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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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