I'm implementing a leveling system in my map and I would like to link a hero's level with his art scale, so that each time the hero goes up in level he also gets, say, 5% larger.
Does anyone know how I should go about doing this?
That looks like it would work for the first level up. However, what happens when the unit levels up again? Then I think nothing would happen, since the scale would still be 1.2. Is there a way to increment the scale, so that it adds like .05 to the scale upon each level?
General - Switch (Actions) depending on (Experience level of (Triggering unit))
Cases
General - If (1)
Actions
Actor - Send actor message "SetScale 1.05" to main actor of unit <triggering unit>
General - If (1)
Actions
Actor - Send actor message "SetScale 1.10" to main actor of unit <triggering unit>
Default
Or you could set a variable each time the thing is run, and then send the actor message as a conversion:
variable:
heroscale[array#ofplayers] <real>
Actions
modify variable heroscale[ownerofunit(triggeringunit)] + 0.5
Send Actor Message To Unit
Message: Convert String To Actor Message
Value: Combine Strings
String 1: "SetScale("
String 2: heroscale[ownerofunit(Triggeringunit)]
String 3: )
Unit: No Unit
However i dont know myself how you write it out like that
It's not a key feature of my map, but I think it will add a lot to see your hero grow in size with it's level. The map is based on the concept of you being much larger than your enemies, but if you start out so huge than you'll look really imposing but actually be pretty weak at level 1.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm implementing a leveling system in my map and I would like to link a hero's level with his art scale, so that each time the hero goes up in level he also gets, say, 5% larger.
Does anyone know how I should go about doing this?
@Kreusser: Go
You could use a trigger to register when the hero levels up and then send an actor message to the unit to increase the scale.
so:
Level UP!
Events
Unit - Any Unit gains an experience level
Local Variables
Conditions
Actions
Actor - Send actor message "SetScale 1.200000" to main actor of unit <triggering unit>
@Torrak: Go
That looks like it would work for the first level up. However, what happens when the unit levels up again? Then I think nothing would happen, since the scale would still be 1.2. Is there a way to increment the scale, so that it adds like .05 to the scale upon each level?
Thanks for the reply, btw!
You could add a switch.
General - Switch (Actions) depending on (Experience level of (Triggering unit))
Cases
General - If (1)
Actions
Actor - Send actor message "SetScale 1.05" to main actor of unit <triggering unit>
General - If (1)
Actions
Actor - Send actor message "SetScale 1.10" to main actor of unit <triggering unit>
Default
Or you could set a variable each time the thing is run, and then send the actor message as a conversion:
variable:
heroscale[array#ofplayers] <real>
Actions
modify variable heroscale[ownerofunit(triggeringunit)] + 0.5
Send Actor Message To Unit
Message: Convert String To Actor Message
Value: Combine Strings
String 1: "SetScale("
String 2: heroscale[ownerofunit(Triggeringunit)]
String 3: )
Unit: No Unit
However i dont know myself how you write it out like that
@Torrak: Go
Thanks!
I'll give it a try when I get home for work.
It's not a key feature of my map, but I think it will add a lot to see your hero grow in size with it's level. The map is based on the concept of you being much larger than your enemies, but if you start out so huge than you'll look really imposing but actually be pretty weak at level 1.