Warcraft III resources & community, 2003–2006 · archived

Small trigger bug help...

7 posts
#1

Small trigger bug help...

Im still working on my farmer and hunter-type map and remember how each sheep gives u 2 gold every 60 seconds? well this is what i tried to do the same thing:

Event: every 30 seconds of game
Action:
1. pick every unit in (sheepfarmgroup) and do create 1 sheep at position of picked unit
2. Add last created unit to (sheeps)

then this was the one that gave u the money:

Event: every 60 seconds of the game
Actions: pick every unit in (sheeps) and do player add (number of units in sheeps) to (owner of picked unit's) current gold

i would figure that to add 1 gold right? NO! it adds 12 for some reason maybe i went wrong somewhere?
#2

hi

I never play to farmer/hunter but i think that its gives to u 12 because u have 12 player, and when u picked sheeps, u pick 'all players sheeps'
I never try it but i think its that:
Event:every 60 sec in game
Condition: Picked unit equal to sheeps
Actions pick every units of 'usuario' and do player...
Usuario=Player Variable
try it
#3

Re: Small trigger bug help...

RaD-Im still working on my farmer and hunter-type map and remember how each sheep gives u 2 gold every 60 seconds? well this is what i tried to do the same thing:

Event: every 30 seconds of game
Action:
1. pick every unit in (sheepfarmgroup) and do create 1 sheep at position of picked unit
2. Add last created unit to (sheeps)

then this was the one that gave u the money:

Event: every 60 seconds of the game
Actions: pick every unit in (sheeps) and do player add (number of units in sheeps) to (owner of picked unit's) current gold

i would figure that to add 1 gold right? NO! it adds 12 for some reason maybe i went wrong somewhere?



Why don't you just use this trigger:

Event - Every 60 seconds of the game
Action - Add ((number of sheep owned by player 1)x(2)) gold to (player 1)
Add ((number of sheep owned by player 2)x(2)) gold to (player 2)
Add ((number of sheep owned by player 3)x(2)) gold to (player 3)
Add ((number of sheep owned by player 4)x(2)) gold to (player 4)

And so on....
#4
Or even:

pick every unit in (sheeps) and do player add X to (owner of picked unit's) current gold


That should add X for each sheep to the owning players gold...
#5
TTFTCUTSOr even:

pick every unit in (sheeps) and do player add X to (owner of picked unit's) current gold


That should add X for each sheep to the owning players gold...


thats just what i did
Action: pick every unit in (sheeps) and add (number of units in (sheep)) to owner of picked unit... exactly lol

Edit: ok maybe it wasnt... :/
#6

Re: Small trigger bug help...

RaD-Im still working on my farmer and hunter-type map and remember how each sheep gives u 2 gold every 60 seconds? well this is what i tried to do the same thing:

Event: every 30 seconds of game
Action:
1. pick every unit in (sheepfarmgroup) and do create 1 sheep at position of picked unit
2. Add last created unit to (sheeps)

then this was the one that gave u the money:

Event: every 60 seconds of the game
Actions: pick every unit in (sheeps) and do player add (number of units in sheeps) to (owner of picked unit's) current gold

i would figure that to add 1 gold right? NO! it adds 12 for some reason maybe i went wrong somewhere?



ok i'll go over this logically with you
lets look at your last statement

'pick every unit in (sheeps) and do player add (number of units in sheeps) to (owner of picked units) current gold'

now, lets say you have 8 sheeps, 4 owned by player 1, and 4 owned by player 2

warcraft will 'pick' every sheep (you told it to pick all units in (sheeps) ), which means it just picked 8 sheeps, and for each sheep it picked, it will add (number of units in sheeps) gold to the owner of that sheep

- so theres sheep 1, its owned by player 1, and theres 8 units in (sheeps)
- so war3 adds 8 (number of units in sheeps) gold to player 1
- now sheep 2, its owned by player 1, and there are 8 units in (sheeps)
- so war3 adds 8 (number of units in sheeps) gold to player 1
etc...

so player 1 will get 8 x 4 = 32 gold, and player 2 will get 8 x 4 = 32 gold for having 4 sheeps each

= pick every unit in (sheeps) and do player add (1) to (owner of picked unit's) current gold
[gives the value of each sheep 1 gold and will give it to the owner]
#7
k thanks lol been awhile since i was able to get on this site