Home   Help Search Login Register  

Author Topic: I'm only person that sees effect on MP  (Read 1347 times)

0 Members and 1 Guest are viewing this topic.

Harkonin

  • Guest
I'm only person that sees effect on MP
« on: 09 Feb 2003, 20:58:39 »
   OK i added a duster script to CTI but I am the only one who can see it can anyone tell me how I can get it visible for everyone?

? (_unitType == ChopperType):_newVehicle Exec "Effects\Duster.sqs"

Thats how I am calling the script since the vehicles are created ingame and not the editor

PRiME

  • Guest
Re:I'm only person that sees effect on MP
« Reply #1 on: 13 Feb 2003, 02:09:24 »
Dunno but you could mess with PublicVariables

Maybe  Publicvariable "execunitname"  ?



This public and server thing for OFP has made is VERY VERY complex when coming to editing, shame as BIS could have made it so much easier..

Basicly these forums are dry these days so not many will help out with these COMPLEX issues. Try looking on the flashpoint1985 forums. Perhaps you will get a better responce there?

Tactician

  • Guest
Re:I'm only person that sees effect on MP
« Reply #2 on: 14 Feb 2003, 23:38:03 »
Because the chopper is created locally, executing the script from the vehicle creation script (which seems to be what you're doing) will only affect the person the vehicle is created for (as I'm not familiar with the CTI source I don't know who that is).  Here's my method for fixing it up.

First, you can modify the vehicle creation script to publicVariable a set pair of variables to broadcast (a) that a new chopper has been created and (b) the name of the chopper.  Here's my example for that method.

1. Initialize newChopperMake = false and newChopperName = nil (for the sake of completenes).

2. As the chopper is created, instead of the dust script execution line you posted, use this single line:

Code: [Select]
?(_unitType == ChopperType): newChopperName = _newVehicle; newChopperMake = true; publicVariable "newChopperName"; publicVariable "newChopperMake"
3. Create a trigger activated by nobody repeatedly with condition:

Code: [Select]
newChopperMake AND !isNull newChopperName
And this activation:

Code: [Select]
newChopperMake = false; newChopperName exec "Effects\Duster.sqs"
And it will detect a new chopper being built then act accordingly.  You might want to add a benchmark condition to that trigger to save the trouble of checking later, if your dust script uses a benchmark limitation.  If you edited the CTI dialog, maybe you could even make a toggle button to switch dust on and off in the player options menu.  If you want me to take a look at editing that for you, shoot me a PM, as I'm eager to try more dialog editing.  And I'm wondering what other improvements I can make to CTI alongside whatever you're doing.