Esc Hero Atrribute Point

error0024

New Member
Reaction score
8
Question:
What should I do in order to make Hero leveling attribue point added by ESC function?

my point function is only support leveling hero so plz help me
 

mase

____ ___ ____ __
Reaction score
154
Events: Player Skips Cin
Cond: (none)
Acts: Pick every unit owned by triggering player matching matching unit is a hero = true and do Set Hero Attribute = Hero Attribute +1
 

error0024

New Member
Reaction score
8
its not that simple dude ..... i dint talked really

ummm

its like this

when a people lvled add points = points + 3
then
when a people press esc

he get's a dialog that
has agi,str,int

then when agi is clicked

set points = points -1

set agi of hero = agi + 1

and etc
 

jeffandsnoop

New Member
Reaction score
8
ESC Hero Attribute Dialog Button Trigger

Okay, first you need five variables
1. Strength - Dialog Button Clicked
2. Agility - Dialog Button Clicked
3. Intelligence - Dialog Button Clicked
4. Hero_Attribute - Dialog Button
5. The_Hero - unit

Triggers Needed
1.Hero Gain A Level
2.Hero Attribute Dialog Buttons (Initially On Unchecked)
3.Str
4.Agi
5.Int

At first, you use the trigger to turn on the dialog! so use this...

Hero Gain A Level
Code:
Event:
Unit gains a level
Condidtion:
Triggering unit is A Hero Equal to True
Action:
Turn on Hero Attribute Dialog Buttons
Set The_Hero Eual to Triggering unit
After these, you do...

Hero Attribute Dialog Buttons
Code:
Event:
Player - Player 1 (Red) skips a cinematic sequence
Condidtion:
None
Action:
Clear Hero_Attribute
Create a dialog button for Hero_Attribute labelled Hero Strength
Create a dialog button for Hero_Attribute labelled Hero Agility
Create a dialog button for Hero_Attribute labelled Hero Intelligence
Change the title of Hero_Attribute to Hero Attribute Points
Show Hero_Attribute

Then these triggers are all the same but remember to change the settings of AGI, STR, or INT!

Code:
Event:
Dialog - A dialog button is clicked for Hero_Attribute
Condition:
(Clicked dialog button) Equal to Str
Action:
Set Strength of (The_Hero) to ((Strength of The_Hero (Exclude bonuses)) + 1 ), (Permanent or Temporary: Permanent)

So if you want to change the attribute point, just change the Strength, Str parts.
 

mase

____ ___ ____ __
Reaction score
154
if u wanted something like that, be more clear... say u want the dialog box to show and etc not just ESC...
 

error0024

New Member
Reaction score
8
ok this is what i need i got another i need >< well how do i make it multi instance able ,,, so 10 people can play it
 

the Lumpy

►►►
Reaction score
53
1. In the trigger that shows the dialog, put events for every player, and then show the dialog only to the (Triggering Player).

2. You might want to turn the dialog trigger back off after someone uses it.
 

error0024

New Member
Reaction score
8
oh i see but when have 2 players lvled they got stucked...

Flames deleted -phyrex1an

but i just need is they dont stuck !

here's my trigger lol

Code:
Hero Gain A Level
    Events
        Unit - A unit Gains a level
    Conditions
        ((Leveling Hero) is A Hero) Equal to True
    Actions
        Trigger - Turn on Hero Attribute Dialog Buttons <gen>
        Set The_Leveling_Hero = (Leveling Hero)
        Set Hero_Spent_Point = (Hero_Spent_Point + 1)

Hero Attribute Dialog Buttons
    Events
        Player - Player 1 (Red) skips a cinematic sequence
    Conditions
    Actions
        Game - Display to (All players) for 10.00 seconds the text: (You have  + ((String(Hero_Spent_Point)) +  Points Left))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Hero_Spent_Point Greater than or equal to 1
            Then - Actions
                Dialog - Clear Hero_Attribute
                Dialog - Create a dialog button for Hero_Attribute labelled Increase Hero Stren...
                Set Strength = (Last created dialog Button)
                Dialog - Create a dialog button for Hero_Attribute labelled Increase Hero Agili...
                Set Agility = (Last created dialog Button)
                Dialog - Create a dialog button for Hero_Attribute labelled Increase Hero Intel...
                Set Intelligence = (Last created dialog Button)
                Dialog - Change the title of Hero_Attribute to (String(Hero_Spent_Point))
                Dialog - Show Hero_Attribute for (Owner of The_Leveling_Hero)
            Else - Actions
                Do nothing

