Stats adding problem

Status
Not open for further replies.
Level 6
Joined
May 20, 2010
Messages
274
ok im currently making MY VERY FIRST rpg map (my first map ever) and im currently making a system to add stats by pressing escape button (Esc)

so far i made a dialog already that when you press escape i dialog will appear saying: "Add stats to:" and has three dialog buttons: "Strength", "Agility" and "Intelligence" and it actually works! when i click one of them.. it adds stats....BUT!!!! one i want it to have a payment like 1 stat add costs you 1 lumber and the problem is that there is no payment for the stats i dont know how i can make it with 1 stat is to 1 lumber please help me with this atleast tell me how :cry:

and one more problem (actually i've just think of this just right now):
how can i make the hero earn 5 lumber whenever he levels up? pls answer my questions! its turning me crazy :cry::cry:
 
Level 16
Joined
Jan 31, 2009
Messages
1,793
I'll try to help you from what I can remember for your second question..
EVENT - A unit levels up
CONDITION -
ACTION - Add 5lumber to owner of leveing unit current lumber

It should be something like that but currently I don't have warcraft 3 on this computer.

Well for the first you can have a condition so that it -1 lumber if they press esc and checks if they got 0 to stop the dialogue from popping up.
 
Level 6
Joined
May 20, 2010
Messages
274
well then thats my problem with the first one
i cant find the condition :p
but i'll try :p if i cant still find ill ask you again hehe

well maybe a picture would really help me :D

EDIT: found it! thnx btw and how can i +rep?? i actually dont know :D if youll teach me ill give you one ^_^
 
Last edited:
Level 10
Joined
Mar 16, 2009
Messages
354
how can i make the hero earn 5 lumber whenever he levels up?

Trigger:
Event - Generic Unit Event - a 5 unit gains a level
Action - Player - Add Property - add 5 lumber to (owner of (triggering unit))

payment like 1 stat add costs you 1 lumber
To make them cost lumber:
Trigger:
Event - Dialog button is clicked
Condition - Integer Comparison - player property - ((Triggering player)'s Current lumber) Greater than or Equal to 1
Action - Player - Add Property - Add -1 lumber to (triggering players) current lumber
Action - Hero - Modify attribute - add 1 strength to (VariableHero)

VariableHero would need to be set at a previous time.
repeat the trigger for all 3 stats and buttons.
 
Level 6
Joined
May 20, 2010
Messages
274
yah yah i know that already light bolt already said now theres come my NEW PROBLEM >.<
my map has so many heroes (81 to be exact) and i used the hero tavern selection so now the problem is it depends on the player what hero he will choose and i only know how to add stats on one unit ONLY..what i think is that this needs some variables or something like that and I DONT KNOW HOW to that pls help :)
 
Level 6
Joined
May 20, 2010
Messages
274
yah yah i know that already light bolt already said now theres come my NEW PROBLEM >.<
my map has so many heroes (81 to be exact) and i used the hero tavern selection so now the problem is it depends on the player what hero he will choose and i only know how to add stats on one unit ONLY..what i think is that this needs some variables or something like that and I DONT KNOW HOW to that pls help :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
I advise strongly against this sort of stat system unless stats value is greatly reduced otherwise you generally end up with agi heroes or such pumping damage related attributes to buggery and no points in other attributes.

Even in Diablo II that was one of its main faults. Everyone only got as much dex for block/gear and str for gear, everything else was in vit leaving none in energy.

Anyway to answer your question, you simply use in if statement to run code for only if the player has 1 or more stats avaialbe. The code run is simply remove 1 from available stats and add 1 to that heroes attribute. Else you just display a error message like "Not enough free points."
 
Level 7
Joined
Jun 14, 2009
Messages
235
When you buy (or in your case choose) the hero from the Tavern, the trigger will "save" the unit in a variable... Then later you can refrence that variable, and it will load the saved unit.

Besides that idk what else you want to know...
 
Level 6
Joined
May 20, 2010
Messages
274
you mean it auto assigns the hero into a variable????

but all i know is the sell thing and i think that what youre saying is the "last sold unit"

am i right :D
 
Level 6
Joined
May 20, 2010
Messages
274
you mean it auto assigns the hero into a variable????

but all i know is the sell thing and i think that what youre saying is the "last sold unit"

am i right? :D
 
Status
Not open for further replies.
Top