2 Questions!

Killerphill

New Member
Reaction score
1
hey guys. i have 2 questions...

1st: 1 of my custom units has a reincarnation ability, now everytime he dies, he's mana gets reset to the max, is there a way to make hes mana get set to 0 instead of full after he is finished reincarnating?

2nd: ok, so basically i have a unit which has a max mana of 10 for example. and i wanna make it that when he gets to 10 mana, a trigger fires off and gives you a load of gold. i cant find the right event for it as all the events are all "preset".

+ rep to who ever gives me a solution to these problems! :)
 

UncleQQ

New Member
Reaction score
1
The first question :
help
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Reincarnation
Actions
Unit - Set mana of (Casting unit) to 0.00%


The second question :
helper
Events
Map initialization
Conditions
(Mana of (Picked unit)) Equal to 10.00
Actions
Player - Add 500 to (Owner of (Picked unit)) Current gold

I have no idea if these triggers work =.= i just did them randomly
 

wraithseeker

Tired.
Reaction score
122
Reincarnation is a passive and is not a start the effect of an ability.

for the 2nd one.

Use a timer that picks units in playable map area that has 10 mana (Integer comparsion) timer not too low or high.

For the 1st. It will be so complex that I don't think you want it. Requires vJass and systems.
 

istar

New Member
Reaction score
31
you can trigger the reincarnation ability instead
event - unit dies
conditions - unit is blah, (some time variable to mimic cooldown of the ability)
action-revive hero + special effects
set mana of last revived...
 

Killerphill

New Member
Reaction score
1
you can trigger the reincarnation ability instead
event - unit dies
conditions - unit is blah, (some time variable to mimic cooldown of the ability)
action-revive hero + special effects
set mana of last revived...

What about all the items the specific unit is carrying at the time?

also, ive figured out the mana to gold one.

still stuck on this reincarnation one though. lol
 

istar

New Member
Reaction score
31
revive hero trigger keeps all his items
you can check his items and remove/give accordingly and even store in a variable
 

Killerphill

New Member
Reaction score
1
revive hero trigger keeps all his items
you can check his items and remove/give accordingly and even store in a variable

I just tryed out that trigger and it doesnt work. The unit who i need to reincarnate is not actually a "hero" unit, hes just a normal unit so that trigger doesnt work on him.
 

istar

New Member
Reaction score
31
in that case, just remove dyingunit, and recreate a new identical unit in its place
like i said, store items in variable and give to the new unit
i not too sure if it still give enemy exp for the first kill though...hmm...
alternatively, make that unit a secret hero? disable hero interface etc in object editor...
 

Killerphill

New Member
Reaction score
1
Ive just tried storing it in a game cache thing or whatever, but everytime he respawns, the units items get reset and hes abilities get reset back to what it was before hand (unit abilities change often). Can somebody give me an example of the saving trigger so i can copy it into my map..

thanks.
 

istar

New Member
Reaction score
31
Untitled Trigger 001
Events
Conditions
Actions
For each (Integer A) from 1 to 6, do (Set item[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A)))
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
For each (Integer A) from 1 to 6, do (Hero - Give item[(Integer A)] to (Last created unit))
dont use game cache, just store in item variable, maybe you need null it
i not too sure if hero -give item works on non-heroes
item(integer A) is a item variable array
 

Killerphill

New Member
Reaction score
1
The hero- give item does work.

but the trigger you gave me, does not work :( tested it and changed it and everything and still nothing!
 

istar

New Member
Reaction score
31
"The hero- give item does work.

but the trigger you gave me, does not work tested it and changed it and everything and still nothing!"
weird? i just tested the same trigger, ironically it work, but only for hero
the hero-give item doesnt work for non-heroes...
edit: doesnt work with units with unit inventory, does work with non-heroes with hero inventory
a workaround could be create a dummy unit with inventory, put all items to dummy and order dummy give item to dying unit
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top