Triggers only work once

Devrak

New Member
Reaction score
17
These triggers only work once, the waves after the first one just stays where they are created, can anyone see the problem?

Trigger:
  • Create Waves
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • -------- Team Left --------
      • Set XInteger[2] = (XInteger[2] + 1)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set XInteger[1] = (Random integer number between XInteger[4] and XInteger[5])
          • Unit - Create 1 CreepWave[XInteger[1]] for Player 6 (Orange) at (Center of LEFT BASE <gen>) facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to XInteger[2]
          • Unit Group - Add (Last created unit) to WaveGroup[XInteger[2]]


Trigger:
  • Move 1
    • Events
      • Unit - A unit enters LEFT BASE <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
    • Actions
      • Set XPoint[1] = (Center of Split 1 <gen>)
      • Unit Group - Order WaveGroup[(Custom value of (Entering unit))] to Attack-Move To XPoint[1]
      • Custom script: call RemoveLocation(udg_XPoint[1])
 

Yoshii

New Member
Reaction score
74
why are you using for each integer A and not refering to it ever ?
and whats the value in Xinteger[4] and [5]
 

Moridin

Snow Leopard
Reaction score
144
I find your variables a little bit confusing, but no doubt you have your reasons for that.

Try replacing [(Custom value of (Entering unit))] with XInteger[2].
XInteger[2] doesn't change anywhere in the loop....so all the units created within a single loop should be added to the same wave group. I can't see any flaws in the trigger....but that might be because I'm sleepy.

Try debugging the triggers by putting game messages inbetween the loops. Make the messages state what XInteger[2] is, which group the newly created units are created to and the custom value of the units set by the loop.

Edit: @ Yoshi. I think he's using the for loop to create 5 random creeps from a creep table he has. He has the variable CreepWave[] array...no doubt it has a multitude of different creeps to spawn.
 

Devrak

New Member
Reaction score
17
why are you using for each integer A and not refering to it ever ?
and whats the value in Xinteger[4] and [5]

>why are you using for each integer A and not refering to it ever ?

Not sure what you mean, I have a loop to make 5 units? :S

The XInteger[4] and [5] is two different numbers, and the random number between them decides which unit types that can spawn. I don't think that's the problem however, since the random spawns work quite nicely. It's just that the second wave or those after wont move. >_>
 

Yoshii

New Member
Reaction score
74
ya I just saw what you were using the interger loop for.
ya the custom value should be replaced with Xinteger[2], will edit this post as i check more
 

Devrak

New Member
Reaction score
17
I find your variables a little bit confusing, but no doubt you have your reasons for that.

Try replacing [(Custom value of (Entering unit))] with XInteger[2].
XInteger[2] doesn't change anywhere in the loop....so all the units created within a single loop should be added to the same wave group. I can't see any flaws in the trigger....but that might be because I'm sleepy.

Try debugging the triggers by putting game messages inbetween the loops. Make the messages state what XInteger[2] is, which group the newly created units are created to and the custom value of the units set by the loop.

Edit: @ Yoshi. I think he's using the for loop to create 5 random creeps from a creep table he has. He has the variable CreepWave[] array...no doubt it has a multitude of different creeps to spawn.

Posted my reply to Yoshii before I saw yours.

Yeah, I have tried debugging with wiriting messages of the value of XInteger[2] and the custom value of the entering unit, and everything seems to work fine.

>Try replacing [(Custom value of (Entering unit))] with XInteger[2].
XInteger[2] doesn't change anywhere in the loop....so all the units created within a single loop should be added to the same wave group.

I don't understand why I should change XInteger[2], do you mean in the second trigger? That would bug it up, since I have several "move" triggers and it would only order one group. Atleast from what I can tell. :nuts:
 

Yoshii

New Member
Reaction score
74
Im pretty sure he means the same thing as I; aka the 2nd trigger.
edit: I could fix it easily but I dont want to destroy the whole thing and create from scratch as it doesnt help anybody so we'll work with your mindset
 

Devrak

New Member
Reaction score
17
Now I'm confused, do you guys mean like this?

Trigger:
  • Move 1
    • Events
      • Unit - A unit enters LEFT BASE <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
    • Actions
      • Set XPoint[1] = (Center of Split 1 <gen>)
      • Unit Group - Order WaveGroup[XInteger[2]] to Attack-Move To XPoint[1]
      • Custom script: call RemoveLocation(udg_XPoint[1])
      • Game - Display to (All players) the text: (String((Custom value of (Entering unit))))


