Is there any way to limit agility strength or intel?

helpmeplease

New Member
Reaction score
7
I'm making a map with shops and tomes to buy, but there is no max to the amount. So you can get hundreds of armor which makes you invincible. Which i don't want..

so yea.. can i set a max limit on agi init or str?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Why not just make them cost more, and maybe have a cooldown in the shop ?
 

Galdiuz

Creator of Photon Command
Reaction score
98
You could make a trigger that counts the amount of tomes bought, and then if you try to buy a tome when you reached the limit you remove the stat and give back the gold.
 

tjordell

New Member
Reaction score
7
Here you have. I have set the maximum to 200. You can easy modify that.
Trigger:
  • Trigger
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Group = (Units in (Entire map) matching (((Picked unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Strength of (Picked unit) (Include bonuses)) Greater than 200
            • Then - Actions
              • Hero - Modify Strength of (Picked unit): Set to 200
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Agility of (Picked unit) (Include bonuses)) Greater than 200
                • Then - Actions
                  • Hero - Modify Agility of (Picked unit): Set to 200
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Intelligence of (Picked unit) (Include bonuses)) Greater than 200
                    • Then - Actions
                      • Hero - Modify Intelligence of (Picked unit): Set to 200
                    • Else - Actions
      • Custom script: call DestroyGroup (udg_Group)


Here is the demo map cuz it's many actions. View attachment Attribute Limit.w3x
 

jomik

New Member
Reaction score
17
LOL WOW tjordell, aint that a bit too laggy maybe?
You should just have a trigger that checks whenever the unit buys one of those tomes, if it's higher than your max attribute, then set it to the max.
- same on level up
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
tjordell
Join Date: Feb 2010
Posts: 3
Maybe this could help you jomik.
 

tjordell

New Member
Reaction score
7
LOL WOW tjordell, aint that a bit too laggy maybe?
You should just have a trigger that checks whenever the unit buys one of those tomes, if it's higher than your max attribute, then set it to the max.
- same on level up

Not laggy at all? :eek: Why do you think so?
If a unit have an ability that's attribut boosting the spell will remove that to.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Yea im new on hive.
Still i wouldnt mind using tjordell's trigger he did clear the leaks.
 

helpmeplease

New Member
Reaction score
7
Here you have. I have set the maximum to 200. You can easy modify that.
Trigger:
  • Trigger
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Group = (Units in (Entire map) matching (((Picked unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Strength of (Picked unit) (Include bonuses)) Greater than 200
            • Then - Actions
              • Hero - Modify Strength of (Picked unit): Set to 200
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Agility of (Picked unit) (Include bonuses)) Greater than 200
                • Then - Actions
                  • Hero - Modify Agility of (Picked unit): Set to 200
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Intelligence of (Picked unit) (Include bonuses)) Greater than 200
                    • Then - Actions
                      • Hero - Modify Intelligence of (Picked unit): Set to 200
                    • Else - Actions
      • Custom script: call DestroyGroup (udg_Group)


Here is the demo map cuz it's many actions. View attachment 35825

ummm when i try to save it says the custom script has encountered an error and disables the trigger.. its highlighted this
call DestroyGroup (udg_Group)
and has some shit written underneath it. i don't really get it

//===========================================================================
function InitTrig_Max_attribute takes nothing returns nothing
set gg_trg_Max_attribute = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Max_attribute, 0.05 )
call TriggerAddAction( gg_trg_Max_attribute, function Trig_Max_attribute_Actions )
endfunction
 

Bogrim

y hello thar
Reaction score
154
It's supposed to be,
Trigger:
  • Custom script: call DestroyGroup( udg_Group )

"Group" being your variable's name.

I do not recommend using that trigger to limit stats. You need to make a trigger that checks when a hero purchases an item of that type, check his current attributes and if he exceeds the limits, reduce the stats to the maximum and refund the gold.

Running a periodic trigger every 0.04 seconds of the game which runs a group action for all units in the entire map is only going to add to the lag.
 

helpmeplease

New Member
Reaction score
7
It's supposed to be,
Trigger:
  • Custom script: call DestroyGroup( udg_Group )

"Group" being your variable's name.

I do not recommend using that trigger to limit stats. You need to make a trigger that checks when a hero purchases an item of that type, check his current attributes and if he exceeds the limits, reduce the stats to the maximum and refund the gold.

Running a periodic trigger every 0.04 seconds of the game which runs a group action for all units in the entire map is only going to add to the lag.

how would i do that type of trigger?
 

fogrn

New Member
Reaction score
2
Trigger:
  • Stat Limit
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Tome of Agility
          • (Item-type of (Item being manipulated)) Equal to Tome of Intelligence
          • (Item-type of (Item being manipulated)) Equal to Tome of Strength
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Intelligence of (Hero manipulating item) (Exclude bonuses)) Greater than 200
        • Then - Actions
          • Hero - Modify Intelligence of (Hero manipulating item): Set to 200
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Agility of (Hero manipulating item) (Exclude bonuses)) Greater than 200
        • Then - Actions
          • Hero - Modify Agility of (Hero manipulating item): Set to 200
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of (Hero manipulating item) (Exclude bonuses)) Greater than 200
        • Then - Actions
          • Hero - Modify Strength of (Hero manipulating item): Set to 200
        • Else - Actions
          • Do nothing


should work
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top