You're creating the visibility modifiers in a loop -- which means you create a new one for each player. So if there are multiple players in the SpectatingPlayers group, then multiple visibility modifiers will be created. However, each time you create one, you set the SpectateModifier variable...
This is a good one I came up with a while ago:
ClrHome
While 1
Input "",Str4
expr(Str4) -> U
U -> T
1 -> P
While T != int(T)
10P -> P
10T -> T
End
round(T/700,0) -> V
randInt(1,2+V)/P -> W
If randInt(0,1)=1
Then
-W -> W
End
Disp U+W
End
You should be able to do this with only one event, like so:
Exploding is Fun
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Explodey Item
Actions
Set unlucky_player = (Random player from (All enemies of (Owner of...
Pressing 'c' toggles the "game camera" on and off. So if you want to switch quickly between the regular view and your entire map view, use 'c'.
If you want to reset the editor camera to the default zoom and angle, press Ctrl+Shift+C (or click the middle mouse button).
Your actions for clearing the dialog box, creating the buttons, and showing it are all inside the Player Group loop, so that's getting repeated for every player.
It looked like your AllyingPlayer variable was supposed to be the same as (Owner of (Casting unit)). Try this:
Treaty
Events...
Well, if you're really looking for unique ideas...
You are a renowned pastry chef who has become lost in the middle of a large forest. The forest nymphs have offered to show you the way out of the forest if you will cook a batch of pastries for them. Normally this would be easy to do using...
Ouch, that'll take forever... Instead, put all those actions inside of a For each (Integer player_number) from 1 to ... and then use the player_number variable for the array indexes.
It probably does leak... I gave up on looking for leaks a long time ago. I usually don't make maps that are complicated to the point where leakage becomes an actual problem. Also, I greatly favor basic and clean code over messy and efficient code.
^ That's a good tutorial if you're making a multi-level map, but if you want something really simple, this should do:
Untitled Trigger 001
Events
Time - Elapsed game time is 10.00 seconds
Conditions
Actions
Unit - Create 2 Footman for Player 2 (Blue) at (Center...
This looks like an interesting trigger, but I'm having trouble understanding what the various "AMOI" variables are being used for. If you're just going to use constant integers for the array indexes, then why bother using arrays in the first place? Perhaps you could explain what each of the...
My guess is that the leaderboard is being updated for Player 1 before his number of kills is updated. Try removing the event from the Update Board trigger, and instead have the Kills trigger run the Update Board trigger. Alternatively, you could try putting a small wait action (about 0.05...
Assuming you'll have multiple pairs of Geomancers, something like this should work:
Geomancer Share Exp
Events
Unit - A unit Dies
Conditions
Actions
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Dying unit)) matching ((Unit-type of (Matching...
There's always a way... you just might have to go in a different direction than you're expecting.
If I understand correctly, you could save the multiplier for each unit in that unit's custom value. Then you could use (Level of (Killing unit)) x (Custom value of (Dying unit)) to get the...
The best way you can help us help you is by explaining what you intend to use this for in as much detail as possible.
I recall you said that you were just using the chat message event for testing. It looks like you want the unit to be updated automatically whenever the variable changes. If...
Well, as long as the condition in Trigger 2 is true, Trigger 3 will run every .5 seconds. Keep in mind that the condition will only work as expected as long as there's only one unit in the region at a time.
As a last resort, you could set Integer to 0 after you create the unit -- that should...
Here's a pretty basic way to do it:
Untitled Trigger 9001
Events
Player - Player 1 (Red) types a chat message containing - as A substring
Conditions
Actions
Set entered_integer = (Integer((Substring((Entered chat string), 2, (Length of (Entered chat string))))))...
A trigger like this should do it; just change the highlighted values to the correct players:
Ally Attack Trigger Thingy
Events
Unit - A unit Is attacked
Conditions
((Attacked unit) is A Hero) Equal to True
(Owner of (Attacked unit)) Equal to Player 1 (Red)...