• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Replacing unit +stats +abillity

Status
Not open for further replies.
Level 12
Joined
Apr 26, 2008
Messages
830
Hi can someone help me?!
I wanted to replace a unit and i did it but the replaced unit doesn't get the +stats that the unit before had and it doesn't replace the skills..

Basically it's an evolution trigger and for example lets say Hero A = Unit before replacing AND Hero B = Is the replaced unit so

Let's say Hero A gets a tome of agillity +2 then evolves(will be replaced) to Hero B then Hero B doesn't get the +2 Agillity and the skills that Hero A had won't be replaced to Hero B so i want a trigger that replaces skills and stats aquirements!
 
Level 12
Joined
Apr 26, 2008
Messages
830
Does he even knows variable... ?
It's hard for him if he doesn't know it

Right i know nothing of storing etc.. so can somebody please do the trigger for me?!

I mean i know how to store stats but what about the skills?

EDIT:And the stats get higher on evolution (replacing unit)i just want the replaced unit to have the +2 agi tome in the example and the skills..
 
Level 1
Joined
Aug 11, 2007
Messages
5
First, you need to understand warcraft III variables, i have picked some of them from a map i am working on. Basically the variables allows you to store data and transfer it from in this case from 1 unit to another.
for fast-finding the variable-editor click CTRL + B while in the trigger editor
  • Actions
Use Set trigger for theese
Skilllevel1-5 = your heros skills (Integer variable)
EXP = your heros experience (Integer Variable)
ITEM1-6 = your heros inventory (Item Variable)
  • Set Skilllevel1 = (Level of Inhuman Speed for (Hero manipulating item))
  • Set Skilllevel2 = (Level of Mesmerize for (Hero manipulating item))
  • Set Skilllevel3 = (Level of Mesmerize for (Hero manipulating item))
  • Set Skilllevel4 = (Level of Illusions of Time for (Hero manipulating item))
  • Set Skilllevel5 = (Level of Unholy Resistance (Hidden Vampire) (Ultimate) for (Hero manipulating item))
  • Set EXP = (Hero experience of (Hero manipulating item))
  • Set ITEM1 = (Item carried by (Hero manipulating item) in slot 1)
  • Set ITEM2 = (Item carried by (Hero manipulating item) in slot 2)
  • Set ITEM3 = (Item carried by (Hero manipulating item) in slot 3)
  • Set ITEM4 = (Item carried by (Hero manipulating item) in slot 4)
  • Set ITEM5 = (Item carried by (Hero manipulating item) in slot 5)
  • Set ITEM6 = (Item carried by (Hero manipulating item) in slot 6)
  • Set ITEM6 = (Item carried by (Hero manipulating item) in slot 6)
Here comes the actual unit replace trigger
  • Unit - Replace (Hero manipulating item) with a Human (Hidden Vampire) (AK-47) using The old unit's relative life and mana
Use Set trigger for theese
basically here you pour in the data you extracted for your hero A so the abilities and items look the same.
  • Unit - Set level of Inhuman Speed for (Last replaced unit) to Skilllevel1
  • Unit - Set level of Mesmerize for (Last replaced unit) to Skilllevel2
  • Unit - Set level of Drink Blood for (Last replaced unit) to Skilllevel3
  • Unit - Set level of Illusions of Time for (Last replaced unit) to Skilllevel4
  • Unit - Set level of Unholy Resistance (Hidden Vampire) (Ultimate) for (Last replaced unit) to Skilllevel5
  • Unit - Change ownership of (Last replaced unit) to Vampire1 and Change color
  • Hero - Set (Last replaced unit) experience to EXP, Hide level-up graphics
  • Hero - Give ITEM1 to (Last replaced unit)
  • Hero - Give ITEM2 to (Last replaced unit)
  • Hero - Give ITEM3 to (Last replaced unit)
  • Hero - Give ITEM4 to (Last replaced unit)
  • Hero - Give ITEM5 to (Last replaced unit)
  • Hero - Give ITEM6 to (Last replaced unit)
You can do the same for your hero stats by using variables tex,
HeroSTR = your heros Strength (Integer Variable)
HeroAGI = your heros Agility (Integer Variable)
HeroINT = your heros Intelligence (Integer Variable)
  • Set HeroSTR = (Strength of (Hero manipulating item) (Exclude bonuses))
  • Set HeroAGI = (Agility of (Hero manipulating item) (Exclude bonuses))
  • Set HeroINT = (Agility of (Hero manipulating item) (Exclude bonuses))
Then you give them to your new hero
  • Hero - Modify Strength of (Last replaced unit): Set to HeroSTR
  • Hero - Modify Agility of (Last replaced unit): Set to HeroAGI
  • Hero - Modify Intelligence of (Last replaced unit): Set to HeroINT
Hope it helps :wwink:

PS: Tell me if i got something wrong :p
 
Level 2
Joined
Nov 24, 2008
Messages
25
Isn't a hardcoded ability "Berserker" (morph) enough to do it?
The only one thing You'd need to do with triggers would be adding the ability to unit A.
 
Status
Not open for further replies.
Top