Help with TD trigger

  • Thread starter Thread starter WeekeeWakee
  • Start date Start date
W

WeekeeWakee

Guest
Hi there,

I'm creating a new WC3TFT TD, but I stoped when I needed to put the lives for the players.
My question is: How do I set lives for the players? And how can I make they lose the lives?

Thanks, and if you don't understand the questions, please post here that I explain to you. ;)
 
well usaly uses a varible integer so the start will pop up a dialog saying how many lifes u need.
so the dialog picked will set the varible = to a value
lets say we creaty a varible called lives integer.
Code:
TEST
    Events
        Unit - A unit enters (Entire map)
    Conditions
        (Owner of (Entering unit)) Equal to Player 12 (Brown)
    Actions
        Set lives = (lives - 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                lives Less than or equal to 0
            Then - Actions
                Game - Display to (All players) the text: GAME DEFEAT!!!
            Else - Actions
 
Best way is to create a variable that is set to the number of lives with a trigger when the players choose the difficulty.

You then need another trigger for when the units enter the portal/boat/whatever. I would do something like this :
Code:
LooseALifeTrigger
    Events
        Unit - A unit comes within 512.00 of ThePortal <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 1 (Red)
    Actions
        Set PlayersLives = (PlayersLives - 1.00)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerCount Less than or equal to 0
            Then - Actions
                -------- The players loose --------
            Else - Actions
                Do nothing

This should get you started
 
This is actually not that complicated of a trigger, First make a Variable and name it lives(or whatever), make it an integer and set its value to however many lives you want the people to start with. Then make a rect , make this rect the place you want the ppl to lose lives if a unit from a player enters it. Now to the Trigger part, first let me just say i cannot be exact about the trigger names because i am not on my home machine...

Event- A unit enters (specified rect)

condition- If unit belongs to player(the player who gets the creeps who move in the td)

Action- Set Variable (lives) ; (lives) - 1
Remove (Triggering or Entering[both will work]) unit
-----------------------------------------------------------------------
Then make a new trigger, this will be for when lives reaches 0, the players will lose.

Event- Periodic;every 1.00 seconds of game time
Action- If/Multiple actions/else
if- (lives = 0)
then- (you can display whatever here but lets just go with this...)Make the player lose the game[again i cannot be specific about trigger name) and have it display the defeat message and make that whatever you want.
else- Do Nothing
------------------------------------------------------------------------
Now this is if you want it to be put on a multiboard, have the columns blah blah blah, have a column named lives and etc. make a new trigger....

Event- periodic;every 0.10 seconds
action-set text of (last created multiboard[this wont work if u have more then one multiboard]) to *convert integer to String of variable [lives] * Again sorry about not being specific but meh : /

Hope i helped with your issue ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • 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
    +1
  • 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 Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top