Show experience earned

  • Thread starter Thread starter team.ism
  • Start date Start date
T

team.ism

Guest
Is there a way to set how much experince you earn per kill to a variable. I want to do this:

Set [variable] = [Exp Earned]

Show [variable] over my units head.

I know how to show the experience I just need to know how to store how much experience I earn per kill.
 
This only works for a single Hero, unfortunately... it's fairly tricky for multiple units. Requires an Integer variable called CurrentXP.
Code:
XP Display
    Events
        Unit - A unit Dies
    Conditions
        (Killing unit) Equal to [i]<your Hero>[/i]
    Actions
        Floating Text - Create floating text that reads ((String(((Hero experience of (Killing unit)) - CurrentXP))) +  XP!) above (Killing unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 100.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the fadepoint of (Last created floating text) to 2.00
        Floating Text - Change the lifespan of (Last created floating text) to 3.00
        Set CurrentXP = (Hero experience of (Killing unit))
 
Its just a string he typed so that the floating text reads:

"Variable number" XP!
OR
864 XP!

dArKz
 
o. Man im really losing it today.


o yeah and it works that is just amazing.
 
Heptameron said:
This only works for a single Hero, unfortunately... it's fairly tricky for multiple units. Requires an Integer variable called CurrentXP.
Code:
XP Display
    Events
        Unit - A unit Dies
    Conditions
        (Killing unit) Equal to [i]<your Hero>[/i]
    Actions
        Floating Text - Create floating text that reads ((String(((Hero experience of (Killing unit)) - CurrentXP))) +  XP!) above (Killing unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 100.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the fadepoint of (Last created floating text) to 2.00
        Floating Text - Change the lifespan of (Last created floating text) to 3.00
        Set CurrentXP = (Hero experience of (Killing unit))


Ohh, I can fix this up to work as any player :)

Code:
GOD TRIGGER
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Killing unit)) slot status) Equal to Is playing
        ((Owner of (Killing unit)) controller) Equal to User
    Actions
        Floating Text - Create floating text that reads ((String(((Hero experience of (Killing unit)) - CurrentXP))) +  XP!) above (Killing unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 100.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the fadepoint of (Last created floating text) to 2.00
        Floating Text - Change the lifespan of (Last created floating text) to 3.00
        Set CurrentXP = (Hero experience of (Killing unit))
 
Senkin said:
Ohh, I can fix this up to work as any player :)
Am I missing something? Because from where I'm standing, it wouldn't work. There's only one CurrentXP variable.
 
try using custom value of the hero instead of a variable, and add in a condition to make sure a hero killed it.
 
It works fine for single player, but like the guy two posts up said, there is only one variable. You would likely need a variable per player. Again great job on this one guys.
 
team.ism said:
It works fine for single player, but like the guy two posts up said, there is only one variable. You would likely need a variable per player. Again great job on this one guys.

Thats what arrays are for, just edit the variable to have X array where X is the number of human players, then when u set Variable[X] replace X with Player - Player number of (Owner of (Killing Unit))
 
but then you can onl have 1 hero per team. if you want more than 1 hero per player then use custom value of the unit to keep track of xp.
 
I dont even see why we needed variables...do something like when a unit kills a unit, if type of killing unit is a hero then Game - Display to (owner of killing unit) the text: (Your Heroes experience: + (String((Hero experience of Unit)))) where unit is killing unit etc...

Floating text is just stupid anyways its way to easy to bug out.
 
um, Rad, what you described will only show my current experience. It will not show how much I got for killing the creep.
 
Yeah im sure thats true but if you kill 2 at the same time and it displays 2 floating text then 1 doesnt go away because floating text sucks well then would you rather have a messege? Or you could put it in a leaderboard with hero attributes... Ive done that before in a map with 5 custom attributes and custom exp system it was really nice :)

EDIT: Oh lol the rest of the suggestions were just XP not how you determine that sorry... but you could just turn exp gain from creeps off then just use an equation working the lvl of the creep into it just like the normal one did, then display the result as text and add that to your heroes exp walla... if you need an equation just ask.
 
Sure I would love some equations. I tried some of my own but as I was thinking of them my head imploded. After cleaning the mess, I decided to just use the stardard exp system and set the exp rate to 50% or so.

Also if you disable experience gain you can't gain it even with the action, add experience to hero. You would have to set exp rate to 0%.

I know how the standard system works, it says in the gameplay constants. It's just that I graduated 4 years ago so I'm hella rusty in math. (As well as the neck area. Ever since the tin man came over...)

Anyway, Floating text sucks only if you use the standard floating text option. I use WEU and it has an advanced actoin called Floating text - Show fading text.

It shows the text rise from wherever you put it for about 2 secs or less then disappears. I always put it right above the dying units head.

anyway send some of those equations my way, but make sure they will give adequate exp for higher levels. (I don't think I will put a cap on levels, so say 10000 is the highest)
 
I was trying to come up with some equations that would make each level require more kills... Kinda started getting lost when i realized its going to have to use blizzards exp system... so... Ill keep trying some when i get 1 that works ill let you know. (Remember my experience system was custom, using the custom values)
 
I tried to make a custom one also using custom values.

It's so insane that I will post it. And before anyone says anything, I know i is very inefficient.

Code:
Event
[INDENT]Unit - A unit owned by Neutral Hostile Dies[/INDENT] 
(No Conditions)
Action
[INDENT]Set CreepLevel = (Level of (Dying unit))[/INDENT][INDENT]Set HeroLevel = (Level of (Killing unit))[/INDENT] 
[INDENT]If (CreepLevel Less than HeroLevel) then do (Set ActualExp = ((Real(CreepExp[CreepLevel])) - ((Real(CreepExp[CreepLevel])) x (((Real(HeroLevel)) - (Real(CreepLevel))) / 100.00)))) else do (Do nothing)[/INDENT]
[INDENT]If (CreepLevel Equal to HeroLevel) then do (Set ActualExp = (Real(CreepExp[CreepLevel]))) else do (Do nothing)[/INDENT]
[INDENT]If (CreepLevel Greater than HeroLevel) then do (Set ActualExp = ((Real(CreepExp[CreepLevel])) + ((Real(CreepExp[CreepLevel])) x (((Real(CreepLevel)) - (Real(HeroLevel))) / 100.00)))) else do (Do nothing)[/INDENT]
[INDENT]Advanced - Show (|cff00aaff+ + ((String((Integer(ActualExp)))) + |r)) with color (Gold,Gold,Gold) at point ((X of (Position of (Dying unit))),(Y of (Position of (Dying unit))))[/INDENT]
[INDENT]Hero - Add (Integer(ActualExp)) experience to (Killing unit), Show level-up graphics[/INDENT]


By the way there are about 5 variables used. CreepExp is an array and is set in another trigger. I set the exp for each level there. Do you see why I was confused now?
 
I was thinking of just doing something like 'unit dies' 'set <expgain> = (Level of dying unit x 20)'... just alot more complex but i cant really think of anything right now :banghead:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top