HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger check please :D

06-21-2006, 10:47 AM#1
Kevin
HI!:D

I can't test my map right now, hoping someone will be kind enough to help me test when I am finished.

I am nearly done.

The only triggers I need help with are:

1. Dueling trigger. can someone please point me to a dueling trigger? I am not finding it very well on search. I must be typing in the wrong words. tyvm :D

2. Implementing 3 of the player slots as "observer only" slots. Anyone know how to do this?

3. Can you please check this trigger script to make sure it will work right? I can't test it out for myself :(

Basically I am trying to make it so if player 1 leaves the game, his/her gold is divided equally among his/her allies:

Trigger:
Untitled Trigger 001
Collapse Events
Player - Player 1 (Red) leaves the game
Conditions
Collapse Actions
Game - Display to (All players) for 30.00 seconds the text: Player 1 has left t...
Collapse Player Group - Pick every player in (All allies of (Triggering player)) and do (Actions)
Collapse Loop - Actions
Player - Divert 100% of the Gold income of (Triggering player) to (Picked player)
06-21-2006, 11:02 AM#2
Thunder_Eye
that wont work, it will give 100% of the income to the last player picked. (I think)

You need to make a variable on how many allies player one has, then divide 100 by that number and set this new number to a variable.

Then use this variable in the
Trigger:
Player - Divert VARIABLE of the Gold income of (Triggering player) to (Picked player)

So If player 1 would have 2 allies, 100 would be divided by 2 giving 50.
You then Divert 50(%) of player one's income to both of the allies
06-21-2006, 11:28 AM#3
Rising_Dusk
Trigger:
Trigger
Actions
Set temp = Number of players in All Players matching player is an ally of (Trigger Player) and not equal to (Trigger Player).
Collapse Pick all players in All Players matching player is an ally of (Trigger Player) and not equal to (Trigger Player).
Collapse Loop - Actions
Player - Divert (100 / temp)% of the Gold income of (Triggering player) to (Picked player)

It'll look something like that.
I don't have the editor in front of me, but that's the gist of it.
06-21-2006, 06:48 PM#4
Kevin
my editor came out funny, it doesn't quite look like your's but I think it does the same thing. Please tell me if it is correct tyvm:

Trigger:
Untitled Trigger 001
Collapse Events
Player - Player 1 (Red) leaves the game
Conditions
Collapse Actions
Game - Display to (All players) for 30.00 seconds the text: Player 1 has left t...
Set allytemp = (Number of players in (All allies of (Triggering player)))
Wait 0.01 seconds
Player Group - Pick every player in (All allies of (Triggering player)) and do (Player - Divert (100 / allytemp)% of the Gold income of (Triggering player) to (Picked player))

I had to put wait in there because I remember that referencing arrays won't work if they don't have a wait command between them.
06-21-2006, 07:42 PM#5
The)TideHunter(
Yes, it looks ok, but the wait dosent actually need to be there.
06-21-2006, 09:11 PM#6
Rising_Dusk
Yeap, looks perfect.

Pardon it not looking the same on mine, I was trying to do the GUI from memory, so I knew it wouldn't be exact.
I came pretty close though, eh? ^_^
06-21-2006, 09:17 PM#7
Kevin
!Yes!

Thank you for helping me! No need to be sorry, I am just easily lost.

I always like wait, better safe than sorry.

!:D!