HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Simple Trigger Problem

06-10-2003, 05:20 PM#1
Milkman
This trigger Creates a hero chooser, although sometimes u dont't get one and sometimes u get 3 at a time

can't think of a better way to do it though:
EVENTS
Unit a unit owned by player 11 dies
CONDITIONS
GameOver Equal to false
HeroKills player number of(owner of killing unit)greater than or egual to 50
ACTIONS
Create one HeroChooser at X
wait 1 sec
Set hero kills (owner of killing unit) herokills -50

whats wrong, its all very simple but sometimes it just wont work!
06-10-2003, 05:28 PM#2
MicrosoftXP
Quote:
Originally posted by Milkman
This trigger Creates a hero chooser, although sometimes u dont't get one and sometimes u get 3 at a time

can't think of a better way to do it though:
EVENTS
Unit a unit owned by player 11 dies
CONDITIONS
GameOver Equal to false
HeroKills player number of(owner of killing unit)greater than or egual to 50
ACTIONS
Create one HeroChooser at X
wait 1 sec
Set hero kills (owner of killing unit) herokills -50

whats wrong, its all very simple but sometimes it just wont work!


EVENTS
Unit a unit owned by player 11 dies
CONDITIONS
GameOver Equal to false
HeroKills player number of(owner of killing unit)greater than or egual to 50
ACTIONS
Turn off (this trigger) // add
Create one HeroChooser at X
// wait 1 sec
Set hero kills (owner of killing unit) herokills -50
Turn on (this trigger) // add


Set hero kills (owner of killing unit) herokills -50
is supposed to be:
Set hero kills[ (Player Number of (owner of killing unit))] = herokills[ (Player Number of (owner of killing unit))] -50
right?
06-10-2003, 05:45 PM#3
Milkman
DOH!! I never REALLY understood what turn off / turn on was good for but i usually mange to put them right...

And yes ut is supposed to be Set hero kills[ (Player Number of (owner of killing unit))] = herokills[ (Player Number of (owner of killing unit))] -50
I'm just 2 lame to write out the whole syntax...
06-10-2003, 07:07 PM#4
rwxr-xr-x
I'm also assuming that you have more than just that one event (player 1, 2, 3, etc..), otherwise using player number is useless.

However, in the case of you not getting a hero chooser, this would be caused by the hero kills being less than 50 (as defined by your conditions). And of course Microsoft's solution with turning off the trigger will prevent you from getting 3 of them (not completely true, considering you could have 2 units die at the same time, increasing the chances of two instances of the trigger executing before one of them turns it off).

I would also be curious if you are meaning for ANY unit to die, or if it should only be executed when a hero dies. If only for a hero dying, you should also add in a condition to reflect that.
06-10-2003, 08:25 PM#5
MicrosoftXP
rw: the player number is for the killing unit, and the event is for the dying unit.

i think the trigger is supposed to give the player another hero every 50 kills, not to restart dead heros.