how do i Destroy a Trigger

C

CDR

Guest
http://www.thehelper.net/forums/showthread.php?t=27219
emjlr3 tutorial sez that if i do this custom script
and lastly, one good Custom Script to use is that when you have a trigger that will only run once, then is useless. In those cases, put this at the end of the trigger. It can greatly reduce lag in your maps.

Code:
Custom script:   call DestroyTrigger( GetTriggeringTrigger() )
it will destroy that trigget but it is not working win i try to save i get that window saying that sum thing is wrong with the script
Code:
Custom script:   call DestroyTrigger( GetTriggeringTrigger() )
so wut is the right script that duz this?
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
in the part where it says
GetTrigger()), you need to put the name of the trigger you want to be destroyed
like GetTrigger(Untitled_trigger_04)
i dont do jass so im guessing
 
C

CDR

Guest
nm i tried it ones more and it worked i must of typed it in wrong
sry about that all
 
C

CDR

Guest
in the part where it says
GetTrigger()), you need to put the name of the trigger you want to be destroyed
like GetTrigger(Untitled_trigger_04)
i dont do jass so im guessing
reading that made me realize that you can destroy what ever trigger you would like right? I tried it like yourface suggested and that did not work

Code:
Custom script:   call DestroyTrigger( GetTrigger(player_1) )

so what is the script to do that?
 

Flare

Stops copies me!
Reaction score
662
Are you destroying the trigger from within itself, e.g.
Code:
Events
...
Conditions
...
Actions
   Custom script: call DestroyTrigger (ThisTrigger)
or, are you trying to destroy it from another trigger e.g.
Code:
Events
...
Conditions
...
Actions
   Custom script: call DestroyTrigger (ThatTriggerOverThere)

For the first, you can use GetTriggeringTrigger () i.e.
Code:
Custom script: call DestroyTrigger ( GetTriggeringTrigger () )
You can also use the option below if you want, both options work just fine when you want the trigger to destroy itself

For the second, you must prefix the name of the trigger being destroyed with gg_trg_ and replace any spaces with underscores i.e.
Code:
Custom script: call DestroyTrigger (gg_trg_Another_trigger)
That will destroy a trigger called "Another trigger" (without the quotation marks, obviously :p)
 
C

CDR

Guest
You shouldn't be destroying triggers anyway, so don't worry about it.
i need to worry about it my map already has over 1000 trigger and will only use about 200 of the triggers in game play the rest wont evin run 1 time


emjlr3 tutorial sez

and lastly, one good Custom Script to use is that when you have a trigger that will only run once, then is useless. In those cases, put this at the end of the trigger. It can greatly reduce lag in your maps.


Code:
Custom script:   call DestroyTrigger( GetTriggeringTrigger() )
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> It can greatly reduce lag in your maps.

That's an old wives' tale...
If this is the kind of help your map needs, I'd suggest you think it over... you're seriously doomed.


> i need to worry ...

... about things like crappy spelling in tooltips and other descriptions.
Because if your map uses the same "style" as your posts, most of your players will start your map precisely once.
 
Reaction score
333
i need to worry about it my map already has over 1000 trigger and will only use about 200 of the triggers in game play the rest wont evin run 1 time


emjlr3 tutorial sez

So 80% of the triggers in your map serve no purpose other than to decorate the trigger editor? I seriously doubt that you have more than 1000 triggers in your map, but even if you did it would not be necessary to destroy them.
 
C

CDR

Guest
So 80% of the triggers in your map serve no purpose other than to decorate the trigger editor? I seriously doubt that you have more than 1000 triggers in your map, but even if you did it would not be necessary to destroy them.
fine here is a link to my map if you can think of a way to have less triggers good for you and pleas show me how it is possible http://epicwar.com/maps/72289
about things like crappy spelling in tooltips and other descriptions.
Because if your map uses the same "style" as your posts, most of your players will start your map precisely once.
wow wut a nice thing to say sry i cant spell but y do people feel the need to tell me i cant spell like i don't already know:eek: it's about like explaining that "wow wut a nice thing to say" is sarcasm:thup:
 

chopperpope

New Member
Reaction score
12
why do you want to destroy a trigger?

have you ever tried just turning the trigger off?

Code:
turn OFF Untitled_trigger_04

for example.
 
Reaction score
333
fine here is a link to my map if you can think of a way to have less triggers good for you and pleas show me how it is possible http://epicwar.com/maps/72289

After looking at your map, it seems that the spawning triggers for each unit type can be merged into one without too much trouble.

The archer spawn triggers could be replaced by something like this, for instance:

Code:
Spawn Archers
    Events
        Time - Every 20.00 seconds of game time
    Conditions
    Actions
        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
                        (Current research level of Archer  for (Picked player)) Equal to 1
                        ((Picked player) Food used) Less than or equal to 100
                    Then - Actions
                        Set point = (Center of spawn_regions[(Player number of (Picked player))])
                        Unit - Create 1 units_night_elf[1] for (Picked player) at point facing Default building facing degrees
                        Custom script:   call RemoveLocation(udg_point)
                    Else - Actions

The spawn_regions variable is an array containing the spawning regions for each player. This might not be exactly equivalent - I am assuming you want archers to begin spawning once the player has researched "Archer".

Doing this for each unit type should save you something like 900 triggers.

wow wut a nice thing to say sry i cant spell but y do people feel the need to tell me i cant spell like i don't already know:eek: it's about like explaining that "wow wut a nice thing to say" is sarcasm:thup:

I assume it is in the hope that you will take the hint and improve the standard of English in your posts.
 
C

CDR

Guest
ya i have. i just figured if you destroy the trigger the game would not have to look threw so meny triggers to finde the one that is going to run
 
C

CDR

Guest
Code:
Spawn Archers
    Events
        Time - Every 20.00 seconds of game time
    Conditions
    Actions
        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
                        (Current research level of Archer  for (Picked player)) Equal to 1
                        ((Picked player) Food used) Less than or equal to 100
                    Then - Actions
                        Set point = (Center of spawn_regions[(Player number of (Picked player))])
                        Unit - Create 1 units_night_elf[1] for (Picked player) at point facing Default building facing degrees
                        Custom script:   call RemoveLocation(udg_point)
                    Else - Actions
cool thank you:D ill fix that
 
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

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top