• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need help event/condition

Status
Not open for further replies.
Level 9
Joined
Feb 20, 2014
Messages
409
Hi,It's difficult to explain:
I buy an item "fight1" and this item is directly removed from my inventory.
Then a dialog window appears called "BET" and I can chose between 1000 and 4000 gold.Then I am teleported in an area vs a hero "herofight1"
This part is done.
How can I do to "if the dialog button "1000" is selected and "herofight1" die : Give 1000 gold to my hero?
Don't know how to do this double condition/event.
Help please
 
Level 11
Joined
Jan 23, 2015
Messages
788
First, you don't need an item, but a custom ability that does nothing, but is just used to detect when to open the dialog window.

As for how to detect when a dialog button is pressed, there is an event:
  • Dialog - A dialog button is clicked for BET
To check which dialog button is pressed, first you need to store all buttons into Dialog Button variables and use the condition:
  • (Clicked dialog button) Equal to 1000Gold
 
Level 9
Joined
Feb 20, 2014
Messages
409
RobertMKD Dialog button part and variable are ok.
IcemanBo like you said "depending on the arena result the system can give "x" gold to a player, where x is the gold variable. (integer)"
How to do this,this is my problem.
How to give x gold depending on Bet AND on the dying unit "herofight1"
Here is what I've done but it doesn't work,no reward when klling "herofight1"
attachment.php

(how do you copy and paste trigger?,image isn't really nice..
 

Attachments

  • trigger.jpg
    trigger.jpg
    25.6 KB · Views: 103
Last edited by a moderator:
Level 9
Joined
Feb 20, 2014
Messages
409
Yes but the problem is the double event,I want to give x money if the unit die (It works I did it) AND if the bet button clicked was x gold.
The probleme is there I want the 2 events to get completed to give the reward because depending the dialog button clicked you will have a different amount of gold.
 
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

As said, when the dialog is cliked you set a integer variable for example "GoldAward".

Now when the correct hero dies you can give the "GoldAward".

Of course you will need to know who ti give the gold then.
This can be done with PlayerGroups for example.
When pressing the dialog, you can add players to a certain player group.
But there are multiple solutions how to do this.
 
Level 11
Joined
Jan 23, 2015
Messages
788
Dude, think logically, what do you need to store? The gold amount!

If you are going to use the gold amount the player bet, then save/store it into an integer variable (example: GoldBet[PlayerNumber] = 4000).. Then use that variable in the trigger where a hero dies and the killer is awarded.
 
Status
Not open for further replies.
Top