|
Post by adamdived on Aug 15, 2019 11:03:49 GMT
Hello, i've got Basic Locomotion PRO and i'm already sperimenting with it. It's great! I love it! I was experimenting with timed action. It's perfect for my need, i was just wandering how can i modify it to resume the action if i stop using it. For example, in Dead By Daylight, when you repair a generator, it start the bar that shows how much time you need to finish the repair. If you leave the generator and you come back, the value still where it was when you left it. Is there a way to achive something similar? I know a bit of coding so i can do it by my own, but i would love to know if there is a way to do it with the original Invector's scripts and components.
|
|
|
Post by Invector on Aug 16, 2019 13:36:38 GMT
Hmmmmmmmm that's a good question, we're always updating our features and adding new functionalities to it and you guys always almost right after the update is released ask for even more functionalities to the new stuff xD
I will need to take a look at it with more time, but sure I think it's possible.
Basically in the vGenericAction we call the method "triggerAction.UpdateButtonTimer(0);" to reset the timer, basically we will need to storaged that timer somewhere and create an optional bool to whether this trigger can be resumed or resetted.
|
|
|
Post by adamdived on Aug 16, 2019 13:58:36 GMT
Hmmmmmmmm that's a good question, we're always updating our features and adding new functionalities to it and you guys always almost right after the update is released ask for even more functionalities to the new stuff xD I will need to take a look at it with more time, but sure I think it's possible. Basically in the vGenericAction we call the method "triggerAction.UpdateButtonTimer(0);" to reset the timer, basically we will need to storaged that timer somewhere and create an optional bool to whether this trigger can be resumed or resetted. Thank you very much. No i wasn't asking for new stuff :D i was just wondering if there could be a solution for it. So ok, i can store UpdateButtonTimer value somewhere and catch it up when i resume. Thank you!
|
|
|
Post by adamdived on Sept 30, 2019 18:07:21 GMT
Hi. I'm here again to propose the resume button timer feature. I've found the method triggerAction.UpdateButtonTimer(0) you've suggested, but the time calculation happens in vGenericAction right?
public void UpdateButtonTimer(float value) { if(value != currentButtonTimer) { currentButtonTimer = value; OnUpdateButtonTimer.Invoke(value); } }
So i thought to grab "currentButtonTimer" value from vGenericAction. I've made it public so i could access it, and i store it in a new float variable, and so i did:
newValue = triggerAction.currentButtonTimer; triggerAction.UpdateButtonTimer(newValue);
But it keep resetting the timer to Zero, no matter what i put in.
What am i'm doing wrong? Or maybe what i don't understand here?
|
|