• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] About storing a unit

Status
Not open for further replies.
Level 4
Joined
Dec 10, 2008
Messages
59
Hi.

I'm currently working on a (spellbook) skill that gives you a few other skills when you open it.

Ok, the skills inside the spellbook are skills that makes the hero transforms into different "modes" (different heroes with different skills) but ALL of the "modes" share the same amount skill points spent and all levels of the skills of the initial hero will be in relevance to the transformed hero.

Now the question:

How do i store the initial hero, so that when he, in the form of any of the transformed forms, when chose to revert back to the initial form, will share any exp gained when he was in the transformed form and any skill points spent when he was in the transformed form. and wise versa.

I understand that this needs caching, which i'm oblivious too.

Also, if this requires JASS, can you tell me at least what functions to input?

Thanks =D
 
Level 4
Joined
Dec 10, 2008
Messages
59
You don't need Jass, just use some variables.

Integers for exp amount, and when a hero converts just set xp to that integer. And set that integer to the amount of xp of new hero vorm.
For the skill points, if they share similar spells just upgrade the skills using simple triggers lol.

Piece of cake.

hmm...they don't share similar spells D=

as in, initial hero has...say Immolation Level 6, and connected to the the 2nd transformation's 2nd skill (say...Blizzard).

Now, how do i, with initial hero having Immolation Level 6, transform into 2nd transformation with Blizzard level 6?
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
hmm...they don't share similar spells D=

as in, initial hero has...say Immolation Level 6, and connected to the the 2nd transformation's 2nd skill (say...Blizzard).

Now, how do i, with initial hero having Immolation Level 6, transform into 2nd transformation with Blizzard level 6?

I don't know.. xD Maybe storing the spell in an integer.
Spell1 (contains level of first spell), Spell2 (contains level of second spell) etc.
Then just check what integer it has and level up his second third or fourth skill to that integer.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Set LevelVar = (Level of Immolation for YourHeroType1)
  • Set ExpVar = Hero Experience of (YourHeroType1)
  • Unit - Set Level of Blizzard for YourHeroType2 to LevelVar
  • Hero - Set (YourHeroType2) Experience to ExpVar, Hide level-up grafix
That should work
 
Status
Not open for further replies.
Top