HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Problems...

01-08-2004, 12:19 PM#1
Dimples
Hi!
The following triggers are giving me a lot of headache, so I'd appreciate any help. They simply don't work.

What it supposed to do is, when a hero dies, check if [player in position 1 in last created leaderboard] has any units in [arena], as long as [player in position 1 in last created leaderboard] is either a user or computer. If [player in position 1 in last created leaderboard] has 0 units in [arena], display text, and move units for other player.

What's odd is that when I placed a hero in world editor in [arena], and then killed it, it DID work.

Trigger 1:
Quote:
C2 P1
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
(((Player in position 1 of (Last created leaderboard)) controller) Equal to User) or (((Player in position 1 of (Last created leaderboard)) controller) Equal to Computer)
Actions
Wait 5.00 seconds
Trigger - Run Team 2 Wins P1 <gen> (checking conditions)

Trigger 2:
Quote:
Team 2 Wins P1
Events
Conditions
(Number of units in (Units in Arena <gen> owned by (Player in position 1 of (Last created leaderboard)))) Equal to 0
Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Player in position 2 of (Last created leaderboard))) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Team 1 Shop <gen>)
Game - Display to (All players) the text: Team 2 wins!


If anyone could help, it would be greatly appreciated.
Thanks in advance!
01-08-2004, 03:15 PM#2
Shark
i don't really understand what the trigger does....
try using food like "player 1 food is equal to 0, then do actions"
or turn off the triggers, and turn them on when the hero enters the arena....

anywayz, for the first trigger, try (Dying unit) instead of Triggering unit

also, try formulating the first trigger like this

E: unit dies
C: Dying unit equals to ArenaHero
C: Owner of dying unit is <ArenaPlayer>
A: run trigger 2

so u need two variables, one is a Unit variable named "ArenaHero" second is a player variable named "ArenaPlayer"...u just have to find a place where u will define those two...
01-08-2004, 06:05 PM#3
Dimples
Thank you! The 'food' suggestion worked. You're a life saver! Thank you, thank you, thank you. :D