[TIPP] How can i improve my RPG map speed?(+multiboard!)

S

shadowvzs

Guest
some ideea, i think good, if u see leak then pls comment the triggers:
- little Map initialization trigger or little pause after starting the map
- i try inside every big trigger near starting game a little waiting
- removing leak's what i know.
- if you use many periodic event exemple every 0.01 then map can laggy, if you can the do with other event

Variables:
Multiboard=multiboard variable
Nation_question=dialog
Nation_Button=dialog button(array)
item_drop_rate=integer
Tempory_nr=integer(array)
number_of_player=integer
Player=player variable
My_Hero=unit (array) - this is the base hero!
Temp_point=point variable (array)
Quest=quest variable (array)
ReSpawnPoint=point variable

Leakeable point,groups (player and unit group), special effect,??

the leaks you can remove exemple if you store your point to variable and use custom script.. exemple:
Code:
        ---------------- Triggering unit = Dying Unit --------------------
        Set [B]ReSpawnPoint[/B] = (Position of triggering unit)
        Wait ((Real((Hero level of (Triggering unit)))) / 2.00) seconds
        Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at 
        Custom script:   call RemoveLocation(udg_[B]ReSpawnPoint[/B])
here the ReSpawnPoint is the point variable...after create unit or something what you want clear the point, in action-Custon script and copy paste there this part:call RemoveLocation(udg_your variable)

The exemple trigger....

Code:
map init
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Set item_drop_rate = 90
         Set Tempory_nr[19] = 0
        For each (Integer A) from 0 to 6, do (Actions)
            Loop - Actions
                Set tempory_num[(Integer A)] = 0
        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) controller) Equal to User
                        ((Picked player) slot status) Equal to Is playing
                    Then - Actions
                              Set Number_of_player = (Number_of_player + 1)
                    Else - Actions
                        Do nothing
Hero Selection with dialog button
Code:
Start Question
    Events
        Time - Elapsed game time is 1.50 seconds
    Conditions
    Actions
        Dialog - Clear Nation_question
        Dialog - Change the title of Nation_question to Choose your nation
        Dialog - Create a dialog button for Nation_question labelled Humans
        Set Nation_Button[0] = (Last created dialog Button)
        Dialog - Create a dialog button for Nation_question labelled Night Elf
        Set Nation_Button[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Nation_question labelled Blood Elf
        Set Nation_Button[2] = (Last created dialog Button)
        Dialog - Create a dialog button for Nation_question labelled Orcs
        Set Nation_Button[3] = (Last created dialog Button)
        Dialog - Create a dialog button for Nation_question labelled Giants&Golems
        Set Nation_Button[4] = (Last created dialog Button)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Dialog - Show Nation_question for (Picked player)
        Wait 0.01 seconds
Creating Hero:
Code:
Create Ur Hero
    Events
        Dialog - A dialog button is clicked for Nation_question
    Conditions
    Actions
        Set Temp_point[1] = (Random point in Region 007 <gen>)
        Set Tempory_nr[14] = 0
        If (Nation_Button[0] Equal to (Clicked dialog button)) then do (Unit - Create 1 *Human Hero* Male for (Triggering player) at Temp_point[1] facing Default building facing degrees) else do (Do nothing)
        If (Nation_Button[1] Equal to (Clicked dialog button)) then do (Unit - Create 1 *Night Elf Female* Hero for (Triggering player) at Temp_point[1] facing Default building facing degrees) else do (Do nothing)
        If (Nation_Button[2] Equal to (Clicked dialog button)) then do (Unit - Create 1 *Elf Male Hero* for (Triggering player) at Temp_point[1] facing Default building facing degrees) else do (Do nothing)
        If (Nation_Button[3] Equal to (Clicked dialog button)) then do (Unit - Create 1 *Orc Hero* for (Triggering player) at Temp_point[1] facing Default building facing degrees) else do (Do nothing)
        If (Nation_Button[4] Equal to (Clicked dialog button)) then do (Unit - Create 1 *Golem for* (Triggering player) at Temp_point[1] facing Default building facing degrees) else do (Do nothing)
        Set Player = (Triggering player)
        Set MyHero[(Player number of Player)] = (Last created unit)
        Custom script:   call RemoveLocation(udg_Temp_point[1])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Some Defintion <gen> is on) Not equal to True
            Then - Actions
                Trigger - Turn on Some Defintion <gen>
                Wait 1.00 game-time seconds
                Trigger - Run Some Defintion <gen> (ignoring conditions)
            Else - Actions
                Wait 2.00 seconds
                Trigger - Run Update Definition <gen> (ignoring conditions)
