Hey there.
I'm working on my own strategic board game (check my youtube link in signature). It's turning out to become pretty interesting, but I'm stuck with a few basic systems.
I know how to work leakless and avoid BJ's and all, but there are a few things I'm just not efficient at in vJASS.
One of those things is using timers.
This is what I'm trying to create, but I don't know where to start or how to build it up from the start:
- Whenever my unit uses an ability the effect triggers. (that's simple)
- The effect puts a group of 'attacking units' in a group I created with GroupUtils. And it also puts a group of 'defending units' in an other group.
- Now every unit will get to attack, but the order in which they defend depends on a few factors; Units in attack group with ability 'First Strike' go first. Units in defend group with 'First Strike' go second. Units in attack group without that ability go third, and last will be the defending units without First Strike. Let's say 4 units in attack group have First Strike, then the order in which they are being put will be random.
- So now I should have some kind of a list (i used a unit variable for this called AttackingUnit with if 'i' is 1 that will be the first unit attacking, and with i = 17 that unit being #17 to attack)
- Now this was the calculating and now the timer should come into play (i guess) because every unit attacking will be paused and play its attack animation (while I also calculate damage etc via an other trigger I already have). It's just that I want every unit to attack in order and not at the same time, so there should be some kind of a 'wait' after every attacking unit to let the 2nd unit start attacking whenever the 1st one is done.
Especially this last part seems to be tricky for me, and I don't really know how I should build something up like this.
Also in general I might be needing help more often with realising this map of mine. I've got a good amount of stuff ready. There are just some things lacking at the moment where I might need help with.
I'm working on my own strategic board game (check my youtube link in signature). It's turning out to become pretty interesting, but I'm stuck with a few basic systems.
I know how to work leakless and avoid BJ's and all, but there are a few things I'm just not efficient at in vJASS.
One of those things is using timers.
This is what I'm trying to create, but I don't know where to start or how to build it up from the start:
- Whenever my unit uses an ability the effect triggers. (that's simple)
- The effect puts a group of 'attacking units' in a group I created with GroupUtils. And it also puts a group of 'defending units' in an other group.
- Now every unit will get to attack, but the order in which they defend depends on a few factors; Units in attack group with ability 'First Strike' go first. Units in defend group with 'First Strike' go second. Units in attack group without that ability go third, and last will be the defending units without First Strike. Let's say 4 units in attack group have First Strike, then the order in which they are being put will be random.
- So now I should have some kind of a list (i used a unit variable for this called AttackingUnit with if 'i' is 1 that will be the first unit attacking, and with i = 17 that unit being #17 to attack)
- Now this was the calculating and now the timer should come into play (i guess) because every unit attacking will be paused and play its attack animation (while I also calculate damage etc via an other trigger I already have). It's just that I want every unit to attack in order and not at the same time, so there should be some kind of a 'wait' after every attacking unit to let the 2nd unit start attacking whenever the 1st one is done.
Especially this last part seems to be tricky for me, and I don't really know how I should build something up like this.
Also in general I might be needing help more often with realising this map of mine. I've got a good amount of stuff ready. There are just some things lacking at the moment where I might need help with.