Home   Help Search Login Register  

Author Topic: How to enable radio options by script?  (Read 507 times)

0 Members and 1 Guest are viewing this topic.

kevind2003

  • Guest
How to enable radio options by script?
« on: 02 Jan 2004, 13:39:03 »
Hi,

I tried setradiomsg but it dones't work, I want to add radio options for a vehicle, but how to do it by script? Please help, thanks

gundernak

  • Guest
Re:How to enable radio options by script?
« Reply #1 on: 02 Jan 2004, 17:40:12 »
Radio messages appearing on your radio during map view in OFP are associated the triggers which you set their activation to 'radio alpha', 'radio bravo', and so on...

The name of the radio option will be the text you entered the trigger 'text' field.

And the effect of pushing the radio option will be that command you typed to the propriate trigger 'on activation' field.

By 'setRadioMsg' command you can only hide or show the certain radio command depending on the number you typed before the command:

3 setRadioMsg "NULL"    ----   it means 'radio charlie' will not shown as an option on the radio

kevind2003

  • Guest
Re:How to enable radio options by script?
« Reply #2 on: 02 Jan 2004, 18:26:30 »
but I'm looking for a way to add Radio without triggers... because I want to add it to the vehicle, not the mission...  :-\

gundernak

  • Guest
Re:How to enable radio options by script?
« Reply #3 on: 02 Jan 2004, 18:31:47 »
Could you be a little more specific?

You want to command to a vehicle...
or
you want to be able to use the radio if a unit is in a vehicle
or
...

kevind2003

  • Guest
Re:How to enable radio options by script?
« Reply #4 on: 02 Jan 2004, 18:38:50 »
Yes... I want to be able to use the radio if a unit is in a vehicle, without adding a triggers, please help...

gundernak

  • Guest
Re:How to enable radio options by script?
« Reply #5 on: 02 Jan 2004, 19:07:13 »
I am very sorry, I can not help until you write the situation you want to.

because

I can imagine a lot of possibility to do, depending what you want to achieve...

p.s.

without triggers you simply can NOT use radio commands, if we are talking about radio alpha, radio bravo, etc which is shown on the radio when you switch to map view during the mission

notmucheyecandy

  • Guest
Re:How to enable radio options by script?
« Reply #6 on: 02 Jan 2004, 20:20:15 »
its pretty much impossible to use or add radio commands without the use of triggers, i would advise that you simply use a trigger with a radio activation (alpha, bravo. etc) as it is much more simple than with scripts

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:How to enable radio options by script?
« Reply #7 on: 03 Jan 2004, 00:35:51 »
I'm not sure if I'm clear on what you want to happen here, but here's a possible solution...

You could accomplish what I think you're after with a couple of triggers....

Radio Trigger

Size: as required
Condition: Radio Alpha
Text: null   <-- Note: TEXT field, not name field
Condition field: this
OnActivation field: as required


Radio on/off Trigger

Size: 0,0
Condition: none (repeatedly)
Condition field: unit in vehicle
OnActivation Field: 1 setradiomsg "Radio call's name"
OnDeactivation Field: 1 setradiomsg "null"


So the first trigger is your radio message. Make it how you like it, just make sure the Text field has null in it... this way the radio call won't show up.

The second trigger detects when unit (I'm guessing you'll want to put the player in there) is in vehicle (again, put the name of your vehicle in). When this happens, it sets the radio message to the text in the quotes.
If unit gets out, it sets the radio message to nothing again (so the player can't use it).


Anyway, as I said I'm not sure if I've read the situation you want correctly here. It's quite easy to adjust it for any vehicle rather than a specific one, but if you give us a bit more info we'll tailor something a bit more specific to your needs ;)