help with timer

  • Thread starter Thread starter kingofdeth
  • Start date Start date
K

kingofdeth

Guest
im making a king of the mountain type map where i need a timer array where it keeps track of when the person becomes king and then the timer starts for that player (only that player can see it his timer) when he loses the role of the king the timer stops. can anyone help me out on these triggers.

i also need an ability where when you attack you knockback the unit you are attacking.
 
another question
for my map king of the mountain i am having trouble using the ramps in the terrain pallet. It is supposed to work but it doesn't. I am attaching my map to see if anyone can fix it.
 

Attachments

ok i will help u with the ramp thing. ramps can be hard u have to give them space too. i will do that when i get upstairs. and the first thing u said that u want it to store their time. u can't se a coundown timer and do u want to just make it so it adds points to a interger array and make a leaderboard show the points? i think that would be the best (and the easiest way to do it) cause i no how to do that anyway.
 
Ramps generally need a lot of room and need to be STRAIGHT. It can only ramp ONE level at a time.

Notice the blue dots. Thats the pathing map. Make walls straight. When doing a corner, move in 90° directions. Sometimes it doesn't take - move back and forth a couple times.

I also have a small imperfection - don't settle for that. Take your time on your map, be proud of your work. Level the terrain and try again. Practice makes perfect.
 
Timers

I am also having trouble with timers in my map ill post the triggers.

Code:
[b][u]Timer Maker[/u][/b]
Events
    Map initialization
Conditions
Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 300.00 seconds
            Set KingTimer[(Player number of (Picked player))] = (Last started timer)
            Countdown Timer - Pause KingTimer[(Player number of (Picked player))]
            Countdown Timer - Create a timer window for KingTimer[(Player number of (Picked player))] with title King Time Left ...
            Set KingTimerWindow[(Player number of (Picked player))] = (Last created timer window)
            Countdown Timer - Show KingTimerWindow[(Player number of (Picked player))] for (Picked player)

[b][u]Timer Beginning[/b][/u]
Events
    Time - Elapsed game time is 5.00 seconds
Conditions
Actions
    Trigger - Turn on Win and Lose <gen>

[b][u]First King Timer Start[/u][/b]
Events
    Unit - A unit enters The Top <gen>
Conditions
    (Unit-type of (Entering unit)) Equal to Pusher
Actions
    Countdown Timer - Resume KingTimer[(Player number of (Owner of (Entering unit)))]
    Trigger - Turn off (This trigger)

[b][u]Timer Stop[/u][/b]
Events
    Unit - A unit leaves The Top <gen>
Conditions
    (Unit-type of (Leaving unit)) Equal to The King
Actions
    Countdown Timer - Pause KingTimer[(Player number of (Owner of (Leaving unit)))]

[b][u]Timer Start New King[/u][/b]
Events
    Time - Every 0.10 seconds of game time
Conditions
    (Number of units in (Units in The Top <gen> matching ((Unit-type of (Matching unit)) Equal to The King))) Equal to 0
Actions
    Countdown Timer - Resume KingTimer[(Player number of (Owner of WinningPusher))]

[b][u]Win and Lose[/b][/u]
[b][u][i]Initially off[/i][/u][/b]
Events
    Time - Every 0.10 seconds of game time
Conditions
Actions
    For each (Integer A) from 1 to 8, do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Integer((Remaining time for KingTimer[(Player number of (Player((Integer A))))]))) Equal to 0
                Then - Actions
                    Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
                    If ((Integer A) Equal to 1) then do (For each (Integer B) from 2 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)) else do (Do nothing)
                    If ((Integer A) Equal to 8) then do (For each (Integer B) from 1 to 7, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)) else do (Do nothing)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 2
                        Then - Actions
                            For each (Integer B) from 1 to 1, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                            For each (Integer B) from 3 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                        Else - Actions
                            Do nothing
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 3
                        Then - Actions
                            For each (Integer B) from 1 to 2, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                            For each (Integer B) from 4 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                        Else - Actions
                            Do nothing
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 4
                        Then - Actions
                            For each (Integer B) from 1 to 3, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                            For each (Integer B) from 5 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                        Else - Actions
                            Do nothing
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 5
                        Then - Actions
                            For each (Integer B) from 1 to 4, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                            For each (Integer B) from 6 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                        Else - Actions
                            Do nothing
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 6
                        Then - Actions
                            For each (Integer B) from 1 to 5, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                            For each (Integer B) from 7 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                        Else - Actions
                            Do nothing
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 7
                        Then - Actions
                            For each (Integer B) from 1 to 6, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                            For each (Integer B) from 8 to 8, do (Game - Defeat (Player((Integer B))) with the message: Defeat!)
                        Else - Actions
                            Do nothing
                Else - Actions
                    Do nothing
 
