Help with: Special Events

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

Moderator: Cheaters

Panda-Assassin
Senior Member
Posts: 123
Joined: July 4th, 2009, 12:00 am
Title: Pandaren-Assassin

Help with: Special Events

Post by Panda-Assassin »

I was wondering if anyone knows how to add events where at certain times, something might happen and when that time expires, the event will the gone. That was just in general but I'll get into details and specifics.

In my map there is this place covered with trees and behind those trees are a pond that you can step in and goods can be bought from a merchant.

I need a trigger that makes a countdown timer. Once that countdown timer expires, certain trees will be cut down creating a path allowing players access that area. Then straight after the countdown timer entitled "Forest Clearance" expires, another countdown timer will takes it place. This new timer should be entitled "Forest Closing". Once this timer expires, the trees that have been chopped down should regrow.
Spoiler:
Trees.jpg
Notes missed out:
-Forest clearance opens every 5 minutes.

Thank You in advance.
You do not have the required permissions to view the files attached to this post.
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."

Thanks for all the help Syre!
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Help with: Special Events

Post by Arabidnun »

Okay, so here is a system I came up with out of the blue. All it does is create timers, run x, then run the other trigger. So, lets get started

Map Initialization: All this trigger does is start the chain of events, and destroys itself after it's job is done. Creates the starting time so the 2nd trigger Secret Shop can be released.
Spoiler:

Code: Select all

Map initialization
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Countdown Timer - Create a timer window for SecretTimer with title Secret Merchant:
        Countdown Timer - Start SecretTimer as a One-shot timer that will expire in 10.00 seconds
        Set CountdownWindow = (Last created timer window)
        Countdown Timer - Show CountdownWindow
        Trigger - Turn on Open Secret Shop <gen>
        Custom script:   call DestroyTrigger( GetTriggeringTrigger() )
Open Secret Shop: This one basically picks every region located in Secret Merchant( which you will have to set to your region located in your map) Picks the trees, and kills them. Then it hides the old Timer and replaces it with the Closing timer.
Spoiler:

Code: Select all

Open Secret Shop
    Events
        Time - SecretTimer expires
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Countdown Timer - Hide CountdownWindow
        Destructible - Pick every destructible in Secret Merchant <gen> and do (Actions)
            Loop - Actions
                Destructible - Kill (Picked destructible)
        Countdown Timer - Create a timer window for ClosingTimer with title Forest Closing:
        Countdown Timer - Start ClosingTimer as a One-shot timer that will expire in 10.00 seconds
        Set CountdownWindow = (Last created timer window)
        Countdown Timer - Show CountdownWindow
        Trigger - Turn on Close Trees <gen>

This one is a little more trickey, while it does basically the same one as before, it checks to see if anyone is located in the secret shop region( which you should make multiple to cover the whole area) and kicks them out to a specified point outside which you will also have to designate. From here it picks the region where your trees are destroyed, checks to see if they are summer trees( which just makes sure it doesn't interfere with other destructibles) and resurrects it. Then it loops back to the beginning.
Spoiler:

Code: Select all

Close Trees
    Events
        Time - ClosingTimer expires
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Countdown Timer - Hide CountdownWindow
        Unit Group - Pick every unit in (Units in Secret Merchant <gen>) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in (Units in Secret Merchant <gen>)) Greater than 0
                    Then - Actions
                        Unit - Move (Picked unit) instantly to (Center of Merchant Expires <gen>)
                    Else - Actions
                        Do nothing
        Destructible - Pick every destructible in Secret Merchant <gen> and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
                    Then - Actions
                        Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Show birth animation
                    Else - Actions
        Countdown Timer - Start SecretTimer as a Repeating timer that will expire in 10.00 seconds
        Countdown Timer - Create a timer window for SecretTimer with title Secret Merchant:
        Set CountdownWindow = (Last created timer window)
        Countdown Timer - Show CountdownWindow
        Trigger - Turn on Open Secret Shop <gen>
Without further explanation, here is a tutorial map.
You do not have the required permissions to view the files attached to this post.
Panda-Assassin
Senior Member
Posts: 123
Joined: July 4th, 2009, 12:00 am
Title: Pandaren-Assassin

Re: Help with: Special Events

Post by Panda-Assassin »

thank you
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."

Thanks for all the help Syre!