Home   Help Search Login Register  

Author Topic: Running "Radio Alpha" at a single machine in MP  (Read 1420 times)

0 Members and 1 Guest are viewing this topic.

Offline Gadjuka

  • Members
  • *
  • Programmer
    • Operation Flashpoint: Commander
Running "Radio Alpha" at a single machine in MP
« on: 24 Sep 2002, 14:40:18 »
I've succeeded to make different versions of my script to run depending on whether the player are west or east (west joins west and east joins east). But it happens everywhere at the same time.
It should work like this:
If someone from side west presses 0-0-1, the closest west unit shall join he who touched off the trigger. If someone from side east touches off the trigger the closest east unit shall join him.
Right now it works like this:
When a west-unit calls radio alpha, the closes west-unit join him AND for every other playable unit the same happens (the closest unit on the same side joins).
Currently working on Operation Flashpoint: Commander.
Website: http://www.nordserver.se/commander/

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Running "Radio Alpha" at a single machine in MP
« Reply #1 on: 24 Sep 2002, 14:48:56 »
As far as I am aware, radio calls are broadcast as public variables.

What this means is that if one player uses radio Alpha, it goes off on everyone's computer (just like a variable declared using the "publicvariable" command).

Unfortunately this makes radio calls in MP much less useful than one would like :-/

Offline Gadjuka

  • Members
  • *
  • Programmer
    • Operation Flashpoint: Commander
Re:Running "Radio Alpha" at a single machine in MP
« Reply #2 on: 24 Sep 2002, 14:56:29 »
Is there some other way to do it then? With user added actions (addaction) or something else, maybe these new, fancy userdialogs?
Currently working on Operation Flashpoint: Commander.
Website: http://www.nordserver.se/commander/

sussmori

  • Guest
Re:Running "Radio Alpha" at a single machine in MP
« Reply #3 on: 27 Sep 2002, 05:16:06 »
You can do it by using only 1-4 for west and 5-8 for east. Or via action menu. Unless you are an expert scripter, don't even bother looking at dialogs

CareyBear

  • Guest
Getting reinforcements using addaction instead.
« Reply #4 on: 02 Oct 2002, 09:51:11 »
You can use addAction to do it. Here's the how:

Set up an object to run the script. Either a static radio tent (more realistic, & only need one) or game logic objects (one per player who can call for reinforcements - can call from anywhere.) If you use GL make sure each of them also runs a small script that updates their position to their players' every few seconds.

now add a 'request reinforcements' action to the GLs or the tent. Someone near them can trigger it now (like 'get in Jeep as Driver' - it's the jeep's action, not the player's). Have the action call your reinforcement script. Perhaps also do a check that the tent is 'alive' - if you're sadistic.

addaction called scripts pass four parameters when they get set off. They include the unit triggering the action. You should be able to find an article detailing what the parameters are somewhere on this site.

So, the script is called with one parameter as the unit that wants reinforcements. From there it's simple, either dispatch them to the radio tent or HALO them in to the player, or whatever you like, really.

Cheers
« Last Edit: 02 Oct 2002, 09:52:49 by CareyBear »

Offline Gadjuka

  • Members
  • *
  • Programmer
    • Operation Flashpoint: Commander
Re:Running "Radio Alpha" at a single machine in MP
« Reply #5 on: 02 Oct 2002, 13:52:59 »
That's great!
I really need a command that have "who-called-it" as a parameter.
Currently working on Operation Flashpoint: Commander.
Website: http://www.nordserver.se/commander/

Offline uiox

  • Contributing Member
  • **
Re:Running "Radio Alpha" at a single machine in MP
« Reply #6 on: 03 Oct 2002, 12:46:10 »
No way with radio but with action, as they say all.

I have done an "Action Command Engine" it works in MP. You can dowload it here :
http://www.ofpec.com/yabbse/index.php?board=7;action=display;threadid=2095

Grosso modo you do this :
Detect players in the init script, install the action detection script (cause you need to detect if players are in or out vehicle)
After it's "simple" cause actions are give to the right player.

If you want a pure script you can test who call the action (cause if you are near an object with action you can call it ) with param return with action key (_This select 1 contain the caller object)

I forget something BenReeper in is mod Battle War use a mirror radio button of the action keys, so I think it's possible with radio script whith a player detection for example...

PS ACE is for multi-squad MP, I have done very light versions of it, you can ask them in the CoC forum...