This trigger is enabled but initinal off
Code:
Some Defintion
    Events
    Conditions
    Actions
      Quest - Create a Required, undiscovered quest titled Spider Forest with the description Welcome on Spider F..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
        Set Quests[0] = (Last created quest)
        Player - Set Neutral Hostile handicap to (((Real(Number_of_player)) x 100.00) x 2.00)%
        Set Activ_players = (All players matching ((((Picked player) slot status) Equal to Is playing) and (((Picked player) controller) Equal to User)))
        Hero - Make (Picked player) Heroes gain (100.00 x (Real(Number_of_player)))% experience from future kills
        Custom script:   call DestroyForce(udg_Activ_players)
        Game - Display to (All players) the text: Game difficult leve...
        Player - Set Player 11 (Dark Green) handicap to (((Real(Number_of_player)) x 100.00) x 2.00)%
        Set Days = 1
        -------- Multiboard Part --------
        Multiboard - Create a multiboard with 6 columns and (Number_of_player + 1) rows, titled Hero Info
        Set MultiBoard = (Last created multiboard)
        For each (Integer A) from 1 to (Number_of_player + 1), do (Actions)
            Loop - Actions
                Multiboard - Set the width for MultiBoard item in column 1, row (Integer A) to 10.00% of the total screen width
                Multiboard - Set the width for MultiBoard item in column 2, row (Integer A) to 4.00% of the total screen width
                Multiboard - Set the width for MultiBoard item in column 3, row (Integer A) to 7.00% of the total screen width
                Multiboard - Set the width for MultiBoard item in column 4, row (Integer A) to 5.00% of the total screen width
                Multiboard - Set the width for MultiBoard item in column 5, row (Integer A) to 6.00% of the total screen width
                Multiboard - Set the width for MultiBoard item in column 6, row (Integer A) to 6.00% of the total screen width
        For each (Integer A) from 2 to (Integer A), do (Actions)
            Loop - Actions
                Multiboard - Set the color for MultiBoard item in column 1, row (Integer A) to (20.00%, 20.00%, 100.00%) with 10.00% transparency
                For each (Integer B) from 1 to 6, do (Actions)
                    Loop - Actions
                        Multiboard - Set the text for MultiBoard item in column (Integer B), row (Integer A) to 0
        Multiboard - Set the text for MultiBoard item in column 1, row 1 to Unit Name
        Multiboard - Set the text for MultiBoard item in column 2, row 1 to Kills
        Multiboard - Set the text for MultiBoard item in column 3, row 1 to K.L. Ration
        Multiboard - Set the text for MultiBoard item in column 4, row 1 to Level
        Multiboard - Set the text for MultiBoard item in column 5, row 1 to Deaths
        Multiboard - Set the text for MultiBoard item in column 6, row 1 to Killer Lv.
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        MyHero[(Integer A)] Not equal to No unit
                    Then - Actions
                        Multiboard - Set the text for MultiBoard item in column 1, row ((Integer A) + 1) to (Name of MyHero[(Integer A)])
                        Multiboard - Set the text for MultiBoard item in column 4, row ((Integer A) + 1) to 1
                    Else - Actions
        Multiboard - Show MultiBoard
        Wait 1.00 seconds
        Multiboard - Change the color of the title for MultiBoard to (40.00%, 40.00%, 100.00%) with 0.00% transparency
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Multiboard - Set the color for MultiBoard item in column (Integer A), row 1 to (100.00%, 100.00%, 20.00%) with 40.00% transparency
Multiboard for second player
Code:
Update Definition
    Events
    Conditions
    Actions
        Set Tempory_nr[29] = ((Player number of (Owner of (Last created unit))) + 1)
        Multiboard - Set the text for MultiBoard item in column 1, row Tempory_nr[29] to (Name of MyHero[Tempory_nr[29]])
        Multiboard - Set the text for MultiBoard item in column 4, row Tempory_nr[29] to 1
Respawn
Code:
reSpawn
    Events
        Unit - A unit owned by Neutral Hostile Dies
    Conditions
        ((Dying unit) is Summoned) Not equal to True
    Actions
---------------- Triggering unit = Dying Unit --------------------
        Custom script:   local location udg_ReSpawnPoint = GetUnitLoc(GetTriggerUnit())
               Set Tempory_nr[26] = (Random integer number between 1 and 100)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Tempory_nr[26] Less than or equal to item_drop_rate
                    Then - Actions
                        Item - Create (Random level (Random integer number between 1 and 10) Purchasable item-type) at ReSpawnPoint
                    Else - Actions
                         Wait ((Real((Hero level of (Triggering unit)))) / 2.00) seconds
                Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at ReSpawnPoint facing Default building facing degrees
                Custom script:   call RemoveLocation(udg_ReSpawnPoint)
