retain hero stats?

akuzaid93

New Member
Reaction score
3
I've make it possible for players in my map to change his/her hero. the question is, how can the previous hero stats( gained from tome ) to be "inherited" by the new hero?
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
please explain a little more how you "change" your hero :x I'm sure you could just transfer stats by setting integer variables, if its in more than one trigger, or you can just hero- set Str to Str of triggering unit or something like that.
 

akuzaid93

New Member
Reaction score
3
***a unit enters region
***unit is hero
***remove trig unit
***create new unit
that's how, i got your idea.

I'll come again if that doesn't work.
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
okay then:
Code:
Hero - Modify Strength of (Last created unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
should be what you're after
 

Sajin

User title under construction.
Reaction score
56
if you only want to keep the bonuses from when it uses a tome, then that wouldn't work quite right, especially if the two units have different starting stats,
you will have to store the data in variables each time the controller uses a tome add one to an integer variable
ex.

Unit uses an item

Item = to Tome of Strength

Set Tome_Strength(Player number of Owner of Hero Manipulating Item) = Tome_Strength(Player number of Owner of Hero Manipulating Item) + 1



then to add them use this

Unit is Replaced

Replaced Unit is a Hero

Modify Strength of Last replaced unit: Set to Strength of replaced unit + Tome_Strength(Player number of Owner of last replaced unit)
Modify Agi of Last replaced unit: Set to Strength of replaced unit + Tome_Agi(Player number of Owner of last replaced unit)
Modify Intel of Last replaced unit: Set to Strength of replaced unit + Tome_Intel(Player number of Owner of last replaced unit)
 

akuzaid93

New Member
Reaction score
3
if you only want to keep the bonuses from when it uses a tome, then that wouldn't work quite right, especially if the two units have different starting stats

It goes to hundreds when i set the attr = triggering unit.


\\i know it won't be that simple.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top