Can someone check my triggers if it leaks . THX :3

saitovyse

New Member
Reaction score
0
Trigger:
  • a
    • Events
    • Map initialization
    • Actions
    • -------- --------
    • Set QInteger = (QInteger + 1)
    • Set QTitle[QInteger] = Vercas Revenge
    • Set QDescription[QInteger] = KILL 1 FOOTMAN!
    • Set QItem[QInteger] = Footman
    • Set QHunt[QInteger] = Footman
    • -------- --------
    • Set QInteger = (QInteger + 1)
    • Set QTitle[QInteger] = Sniper of Shadows
    • Set QDescription[QInteger] = KILL 1 RIFLEMAN!
    • Set QItem[QInteger] = Rifleman
    • Set QHunt[QInteger] = Rifleman
    • -------- --------
    • Set QInteger = (QInteger + 1)
    • Set QTitle[QInteger] = Greedy Crusade
    • Set QDescription[QInteger] = KILL 1 KNIGHT!
    • Set QItem[QInteger] = Knight
    • Set QHunt[QInteger] = Knight
    • -------- --------
    • Set QIntegerMax = QInteger
    • -------- --------


Trigger:
  • b
    • Unit - A unit Acquires an item
    • Actions
      • For each (Integer I) from 1 to QIntegerMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Item-type of (Item being manipulated)) Equal to QItem<i>
                  • (Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))) and ((Unit-type of (Matching unit)) Equal to QHunt<i>)))) Equal to 0
            • Then - Actions
              • -------- --------
              • Cinematic - Clear the screen of text messages for (Player group((Owner of (Triggering unit))))
              • -------- --------
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 30.00 seconds the text: (QTitle<i> + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 30.00 seconds the text: ( - + QDescription<i>)
              • -------- --------
              • Unit - Create 1 QHunt<i> for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing 270.00 degrees
              • Unit - Pause (Last created unit)
              • -------- --------
            • Else - Actions
    • </i></i></i></i></i>


Trigger:
  • c
    • Unit - A unit Dies
    • Actions
      • For each (Integer I) from 1 to QIntegerMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Unit-type of (Triggering unit)) Equal to QHunt<i>
                  • (Number of units in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Owner of (Killing unit))) and ((Unit-type of (Matching unit)) Equal to QHunt<i>)))) Equal to 1
            • Then - Actions
              • -------- --------
              • Cinematic - Clear the screen of text messages for (Player group((Owner of (Killing unit))))
              • -------- --------
              • Game - Display to (Player group((Owner of (Killing unit)))) for 5.00 seconds the text: Q U E S T C L E A R...
              • -------- --------
              • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Owner of (Killing unit))) and ((Unit-type of (Matching unit)) Equal to QHunt<i>))) and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • -------- --------
              • Player - Add 50 to (Owner of (Killing unit)) Current gold
              • Hero - Add 30 experience to (Killing unit), Hide level-up graphics
              • -------- --------
            • Else - Actions
    • </i></i></i>


VARIABLES:
I = Integer
QDescription = String Array (0)
QHunt = Unit-Type Array (0)
QInteger = Integer
QIntegerMax = Integer
QItem = Item-Type Array (0)
QTitle = String Array (0)

WHAT IT DOES:
Well it is a code for making quest by not using Quest Triggers cause it takes alot of space, it uses Integer and Strings instead . BUT i dont know if it is MUI nor MPI . and especially the code "For each (Integer I) from 1 to QIntegerMax, do (Actions)" i dont know if this code here leaks or not so please someone help me here ? :3
 

chukky-jr

Member
Reaction score
15
Code:
Unit - Create 1 QHunt[I] for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing 270.00 degrees

that one leaks point, you should make set the point first like

Unit - Create 1 QHunt at udg_temp_point instead of
at (Center of (Playable map area)) facing 270.00 degrees
then add
custom script : call RemoveLocation (udg_temp_point)


Unit Group - Pick every unit in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Owner of (Killing unit))) and ((Unit-type of (Matching unit)) Equal to QHunt))) and do (Actions)
  • Loop - Actions
    • Unit - Remove (Picked unit) from the game
this one leaks unit group, just add
custom script : set BJWantsDestroyGroup =true
the rest i'm not sure, don't know much about player leaks
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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