• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Adding Skill points at begging of game

Status
Not open for further replies.
Something like this?
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Hero - Modify unspent skill points of (Picked unit): Add (250 x (Strength of (Picked unit) (Include bonuses))) points
This is what you mean by Skill Points, right?
 
Yes, with triggers where you do some simple maths and multiply their hero level by 250. You then set their hero stats of strength and agility to that computed value.

You will probably want to run this when you spawn the units, so eithor on map initialization or directly after they get created/trained/built.
 
Moved to World Editor Help Zone. Need help getting started on a trigger? Triggers & Scripts is not the right place.

=Offtopic=
A lot of people was confused about this Triggers & Scripts and This Helping Board. XD. Even I got the wrong idea.

=Ontopic=
I wonder what abilities who he use... 50 levels per ability??? Now that's a lot. Then add the multiplyer.
 
WARNING: Questions regarding the creation of triggers or systems go here (not in Triggers & Scripts!)

Is that confusing even a little? Seems quite straight-forward.

And on Triggers & Scripts:

Need help getting started with a trigger? If so, this is not the right place - please use the World Editor Help Zone.

If you think this is confusing, let me know what needs to be cleared up and I'll request that the notes be changed.
 
Im trying to make it in my map where certain NPC's get 250* their level of strength and agility. anyone have a trigger that would do this?

This trigger would do the trick if the units are on the map at game start:

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Add <selected unit> to NPC_Group
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is in NPC_Group) Equal to True)) and do (Actions)
        • Loop - Actions
          • Hero - Modify Strength of (Picked unit): Add (250 x (Hero level of (Picked unit)))
You need a unit group action like the one above for each NPC on the map so they're all added to the NPC group before the pick action.

Got it?
 
Something like this?
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Hero - Modify unspent skill points of (Picked unit): Add (250 x (Strength of (Picked unit) (Include bonuses))) points
This is what you mean by Skill Points, right?

no i want it to ADD strength... Ok let me put it this way, i have a level 85 npc under browns (computer) control. At the very start of the game i want it to add 85*250 strength and agility
 
Just make a trigger that does exactly what you said?

Set unit strength to 250 * getherolevel
Set unit agility to 250 * getherolevel

There are natives to both get the level of a hero and to set the strength and agility and intelligence of a hero to any value. You can even use natives to get what value of strength or agility or intelligence a hero has with or without bonuses (green +X)
 
Capture.jpg

I think this is what your asking for, please tell me if it works.
 
Capture.jpg

I think this is what your asking for, please tell me if it works.

I edited it a little but it worked! :goblin_good_job: this is my finished trigger.
  • Extra NPC Skill ups
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to Player 12 (Brown)
            • Then - Actions
              • Hero - Modify Agility of (Picked unit): Add ((Hero level of (Picked unit)) x 250)
              • Hero - Modify Strength of (Picked unit): Add ((Hero level of (Picked unit)) x 250)
            • Else - Actions
              • Do nothing
 
I edited it a little but it worked! :goblin_good_job: this is my finished trigger.
  • Extra NPC Skill ups
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to Player 12 (Brown)
            • Then - Actions
              • Hero - Modify Agility of (Picked unit): Add ((Hero level of (Picked unit)) x 250)
              • Hero - Modify Strength of (Picked unit): Add ((Hero level of (Picked unit)) x 250)
            • Else - Actions
              • Do nothing

This is the fixed trigger of yours:
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Picked unit)) Equal to Player 12 (Brown)
        • Then - Actions
          • Hero - Modify Agility of (Picked unit): Add ((Hero level of (Picked unit)) x 250)
          • Hero - Modify Strength of (Picked unit): Add ((Hero level of (Picked unit)) x 250)
        • Else - Actions
1. Add the "set bj_wantDestroyGroup = true" for cleaning Unit Group leaks
2. Remove the "Do nothing" action because it practically does nothing, so why should you add ?
It will lessen your trigger performance
 
Status
Not open for further replies.
Back
Top