• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[REQ Trigger] Wood 'N' Gold

Status
Not open for further replies.
Level 14
Joined
Jul 28, 2009
Messages
1,085
Hey guys, im in the need of a trigger that can make player red say:
-Wood (amount) (color)
-Gold (amount) (color)

And give gold/wood to the player he wants too.
And when he gives them gold or wood, i want a message too say:

(PlayerRedName) gave (amount) (Gold or Wood) to (PlayerColorName).

Thanks! :wink:

- Oh and it has too be in Gui :]
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
Ya, don't think I can do this without Jass. Can't figure out how to do an Exitloop in GUI, and I need it to detect how long the number string is.


Disregard that, it just means multiple triggers then :/

I can skip all remaining in the trigger, just can't exit a loop with GUI
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
Here cha go.

Entirely GUI, 2 triggers, has instructions, and is entirely to the specifications you gave, plus some.


Note: the filesize is due to me getting bored and adding a bunch of raccoons in water.

2nd note: I could make it a single trigger with some more work and a bit of recursive magic, I might do so out of boredom.



Edit: Recursive magic done, single trigger, and now MUI except with itself. It's in File 2, left File 1 for reference.
 

Attachments

  • UserFriendlyGive.w3x
    42.4 KB · Views: 43
  • UserFriendlyGive2.w3x
    42.5 KB · Views: 56
Last edited:
Level 14
Joined
Jul 28, 2009
Messages
1,085
Here you go.
It's partially in JASS, however i used custom scripts so the actual trigger is in GUI and it's way shorter thus more efficient. Also you won't need to edit the JASS part at all anyway.

Ty Garfield, but i prefer the GUI one, but you defn deserve a +REP for helping :)


Here cha go.

Entirely GUI, 2 triggers, has instructions, and is entirely to the specifications you gave, plus some.


Note: the filesize is due to me getting bored and adding a bunch of raccoons in water.

2nd note: I could make it a single trigger with some more work and a bit of recursive magic, I might do so out of boredom.



Edit: Recursive magic done, single trigger, and now MUI except with itself. It's in File 2, left File 1 for reference.

Thank you Very much sir, just what i needed! :)
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
Ty Garfield, but i prefer the GUI one, but you defn deserve a +REP for helping :)
Your choice, though i only used JASS for part that doesn't have to be edited anyway and the trigger is much shorter.

Hmm...There's a bug in BlargHonk's test map - if you type "-give gold blue" (or any other color), the game will instantly exit. I think it's an infinite loop connected to Run Trigger action.
Also, i'm not sure if eMo2LoVe wants this, but red's resources don't get deducted upon sending.
 
Level 14
Joined
Jul 28, 2009
Messages
1,085
Your choice, though i only used JASS for part that doesn't have to be edited anyway and the trigger is much shorter.

Hmm...There's a bug in BlargHonk's test map - if you type "-give gold blue" (or any other color), the game will instantly exit. I think it's an infinite loop connected to Run Trigger action.
Also, i'm not sure if eMo2LoVe wants this, but red's resources don't get deducted upon sending.

Mine was working fine, and you have to type an amount of gold.
hm, but i will take a look at this.
 
Status
Not open for further replies.
Top