This doesn't work though, since it bugs up the whole thing. :S
 

Moridin

Snow Leopard
Reaction score
144
You have other move triggers? Are the custom values of the entering units ever coinciding / clashing? It might only order one group of units then...

If the left and right side ever coincide....it might be that units from both sides are ordered to attack move to either the left or the right side. That means that whichever unit group was already there wouldn't do anything...
 

Devrak

New Member
Reaction score
17
You have other move triggers? Are the custom values of the entering units ever coinciding / clashing? It might only order one group of units then...

Yup, I have other move triggers, but they are all identical to the "Move 1" trigger, it orders the custom value of the entering units group to move to the next region.
 

Yoshii

New Member
Reaction score
74
also after the unit are created for orange (center of bla bla) why is there a need for a 2nd trigger to move them, why not just order them right away or is there something im missed from your map gameplay because I created a map and did what your trying and it worked fine so i need more detail
 

Devrak

New Member
Reaction score
17
also after the unit are created for orange (center of bla bla) why is there a need for a 2nd trigger to move them, why not just order them right away or is there something im missed from your map gameplay

Good point. ^^,

It still doesn't work though, that's very odd. The trigger looks like this now.

Trigger:
  • Create Waves
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • -------- Team Left --------
      • Set XInteger[2] = (XInteger[2] + 1)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set XInteger[1] = (Random integer number between XInteger[4] and XInteger[5])
          • Unit - Create 1 CreepWave[XInteger[1]] for Player 6 (Orange) at (Center of LEFT BASE <gen>) facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to XInteger[2]
          • Unit Group - Add (Last created unit) to WaveGroup[XInteger[2]]
      • Set XPoint[1] = (Center of Split 1 <gen>)
      • Unit Group - Order WaveGroup[XInteger[2]] to Attack-Move To XPoint[1]
      • Custom script: call RemoveLocation(udg_XPoint[1])


Quick edit: deleted the move 1 trigger also.
 

Moridin

Snow Leopard
Reaction score
144
Crap it's late where I am. Gotta get to bed...

Edit: The trigger should work fine. I can't see any problems with it as of now. I suggest looking at other triggers that might cause the error. Also look through the variable arrays you've used. Make sure they do what they're supposed to do.

Edit 2: IF it creates the units fine...then it should almost definitely order them as well. Maybe there are conflicting orders given by other triggers?
 

Yoshii

New Member
Reaction score
74
I make a test trigger and here what It does currently
every 5 second of game time
it spawn 5 creep of type between 1 and 2 ie it can be 5 of type 1 0 type 2 or 4 type 1 1 type 2 etc
it order all of them to move to another region

is there anything more you need?
i assume you need to it to chose between say lvl 2 and 3 the next time the trigger run or something?
 

Devrak

New Member
Reaction score
17
Crap it's late where I am. Gotta get to bed...

Anyway, will leave you with a few things until tomorrow:
1) Yoshii's question ^
2) When you spawn different groups of units and assign them custom values. Do you ever assign them the same custom value?
3) Where do you move newly spawned units? To the enemy base or to the enemy spawn zones?
4) Try creating a few game messages. Make one tell you which wavegroup was created (this'll be in the first trigger). Another one in the second trigger telling you which wavegroup was ordered to attackmove. Are they coinciding?

Ok, good night then!

1) It's all very odd, because I just created this map and I only have these triggers and the map initialization trigger.

2) I don't think I am, I can't see where that would happen.

3) I move them to the next area.

4) Already did, can't see any problems. :|

What the heck, I'll just post the map so you guys can see for yourself. It's not like it's a secret map with anything special inside it.

And @Yoshii, can you load up your map? ^^,

(How do you like the terrain so far? :p)
 

Attachments

  • Stupid triggers never work the first time.w3x
    122.8 KB · Views: 113

Yoshii

New Member
Reaction score
74
here it is;

note: it does leak i didnt bother fixing that.
im looking at your map now
 

Devrak

New Member
Reaction score
17
Well, in your map you only order then one and one, but that way they tend to step on eachothers feet, so that's why I bother with the groups at all.
 

Yoshii

New Member
Reaction score
74
Well, in your map you only order then one and one, but that way they tend to step on eachothers feet, so that's why I bother with the groups at all.
with the group i would of just add them to a group and move order the group instead, easily fixable
 

Yoshii

New Member
Reaction score
74
im almost done, i made them move so far but they come back after like 10-15sec with the other who were ordered earlier
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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