
0
Not a Bug
Help; Custom event triggers only once
Hi,
I am having trouble triggering custom events after they have fired once.
I am triggering a custom event from the MathManager to a gameobject in the scene and sending 1 argument (an int value). The first time the value gets passed to the gameobject, but the secont time the event gets triggered, the event is not triggered on the gameobject. The 'old' value stays the same in that gameobject flow script. (you can see the event is not getting triggered)
I tried various work-a-round, and sometimes it works twice, but then the value stays the same again..
What could be wrong?
I can make a screenrecording to show you if my explanation is not clear.
Menno
Bolt Version:
1.4.8
Unity Version:
2019.2.10
Platform(s):
windows 10
Scripting Backend:
IL2CPP
.NET Version (API Compatibility Level):
.NET Standard 2.0
Customer support service by UserEcho
Hi Menno,
Sorry you're experiencing this issue.
Did this only start happening after upgrading to 1.4.8?
Probably yes, but it is hard to say exactly because I made huge progress today building the system.
(made 3 of the 4 math elements today and the first one was working with 1.4.7)
I have made a small video showing what is (not) happening ;-)
Audio is pretty bad though.
http://dplusvisuals.nl/downloads/bolt_trigger_event.mp4
Ah ok, thank you for testing, is this something you will be able to fix in an upcoming update?
Looks like the issue was with my logic after all. Custom events with arguments fire fine in this test case: https://i.imgur.com/4dbPYS2.png
could it be because I am sending an event from a statemachine to another gameobject?
If you're trying to trigger a custom event on another object, you need to reference that object.
I tested the same logic in a state machine that sends a custom event with float arguments to another object in it works just as fine as it did in the flow machine.
Hmm, I suddenly got this error without any changes to that part of the logic:
Do you have errors like this in the console?
The gameobjects are in a list array, (as you can see in the video) I'll investigate further
Hmm, I'm not seeing any videos.
what if you put your setup into a statemachine? and then have the the logic go to another state and come back to this state? Does it still work?
I tried the same logic in a state machine, it sends a custom event with two float arguments to another object without any issues.
I have posted a link to a video I made (my 2nd post)
dplusvisuals.nl/downloads/bolt_trigger_event.mp4
here it is again (sorry for the bad audio)
I see the posts with a link to the video is "on moderation"
So I don't know if you have seen it.?
Nope, if it's on moderation, I can't see it.
ok well, I copied the flow to a new statemachine and let it loop into itself and then it works, so I have to investigate why it doesn't work in the other statemachine graph.
I'll let you know if and why and how (i am sure I will) I solved it...
Ok, I got an update. It seems a user error off course ;-)
I disabled the gameobjects after picking and re-enabled them, somehow that causes the trigger not to work correctly. I have rearranged and adjusted some parts and finally I have something going :-)
Thank you so much for taking the time to see if there was a bug!!. (clearly not)
best regards
Menno
Glad you were able to get it fixed. :)
I'm not sure I follow, do you consider this to be a bug still? If so, please send me clear reproduction steps or a small example project so I can test on my end.
And I do apologize about the moderation filter, it's overly strict sometimes but we need it otherwise the forum gets riddled with ads and spam. I approved every of your post I saw.
Hi Lazio,
this doesn't seems to be bug. :-)
No need to apologize, your support is amazing! thank you!
best
Menno
Ok, great, I'll close this issue then. :)
Cheers!