S
SoCal_420
Guest
Q-What is a dialog attribute system. ?
A- Its a System where every time you level up you get 3 attribute points. then you press the escape key and pick wich attributes you will add with those points.
Setup
First off we will create all the variables we need for the first couple triggers:
1. Name = Dialog
Type = Dialog
2. Name = Buttons
Type = Dialog Button Array
Now we start the triggers.
Trigger One
the first trigger will open the dialog.
1. the events are..
this allows us to press escape to open the dialog menu.
2. next the conditions must check if you have attribute points or not or else you cuold just get as many stats as you want.
3. Now to setup and show the dialog. in this trigger we set all the buttons and put them into a variable.
Trigger Two
in this trigger we will make the actions for the clicked button.
1. The "event is a dialog is clicked for Dialog" Dialog being the variable you made. it should look like this.
2. next create a action if/then/else so we can put all the clicked dialogs in 1 trigger instead of 3.
if condtion being -
[/QUOTE]
Now repeat that until you have all the buttons set to add Str, Int , Agi.
The end should look like this
Yea its long but u need it.
[/CODE]
Dont forget to add the "Close Button"
Trigger three And Four
you could imput this into the seconds trigger but i make another to make the seconds trigger not so long.
1. in this trigger we make it so when the player runs outa attribute points the dialog closes
trigger four is the trigger so whem you level up you get the attribute points.
if for some reason you didnt understand something POST IT HERE and ill clarify it.
Check out the demo map
A- Its a System where every time you level up you get 3 attribute points. then you press the escape key and pick wich attributes you will add with those points.
Setup
First off we will create all the variables we need for the first couple triggers:
1. Name = Dialog
Type = Dialog
2. Name = Buttons
Type = Dialog Button Array
Now we start the triggers.
Trigger One
the first trigger will open the dialog.
1. the events are..
Code:
.
Events
Player - Player 1 (Red) skips a cinematic sequence
Player - Player 2 (Blue) skips a cinematic sequence
Player - Player 3 (Teal) skips a cinematic sequence
Player - Player 4 (Purple) skips a cinematic sequence
Player - Player 5 (Yellow) skips a cinematic sequence
Player - Player 6 (Orange) skips a cinematic sequence
Player - Player 7 (Green) skips a cinematic sequence
Player - Player 8 (Pink) skips a cinematic sequence
.
this allows us to press escape to open the dialog menu.
2. next the conditions must check if you have attribute points or not or else you cuold just get as many stats as you want.
Code:
.
Conditions
((Triggering player) Current lumber) Not equal to 0
.
3. Now to setup and show the dialog. in this trigger we set all the buttons and put them into a variable.
Code:
.
Actions
Dialog - Clear Dialog
Dialog - Change the title of Dialog to Attributes
Dialog - Create a dialog button for Dialog labelled Strength
Set Button[1] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled Agility
Set Button[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled Intellegence
Set Button[3] = (Last created dialog Button)
Dialog - Show Dialog for (Triggering player)
.
Code:
This is what the first trigger should look like.
Dialog
Events
Player - Player 1 (Red) skips a cinematic sequence
Player - Player 2 (Blue) skips a cinematic sequence
Player - Player 3 (Teal) skips a cinematic sequence
Player - Player 4 (Purple) skips a cinematic sequence
Player - Player 5 (Yellow) skips a cinematic sequence
Player - Player 6 (Orange) skips a cinematic sequence
Player - Player 7 (Green) skips a cinematic sequence
Player - Player 8 (Pink) skips a cinematic sequence
Conditions
((Triggering player) Current lumber) Not equal to 0
Actions
Dialog - Clear Dialog
Dialog - Change the title of Dialog to Attributes
Dialog - Create a dialog button for Dialog labelled Strength
Set Button[1] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled Agility
Set Button[2] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled Intellegence
Set Button[3] = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled Close
Set Button[4] = (Last created dialog Button)
Dialog - Show Dialog for (Triggering player)
Trigger Two
in this trigger we will make the actions for the clicked button.
1. The "event is a dialog is clicked for Dialog" Dialog being the variable you made. it should look like this.
Code:
.
Events
Dialog - A dialog button is clicked for Dialog
.
2. next create a action if/then/else so we can put all the clicked dialogs in 1 trigger instead of 3.
if condtion being -
and the then action picks all your units of type hero , assuming you only have 1 , and adds the attribute point.If - Conditions
(Clicked dialog button) Equal to Button[1]
Code:
Then - Actions
Player - Add -1 to (Triggering player) Current lumber
Dialog - Show Dialog for (Triggering player)
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
Loop - Actions
Hero - Modify Intelligence of (Picked unit): Add 1
Now repeat that until you have all the buttons set to add Str, Int , Agi.
The end should look like this
Yea its long but u need it.
Code:
[CODE]Buttons
Events
Dialog - A dialog button is clicked for Dialog
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Button[3]
Then - Actions
Player - Add -1 to (Triggering player) Current lumber
Dialog - Show Dialog for (Triggering player)
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
Loop - Actions
Hero - Modify Intelligence of (Picked unit): Add 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Button[2]
Then - Actions
Player - Add -1 to (Triggering player) Current lumber
Dialog - Show Dialog for (Triggering player)
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
Loop - Actions
Hero - Modify Agility of (Picked unit): Add 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Button[1]
Then - Actions
Player - Add -1 to (Triggering player) Current lumber
Dialog - Show Dialog for (Triggering player)
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
Loop - Actions
Hero - Modify Strength of (Picked unit): Add 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Button[4]
Then - Actions
Dialog - Hide Dialog for (Triggering player)
Else - Actions
[/CODE]
Dont forget to add the "Close Button"
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Button[4]
Then - Actions
Dialog - Hide Dialog for (Triggering player)
Else - Actions
Trigger three And Four
you could imput this into the seconds trigger but i make another to make the seconds trigger not so long.
1. in this trigger we make it so when the player runs outa attribute points the dialog closes
Code:
Close
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) Current lumber) Equal to 0
Then - Actions
Dialog - Hide Dialog for (Picked player)
Else - Actions
trigger four is the trigger so whem you level up you get the attribute points.
Code:
Level up
Events
Unit - A unit Gains a level
Conditions
Actions
Player - Add 3 to (Owner of (Leveling Hero)) Current gold
if for some reason you didnt understand something POST IT HERE and ill clarify it.
Check out the demo map