OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Wildebeest on 28 Nov 2003, 15:12:47
-
Hi!
My problem is this:
I have a squad with a radio guy in it (he carries the "sebprc25" radio).
I want the radio selection screen only to be avaiable to the person carrying the radio. So if the radio guy dies someone else can pick it up and use it.
Can this be done?
Plz, help. Thx :)
-
That could be done by a simple switch trigger:
size: 0/0
activation: none/repeatedly
condition: player hasWeapon "sebprc25"
onActivation: # setradiomsg "blabla"
onDeactivation: # setradiomsg "null"
off course you would need to hide the radio message
by default for everyone in your init.sqs, as the deactivation
would not do it's job as long as the condition of the trigger
hasn't been met to activate the trigger before.
:note - remember that the action/script/command, activated
by the radio call, would still run on every machine even if
it's not available/visible to somebody. That's because
radio-calls are set off global. For local use i would suggest
custom actions ;)
~S~ CD
-
Yeeehaaaa, I did it. Now it works in multiplayer... one man in the squad starts with the radio and he can call in artillery. He can drop the radio (or die) and another man kan take it and use it. Before I experienced problems in multiplayer when the guy with the radio used it. From start only the radio guy could see the radio commands as accessed by 0-0, but when he performed an action the radio suddenly became available to everyone and couldn't be removed. I solved this by making one set of radio triggers for each individual. At first this didn't work since OPF wouldn't seperate each guy's alpha, bravo, delta etc. triggers. However, I added the hasweapon command to the condition field in each and voilá. I test the mission by starting OFP twice and join myself lol.
Credit to you Chris Death and to
Reaper
http://home.cablelynx.com/~jchaney/ofp/)
v8dodge@yahoo.com
for his excellent Artillery Script, which I had to modify a little - hope it's OK. Thx ;D