Page 1 of 1

How to stop hero corpse from sliding?

Posted: Mon May 04, 2009 6:41 pm
by Legit
First of all i wonder why did this post deleted when i posted this yesterday. Was hoping to get a response today to work on my map more.
I don't want the hero corpse to slide...
Like when the hero dies to a unit collision hero kill trigger the corpse keeps sliding....

Re: How to stop hero corps from sliding?

Posted: Tue May 05, 2009 8:35 am
by 3ICE
Thank you for posting in the right section. (Posts in the wrong section are automatically deleted without exception.)
Please note that "corpse" is spelled with an "e" at the end. Use a spell checker if you are not 100% sure about your spelling.

To make dead heroes stop sliding, you could remove them from the t_ugr S unit group variable on death, and add them again when they get revived.

Or modify the script in the Slide trigger:
Slide Slide
Line 6:
    if(t==udg_Slide)then
to
Slide Slide
Line 6:
    if(t==udg_Slide)and(GetUnitState(u,UNIT_STATE_LIFE)>0)then
so it checks if the unit is alive before sliding it.

Re: How to stop hero corpse from sliding?

Posted: Tue May 05, 2009 7:32 pm
by Legit
Sorry for the bad spelling anyways...
my slide script line 6 should be like this
if(t==udg_Slide)or(t==udg_Slide2)and(GetUnitState(u,UNIT_STATE_LIFE)>0)then
i think... if something goes wrong ill just post it and thanks for the help again, specially for this wonderful sliding system.

Re: How to stop hero corpse from sliding?

Posted: Wed May 06, 2009 1:41 am
by 3ICE
You are good at coding JASS :)
Congratulations and thank you.