.:BUG REPORTING:. "switch execution to trigger" bugs

Report any bugs here or ask questions here!

.:BUG REPORTING:. "switch execution to trigger" bugs

Postby jeje52 » 4 June 2024, 21:30

1. The "switch execution to trigger" trigger action can execute triggers that are disabled or don't have any remaining calls.
2. When a trigger with 0 calls is switched to, that trigger will gain infinite uses (probs cuz its remaining calls gets subtracted and becomes -1)
3. If parameter 'A' doesn't point to any existing trigger on the map, the trigger action will default to executing the first trigger on the map (which causes some very hard to track down bugs). It would be better if it threw an error instead.
User avatar
jeje52
Advanced Usurpation Soldier [150]
 
Posts: 153
Joined: 13 April 2018, 19:52

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby mici1234 » 6 June 2024, 08:07

Hello, one of contributors here:
1. Switch execution executing triggers that are disabled or don't have any remaining calls is intentional, it was meant for fast loops, so it bypasses all the checks.

2. You are not really supposed to use "switch execution" AND "execute trigger" on same trigger, you use 1 of them depending on the usecase not both of them for same trigger.

3. Yeah, it would be nice to error when the target trigger doesn't exist, but I don't think any of us can update the action now(As it looks like lin is not updating anything until steam version of pb2 gets released). Best you can do is have related triggers be close to each other in ALE to make sure you always remember those triggers call each other. Or you can use "Find errors" button in ALE? I don't know how that works
FYI: 3 is not unique to switch execution action, it happens with any actions taking object.

mici1234
Recruit
 
Posts: 22
Joined: 12 June 2017, 20:18
Location: Turkey

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby jeje52 » 6 June 2024, 09:00

1. It just seems like that kind of stuff should never be allowed, but it's reasonable if it improves performance. It only causes problems in combination with #3 since the first trigger on the map is usually a 1 call trigger that initializes variables and stuff.

2. ik it doesn't make sense to use both but I just noticed that and thought I'd mention it. #3 is really the main problem with these switch trigger actions.

3. this problem is only significant when using "switch execution to trigger ID in variable 'A'" since there is no indication that anything's wrong.
User avatar
jeje52
Advanced Usurpation Soldier [150]
 
Posts: 153
Joined: 13 April 2018, 19:52

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby mici1234 » 6 June 2024, 09:13

3. You don't get indication with other actions either, I guess you can say that if you combine it with 1, actions such as execute trigger atleast checks if it can execute before executing so if first trigger in the map is 1 call, it won't really have any issues, but yeah this is just how it is as we can't update the action now.

By the way, here are words from contributor responsible for this action as he can't send messages here: (Please don't take this as offense, saying just incase)
This trigger action's primary purpose is performance. If you don't like how it works, just use execute trigger instead

mici1234
Recruit
 
Posts: 22
Joined: 12 June 2017, 20:18
Location: Turkey

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby wanted2001 » 6 June 2024, 09:17

jeje52 wrote:1. It just seems like that kind of stuff should never be allowed, but it's reasonable if it improves performance. It only causes problems in combination with #3 since the first trigger on the map is usually a 1 call trigger that initializes variables and stuff.

2. ik it doesn't make sense to use both but I just noticed that and thought I'd mention it. #3 is really the main problem with these switch trigger actions.

3. this problem is only significant when using "switch execution to trigger ID in variable 'A'" since there is no indication that anything's wrong.


Developer of this trigger action here.
Please do not use the trigger action if you don't like the way it behaves. It doesn't really benefit you in any other way than performance. Just use execute trigger instead.

wanted2001
 
Posts: 1
Joined: 12 October 2022, 20:28

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby jeje52 » 6 June 2024, 09:46

odd how the main purpose is supposed to be performance, i've mostly used them to make an if-else type thing or to execute triggers by name using a "hashmap" made of variables. didn't even know it was more performant.
User avatar
jeje52
Advanced Usurpation Soldier [150]
 
Posts: 153
Joined: 13 April 2018, 19:52

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby mici1234 » 6 June 2024, 10:19

Oh, you are creative actually. What I meant was that the action was originally made with fast loops in mind, not for something like this, good to know that you can do more kind of stuff with those actions.

I guess we can add few actions that do same but check for whether trigger is disabled or not, whether there are remaining calls left before executing.

mici1234
Recruit
 
Posts: 22
Joined: 12 June 2017, 20:18
Location: Turkey

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby pb dman » 6 June 2024, 17:41

skibidi dop dop dop
Playing PB2 since 2015!

pb dman
Usurpation Soldier [50]
 
Posts: 87
Joined: 15 February 2020, 12:16
Location: earth

Re: .:BUG REPORTING:. "switch execution to trigger" bugs

Postby PeacyQuack » 11 June 2024, 19:29

Please refrain from spamming the threads with irrelevant posts. -Sigma police
Bugattis and hot women

PeacyQuack
Civil Security Lite [100]
 
Posts: 100
Joined: 24 April 2020, 16:38
Location: Turkey


Return to Bug Reporting, Help & Support

Who is online

Users browsing this forum: No registered users