Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Come and join our gamer community by
registering for free here
Other Gaming Forum
PC games
WarCraft III Modding
Boolean trouble
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Zergleb" data-source="post: 119585" data-attributes="member: 5919"><p>Oh come on evaluate what is going on, what happens is you have 2 triggers that will both stack in the queue at the same time so here is what happens.</p><p></p><p>the first trigger will check conditions and order accordingly. so now you have a unit going in that direction. Then after you set the boolean variable to true/false so that the other trigger will be set up to work.</p><p></p><p>but now you forgot that right after that trigger, the second trigger is going to execute, but you just barely set this trigger up so that it will work! so that means that even though you ordered the unit to move one way, this trigger is just going to change those orders so he will move the other way! So what happens is it will always move in the direction of the second trigger in your script.</p><p></p><p>re-do your trigger this way(rough guess of what it will look like)</p><p></p><p>Event:</p><p> Unit - A unit enters Turn2 <gen></p><p>Conditions:</p><p> None</p><p>Actions</p><p> if VariableCheck[1] == true then</p><p> Unit - Order (Entering unit) to Move To (Center of Turn3A <gen>)</p><p> Set VariableCheck[1] = False</p><p> else</p><p> Unit - Order (Entering unit) to Move To (Center of Turn3B <gen>)</p><p> Set VariableCheck[1] = True</p><p> endif</p><p></p><p>That is not the exact way I would do it but that is a working conversion of your trigger(I hope its a working one)But this way you don't have 2 triggers messing each other up.</p></blockquote><p></p>
[QUOTE="Zergleb, post: 119585, member: 5919"] Oh come on evaluate what is going on, what happens is you have 2 triggers that will both stack in the queue at the same time so here is what happens. the first trigger will check conditions and order accordingly. so now you have a unit going in that direction. Then after you set the boolean variable to true/false so that the other trigger will be set up to work. but now you forgot that right after that trigger, the second trigger is going to execute, but you just barely set this trigger up so that it will work! so that means that even though you ordered the unit to move one way, this trigger is just going to change those orders so he will move the other way! So what happens is it will always move in the direction of the second trigger in your script. re-do your trigger this way(rough guess of what it will look like) Event: Unit - A unit enters Turn2 <gen> Conditions: None Actions if VariableCheck[1] == true then Unit - Order (Entering unit) to Move To (Center of Turn3A <gen>) Set VariableCheck[1] = False else Unit - Order (Entering unit) to Move To (Center of Turn3B <gen>) Set VariableCheck[1] = True endif That is not the exact way I would do it but that is a working conversion of your trigger(I hope its a working one)But this way you don't have 2 triggers messing each other up. [/QUOTE]
Verification
Post reply
Other Gaming Forum
PC games
WarCraft III Modding
Boolean trouble
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top