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

Skill Selection System By Dialog Box

Status
Not open for further replies.
Level 4
Joined
Apr 1, 2004
Messages
37
Ok, For my map im working on I have decided to make a Skill selection system with a dialog box. I have made the dialog box and buttons for the skills and an exit button. But i have yet to figure out how i can get the skill i wanted from the button i clicked. It won't place it on the hero. Trigger looks like this

Events
Player - Player 1 (Red) Selects a unit

Conditions
(Triggering unit) Equal to Master Trinel 0001 <gen>
(Level of (Triggering unit)) Greater than or equal to 5

Actions
Dialog - Create a dialog button for SelectSkill labelled Bash
Set BashDialog = (Last created dialog Button)
Dialog - Create a dialog button for SelectSkill labelled Exit
Set ExitSkill = (Last created dialog Button)
Dialog - Change the title of SelectSkill to Skills
Dialog - Show SelectSkill for (Triggering player)

next trigger

Events
Dialog - A dialog button is clicked for SelectSkill

Conditions
(Clicked dialog button) Equal to BashDialog

Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Unit - Add Bash to (Leveling Hero)
Else - Actions
Dialog - Clear SelectSkill

Could someone help me on this i need to get this to work before i can continue my map :\. Im working on it right now and i think im onto sumtin so if i get it i'll let u guys know
 
Level 7
Joined
Mar 26, 2004
Messages
350
you have the false condition : triggering unit refers to nothing because u have no triggering unit (sounds a little bit strange) in this trigger
try : if triggering player equal to player 1 , then do "actions"

P.S.: I haven't tested, so u have to try
 
Level 13
Joined
Jan 9, 2004
Messages
1,037
Or even easier, just create a unit varibale (i'll call it Master_Trinel) and in the first trigger, at the beginning add the Set Master_Trinel = (Triggering unit) action. Then the second trigger should be like this:
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions) 
If - Conditions 
(Owner of (Master_Trinel)) Equal to Player 1 (Red) 
Then - Actions 
Unit - Add Bash to (Master_Trinel)
 
Status
Not open for further replies.
Top