HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Level Conditional

02-12-2007, 02:05 AM#1
notor
Hi, i want to De-Level a hero when they die, as a punishment for death.

Should I have a conditional that says:

If hero level > 1, then you can de-level on death?

or is this something you should not try to do... ie: war3 doesn't support it for some reason?
02-12-2007, 02:16 AM#2
notor
P.S.: When the hero revives i want to center the players camera on the hero, but i want the hero to spawn in a random point on the map. How do you tell camera to move to hero?
02-12-2007, 02:55 AM#3
Alevice
You certainly can do the first. You may have noticed that Arthas de-leveled during the tft campaign. One problem with that, is that you can't control which abilities get downgraded. Careful with that.

For the second, just use the pan camera action.

Also, avoid double-posts; just use the edit post option.
02-12-2007, 08:25 AM#4
CommanderZ
Trigger:
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A Hero) Not Equal to True
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Hero level of (Dying unit)) Equal to 1
Collapse Then - Actions
Hero - Set (Dying unit) Hero-level to ((Hero level of (Dying unit)) - 1), Hide level-up graphics
Else - Actions
02-13-2007, 01:34 AM#5
Pyrogasm
Quote:
Originally Posted by CommanderZ
Trigger:
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A Hero) Not Equal to True
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Hero level of (Dying unit)) Equal to 1
Collapse Then - Actions
Hero - Set (Triggering unit) Hero-level to ((Triggering level of (Dying unit)) - 1), Hide level-up graphics
Else - Actions
That's actually incorrect and inefficient. Here's what you should do:
Trigger:
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
(Hero level of (Triggering unit)) greater than 1
Collapse Actions
Hero - Set (Dying unit) Hero-level to ((Hero level of (Dying unit)) - 1), Hide level-up graphics