• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with Stun/Recarnation on creeps/teleporting creep for a td!

Status
Not open for further replies.
Level 3
Joined
Mar 22, 2010
Messages
40
Hi im making a TD....


Well the towers that aint made yet are these:

Stunning (gives a chance to stun targer)

Teleporting (gives a chance to teleport back to start)

needing help with fixing so the recarnation of the creeps could work to!.


The problems with the things i want to fix:

1. STUN

I tryed just to add stun... but when they are stunned they stop walk!...

Can some one tell me how i can make them continue walk the path they walked before? instead of just standing still after the stun?...
Want i to not have 100% stun chance... just 10% stun chance...

2. Teleport

Can some tell me how to do teleport skill?

Like this skill:

Gives 5% chance to teleport the enemie back to the start.

3. Recarnation

Kinda pritty mutch same problem as the furst...

They stop after the recarnation!


(p.s why they stop is couse they dont have flee on and my towers are invulnerable.)

Please help!
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
use triggers to manually create a stun effect on a tower so that whenever a unit gets attacked by your type of tower you can pause that unit to keep its original orders after they stop being "stunned".

For the teleporting and reincarnation skill you can also use that type of trigger.
try something like:

  • example
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to player that controlls your mobs
      • (Unit-type of (Attacking unit)) Equal to your type of tower
    • Actions
      • Do anything here :)
you can also add the conditions inside the actions part so that you can put all your towers ability's inside one trigger.
Use IF/THEN/ELSE action for that.

for the reincarnation: give the units a variable that shows which region they have already came across so that you can order it to move again after it reincarnaded.


EDIT: if you want I can just create the triggers for you, but first try it yourself. It's simpel, not that hard..
Ow and check out some tutorials, they are verry verry usefull:

Tower Defence tutorial:
http://world-editor-tutorials.thehelper.net/towerdef.php
 
Level 3
Joined
Mar 22, 2010
Messages
40
Thanks ill try but ...

cant i add the chance to bash it in the trigger?

Or how do i fix that? :S
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
anoher example on how to do that:

  • another example
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Attacked unit)) Equal to Player 12 (Brown)
          • (Unit-type of (Attacking unit)) Equal to StunTower
        • Then - Actions
          • Set stun_chance = 5
          • Set random_number = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • random_number Less than or equal to stun_chance
            • Then - Actions
              • Unit - Pause (Attacked unit)
              • Wait 2.00 seconds
              • Unit - Unpause (Attacked unit)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Attacked unit)) Equal to Player 12 (Brown)
          • (Unit-type of (Attacking unit)) Equal to TeleportTower
        • Then - Actions
          • Set teleport_chance = 5
          • Set random_number = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • random_number Less than or equal to teleport_chance
            • Then - Actions
              • Unit - Order (Attacked unit) to Stop
              • Unit - Move (Attacked unit) instantly to theStart
        • Else - Actions
however: the wait action is not verry efficiant because that will cause problems. (if you want me to I can explain why xD) Try using a timer instead :)

this means every time the unit is attacked by your stun tower the stun chance will be set to 5 and random number will be a random number between 1 and 100
then simply check if the number is under 5 or equal to 5 and voila you have yourself 5% percentage ;)
this also counts for the teleport tower.

random integer number can be found under: math - Random

I created 2/3, try the 3rd ;)

if you run into troubles or really cant find the solution contact me through pm or post a message here ;)

(it's always better to try it yourself because you'll learn about it. I can easilly create the reincarnate part for you, but I want you to try and solve it yourself before I give you the answer)

EDIT: also... If you want the teleport tower not to attack but only to teleport I suggest changing his damage to 0 and use a unexisting model for his arrow. This way the tower will still shoot but he'll shoot an invisible arrow that does no damage. But that's all up to you ofcourse.

also: add some special effects here and there and people will see what happened instead of some creatures jumping to the start or standing still for no reason :p
 
Last edited:
Level 3
Joined
Mar 22, 2010
Messages
40
Thanks :) Well yea i know about that lurning thing :p I allways try to solve it my self in fust way :p
 
Level 3
Joined
Mar 22, 2010
Messages
40
however: the wait action is not verry efficiant because that will cause problems. (if you want me to I can explain why xD) Try using a timer instead :)

Well Please explain what the diffrence is there... and what you mean with the timer? -.^?
 
Level 4
Joined
Jul 24, 2010
Messages
85
Cheat it? How do you mean?

Many WC3 map use event "When Unit is attacked" which is the main problem especially in the map with only 1-2 units in control. (Like the copy of dota and many other maps, they usually have this problem.)

The problem is "This event will fires the trigger before the unit is really attacking." So some people cheat by "pressing S (stop) repeatedly" when unit acts to attack the target causing the event fires about 5-10 times/seconds. while the attack cooldown is 1-2 seconds.

If your tower attack slower than 2s. This problem will occur. But if it normally attack fast, no need to change it.

Another problem is that, the target will surely get stunned before it get damage from the tower.
 
Level 3
Joined
Mar 22, 2010
Messages
40
Then read top xD

If you use bash ability in a td... the creeps stops their moving pathes couse of bash

So therefore i needed something to make them bashed but still hold their last order
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
thank you Bankde I forgot about that :)
I just made a quick example, but damage detection surely is a must-have here.

sofia, using waits will mean that whenever a trigger is triggered that trigger waits for an amount of time. Inbetween that amount of time the trigger can be triggered again, which can interfer in setting variables and such. That's why I suggest using timers instead. If you want to learn more you'll have to check some tutorials about making spells (MUI). But that requires a small bit of JASS knowledge ;)

with timer I mean -> Countdown Timer, create a variable for your timer, set it in your bash/reincarnate/whatever trigger and make a trigger that makes the unit get unpaused whenever the timer ends.

@kobas: using the bash abillity will remove the unit's previous order, which probably was moving to a region. Pausing and unpausing a unit will not remove the unit's previous order, add a special effect and voila you have yourself a bash ability.
You can ofcourse use the bash abillity and make all the units that got stun run to their next regions after they get unstunned. This ofcourse would be more work if you ask me :)

Or as bankde said use a slow skill, set it to 100% and put the bash buff on that skill. Will probably be the fastest way to fix this problem.
 
Last edited:
Level 3
Joined
Mar 22, 2010
Messages
40
I want help with this then:

If unit is damaged by tower....

i cant find any way to check that...


I would like allsow to have this to:

If unit gets a buff then something
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I want help with this then:

If unit is damaged by tower....

i cant find any way to check that...


I would like allsow to have this to:

If unit gets a buff then something

for a unit damaged by tower you'll need a system. Badke already showed a thread with such a system. Download it and read the readme to understand how to implement it into your map.

here is the link again: http://www.thehelper.net/forums/showthread.php?t=137957

that system will detect damage taken.
 
Status
Not open for further replies.
Top