Any way to delete an event from a trigger via action?

naughty

New Member
Reaction score
12
I need to delete events from a trigger because i have a spell that adds events to a trigger for regions but after a while i don't want that trigger to work for those regions anymore so i want to delete those events. Is there any way?
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
not in GUI, thats called event leaks.

but most likely if you tell us what you want to make we can tell you how to make it without adding events.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
To my knowledge, there is no way to delete events. I think I'd need more information about what you are doing to try finding a workaround.
 

naughty

New Member
Reaction score
12
Well my spells creates regions between trees and adds an event to another trigger "Trigger - Add to Unit Comes To Trap <gen> the event (Unit - A unit enters R_Troll[(Integer A)])". Its supposed to be a trap if the unit passes through there to take damage and so on. But after 30 seconds those regions should be removed and nothing should happen if a unit passes there anymore. However i cant make that work even though i use "Custom script: call RemoveRect(udg_R_Troll[GetForLoopIndexA()])" and "Custom script: set udg_R_Troll[GetForLoopIndexA()] = null", still if the unit passes through those regions the spell will activate.... I did it with adding an event for a unit comes to a unit but the game kinda lags like that with so much units...
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
You might just try using a boolean variable. Spell_On or so. When the spell is cast, set it to True, and after a certain amount of time, set it to False. In the trigger with the region entering, check to make sure that Spell_On is set to True before running the actions.
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
i'd say adding events here is a really bad thing to do, it will leak twice.
not just the event but the region as well since the event will create its own region which cannot be destroyed anymore.

can you use circles instead of rects? would make things alot easier.

otherwise you might want to run a periodic event checking for every unit within the rect. you can make this MUI via hashtable use too.
 

naughty

New Member
Reaction score
12
i'd say adding events here is a really bad thing to do, it will leak twice.
not just the event but the region as well since the event will create its own region which cannot be destroyed anymore.

can you use circles instead of rects? would make things alot easier.

otherwise you might want to run a periodic event checking for every unit within the rect. you can make this MUI via hashtable use too.

how can i use circles? i don't know how will i detect if a unit comes to that circle if not by adding a new event or by using regions. i must use a periodic event for 0.01 second because i want it to happen immediately which i think for so much circles will cause lag
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
i'd say use a dummy unit with permanent immolation dealing 0.01 points of damage every 0.25 (or whatever) seconds.

then your trigger might look like,
Event
unit takes damage
Condition
damage source == MyDummyUnit
Action
do stuff

this would be by far the best solution for circle based detection though it would require a damage detection system (Weeps GDD (GUI-Friendly-Damagedetection) is recommended)
 

naughty

New Member
Reaction score
12
sorry man but your solution does not help me because i have pushing spells that move the unit very very fast and every 0.25 seconds is very low to detect that. to detect that speed i will need 0.01 second which will cause lag and will deal too much damage if the unit normally passes through it because it will happen at least 5 times till the unit moves those 30 points..also i don't want the unit to take damage if its standing there i want when the unit will only pass there ... i still think i'll stick with the leaking option...however its an ultimate spell with a lot of cooldown. i don't think it can cause so much leaks
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
first of all, you can set the intervalls for the permanent immolation skill to whatever you like, even 0.01

the damage might be set to 0.00 either but i dont know for sure, however 0.01 points of damage will most probably deal nothing at all since the game will round it down.

and for a pushback, the event "unit enters rect" isnt the right think either, you said you want your trigger to fire when a unit enters a specific position not periodically.
 

gaskell

Member
Reaction score
0
could you just make a trigger to turn on and off the required trigger when conditions (or time) is reached.
sooo you start with the trigger off and have a trigger that enables it when blah blah happens (game time, periodic, unit does blah blah) then start a timer and a trigger to disable the trigger when that timer expires?
Would that work?
 

RangerX

I am justice!
Reaction score
69
ok create a dummy goblin mine trap and a dummy "Mine - exploding" ability change it's activation delay to 0.01 and transition to 0.01 then when it dies it gives damage and than create another mine in the same place and use some boolean to check if the creating mine trigger should still work and offcorse you can add some buff to all the damaged units so it's not getting new damage if it just sit
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • 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

      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