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

[General] Buying stats usings trigger, Like HLW lition

Status
Not open for further replies.
Level 7
Joined
Aug 5, 2010
Messages
147
I am currently modifying a Hero Line War Deluxe map and but it doesn't have the -agi max -str max and -int max commands that Hero Line War Lition has, i would like to add it to my map. and since most of the HLW L maps are protected i cant get the GUI triggers for the commands from them.

Could someone tell me how i would go about recreating the trigger/s in my map, thanks. Preferable in GUI format.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Player chats a message...

Get triggering player gold

increase stat by the stat per gold Ratio

Set gold to 0

It'll be a little more complex if and when you want the player to be able to choose how much gold to be used Instead of all
 
Level 7
Joined
Aug 5, 2010
Messages
147
Player chats a message...

Get triggering player gold

increase stat by the stat per gold Ratio

Set gold to 0

This really didnt help.

I presume that "get triggering player gold" would be done by setting a Integer variable to the triggering players current gold, but how do i make it so that for every 100 gold the player currently has, increase selected units Agi, Str or Int Attribute by 1, where and how do i set up the gold to stat ratio.
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
  • Nahkampf-Initialisierung
    • Ereignisse
      • Spieler - Spieler 1 (Rot) types a chat message containing -str max as Exakte Ãœbereinstimmung
      • Spieler - Spieler 2 (Blau) types a chat message containing -str max as Exakte Ãœbereinstimmung
      • Spieler - Spieler 3 (Blaugrau) types a chat message containing -str max as Exakte Ãœbereinstimmung
    • Bedingungen
    • Aktionen
      • Held - Modify Kraft of playerHero[(Player number of (Triggering player))]: Hinzufügen (((Triggering player) Aktuelles Gold) / 100)
      • Spieler - Set (Triggering player) Aktuelles Gold to (((Triggering player) Aktuelles Gold) mod 100)
Add more events for the missing players and adjust the gold cost for 1 stat (currently 100) in BOTH actions.

Do the same for agi, int. Sry for german editor...
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
You set it up with a handy thing some people math

You said you want 1 stat per 100 gold. So...

We could parse and have 1 trigger for all of these but since you're new it's not a big deal to have 3.

So for now we're working with the Strength one.

A player types -str max

Get their current gold...

say it's 3000 divide by 100

you get 30.

Since this is the strength trigger we now add this calculated number to the hero's strength.

Set their gold to 0 and we're all done
 
Level 7
Joined
Aug 5, 2010
Messages
147
  • Nahkampf-Initialisierung
    • Ereignisse
      • Spieler - Spieler 1 (Rot) types a chat message containing -str max as Exakte Ãœbereinstimmung
      • Spieler - Spieler 2 (Blau) types a chat message containing -str max as Exakte Ãœbereinstimmung
      • Spieler - Spieler 3 (Blaugrau) types a chat message containing -str max as Exakte Ãœbereinstimmung
    • Bedingungen
    • Aktionen
      • Held - Modify Kraft of playerHero[(Player number of (Triggering player))]: Hinzufügen (((Triggering player) Aktuelles Gold) / 100)
      • Spieler - Set (Triggering player) Aktuelles Gold to (((Triggering player) Aktuelles Gold) mod 100)

That trigger worked perfectly. Would it be possible to make floating text above the hero, informing the playing about how much str their hero just got, the floating text would be above the hero for 3 seconds and would also move with the hero. For example "+200 Strength" would appear above the hero. EDIT: the floating text would appear soild for 3 seconds before fading out over 2 seconds.


I would also like to know how to show the amount of str gained using a message, i tried doing this myself but i cant figure it out. this message would appear as such "Your Hero Gained 200 Strength"

EDIT2: I figured out how to do it by my self, no need to tell me how to do it now.

Here is the trigger that i currently have:

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -str max as An exact match
    • Conditions
    • Actions
      • Hero - Modify Strength of PlayerHero[1]: Add ((Player 1 (Red) Current gold) / 100)
      • Game - Display to Player Group - Player 1 (Red) the text: (Substring(Your Heroes Strength has been increased by:, ((Player 1 (Red) Current gold) / 100), 1))
      • Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) mod 100)
Don't forget to check first if player has enough gold. If not you may want to 'buy' max amount of stats that triggering player can buy with current gold.

No need to check first, the trigger uses all of the players current gold.
 
Last edited by a moderator:
Status
Not open for further replies.
Top