How to solve this?

Status
Not open for further replies.
Level 21
Joined
Nov 4, 2013
Messages
2,016
Basically, I'm creating a skill called Hyperspeed where all units in the map move very slowly and only my hero moves very quickly. I managed to create the spell successfully but I've encountered one damn problem. Whenever my hero kills a unit during Hyperspeed, it plays its death animation slowly (nothing abnormal) yet after it finishes its "Death Time", the unit immediately turns into a decaying flesh. I set the animation speed to 2.5% and paused the units just to let you know the mechanics behind the spell.

So how do I let these units not turn instantly into a flesh but simply wait till the end of Hyperspeed? It lasts 15 seconds and I do not want to alter the Death Time of any unit.

No JASS functions please, I know nothing about them.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Try altering the game speed to achieve the effect you want. That may or may not work well.
Reset it's animation to 100% upon death.
Except he wants it to be slow because time itself is meant to have slowed. Having the animation run at full speed would ruin the visual effect of the ability.

In SC2 one would do this by giving all units a time modification to slow them down or by slowing game speed down and giving your unit a time modification to speed it up.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Since, you do not want to alter the unit's death time, then I suggest when a unit dies, immediately Hide it from the game and create another unit with the same unit type id but add Locust 'Aloc' to it and play its death animation.

However this can be a problem when a hero dies because another icon will appear in the top left when a new hero is created. I suggest you create a dummy unit for each hero.
 
Level 21
Joined
Nov 4, 2013
Messages
2,016
The dying animation is slowed and it lasts longer, while the dying time is the same, thats the problem right?
Can you tell me what did you used to slow the units?

I told you. I slowed the units by setting their animation to 2.5% and pausing them.

Reset it's animation to 100% upon death.

I already did that!

Try altering the game speed to achieve the effect you want. That may or may not work well.

That would slow down my hero as well.

Since, you do not want to alter the unit's death time, then I suggest when a unit dies, immediately Hide it from the game and create another unit with the same unit type id but add Locust 'Aloc' to it and play its death animation.

However this can be a problem when a hero dies because another icon will appear in the top left when a new hero is created. I suggest you create a dummy unit for each hero.

I had already thought about doing this but there is just one tiny problem... you cannot add the Locust skill to any unit by triggers :/
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
You can, create an "ability" type variable with name Locust, and in some trigger like this:
  • Events
    • Map Initilialization
  • Conditions:
  • Actions
    • Custom script: set udg_Locust = 'Aloc'
    • Now you can use this variable
    • Unit - Add Locust to someUnit
 
Level 21
Joined
Nov 4, 2013
Messages
2,016
I already mentioned the ability code in my previous post. Sorry I wasn't obvious enough.
So how did you solved for the hero part? you created another hero?The Hero Icon is shown right?

Uhm basically I decided not to apply this damn method of locust because then it was too hard to let the dummy units decay. I had to give up and increase the Death Time of all units.
 
Level 21
Joined
Nov 4, 2013
Messages
2,016
That was the last resort, the forlorn hope you know. I even obtained a more realistic effect by doing so because clearly when someone dies, he doesn't decay after 2 seconds so increasing the Death Time gives more realism to my RPG.
At least now I know how to add Locust to a unit thanks to Ceday.
 
Status
Not open for further replies.
Top