This is best I can do without a decent explenation of what your TRYING to do.

Code:
// Delete Timer Beginning
// Change this trigger.

[b][u]Win and Lose[/b][/u]

Events
    [b]Time - A timer expires[/b]
Conditions
Actions
    For each (Integer A) from 1 to 8, do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Integer((Remaining time for KingTimer[(Player number of (Player((Integer A))))]))) Equal to 0
                Then - Actions
                    Set OurPlayerGroup = Pick all players in (all players)
                    Player group - Remove Player(Integer A) from OurPlayerGroup
                    Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
                    Game - Defeat (Player(OurPlayerGroup) with the message: Defeat!
                Else
                 Do Nothing
        //End Loop

//change this one too

[b]Timer Start New King[/b]
Events
    Unit - A Unit leaves Top <gen>
Conditions
Actions
    Wait .5
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
           (Number of units in (Units in The Top <gen> matching ((Unit-type of (Matching unit)) Equal to The King))) Equal to 0
        Then
           Countdown Timer - Resume KingTimer[(Player number of (Owner of WinningPusher))]
        Else
           Do Nothing
     //end if
 
I believe there is a problem with the trigger "Timer Maker". You can't start a timer on Map Initialization. Use "Time - Elapsed game-time" as the event instead.
 
it still defeated me but i saw it create the timer. Other than defeating me it also made two timer windows.
 
fixed the defeat problem but now i have a bunch of timers
my new trigger
Code:
Timer Maker
Events
    Time - Elapsed game time is 0.01 seconds
Conditions
Actions
    For each (Integer A) from 1 to 8, do (Actions)
        Loop - Actions
            Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 300.00 seconds
            Set KingTimer[(Player number of (Player((Integer A))))] = (Last started timer)
            Countdown Timer - Pause KingTimer[(Player number of (Player((Integer A))))]
            Countdown Timer - Create a timer window for KingTimer[(Player number of (Player((Integer A))))] with title ((Name of (Player((Integer A)))) + 's Time Left...)
            Set KingTimerWindow[(Player number of (Player((Integer A))))] = (Last created timer window)
            Countdown Timer - Show KingTimerWindow[(Player number of (Player((Integer A))))] for (Player((Integer A)))
 
now this is better but it still creates one for each player. I want it to create one for the one player. It keeps creating a lot of timer windows. Here is my trigger.
Code:
Events
    Time - Elapsed game time is 0.01 seconds
Conditions
Actions
    If ((Player 1 (Red) slot status) Equal to Is playing) then do (Player Group - Add Player 1 (Red) to AllPlayers) else do (Do nothing)
    If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Player Group - Add Player 2 (Blue) to AllPlayers) else do (Do nothing)
    If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Player Group - Add Player 3 (Teal) to AllPlayers) else do (Do nothing)
    If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Player Group - Add Player 4 (Purple) to AllPlayers) else do (Do nothing)
    If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Player Group - Add Player 5 (Yellow) to AllPlayers) else do (Do nothing)
    If ((Player 6 (Orange) slot status) Equal to Is playing) then do (Player Group - Add Player 6 (Orange) to AllPlayers) else do (Do nothing)
    If ((Player 7 (Green) slot status) Equal to Is playing) then do (Player Group - Add Player 7 (Green) to AllPlayers) else do (Do nothing)
    If ((Player 8 (Pink) slot status) Equal to Is playing) then do (Player Group - Add Player 8 (Pink) to AllPlayers) else do (Do nothing)
    Player Group - Pick every player in AllPlayers and do (Actions)
        Loop - Actions
            Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 300.00 seconds
            Set KingTimer[(Player number of (Picked player))] = (Last started timer)
            Countdown Timer - Pause KingTimer[(Player number of (Picked player))]
            Countdown Timer - Create a timer window for KingTimer[(Player number of (Picked player))] with title ((Name of (Picked player)) + 's Time)
            Set KingTimerWindow[(Player number of (Picked player))] = (Last created timer window)
Why doesn't that work. Maybe it is pick every player action. Maybe it needs to be a for each integer. But that didn't work either when i tryed it. I need a lot of help here. Please help. My map is almost finished except for creep spawns and items. Please help.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • The Helper The Helper:
    Also, anyone who is reading this and is sad - don't be, turn off the Internet, step away from the box - enjoy your life - there is so much more out there for you than there is here for you.

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top