Jump to content
Sign in to follow this  
mk82

different trigger conditions on mp / sp sessions

Recommended Posts

Hello,

english is not my motherlanguage, so in case that there'll be some misunderstanding, I excuse in advance.

I made a bunch off coop missions, working on them since almost 10 years. I still enjoy adding new features to them and to improve my skills. In the editor everything works fine, but playing them on lan-network there occure some kind of sync-problems involving some kinds of trigger.

This kind of trigger has the function to end the mission if a defined area is finally cleared from russian forces. But russion units aren't inside that area on from the beginning of the mission. They still have to fall into that area before. So I gave the russian forces a waypoint, leading into the area of my trigger, writing "condition_end=true" into waypoints "On Activation"-field.

So the trigger should only start checking the area when the enemy forced have reached the area/their waypoint.

The parameters of the trigger are as following:

Axis a: 200
Axis b: 200
Activation: East, Not Present
Type: End #1
Condition: this && condition_end
On activation: hint localize "STR_THIRD_OBJECTIVE_FINISHED"; "3" objstatus "done"

So far so good! Testing the mission on the editor by myself it works fine. The trigger only checks if the area has been cleared from enemey forces, when they first have reached their waypoint/the area.

On multiplayer-sessions other things happen: russian forces enter the area, the trigger should start to check it. On the hosting machine it works fine, but at the same time on the client machines, the trigger simply gets activated and immediately ends the mission, altough the russian forces are still active in the area.

For sure I know this might have something to do with local and global variables, but I dont know how to fix that kind of problem. I tried it by writing the following into the init.sqs, without success:

? not local Al : exit
publicVariable "condition_end"

It was just a try. Can anybody help me?

Greetings mk82

Edited by mk82
logic error

Share this post


Link to post
Share on other sites

hi,

You need to define your variables first. By convention it is in the init.sqs. No need to use publicVariable here since the init.sqs is executed on every computers.

init.sqs

condition_end=false
east_present=false

exit

I the WP activation field write:

east_present=true; publicVariable "east_present"

Then place a trigger east not present with condition:

this && east_present

Write in activation:

condition_end=true; publicVariable "condition_end"; hint localize "STR_THIRD_OBJECTIVE_FINISHED"; "3" objStatus "DONE"

Place a second trigger 0x0 end #1 with condition

condition_end

I suggest a little delay (5-10sec) to be sure that players will see the objective hint before the mission switch to the debriefing.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Thank you for your quick answer. Great to have such activity here after more than 10 years it's been since the release.

Now I pre-defined all those variables used as condition by triggers who have more than one condition to be achieved for activation.

So far, as I remeber, all triggers depending on only one single condition-variable worked fine on multiplayer.

I'll test it on the next network session.

Share this post


Link to post
Share on other sites

I made an entry for each variable in my init.sqs (east_present=false) and defined them as public-variable on activation (east_present=true; publicVariable "east_present") but nothing has changed. On my buddys pc the trigger is still getting activated altough there are still units in the area. On my pc, I'm hosting the session, it works instead. Trigger just activates and ends the mission when all units in the area are neutralized. :confused:

Share this post


Link to post
Share on other sites

hi,

I'm not 100% sure but I guess your synchro (server/client) problem come from the WP activation field which doesn't work reliably in MP. I never tested WP condition/activation in MP I always use scripts and functions then I may be totally wrong. IMHO, you should find another way to trigger your condition east_present.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Hi,

that might be possible.

I got the impression, that these problems only occur, if triggers got more than just the simple "not present"-condition on acitvation. This single condition worked fine since I can remember. But in connection to other conditions ( && ), the trouble begins.

Let's see... already thinking about other solutions.

Thanks for your effort

//Edit:

After lots of testing we found out, that single conditions as well as a line of them caused the same synchro problem in our example mission. So, refering to your advice, I finally changed the geometric figure of the trigger area. From an elipsis into a simple box. Seems to fit now. Finally there was no desync. We'll keep on testing it.

Edited by mk82

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  

×