Item Drop Rate
Code:
inc dec item drop rate
    Events
        Player - Player 1 (Red) types a chat message containing - as An exact match
        Player - Player 1 (Red) types a chat message containing + as An exact match
    Conditions
        (item_drop_rate Greater than or equal to 0) or (item_drop_rate Less than or equal to 100)
    Actions
        If ((Entered chat string) Equal to -) then do (Set item_drop_rate = (item_drop_rate - 5)) else do (Do nothing)
        If ((Entered chat string) Equal to +) then do (Set item_drop_rate = (item_drop_rate + 5)) else do (Do nothing)
        If (item_drop_rate Equal to -5) then do (Set item_drop_rate = 0) else do (Do nothing)
        If (item_drop_rate Equal to 105) then do (Set item_drop_rate = 100) else do (Do nothing)
        Game - Display to (All players) the text: Item Drop Rate was ...
Safe Zone
Code:
SafeZone
    Events
        Unit - A unit enters Arena <gen>
    Conditions
    Actions
        Unit - Make (Entering unit) Invulnerable
Code:
SafeZoneLeave
    Events
        Unit - A unit leaves Arena <gen>
    Conditions
    Actions
        Unit - Make (Leaving unit) Vulnerable
Death and Killing count
Code:
Killing and Deaths Count
    Events
        Unit - A unit Dies
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Killing unit)) controller) Equal to User
            Then - Actions
                Set Tempory_nr[29] = (Player number of (Owner of (Killing unit)))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Kills[Tempory_nr[29]] Not equal to 0
                    Then - Actions
                        Set Temp_Real = (((KillRations[Tempory_nr[29]] x (Real(Kills[Tempory_nr[29]]))) + (Real((Level of (Dying unit))))) / ((Real(Kills[Tempory_nr[29]])) + 1.00))
                    Else - Actions
                        Set Temp_Real = (Real((Level of (Dying unit))))
                Set Kills[Tempory_nr[29]] = (Kills[Tempory_nr[29]] + 1)
                Set KillRations[Tempory_nr[29]] = Temp_Real
                Multiboard - Set the text for MultiBoard item in column 2, row (Tempory_nr[29] + 1) to (String(Kills[Tempory_nr[29]]))
                Multiboard - Set the text for MultiBoard item in column 3, row (Tempory_nr[29] + 1) to (String(KillRations[Tempory_nr[29]]))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                MyHero[(Player number of (Owner of (Dying unit)))] Equal to (Dying unit)
            Then - Actions
                Set Tempory_nr[29] = (Player number of (Owner of (Dying unit)))
                Set Deaths[Tempory_nr[29]] = (Deaths[Tempory_nr[29]] + 1)
                Multiboard - Set the text for MultiBoard item in column 5, row (Tempory_nr[29] + 1) to (String(Deaths[Tempory_nr[29]]))
            Else - Actions
                Do nothing
Leveling Count
Code:
Leveling
    Events
        Unit - A unit Gains a level
    Conditions
        MyHero[(Player number of (Owner of (Leveling Hero)))] Equal to (Leveling Hero)
    Actions
        Set Tempory_nr[29] = (Player number of (Owner of (Leveling Hero)))
        Set Levels[Tempory_nr[29]] = (Hero level of (Leveling Hero))
        Multiboard - Set the text for MultiBoard item in column 4, row (Tempory_nr[29] + 1) to (String(Levels[Tempory_nr[29]]))
PvP system for Killer Level Counting
Code:
PvP
    Events
        Unit - A unit Is attacked
    Conditions
        ((Owner of (Attacked unit)) is an ally of (Owner of (Attacking unit))) Equal to True
        ((Owner of (Attacking unit)) controller) Equal to User
        (Owner of (Attacking unit)) Not equal to (Owner of (Attacked unit))
    Actions
        Game - Display to (All players) the text: ((Name of (Attacking unit)) +  is attacked his alliance, attacked unit automatical begin self defens system (heal half damage).)
        Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + ((Damage taken) / 2.00))
        Set Temp_point[2] = (Position of (Attacked unit))
        Cinematic - Ping minimap for (All players) at Temp_point[2] for 3.00 seconds
        Custom script:   call RemoveLocation(udg_Temp_point[2])
