Home   Help Search Login Register  

Author Topic: Radio for assistance from a vehicle  (Read 2015 times)

0 Members and 1 Guest are viewing this topic.

polvy

  • Guest
Radio for assistance from a vehicle
« on: 27 Jan 2005, 16:23:55 »
I have a mission in mind where a small patrol is ambushed in CAT Afghanistan. I would like them to be able to radio for a medivac chopper or airstrike but would prefer the script for said actions to be tied to their vehicle. That way anyone in the squad can use it and if the vehicle is destroyed then so is the ability to radio for assistance. Does anyone know of such a script?

Thank you,
Polvy

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Radio for assistance from a vehicle
« Reply #1 on: 27 Jan 2005, 16:44:06 »
I would do it like this:

Create a switch trigger that fires when the bolean condition radioTransmission (or whatever) is set to true. Use the trigger to start the Medvac chopper in the usual way (synchronize). Now you want to create a way for any player who gets close to the car to use the radio.

In the init.sqs of your mission you add the line:

publicVariable "radioTransmission" ; radioTransmission=false

This ensures that every machine, not just the server, in the game will be told whenever the variable radioTransmission toggles between true or false. Then, in the init line of the patrol car your write:

this addAction ["Use Radio", "radio.sqs"]

This gives any unit who gets within 3-5 meters of the car an action named "Use Radio".  Then make a small script called radio.sqs that looks like this:

radioTransmission=true

exit

Now you have set the variable radioTransmission to true on all computers in the game, enabling anybody in the group to use the "radio" by aproaching the car.

Off course this will be a radio transmission without sound or texts. But they can be added without to much effort if you have sound files to go with your mission.

OFPEC | Intel Depot
RETARDED Ooops... Retired!

polvy

  • Guest
Re:Radio for assistance from a vehicle
« Reply #2 on: 27 Jan 2005, 21:11:04 »
Thank you kindly for the response. I will try that out and let you know. I was however hoping to be able to tie the scripts into the vehicle in such a way that the players could move it around but if that is not possible then your suggestion will be a good "second best" option.


Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Radio for assistance from a vehicle
« Reply #3 on: 27 Jan 2005, 22:42:10 »
I was however hoping to be able to tie the scripts into the vehicle in such a way that the players could move it around but if that is not possible then your suggestion will be a good "second best" option.

My suggestion let's you move it around. That's why the addAction command is supposed to go in the init line of the patrol car  ;)
OFPEC | Intel Depot
RETARDED Ooops... Retired!

polvy

  • Guest
Re:Radio for assistance from a vehicle
« Reply #4 on: 28 Jan 2005, 05:15:44 »
My appologies. I did not read it closely enough the first time. I will report back with my findings as soon as I can. Thank you once again.  :)

polvy

  • Guest
Re:Radio for assistance from a vehicle
« Reply #5 on: 28 Jan 2005, 18:20:49 »
OK, I set everything up the way you instructed. Double and Quadruple checked everything and the "Use Radio" option appears. I have SnYpers "Land Chopper" script setup with several orbit waypoints and the SWITCH trigger synched to the CYCLE WP. The only problem I am encountering is that the SWITCH trigger is not firing when I select the "Use Radio" option. (i.e. the chopper never comes in.) I have some text assigned to the SWITCH trigger to let me know if it's firing and I get no text. Please Advise?


polvy

  • Guest
Re:Radio for assistance from a vehicle
« Reply #6 on: 30 Jan 2005, 11:50:37 »
*bump* :-\

polvy

  • Guest
Re:Radio for assistance from a vehicle
« Reply #7 on: 31 Jan 2005, 22:01:44 »
Can anyone provide some assitance with this issue? My mission is complete except for this trigger not firing. I've worked really hard on this one and it's a fun mission. Please Help.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Radio for assistance from a vehicle
« Reply #8 on: 14 Feb 2005, 10:31:02 »
A crude but working method:

Place an empty object (sandbag or whatever) anywhere on the map, preferebky out of  view from the mission area. Name it controlUnit.

In the script that is suppose to fire the trigger you write:

controlUnit setDamage 1

Then make the switch trigger fire if:

!(alive controlUnit)

Killing objects from a script always works (because death is recorded on all machines) and you don't have to worry about the local/public variable problem.
OFPEC | Intel Depot
RETARDED Ooops... Retired!