(TD) Thread!

morno

Active Member
Reaction score
2
i figured out that wht make all theads for only one thing so here is my TD thread where you can look up things and/or ask things.. so here is my first question for this new thread:

i have maked a selling trigger and the selling thing.. but it dint work.. please help me many more questions will come..

Code:
Sell Trigger
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Sell Tower (Hero Abilities, Thunder Clap) 
    Actions
        Player - Add ((Point-value of (Triggering unit)) x (Integer(0.75))) to (Owner of (Triggering unit)) Current gold
 
You need to add another actions like -

Unit remove triggering unit from the game.

So then it removes the unit from the game, and with your trigger it will add should add the gold too. Hope i helped. ;)
 
ok it worked.. but if i selected 10 buildings i most click 10 times... i whant when i click one time and have selected 10 all will be removed.. and i diddent get any money.. :(
 
You should change the 'sell unit' from spell into an actual unit.
Then you can train it in your towers, and have the condition (Triggering unit) equal to 'Sell This Tower' - Actions...

I believe that will work if you select several towers, as well.

Oh, and if you want the thunderclap effect, you need to add it with a special effect.
 
Make a unit - call it Sell.

Code:
Event
    Unit - a unit begins Training a unit
Condition
    Traind unit equal to Sell
Actions
    Player - Add ((Point-value of (Triggering unit)) x (Integer(0.75))) to (Owner of (Triggering unit)) Current gold
    Unit - Remove Triggering unit from the game

That should do it i think. make it so that all the towers can Train the unit called Sell.

Edit: This is free hand, i didin't use World editor. But im pretty sure this is right.
 
It's really the same thing that you already have, but instead of having a spell that sells your tower, you use a unit.

So start by making a new custom unit in your object editor and name it 'Sell this tower' or something similar.
Then add this trigger:

Code:
Sell Trigger
    Events
        Unit - A unit finishes training a unit
    Conditions
        (Trained unit) equal to '[I]Sell this tower[/I]' 
    Actions
        Set [B]Location[/B] = Position of (Triggering Unit)
        Special Effect - Create 1 special effect at [B]Location[/B] using blabla/Thunderclap
        Special Effect - Destroy Last Created Special Effect
        Player - Add ((Point-value of (Triggering unit)) x (Integer(0.75))) to (Owner of (Triggering unit)) Current gold
        Unit - Remove (Triggering Unit) from the game
        Custom Script - call RemoveLocation(udg_[B]Location[/B])

Something like that. The triggers might look a bit odd, I don't have World Editor open at the moment. :p
 
You need to make it so you aren't converting the 0.75 to an integer, it needs to stay as a real value.

So i would be -
Player - Add ((Point-value of (Triggering unit)) x (0.75) to (Owner of (Triggering unit)) Current gold

And if that doesn't work, them im don't know whats wrong :eek:
 
i can't add (0.75) to Player - Add ((Point-value of (Triggering unit)) x (Integer(0.75))) to (Owner of (Triggering unit)) Current gold. becouse i cant add . to ''Value''
 
Can you do
Add 0.75 x (Integer((Point-value of (Triggering unit))) to (Owner of (Triggering unit)) current gold?
Just a thought, because isn't the first value a real? Or is that with something else? I'm not sure.

Make a real Variable? Set it to your equation, Point value of trigger unit x 0.75 and then do
Add Variable to owner of triggering units current gold.

Im not sure.
 
Here is a tip: If you put the unit to "sell" the tower under:
Techtree Units Sold <-unit here, then you can select 1000 buildings, and theywill be sold at once. Train unit got a timer, but then again, with training a unit you can regreat and have the possiblity to cancel..
And to get 75%...of the point value, you need a variable type Real.
Here:
Code:
Actions
    Set real = ((Real((Point-value of (Selling unit)))) x 0.75)
    Player - Add (Integer(real)) to Player 1 (Red) Current gold
 
Remade

Ok, I remade the trigger in World Editor.
This should work:

Code:
selling
    Events
        Unit - A unit Finishes training a unit
    Conditions
        ((Triggering unit) is A structure) Equal to True
        (Unit-type of (Trained unit)) Equal to Sell this tower
    Actions
        Set Location = (Position of (Triggering unit))
        Special Effect - Create a special effect at Location using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Remove (Triggering unit) from the game
        Unit - Remove (Trained unit) from the game
        Player - Add ((Point-value of (Triggering unit)) / 2) to (Owner of (Triggering unit)) Current gold
        Custom script:   call RemoveLocation(udg_Location)
 
> i figured out that wht make all theads for only one thing so here is my TD thread where you can look up things and/or ask things.. so here is my first question for this new thread

And here is the final answer: Tower Defense Tutorial by Andrewgosu
 
here is the thing i don't like complecated triggers... i have tried the TD turnal but the sell trigger diddent work.. here is the trigger im useing but it dont work! im getting mad!

Code:
Sell Trigger
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Sell Tower 
    Actions
        Player - Add ((Point-value of (Triggering unit)) x (Integer((0.75 x Real)))) to (Owner of (Triggering unit)) Current gold
        Unit - Remove (Triggering unit) from the game

if someone knows an easy sell trigger THAT WORKS! please post it here..
 
here is the thing i don't like complecated triggers... i have tried the TD turnal but the sell trigger diddent work.. here is the trigger im useing but it dont work! im getting mad!

Code:
Sell Trigger
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Sell Tower 
    Actions
        Player - Add ((Point-value of (Triggering unit)) x (Integer((0.75 x Real)))) to (Owner of (Triggering unit)) Current gold
        Unit - Remove (Triggering unit) from the game

if someone knows an easy sell trigger THAT WORKS! please post it here..


You DID make an ability called Sell Tower I assume?
Preferably based upon Channel...


Since your sell trigger looks a lot like mine and guess what... it works :/
 
General chit-chat
Help Users
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top