Str
    Events
        Dialog - A dialog button is clicked for Hero_Attribute
    Conditions
        (Clicked dialog button) Equal to Strength
    Actions
        Set Hero_Spent_Point = (Hero_Spent_Point - 1)
        Hero - Modify Strength of The_Leveling_Hero: Add 1

Agi
    Events
        Dialog - A dialog button is clicked for Hero_Attribute
    Conditions
        (Clicked dialog button) Equal to Agility
    Actions
        Set Hero_Spent_Point = (Hero_Spent_Point - 1)
        Hero - Modify Agility of The_Leveling_Hero: Add 1

Int
    Events
        Dialog - A dialog button is clicked for Hero_Attribute
    Conditions
        (Clicked dialog button) Equal to Intelligence
    Actions
        Set Hero_Spent_Point = (Hero_Spent_Point - 1)
        Hero - Modify Intelligence of The_Leveling_Hero: Add 1

Gain Level Command
    Events
        Player - Player 1 (Red) types a chat message containing -level up as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Show level-up graphics)
 

xPheRe

New Member
Reaction score
43
Create the dialog at map initialization but don't show it.
This only will work if you have one hero per player.

I would use a spellbook with three abilities (Raise Str, Raise Agi, Raise Int)
And give it to the hero when leveling, removing it when his custom value reaches zero.

But as you wish, here you are the dialog way
Code:
Creating dialog
Events
    Map initialization
Conditions
Actions
    Clear Dlg_HeroStats

    Create a dialog button for Dlg_HeroStats labelled +STR
    Set Btn_HeroStats_STR = (Last created dialog Button)

    Create a dialog button for Dlg_HeroStats labelled +AGI
    Set Btn_HeroStats_AGI = (Last created dialog Button)

    Create a dialog button for Dlg_HeroStats labelled +INT
    Set Btn_HeroStats_INT = (Last created dialog Button)

    Create a dialog button for Dlg_HeroStats labelled Cancel
    Set Btn_HeroStats_CANCEL = (Last created dialog Button)
Code:
Leveling
Events
    A Hero levels
Conditions
Actions
    Set custom value of (Leveling Hero) to (Custom value of (Leveling Hero) + 1)
Code:
Showing dialog
Events
    Player 1 skipped a cinematic
    ...
Conditions
Actions
    If (Custom value of Hero[Player number of (Triggering player)]) equal to 0 then
        Game - Display to Triggering Player the text Your hero can't raise attributes yet
    Else
        Show Dlg_HeroStats for Triggering Player
Code:
Events
    A dialog button is clicked for Dlg_HeroStats
Conditions
Actions
    If (Clicked dialog button) equal to Btn_HeroStats_CANCEL then
        Skip remaining actions

    Set TmpUnit = Hero[Player number of (Triggering player)]

    If (Clicked dialog button) equal to Btn_HeroStats_STR then
        Hero - Modify Strength of TmpUnit: Add 1

    If (Clicked dialog button) equal to Btn_HeroStats_AGI then
        Hero - Modify Agility of TmpUnit: Add 1

    If (Clicked dialog button) equal to Btn_HeroStats_INT then
        Hero - Modify Intelligence of TmpUnit: Add 1

    Set custom value of (TmpUnit) to (Custom value of (TmpUnit) - 1)
Variables needed:
- Dlg_HeroStats - dialog
- Btn_HeroStats_STR - dialog button
- Btn_HeroStats_AGI - dialog button
- Btn_HeroStats_INT - dialog button
- Btn_HeroStats_CANCEL - dialog button
- TmpUnit - unit
- Hero - unit array

Notes:
You need to store the one and only hero for every player in the Hero array.
 

error0024

New Member
Reaction score
8
well my rpg is like this when u lvled 4 or 5 times u only get 1 points ...
and one more thing .. when they -save/load when they load they get a points too lol ...
 

jeffandsnoop

New Member
Reaction score
8
Don't blame it on me! You told me to write only for player1!
And I sent a email to you, hope you will read it soon! (About your RPG)

I'll try to do a map, because it is really hard to put everything up here.
 
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