Jump to content

seems triggers applied from a scheduled function do not stay true upon any input


Sir_Skurpsalot

Recommended Posts

Continuing on from my previous post, It seems that any trigger that is set on a weapon image that is called from a scheduled function does not stay applied upon input. What I mean is that I have a function that is shooting a raycast at regular intervals, making use of a schedule. When it hits a "friendly" it sets genericTrigger3 on the weapon image in slot 0 to true. If I stay looking at this object and touch any movement key the trigger sets itself to false. For debugging purposes I have removed anything from this function that returns the trigger to false, and it still happens. I tried using different genericTriggers and also setImageTarget instead and they all behave the same. If I write a simple function to toggle the generic trigger on and off with the press of a key it works fine as intended. There is something about the fact that it was called from a scheduled function that I think is making it not stay applied.

Link to comment
Share on other sites

The intended outcome of all this is to have it when a teammate crosses your line of sight within a certain distance it triggers a transition to a weapon state where it shows your character taking their muzzle offline so as to not flag them. I'm using setImageGenericTrigger(0,3,true) to accomplish the transition. It would work if it would just not get set to false as soon as you press a key. Even just pressing shift causes it to break. It's really strange.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...