System Dialog Attribute System

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..
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 -
If - Conditions
(Clicked dialog button) Equal to Button[1]
and the then action picks all your units of type hero , assuming you only have 1 , and adds the attribute point.
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
[/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:
[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
 

Attachments

  • Attribute Dialog System v0.1.w3x
    19.7 KB · Views: 223

Vicboy

Ultra Cool Member
Reaction score
44
You can use non-property numbers to help count without any affect to the gameplay. (Using gold is a vital property)...

Altough Im on my PsP I will show you how I do my Counting System...

Trigger name: Poo Red
Events - Elapse game time is 1.00
Action - Game Message : Attribute Point added!

Lets see what we can do with that!

Trigger.
Event - a unit Gains a level
Condition - Triggerer was player 1
Action - Run Trigger (Poo Red) following conditions

Max letter reached... Next reply

Now gets it? Whats next? A deduction ofcourse!

Trigger name - Wee Red
Events - Elapse Game time is 1.00
Action - Game Message : Attribute Wasted!

That acts as your deductions... Place
Action - Run trigger (Wee Red) checking conditions
At each dialog button...

Finale!
Events - Dialog button is clicked
Conditions - Blah! on PsP...
and
(Poo Red) exe # - (Wee Red) exe # equal or more than 1
Actions - Give 1 str to Red's hero
Run Trigger (Wee Red)

MEANing

Reds hero levels up then +1 numbers of execution (Poo Red)

Red clicks dialog then +1 number of execution (Wee Red)

MEANing

ex.
62 (poo red) - 61 (wee red) = 1 attribute pt.
 
Reaction score
456
Uhm.. Triple post? That doesn't seem to be an accident...

Sounds like a neat system, haven't checked yet though...
 

Vicboy

Ultra Cool Member
Reaction score
44
If your sure of what I posted go ahead and experiment... The flaw is that it has a huge quantaty of trigger =/
 
S

SoCal_420

Guest
if you didnt want to waste a recource then you could just make a variable Representing the attribute points then show it in a leaderbloard/multiboard
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top