Home   Help Search Login Register  

Author Topic: Global Radio  (Read 401 times)

0 Members and 1 Guest are viewing this topic.

Treadstone

  • Guest
Global Radio
« on: 02 Jun 2004, 11:22:33 »
Scripting Guru's,

I would like to know, if it's possible, how to create a BAS_Satcom that is capable of monitoring all global radio messages. The premise here is to have a Satcom pack that when in the inventory of the player, allows the player to hear/see all global radio messages for East/West/Resist forces. It would not broadcast, only receive global traffic, but work as a normal radio in all other respects. I would like to make it have a variable range available (in script, not as action), so that it could be tailored to specific missions, as the player would not need to get message traffic from the other side of the island unless necessary. I have looked all over for some type of tutorial on radios, but the only one I could find was not helpful. I am relatively new to mission editing/scripting so please spell it out like you're explaining it to a 3 year old, if you have the patience.

As well, I think it would be interesting to create a radio monitoring script attached to a vehicle (any type), which would then vector in the vehicle with a squad (3-4 guys) to the last known location of a radio broadcast.

Any help greatly appreciated,

Treadstone

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:Global Radio
« Reply #1 on: 06 Jun 2004, 20:28:51 »
Well, I think you can't make this to be compatibile in all cases. But it could be done nicely in a single/multiplayer mission or campaign.

If you want to make a unit to say something via GlobalChat command, you just write

this GlobalChat "Blah blah blah"

or similar cases such as GlobalRadio, chat through stringatble etc. I think that's clear for you  ;)

But if you want to operate with the chatting units or texts, you'll have to use a special line for each chat, which will run a special function. Example:

[MySoldier,(localize "STR_GlobalChat1")] exec "GlobalChat.sqs"

You can pass the arguments (the chatting unit and text of the message) into script, where you can play with it as you want. Example code of the script "GlobalChat.sqs":

_man = (_this select 0)
_text = (_this select 1)

ChatterPos = (GetPos _man)
MessageText = (_this select 0)

_man GlobalChat _text

exit

This simple script makes the unit radio the chosen text and sets it's position and text of the message to variables. This is the way how to solve this problem. Try to play with it a little bit and you'll see it's not so hard. Anyway, you can always write here  :-*
« Last Edit: 06 Jun 2004, 20:29:31 by Jezuro »
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"