Jump to content
Sign in to follow this  
nichevo

empty parachutes from non-existant units?

Recommended Posts

Tried to search for this, but all I could find were topics about putting units into empty parachutes which is not what I want to do.

The problem is thus:

I have a mission where an AI squad para-drops from a chopper. The number of units in that squad is partially determined by random probablity of existing (i.e. the slider in the editor), and partially determined by "condition of presense" field based on Param2 (which I use as something of a difficulty setting).

Testing in the editor, everything works fine. Testing in a multiplayer server by myself, everything works fine. Testing multiplayer with multiple players, suddenly there are a host of empty parachutes coming down with the real AI paratroopers.

I'm looking for some insight because, as I'm sure you can appreciate, I need other players to help me test and I don't want to exhaust my loyal testers by forcing them to join my server again and again as I tweak the script and then observe the results.

I have one theory that the empty parachutes are being caused by other clients running the script, ordering units to eject multiple times and spawning these fake parachutes. But the maths doesn't hold up. If I have three players (for example) for each real paratrooper you would expect two additional empty parachutes. That isn't the case.

My other theory is than an empty parachute appears any time you eject a non-existant unit from an aircraft. As a I mentioned above, the AI squad in the chopper has a variable number of members. I've tried to avoid problems in my script by skipping over any unit that isn't "alive" but to no avail.

Does anyone have any ideas?

Share this post


Link to post
Share on other sites

I have this issue as well, even occured in the original arma, never got an answer for it.. Even if its not random variables, AI parachutes spam out like non other.

Share this post


Link to post
Share on other sites

very likely that the empty chutes are being spawned by client machines activating a triggers from the editor.

Use the isServer command to ensure only the server executes the code - ie you can't stop clients activating the trigger, but you CAN stop clients running the OnActivation code eg:

if (isServer) then {null = execvm "MySweetAssScript.sqf"};

Share this post


Link to post
Share on other sites
very likely that the empty chutes are being spawned by client machines activating a triggers from the editor.

Use the isServer command to ensure only the server executes the code - ie you can't stop clients activating the trigger, but you CAN stop clients running the OnActivation code eg:

if (isServer) then {null = execvm "MySweetAssScript.sqf"};

Question with this... if I am running it on an actual trigger via the in game editor how would I do that?

would the condition be

this AND isServer

with the activation being

{null = execvm "MySweetAssScript.sqf"}

or do I just put it all in the activation as you wrote it?

Share this post


Link to post
Share on other sites
very likely that the empty chutes are being spawned by client machines activating a triggers from the editor.

Use the isServer command to ensure only the server executes the code - ie you can't stop clients activating the trigger, but you CAN stop clients running the OnActivation code eg:

if (isServer) then {null = execvm "MySweetAssScript.sqf"};

Thanks. I had a suspicion multiplayer locality was the culprit. I'll try this. :)

---------- Post added at 09:44 AM ---------- Previous post was at 09:37 AM ----------

Question with this... if I am running it on an actual trigger via the in game editor how would I do that?

I know this doesn't answer your actual question (which I can't answer with certainty). But if you are using a trigger to call a script anyway, you can always put something like this as your first line of the script:

if(not isServer) {exit;}

Share this post


Link to post
Share on other sites

to be double sure, put the isserver check in the onactivation field and as the first line in your script

Share this post


Link to post
Share on other sites
to be double sure, put the isserver check in the onactivation field and as the first line in your script

All I have is a single soldier ejecting from an aircraft and a bunch of parachutes spam out. I really dont want to write a script for a single man to parachute. Is there a way for me to use isserver ina trigger? Or better yet could some one show me a sample script of how to write one with that?

Basically me and 4 soldiers on the ground waiting for an informat to jump down to us from a C-130 flying by.. some times those spamming chutes kill him...

Share this post


Link to post
Share on other sites

I've fixed the problem. As suggested by TurokGMT I used the isServer command. I simply slapped it onto the end of my existing trigger's "condition" code like so:

getpos startejecting select 1 < getpos enemychopper select 1 AND isServer

Worked a charm. Tested in multiplayer several times (with 1, 2 and 3 players) and there were no empty parachutes.

Thanks for the assistance. :)

Share this post


Link to post
Share on other sites

I have just started getting this using the HALO script and it's even happening in the editor.

I have tried using the server only syntax but that only stops the script from executing locally AKA the AI don't open their chutes.

Anyone got any suggestions?

Eth

Edited by BangTail

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×