Sir_Skurpsalot Posted April 6, 2020 Share Posted April 6, 2020 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. Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted April 7, 2020 Share Posted April 7, 2020 Sry I dont have any advice . Id like to ask you , what does setting generictrigger3 to true accomplish ? What is what is your desired effect here ? Quote Link to comment Share on other sites More sharing options...
Sir_Skurpsalot Posted April 7, 2020 Author Share Posted April 7, 2020 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. Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted April 7, 2020 Share Posted April 7, 2020 Are you familiar with the speed-o-meter hud ? If not then you should search for the code used for the speedometer hud schedule . perhaps someone can help you find it or can post a nice example of the speedometer scheduling code . Quote Link to comment Share on other sites More sharing options...
Sir_Skurpsalot Posted April 7, 2020 Author Share Posted April 7, 2020 Fixed it. If I have the raycast scanning function that is looping on a schedule call an outside serverCmd function that sets the imageGenericTrigger, it works like a charm. Quote Link to comment Share on other sites More sharing options...
Jason Campbell Posted April 7, 2020 Share Posted April 7, 2020 Nice. Love that feeling when you finally figure it out (and it doesn't break something else!) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.