• 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!

[Trigger] need help, scoreboard+variable+merchant trigger

Status
Not open for further replies.
Level 7
Joined
Oct 6, 2006
Messages
293
Alright im making a mercenary hiring system for my beta map. I dont quite understand variables but here is basically what im trying to do.
(The merc hirer is spawned by hero in range)

1. I have a mercenary shop with just 1 mercenary.

2. When i buy my first mercenary im going to put up a scoreboard that says like mercenary points or i can have it up at init, thats fine to. That would be less complicated.

3. When i train the unit i want it to increase the merc points to on the scoreboard by 1.

4. When the merc points get to 10 i want it to turn on a trigger that spawns a different merc hirer, he will have an extra unit for all the funding.

So i come near a spot, it spawns a shop guy, i buy a unit, it increases a variable by 1 that when at like 10,20,30 i will turn off a trigger and turn on a diff one that has more units. The scoreboard is just to show the points but i dont really need it. Maybe just have it typed like -merc points and it will show the points like that.

I would like it to add more then 1 point for more expensive units but i can tinker with that if anyone can help me get the basic foundation explained to me.
 
Didn't really understand what you want to make but I think this should help

  • Unknown
    • Events
      • Events
    • Conditions
    • Actions
      • Set Integer = (Integer + 1)
      • Leaderboard - Change the value for (Some Player) in (Your Leaderboard) to Integer
  • Unknown2
    • Events
      • Unit - A unit enters Your Region
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Integer Greater than or equal to 0
              • Integer Less than 10
        • Then - Actions
          • Do actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Integer Greater than or equal to 10
                  • Integer Less than 20
            • Then - Actions
              • Do actions
            • Else - Actions
 
cool that helps

Ill try to spread the idea out more.

Unit enters a region. It spawns a mercenary shop npc depending on number in a variable. Its a 1 at the beginning or 0 i guess
1 could spawn shop keeper 1 and 10 could spawn shop keeper 2

The variable is a thing im looking for to store information like everything i train a unit from the shop person, it increases a number by 1. So in when you have a 10 you get a better shopkeeper to spawn.

Idk if this variable would have to be a integer and or with an array of like 10
it needs to go to 10, idk if a integer array of 10 will cap it at 10 and at the beginning i can set it to 0.
 
You would need a Integer or a Real (Integer = 1,2,3,4,-1,-2,-3,-4 etc. I think it gets to like 124k ? need to learn programming to know that lol, Real = 1.01,1.024345367 Etc.).

A harray means how much instances of the same variable you can use at the same time.

You would usually like to set it to 1 (default) to make it infinite.
The harray ISN'T a VALUE of a variable.
It means you can for example set diffrent values for Variable[1], Variable[2] Etc.

For this you would need to use harrays (or use multiple variables) because you need a diffrent value for each diffrent player.

If you need furter explaination ill be glad to explain.
 
Ok i think i got it now. It'll take me awhile to figure this out completely so if anyone has any free time feel free to try it in a map and submit :). Ill be using 8 players so i guess ill need 8 instances.

If anyone can do this before me, which will be awhile :|, ill give u credit in my upcoming map "Castle Siege". Please and Thank You if you choose to =).
 
Status
Not open for further replies.
Back
Top