• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Floating Experience

Status
Not open for further replies.
Level 1
Joined
Jun 5, 2008
Messages
151
Hey, I found this thread:

http://www.hiveworkshop.com/forums/world-editor-help-zone-98/xp-211230/

but I cannot find a way to put this integer value...

Floating Text - Create floating text that reads (String(((Hero experience of (Killing unit)) - i)))

its called "i" I tried many ways around but no matter what I cant find a way to put it inside of triger lol...also integer value is called R? or its C? cuz I dont use english warcraft I cant find it so i use R. I hope someone can help me out ^^
 
Level 8
Joined
Aug 13, 2009
Messages
466
This is the relevant text:
i is an integer variable where you store the hero's exp. If you have multiple heroes then you need to use a hashtable or a integer array.
Well, perhaps I can expand on this a bit. I might get too technical though..

You need to have something that stores the experience for every hero you want to use the 'system' on the map.

One thing to note is this: If you have only one hero (or perhaps, just a maximum allowed) per player, this gets much easier. In that case, use an Integer Array, which you fill using Player Number of (Owner of(Killing Unit)) (or something similar).
If you want to have unlimited numbers of heroes per player, you will need to
look into hash tables. I'm sure there are tutorials on this very site about it.
 
Level 1
Joined
Jun 5, 2008
Messages
151
1 hero per player, possible repick, but you havent answered my question :/ What to do with that "i" integer, How to put it into trigger? to put it simply, its too complicated and I cant find a way to put it in trigger lol :>
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
1 hero per player, possible repick, but you havent answered my question :/ What to do with that "i" integer, How to put it into trigger? to put it simply, its too complicated and I cant find a way to put it in trigger lol :>

first you must create the "Integer Variable" named "i".
1. Go to trigger editor.
2. Press CTRL + B, there will appear a tab called "Variables".
3. press CTRL + N to create a new variable.
4. Type the name of the variable (in your case it's named "i").
5. From the dropdown menu of Variable Type choose "Integer".
6. Press OK.
7. Press OK.

now you already got your Integer Variable called "i" and you want to put it into your trigger :

1. right click on the 'Action' of your trigger.
2. choose 'New Action'.
3. from the dropdown menu, choose 'Set Variable'.
4. click the underlined Variable and all list of your variable will appear there, choose your Integer variable "i".
5. in the underlined Value field, choose 'Hero - Hero Experience'.
6. change the (Triggering unit) into (Killing unit).
7. Press OK.
8. Press OK.

EDIT : hmm, what i explain is about this

  • Set i = (Hero Experience of (Killing unit))
you should be able to do the rest i think.
tell me if you need more guide.
 
Level 1
Joined
Jun 5, 2008
Messages
151
Thanks alot :) but as I said in my first post I am not using English w3 editor so:

5. From the dropdown menu of Variable Type choose "Integer".

I cant find it even if i translate it to my language I cannot find it, could you add a map with just this integer variable so I will know which one is it? Thats all I need thanks alot +REP

@UP

yes read first post :> I dont know how to create this trigger because it doesnt fit in there...not sure how to say this :>


@EDIT:

to make it even simplier to understand my problem:

Floating Text - Create floating text that reads (String(((Hero experience of (Killing unit)) - i)))

that red part I dont know how to put it in trigger, I can make whole trigger easly but this part just dont fit in there ^^
 
Status
Not open for further replies.
Top