HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Resurrection

06-24-2007, 07:13 AM#1
AustralianBeast
If anyone has ever played the battle net game called "Tomb of Jarahcon", then they'll know what im talking about.

So, after a hero dies, an item called his soul appears where he died. The to revive him, an ally hero must pick up his soul and bring it to a shop which sells an item that if you buy it, it will revive the heroes soul in your inventory.

Does anyone know how one would go about making this? Thank you :]
06-24-2007, 07:42 AM#2
Tide-Arc Ephemera
Uh... I haven't tested this...


This trigger makes the token, and gives it a player number value.
Trigger:
Make Me a Key
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A Hero) Equal to (==) True
Collapse Actions
Item - Create Ghost Key at (Position of (Dying unit))
Item - Set the custom value of (Last created item) to (Player number of (Owner of (Dying unit)))
Set DeadGuy[(Player number of (Owner of (Dying unit)))] = (Dying unit)


This trigger is when the token is sold, and revives the player somewhere.
Trigger:
Sell Me a Key
Collapse Events
Unit - A unit Pawns an item (to shop)
Collapse Conditions
(Item-type of (Sold Item)) Equal to (==) Ghost Key
Collapse Actions
Hero - Instantly revive DeadGuy[(Custom value of (Sold Item))] at (Center of (Playable map area)), Hide revival graphics

Note that I haven't tested this (as noted earlier), and it will leak.
06-24-2007, 05:44 PM#3
AustralianBeast
Thanks, but theres one problem. The hero isnt supposed to sell the heroes soul to a shop to make him rez, hes supposed to buy an item from a shop and if he has the heroes soul in the inventory when he buys it, the hero will ressurect next to him.
06-25-2007, 05:44 AM#4
Tide-Arc Ephemera
So he buys an item to rez an ally... in that case... let's see...

Well I'm using Ultra Mega Special World Editor (UMSWE) so if you see any unknown functions just tell me (Sometimes I forget myself)...

Trigger:
Revive DeadGuy
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Item-type of (Item being manipulated)) Equal to (==) Rune of Rebirth
((Hero manipulating item) has an item of type Ghost Key) Equal to (==) True
Collapse Actions
Hero - Instantly revive DeadGuy[(Custom value of (Item carried by (Hero manipulating item) of type Ghost Key))] at (Position of (Hero manipulating item)), Hide revival graphics

I hope that's what you were looking for (again... it leaks...).
06-25-2007, 03:16 PM#5
AustralianBeast
Thanks, that would probably work. But in your first post i dont think you can set a variable plus something else (in this case the custom value of the item and player) in normal WE.
06-26-2007, 05:38 AM#6
Tide-Arc Ephemera
All that == stuff is just an add-on from UMSWE.

About that custom value, that's all normal editor. The Custom Value is under Item, and the strange looking variable is an array.