skill points for hero=0

wassat676

New Member
Reaction score
3
i was wondering if there was a way i could change the heros starting ability points to zero, this must happen when the hero has been selected from a taver (think rpg) because each level the hero gets 2 skill points and the first skill point obtained at the start of the hero is throwing off the balance
 
S

ShadeShadow

Guest
Custom Heroes

I think it has to deal with editing that hero in the "object editor" and changing the heroes custom ability.

Sorry I couldn't be more specific; don't have a WE to confirm my info. :eek:
 
I

iNsaNe

Guest
There is a player selection event, and there is a Hero - modify skill points action
 
S

ShadeShadow

Guest
Much better

iNsaNe said:
There is a player selection event, and there is a Hero - modify skill points action

That works much more better than my idea :nuts: lol.
 

wassat676

New Member
Reaction score
3
yes but that selection even is not what im talking about, when you select a hero froma tavern in my map, your wisp diappears and the hero is automatically transferred to a region. When the hero gets to that region, i need him to lose all of his skill poins. But the problem is, if someone were to walk in there later, they wud lose their skill points if they had any. Thinking on it, it is sort of unlikly that sum1 wud get that far into town with a skill point but im trying to be thourogh and learn at the same time. If there is a condition to check the heros level that wud work for me, is there?
 
I

iNsaNe

Guest
OK. Were gonna have an integer that if they are 0 then they will lose their skill points, if it's 1, the trigger wont work

Events-
Unit enters LoseSkillPoints<gen>

If Then Else:
Conditions-
If INTEGER = 0
Then-
Hero - Set Skill Points to 0
Set INTEGER = 1
Else-
Do nothing

EDIT: you can set the INTEGER variable to an array

Set INTEGER[Player number(owner of(triggering unit))] = 1

[Player number(triggering player)] wont work for some reason
 

Tom Jones

N/A
Reaction score
437
what you need to do is:

Event
A unit enters whatever.
Conditions
If custom value of triggerunit is equal to 0
actions
//under hero actions you'll find an action that goes:
hero - modify unspent skillpoints for triggerunit subtract 1
unit - set customvalue of triggerunit = 1

if you allready are using unit customvalues, then a global boolean variable, with as many arrays as you got player, might be the solution. But if i were to make this, i would make it in jass, and have 2 functions, one serving as a trigger, the other performing the actions + turning off the trigger in the end. The trigger function executes when a unit enters a region, runnning the function with actions.

insanes idea is good to :D
 
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