- Joined
- Apr 21, 2013
- Messages
- 1,194
So I created a hero revival system which drops an item on the ground(hero death location) unless another player takes the item and gets into a region(hospital) the dead hero will not respawn. If the item has been brought to the hospital the item will be removed from the inventory of the carrying hero. But I'm having some kind of bugs. It seemed like it worked but it turned out it had some issues I checked this over and over again but can't find the mistake...
-
ItemUponDeath
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Simple Adventurer
-
(Unit-type of (Triggering unit)) Equal to Simple Adventurer Acher
-
(Unit-type of (Triggering unit)) Equal to Simple Adventurer(Mage)
-
-
-
-
Actions
-
Set DyingHeros[DyingHeroCount] = (Triggering unit)
-
Set DyingHeroCount = (DyingHeroCount + 1)
-
Item - Create Ashes at (Position of (Triggering unit))
-
-
-
HospitalArea
-
Events
-
Unit - A unit enters Hospital <gen>
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Simple Adventurer
-
(Unit-type of (Triggering unit)) Equal to Simple Adventurer Acher
-
(Unit-type of (Triggering unit)) Equal to Simple Adventurer(Mage)
-
-
-
-
Actions
-
For each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Ashes
-
-
Then - Actions
-
Hero - Instantly revive DyingHeros[DyingHeroCount2] at (Center of Hospital <gen>), Show revival graphics
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DyingHeroCount Equal to 0
-
-
Then - Actions
-
Else - Actions
-
Set DyingHeroCount = (DyingHeroCount - 1)
-
-
-
Set DyingHeroCount2 = (DyingHeroCount2 + 1)
-
Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Greater than 6
-
-
Then - Actions
-
Set DyingHeroCount2 = 0
-
-
Else - Actions
-
-
-
-
-
-
-