Code:
PvP Die
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Killing unit)) is an ally of (Owner of (Dying unit))) Equal to True
        ((Owner of (Killing unit)) controller) Equal to User
        (Level of Killing Level  for (Dying unit)) Equal to 0
        (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
    Actions
        Unit - Change color of (Killing unit) to (Color of Neutral Extra)
        Set Temp_point[2] = (Position of (Dying unit))
        Cinematic - Ping minimap for (All players) at Temp_point[2] for 3.00 seconds
        Custom script:   call RemoveLocation(udg_Temp_point[2])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Killing unit) Equal to MyHero[(Player number of (Owner of (Killing unit)))]
            Then - Actions
                Unit - Set mana of (Killing unit) to 0.00%
                Unit - Set life of (Killing unit) to ((Life of (Killing unit)) / 10.00)
                Set Tempory_nr[28] = ((Owner of (Killing unit)) Current gold)
                Player - Set (Owner of (Killing unit)) Current gold to (Tempory_nr[28] / 2)
                Unit - Remove All buffs from (Killing unit)
                Game - Display to (Player group((Owner of (Dying unit)))) the text: ((Name of (Killing unit)) + ( killed his allance Hero  + ((Name of (Dying unit)) + , now attacker unit lose 50% life and 100% mana and half gold and dispel all buff on killer unit.)))
            Else - Actions
                Unit - Set mana of (Killing unit) to 0.00%
                Unit - Remove All buffs from (Killing unit)
                Unit - Set life of (Killing unit) to ((Life of (Killing unit)) / 2.50)
                Player - Set (Owner of (Killing unit)) Current gold to (((Owner of (Killing unit)) Current gold) - 500)
                Game - Display to (Player group((Owner of (Dying unit)))) the text: ((Name of (Attacking unit)) + ( killed his allance unit  + ((Name of (Dying unit)) + , now attacker unit lose 40% life and 100% mana and 500 gold and dispel all buff on killer unit.)))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Killing Level  for (Killing unit)) Equal to 0
            Then - Actions
                Unit - Add Killing Level  to (Killing unit)
            Else - Actions
                Unit - Increase level of Killing Level  for (Killing unit)
        Set Tempory_nr[29] = (Player number of (Owner of (Killing unit)))
        Set KillerLV[Tempory_nr[29]] = (Level of Killing Level  for (Killing unit))
        Multiboard - Set the text for MultiBoard item in column 6, row Tempory_nr[29] to (String(KillerLV[Tempory_nr[29]]))
        Game - Display to (All players) the text: (((Name of (Killing unit)) + ( is stage  + (String((Level of Killing Level  for (Killing unit)))))) + ( killer, who kill him rich with gold, his price is  + (String(((Level of Killing Level  for (Killing unit)) x 1000)))))
Code:
Killer Stage Clearing
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Dying unit)) controller) Equal to User
        (Level of Killing Level  for (Dying unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Killing Level  for (Dying unit)) Greater than 1
            Then - Actions
                Unit - Decrease level of Killing Level  for (Dying unit)
                Game - Display to (All players) the text: (((Name of (Dying unit)) + ( is stage  + (String((Level of Killing Level  for (Dying unit)))))) + ( killer, who kill him rich with gold, his price is  + (String(((Level of Killing Level  for (Dying unit)) x 1000)))))
            Else - Actions
                Unit - Remove Killing Level  from (Dying unit)
                Unit - Change color of (Killing unit) to (Color of (Owner of (Dying unit)))
                Game - Display to (All players) the text: ((Name of (Dying unit)) +  now his hero spirit is clear, he is not killer.)
        Set Tempory_nr[29] = (Player number of (Owner of (Killing unit)))
        Set KillerLV[Tempory_nr[29]] = (Level of Killing Level  for (Killing unit))
        Multiboard - Set the text for MultiBoard item in column 1, row (Tempory_nr[29] + 1) to (String(KillerLV[Tempory_nr[29]]))
 

WindexGlow

New Member
Reaction score
54
So uh..What's the problem?

And I hope english isn't the only thing you know..if it is, you're rather sad.
 

Duwenbasden

Ver 6 CREATE energy AS SELECT * FROM u.energy
Reaction score
165
Code:
        Set ReSpawnPoint = (Position of triggering unit)

If you are going to use Triggering Unit, put comments to indicate which unit we are talking about. Here I have no idea what Triggering Unit is without guessing.

Both way is more preferred:
Code:
        Set ReSpawnPoint = (Position of dying unit)
Code:
        Comment: Triggering unit = dying unit
        Set ReSpawnPoint = (Position of triggering unit)
 
S

shadowvzs

Guest
Code:
        Set ReSpawnPoint = (Position of triggering unit)

If you are going to use Triggering Unit, put comments to indicate which unit we are talking about. Here I have no idea what Triggering Unit is without guessing.

Both way is more preferred:
Code:
        Set ReSpawnPoint = (Position of dying unit)
Code:
        Comment: Triggering unit = dying unit
        Set ReSpawnPoint = (Position of triggering unit)

okey i fixed. u see inside the triggers leakable things?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top