Timer end action begins.

Guldfisk

New Member
Reaction score
0
Hello!

I have tried to make a trigger that when the timer ends the monster will spawn and walk to destroy the castle. I have manage to make a timer and then i want to know how to make monsters spawn and then walk to the castle.

This is what i have managed to do so far.

testing trigger nr1
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Countdown Timer - Create a timer window for (Last started timer) with title Get ready
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 600.00 seconds

Any support is appreciated and try to explain like I'm three years old because I'm quite new to this
also, tell me if this is way to complicated
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Trigger:
  • Trigger1
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Timer1 = (Last Created Timer)
      • Countdown Timer - Start Timer1 as a One-shot timer that will expire in 600.00 seconds


Trigger:
  • Trigger2
    • Events
      • Time - Timer1 expires
    • Conditions
    • Actions
      • Set Point1 = (Your point)
      • Unit - Create 1 Monster for (Neutral Hostile) at (Point1) facing (Castle 0000 <gen>)
      • Unit - Order (Last created unit) to Attack (Castle 0000 <gen>)
      • Custom script: call RemoveLocation (udg_Point1)
      • Custom script: call DestroyTimer (udg_Timer1)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Might wanna use this instead... abit more modified for your needs maybe ;)
Trigger:
  • Timer Begin
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 600.00 seconds
      • Countdown Timer - Create a timer window for Timer with title Get Ready!
      • Set Timer_Window = (Last created timer window)


Trigger:
  • Timer Ends
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Set TempPoint = (Center of Spawn <gen>)
      • Unit - Create 1 Footman for Neutral Hostile at TempPoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack Castle 0012 <gen>
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyTimer(udg_Timer)
      • Custom script: call DestroyTimerDialog(udg_Timer_Window)
      • Countdown Timer - Destroy Timer_Window


@Pharao: Sorry, didn't mean to be disrespectful to you trigger XD
 

Guldfisk

New Member
Reaction score
0
komaqiton how do guys get the variables in the trigger the won't get there for me they'll just stay in the variables editor
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Do you mean how i set variables like:
Trigger:
  • Set TempPoint = (Center of Spawn <gen>)


Then there is an action called "Set Variable"
 

Guldfisk

New Member
Reaction score
0
thanks BTW i made the opposite order does it matters on the first?

Now i'm going to watch the mentalist
 

Guldfisk

New Member
Reaction score
0
Trigger:
  • testing trigger nr1
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set timer1 = (Last started timer)
      • Countdown Timer - Create a timer window for (Last started timer) with title Get ready
      • Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 30.00 seconds


you had the variables down i had it up hasn't had time to make second yet shall do it tommorow thanks for al you support.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You need to set the variable after you starts the timer, since it uses (Last Started Timer)
and you also need to move the Create timer window to last, and change Laststarted timer there to the variable, timer1.
 

Guldfisk

New Member
Reaction score
0
Yes, now i know what they do... sort of. Removing old things and things that are not in use i guess. Correct me if I'm wrong


Edit1: Where do you find "unit - Order unit" in actions?
Edit2: No worries i found.
Edit3: i got some errors even though the trigger almost exactly as yours.

call RemoveLocation(udg_TempPoint)
call DestroyTimer(udg_Timer)
call DestroyTimerDialog(udg_Timer_Window)
was the error lines

Trigger:
  • testing trigger nr1
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start timer1 as a One-shot timer that will expire in 140.00 seconds
      • Countdown Timer - Create a timer window for timer1 with title Get ready
      • Set Timer_window = (Last created timer window)


this i have no error on

Trigger:
  • testing trigger nr2
    • Events
      • Time - timer1 expires
    • Conditions
    • Actions
      • Set rallyPoint = (Center of Region 010 <gen>)
      • Unit - Create 2 Armor unit for Neutral Hostile at rallyPoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack Castle 0003 <gen>
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyTimer(udg_Timer)
      • Custom script: call DestroyTimerDialog(udg_Timer_Window)
      • Countdown Timer - Destroy Timer_window

is the second who i have error on.

