Trigger Problems Please Help

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Trigger Problems Please Help

Post by Black-Hole »

I made a trigger that i call Last Hope, Its sapost to turn all enemy units into little balls of fire and than move them up and kill them.

I got the balls of fire as flying units that they change into. Also the trigger only has a 25% chance of working, but something is wrong and it dosnt work at all

After i posted the Message i found one of my problems. It creats a random number for LastHope Intiger but i was using Condition if RandomNumber Intiger

Now i have another problem. When it works it dosnt make them into little balls. It just skips straight to the end, but dosnt kill them.

Code: Select all

Last Hope
    Events
        Player - Player 1 (Red) types a chat message containing -last hope as An exact match
    Conditions
    Actions
        Set LastHope = (Random integer number between 1 and 20)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RandomNumber Greater than or equal to 1
                RandomNumber Less than or equal to 15
            Then - Actions
                Game - Display to (All players) the text: The last hope faile...
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RandomNumber Greater than or equal to 16
                RandomNumber Less than or equal to 20
            Then - Actions
                Cinematic - Disable user control for Player Group - Player 12 (Brown)
                Game - Display to (All players) the text: The last hope has w...
                Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Actions)
                    Loop - Actions
                        Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
                        Wait 1.00 seconds
                        Unit - Create 1 Flame for Player 12 (Brown) at (Position of (Picked unit)) facing Default building facing (270.0) degrees
                        Unit - Remove (Picked unit) from the game
                Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Actions)
                    Loop - Actions
                        Animation - Change (Picked unit) flying height to 300.00 at 10.00
                        Wait 4.00 seconds
                        Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
                        Wait 1.00 seconds
                        Unit - Kill (Picked unit)
                Cinematic - Enable user control for Player Group - Player 12 (Brown)
            Else - Actions
                Do nothing
User avatar
Squiggy
Newcomer
Posts: 5
Joined: April 28th, 2007, 5:27 pm

Re: Trigger Problems Please Help

Post by Squiggy »

First:

Code: Select all

Set LastHope = (Random integer number between 1 and 20)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RandomNumber Greater than or equal to 1
                RandomNumber Less than or equal to 15
huh ? wouldn't it be better if it looked like this:

Code: Select all

            If - Conditions
                (LastHope) Greater than or equal to 1
                (LastHope) Less than or equal to 15
Second: Try "Replace unit" with the creeps to turn them into fireballs and later remove the replaced unit.

Shall do it ;)