• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] how to remove "expiration time".

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2012
Messages
82
  • Unit - Add a 60.00 second Generic expiration timer to (Triggering unit)
Question is, if I add 60s exp to display a spell effect, then in 59th second, I want to remove it, how to ?
 
Hm no, it won't remove the timer I guess. So the way you wanna use it, it would be a bad solution :s

My suggestions:

1)Dont use expiration timer, use a timer insetad (you will need to create variables)
  • Aktionen
    • Countdown-Timer - Start Timer as a Once/Unique timer that will expire in 60.00 seconds
    • Countdown-Timer - Create a timer window for Timer with title Spell
And dont forget desroying timer window if unit dies before, or it stops this ability.

2)You could just create floating text Timer (60) above unit, and then change the text every 1 second to "Timer - 1"

3) You could replace old unit with new unit (old life and mana). But if you do this with hero, he would lose all items. So you would have to put items variables before you replace it, and re-create these items after you replaced hero.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You could replace old unit with new unit (old life and mana). But if you do this with hero, he would lose all items. So you would have to put items variables before you replace it, and re-create these items after you replaced hero.
Using the ReplaceUnit function doesn't take away your items, as far as I can recall.
As well as Skill Point Allocation, etc.

The downside is, it doesn't save the slot for which the item takes place.
 
Level 4
Joined
Oct 28, 2012
Messages
82
IcemanBo
Hm no, it won't remove the timer I guess. So the way you wanna use it, it would be a bad solution :s

My suggestions:

1)Dont use expiration timer, use a timer insetad (you will need to create variables)
Aktionen
Countdown-Timer - Start Timer as a Once/Unique timer that will expire in 60.00 seconds
Countdown-Timer - Create a timer window for Timer with title Spell
And dont forget desroying timer window if unit dies before, or it stops this ability.

2)You could just create floating text Timer (60) above unit, and then change the text every 1 second to "Timer - 1"

3) You could replace old unit with new unit (old life and mana). But if you do this with hero, he would lose all items. So you would have to put items variables before you replace it, and re-create these items after you replaced hero.

Ok. Cause I have a timer system for lot of thing, so 1. is not really work.
But 2. or 3. really good, and transformation active skill too.
I just wonder if any solution around?
 
  • Melee Initialization
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Set life of (Last created unit) to 25.00%
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Set r = (Life of (Last created unit))
      • Wait 2.90 seconds
      • Unit - Add Reincarnation to (Last created unit)
      • Wait 0.00 seconds
      • Unit - Set life of (Last created unit) to r
      • Unit - Remove Reincarnation from (Last created unit)
Reincarnation Setup
Effect -> none
Hero Ability -> none
Reincarnation Delay -> 0.01
Casting Time -> 0.00

If selected you will lose selection, so care about it.
Also be sure to resume unit order if any.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
@Kobas
You can do this to re-select the unit ?
  • Actions
    • Set u = (Last created unit)
    • Selection - Select u for (Owner of u)
Btw, you should save the unit to a variable because it's not instant, you used Wait, therefore it might get overwritten if the map accept a newly created unit within the period of 2.90 seconds.
 
Level 4
Joined
Oct 28, 2012
Messages
82
Reincarnation Setup.
thank for the idea, but how to hide it, so the player dont see the skill "Reincarnation"
 
Level 4
Joined
Oct 28, 2012
Messages
82
I change the Alternate Form Unit to Footman, then it remove Ability "Reincarnation" so unit die and it do not change the model. Now I dont understand anything.
 

Attachments

  • a.w3x
    12.9 KB · Views: 85
Status
Not open for further replies.
Top