Home   Help Search Login Register  

Author Topic: radio use in mp  (Read 1734 times)

0 Members and 1 Guest are viewing this topic.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
radio use in mp
« on: 26 Jun 2003, 05:43:01 »
i have 8 playables who each start in one of 8 cars; everyone is in a seperate group

i want each person to be able to use the radio to instantly spawn his car 5 feet above where he is when he uses the radio.  how do i do it?

Tactician

  • Guest
Re:radio use in mp
« Reply #1 on: 26 Jun 2003, 16:41:48 »
You have to set up 1 radio trigger for each player.  Then, in your init, set the radio commands that don't correspond to the player to "NULL".

Example:  Your men are named driver1, driver2, driver3, etc.  Your cars are named car1, car2, car3, etc.

Radio Alpha
car1 setPos getPos driver1

Radio Bravo
car2 setPos getPos driver2

Radio Bravo
car3 setPos getPos driver3

etc. etc.

Code: [Select]
;; begin init.sqs snippet
?!(player == driver1): 1 setRadioMsg "NULL"
?!(player == driver2): 2 setRadioMsg "NULL"
?!(player == driver3): 3 setRadioMsg "NULL"
?!(player == driver4): 4 setRadioMsg "NULL"
?!(player == driver5): 5 setRadioMsg "NULL"
?!(player == driver6): 6 setRadioMsg "NULL"
?!(player == driver7): 7 setRadioMsg "NULL"
?!(player == driver8): 8 setRadioMsg "NULL"

Now, the driver only sees the radio command to return his car to him.  So driver1 would press 0-0-1, driver2 would press 0-0-2, etc.

It has to be this way because the activation of a radio command is public, and there's no way to determine who triggered the radio.  So unless you want everyone's car to return when 1 person triggers it, you have to separate them :)

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:radio use in mp
« Reply #2 on: 26 Jun 2003, 23:16:13 »
thanks so much for your help, could i do it with an action command instead?

Tactician

  • Guest
Re:radio use in mp
« Reply #3 on: 27 Jun 2003, 02:58:56 »
You could.

(in each driver's init field)
this addAction ["Return Car","returncar.sqs"]

Code: [Select]
;; begin returncar.sqs
_driver = _this select 0
?(_driver == driver1): car1 setPos getPos _driver; exit
?(_driver == driver2): car2 setPos getPos _driver; exit
?(_driver == driver3): car3 setPos getPos _driver; exit
?(_driver == driver4): car4 setPos getPos _driver; exit
?(_driver == driver5): car5 setPos getPos _driver; exit
?(_driver == driver6): car6 setPos getPos _driver; exit
?(_driver == driver7): car7 setPos getPos _driver; exit
?(_driver == driver8): car8 setPos getPos _driver; exit
exit

Might work.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:radio use in mp
« Reply #4 on: 29 Jun 2003, 02:03:09 »
i have a trigger set to repeatable
condition: Radio Juliet
on activation: runs the nitro script

how do i make it disappear?  i can get it to not work, but it still shows up in the radio menu.  0 setradiomsg "" doesn't work...

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:radio use in mp
« Reply #5 on: 29 Jun 2003, 02:55:58 »
1 setradiomsg "NULL"

will make RADIO-ALPHA disappear


2 setradiomsg "NULL"

will make RADIO-BRAVO disappear


Now guess, what will make RADIO-JULIET disappear  ;)


~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:radio use in mp
« Reply #6 on: 30 Jun 2003, 00:05:52 »
doesn't work

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:radio use in mp
« Reply #7 on: 03 Jul 2003, 15:39:22 »
Hmm... you're right - it seems that
Code: [Select]
0 setRadioMsg "null"won't work, i.e. the 0 radio menu option is still there...

Might be that it is special in some way...

EDIT: Aaaah haaa! (Gripping OFP by its neck) "Why you little..."

This, however
Code: [Select]
10 setRadioMsg "null"should do it, pablo!

« Last Edit: 03 Jul 2003, 15:45:39 by Killswitch »