I have no idea what is wrong!

S

Shades-X

Guest
Well I have been trying everything to fix this but I can't seem to do it on my own. What I am trying to fix is this trigger I have it turns on 2 other triggers(they are initially off) and than later on I have this other trigger that turns those triggers off again. The problem is it is not turning off the triggers. So I suppose the only way to help is to post my triggers:

Code:
Sheepspawn
        Event-
            Time - Every 2.50 seconds of game time
        Condition-
            None
        Action-
            Unit - Create 1 Sheep for Neutral Hostile at (Center of Sheep1G <gen>) facing 45.00 degrees
            Unit - Order (Last created unit) to Move To (Center of Feedg <gen>)

^that is the trigger that gets turned on and off the 2nd one is exactly the same just different spawn point

Code:
Growth
    Event-
        Unit - A unit comes within 120.00 of Grower 0016 <gen>
    Condition-
        (Unit-type of (Triggering unit)) Equal to Sheep
    Action-
        Set Growthcount = (Growthcount + 10.00)
        Unit - Order (Triggering unit) to Hold Position
        Unit - Make Grower 0016 <gen> face (Triggering unit) over 0.01 seconds
        Unit - Explode (Triggering unit)
        Animation - Change Grower 0016 <gen>'s size to ((50.00 + Growthcount)%, (50.00 + Growthcount)%, (50.00 + Growthcount)%) of its original size
        Trigger - Run Defeat <gen> (checking conditions)
        Trigger - Turn on Sheepspawn <gen>
        Trigger - Turn on Sheepspawn2 <gen>

^There it turns the triggers on

Code:
Defeat
    Event-
       None
    Condition-
       None
    Action-
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        Growthcount Greater than or equal to 200.00
    Then - Actions
        Trigger - Turn off Sheepspawn <gen>
        Trigger - Turn off Sheepspawn2 <gen>
        Unit Group - Pick every unit in (Units in Resetg <gen> matching ((Unit-type of (Matching unit)) Equal to Sheep)) and do (Unit - Kill (Picked unit))
        Animation - Change Grower 0016 <gen>'s size to (50.00%, 50.00%, 50.00%) of its original size
        Special Effect - Create a special effect at (Center of Feedg <gen>) using Units\Undead\Abomination\AbominationExplosion.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in (Units in Resetg <gen> matching ((Unit-type of (Matching unit)) Equal to Fence)) and do (Unit - Remove (Picked unit) from the game)
        Item - Pick every item in Resetg <gen> and do (Item - Remove (Picked item))
        Item - Create Fence at (Center of Itemspawn1 <gen>)
        Item - Create Fence at (Center of Itemspawn2 <gen>)
        Item - Create Fence at (Center of Itemspawn3 <gen>)
        Item - Create Fence at (Center of Itemspawn4 <gen>)
        Set Growthcount = 0.00
        Unit Group - Pick every unit in (Units owned by Neutral Passive of type Fence) and do (Unit - Unhide (Picked unit))
        Unit Group - Pick every unit in (Units in Resetg <gen> matching ((Unit-type of (Matching unit)) Equal to Victim)) and do (Actions)
            Loop - Actions
                Unit - Kill (Picked unit)
                Game - Display to (Player group((Owner of (Picked unit)))) the text: You have failed to ...
                Game - Defeat (Owner of (Picked unit)) with the message: GAME OVER!
    Else - Actions
        Do nothing

^There it is suppose to turn it off however when the trigger runs it does everything except turn those 2 off.

Now I do have another trigger that turns those off successfully here it is:

Code:
Solved
    Event-
       Player - Neutral Hostile's Food used becomes Equal to 10.00
    Condition-
       None
    Action-
       Trigger - Turn off Sheepspawn2 <gen>
       Trigger - Turn off Sheepspawn <gen>
       Unit Group - Pick every unit in (Units in Resetg <gen> matching ((Unit-type of (Matching unit)) Equal to Sheep)) and do (Unit - Remove (Picked unit) from the game)
       Animation - Change Grower 0016 <gen>'s size to (50.00%, 50.00%, 50.00%) of its original size
       Unit - Hide Grower 0016 <gen>
       Special Effect - Create a special effect at (Center of Feedg <gen>) using Abilities\Spells\Items\AIda\AIdaCaster.mdl
       Wait 0.50 seconds
       Special Effect - Destroy (Last created special effect)
       Destructible - Open Icy Gate (Vertical) 0078 <gen>
       Floating Text - Create floating text that reads Congratulations you... at (Center of Feedg <gen>) with Z offset 0.00, using font size 10.00, color (50.00%, 50.00%, 50.00%), and 0.00% transparency
       Wait 10.00 seconds
       Floating Text - Destroy (Last created floating text)

^ this works fine I just don't understand why the other one does not work. If anyone has anything they would like to add feel free it will be greatly appreciated! Also I know about some of the memory leakage I plan to fix that at a later time because I am not sure how to right now!
 
T

thedude

Guest
I'm not sure how fast a trigger runs, but i know it's extremely fast. So what's happening (at least i think) is that it's running Growth, up until the trigger runs defeat. This is turning off your triggers. Then its running the rest of Growth, which is to turn them back on.
 
S

Shades-X

Guest
Sure is amazing how easy a fix can be... Thank you very very much All I had to do was make the action "run defeat" last. Again thank you very much!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top