HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

event help

10-17-2004, 02:49 AM#1
a thing
How do you make a trigger that fires when a player gains gold? The events for this trigger are added in another trigger at int (I did try doing it at 0.01 seconds btw) with
Code:
For each (Integer A) from 1 to 12, do (Actions)
    Loop - Actions
        Trigger - Add to gold part 1 <gen> the event (Player - (Player((Integer A)))'s Current gold becomes Greater than or equal to (Real(((Player((Integer A))) Current gold))))
10-17-2004, 03:50 AM#2
-={tWiStÄr}=-
event
every .02 seconds
conditions
actions
set oldgold = getplayers current gold

event
every .01 seconds
conditions
players current gold greater than oldgold
actions
youre stuff

edit: oh yeah, yours doesnt work because well, will 100 ever be greater than 100?
10-17-2004, 03:56 AM#3
a thing
I remeber having this event work before... somehow... I looked for the map on my comp and didn't find it.
10-17-2004, 04:31 AM#4
-={tWiStÄr}=-
you can have
Trigger - Add to gold part 1 <gen> the event (Player - Player((Integer A)))'s Current gold becomes Greater than or equal to 1000.00)
and have it greater than a number. thats what mine does, it sets the players gold to a var, then checks the next milisecond to see if the player has more gold.
10-20-2004, 01:22 AM#5
a thing
Alright this is really wierd. The trigger goes off for player 1 but not players 11 and 12.

Also, when I enable the function "Player - Set (Triggering player) Current gold to Gold2[(Player number of (Triggering player))]" the trigger works for all players but the rest of the actions don't work for players 11 and 12.
10-21-2004, 11:36 PM#6
a thing
... anyone :(
10-21-2004, 11:42 PM#7
iNfraNe
check variable length
10-22-2004, 12:57 AM#8
a thing
The arrays are the correct sizes.
10-22-2004, 01:18 AM#9
bug
Don't forget that events only use the current value of the variable at the time of it being added.