LtAnderton159 1 Posted June 15, 2013 Hello ! In my last mission, i have 3 triggers for the creation of units. In one of them, i writed : group2 = Creategroup EAST; "O_Soldier_TL_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "lieutenant"]; "O_Soldier_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "sergent"]; "O_Soldier_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; "O_Soldier_GL_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; "O_Soldier_AR_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; "O_Soldier_M_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; WP2 setWaypointType "SEEK AND DESTROY"; WP2 = group2 addWaypoint [getMarkerPos "groupe2w", 100]; But, when we played it, we were 7 and the trigger created 7 x 6 units and its true for the two others. How can i solve this problem ? I would like to create only one group by one trigger and not seven or more ! Thanks you for your help ! Share this post Link to post Share on other sites
SteelSampson 1 Posted June 15, 2013 In the On Condition field of the triggers try this: this && isServer; Share this post Link to post Share on other sites
Blitzer134 1 Posted June 15, 2013 (edited) if (!isServer) exitWith {}; group2 = Creategroup EAST; "O_Soldier_TL_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "lieutenant"]; "O_Soldier_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "sergent"]; "O_Soldier_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; "O_Soldier_GL_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; "O_Soldier_AR_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; "O_Soldier_M_F" createUnit [getMarkerPos "spawn2", group2,"", 0.6, "corporal"]; WP2 setWaypointType "SEEK AND DESTROY"; WP2 = group2 addWaypoint [getMarkerPos "groupe2w", 100]; Edited June 15, 2013 by Blitzer134 Share this post Link to post Share on other sites
LoonyWarrior 10 Posted June 15, 2013 (edited) i will watch my behaviour.. :cool: Edited June 15, 2013 by LoonyWarrior Share this post Link to post Share on other sites
LtAnderton159 1 Posted June 15, 2013 In the On Condition field of the triggers try this: this && isServer; Thanks you, that is working :) Can you explain me what is doing exactly "isServer" ? Thank you again. Share this post Link to post Share on other sites
SteelSampson 1 Posted June 16, 2013 Thanks you, that is working :) Can you explain me what is doing exactly "isServer" ? Thank you again. Here's the wiki link, but it basically says: don't run the trigger on each individual client. http://community.bistudio.com/wiki/isServer Share this post Link to post Share on other sites
froggyluv 2136 Posted June 16, 2013 Here's the wiki link, but it basically says: don't run the trigger on each individual client. http://community.bistudio.com/wiki/isServer So basically if you wanted your SP mission to be MP compatible you need to run this in every trigger? Share this post Link to post Share on other sites
LtAnderton159 1 Posted June 16, 2013 Ok i understand, thanks you :p Share this post Link to post Share on other sites
Johnson11B2P 3 Posted June 17, 2013 So basically if you wanted your SP mission to be MP compatible you need to run this in every trigger? Think about it this way. What ever is in the activation field of the trigger will run across all players connected to the mp server and if I'm not mistaken including the server. So in the condition box this(this being the current trigger) && isServer(being that the mission is on a server or host computer) will run the script only once. Share this post Link to post Share on other sites