i don't get this
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, those lines remove the leaks of variables, which means that you need to use the same variables as i did, or change the name, for example:
call RemoveLocation(udg_TempPoint)
change TempPoint there to you point variable you use in you trigger, and the same for the others :thup:
 

Guldfisk

New Member
Reaction score
0
Okay I'll try that.

Edit: It doesn't work i have changed all to their correct names but there is still an X on the trigger paper.
Do you mind take a look at my trigger and tell me whats wrong

Trigger:
  • testing trigger nr2
    • Events
      • Time - timer1 expires
    • Conditions
    • Actions
      • Set rallyPoint = (Center of Region 010 <gen>)
      • Unit - Create 2 Armor unit for Neutral Hostile at rallyPoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack Castle 0003 <gen>
      • Custom script: call RemoveLocation(udg_rallyPoint)
      • Custom script: call DestroyTimer(udg_timer1)
      • Custom script: call DestroyTimerDialog(udg_Timer_window)
      • Countdown Timer - Destroy Timer_window


Here's a picture of it



Edit2: Now I've made a new exactly mirror of the old trigger and i hope that will work.
Edit3: Okay now the monsters spawn but they're not moving towards the castle
Edit4: I figured out why they won't attack castle... They had no attack but now thay walk half when then turn around
 

Guldfisk

New Member
Reaction score
0
Now i got like everything working except for one thing i want to create many units like 6 units and only one will attack the castle... What shall i do becuse i cant have random units in region :(
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Make a loop,I'll just show you the look of the loop, like this:
Trigger:
  • For each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Create 1 Footman for Player 1 (Red) at TempPoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack Castle 0012 <gen>
      • Custom script: call RemoveLocation(udg_TempPoint)

BTW, just put the unit actions in this loop, and then the two custom scripts, call DestroyTimer and call DestroyTimerDialog, after the loop ;)

And i also want to point out that, oyu don't need that last action in your second trigger, Countdown Timer - Destroy Timer_window, the custom script before that takes care of it ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    That sounds like fun!
    +1
  • The Helper The Helper:
    it was a blast!
  • The Helper The Helper:
    I am going to post the Youtube of the investigation in the forums when it is ready
    +1
  • jonas jonas:
    cool!
  • vypur85 vypur85:
    Sounds cool TH.
  • tom_mai78101 tom_mai78101:
    I was on a Legend of Zelda marathon...
  • tom_mai78101 tom_mai78101:
    Am still doing it now
    +1
  • jonas jonas:
    which one(s) are you playing?
  • jonas jonas:
    I played a little bit of the switch title two weeks ago and found it quite boring
  • The Helper The Helper:
    just got back from San Antonio this weekend had the best Buffalo Chicken Cheesesteak sandwhich in Universal City, TX - place was called Yous Guys freaking awesome! Hope everyone had a fantastic weekend!
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • The Helper The Helper:
    We have been getting crazy numbers reported by the forum of people online the bots are going crazy on us I think it is AI training bots going at it at least that is what it looks like to me.
  • The Helper The Helper:
    Most legit traffic is tracked on multiple Analytics and we have Cloud Flare setup to block a ton of stuff but still there is large amount of bots that seem to escape detection and show up in the user list of the forum. I have been watching this bullshit for a year and still cannot figure it out it is drving me crazy lol.
    +1
  • Ghan Ghan:
    Beep boop
    +1
  • The Helper The Helper:
    hears robot sounds while 250 bots are on the forum lol
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    and then it was Thursday...
    +2
  • tom_mai78101 tom_mai78101:
    And then Monday
    +1
  • The Helper The Helper:
    I got the day off today!
    +1
  • tom_mai78101 tom_mai78101:
    How...? (T-T)
  • The Helper The Helper:
    I took the day off. I work for myself so I can do that.
    +1
  • Varine Varine:
    Well I'm already over summer
  • jonas jonas:
    varine! good to see you
  • jonas jonas:
    what's going on, what's got you going
  • The Helper The Helper:
    good to see you varine hope you are well my friend

    The Helper Discord

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top