About texts ingame

nome

New Member
Reaction score
0
well i need to make a floating text, when a unit dies.
its something like this:

If - Conditions
(Unit-type of (Dying unit)) Equal to Hormiga
Then - Actions
Hero - Add ((Level of (Triggering unit)) x 4) experience to (Killing unit), Show level-up graphics
Floating Text - Create floating text that reads (HERE COMES MY TEXT) at (Position of (Dying unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency

my text should say: You have won (Level of (Triggering unit)) x 4) experience
but i need a way to make it universal for every unit..
i have 37 units

Is there a way to save the amount of exp that my hero has just won into a Variable?

so in the text i can use the Variable instead of different texts?

also:
---

when i'm attacking a unit, and i'm about to kill it, if an enemy comes
or an ally comes (the exp is not shared with allies) and kill it, he takes the whole experience and i get nothing..
is there a way to make the unit attacked, to give only exp to the first player who attacked it?

thanks!!
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
set <variable(integer)> = (Level of (Triggering unit)) x 4)


2:)

hmmm... possible. but probable.
 

nome

New Member
Reaction score
0
yea but it's not universal...
i need to make it universal...
the x4 is the amount of exp they'll get.
if there are different units, i need to set differents multipliers..
 

Weyrling

New Member
Reaction score
25
yea but it's not universal...
i need to make it universal...
the x4 is the amount of exp they'll get.
if there are different units, i need to set differents multipliers..

You can't simply change the levels around so it matches properly?
Max unit level can be set to 100, and you could simply set all the units individually to a level that multiplies to the proper amount.
 

nome

New Member
Reaction score
0
not possible, already tried...

if there is no way, then i'll do it one by one..
i was asking in case there is...

thanks, anyway!
 

the Lumpy

►►►
Reaction score
53
There's always a way... you just might have to go in a different direction than you're expecting.

If I understand correctly, you could save the multiplier for each unit in that unit's custom value. Then you could use (Level of (Killing unit)) x (Custom value of (Dying unit)) to get the experience. Of course, you'd still have to figure out some way to set the custom value for each unit, but hopefully it's less work than making a separate text message for each type of 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