(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
 
T

Twyddli

Guest
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. ;)
 

morno

Active Member
Reaction score
2
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.. :(
 

Exide

I am amazingly focused right now!
Reaction score
448
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.
 
T

Twyddli

Guest
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.
 

Exide

I am amazingly focused right now!
Reaction score
448
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
 
T

Twyddli

Guest
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:
 

morno

Active Member
Reaction score
2
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''
 
T

Twyddli

Guest
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.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
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
 

Exide

I am amazingly focused right now!
Reaction score
448
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)
 

Sooda

Diversity enchants
Reaction score
318
> 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
 

morno

Active Member
Reaction score
2
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..
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
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
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top