[Help] Collide engine throttle script.
2 posts • Page 1 of 1
[Help] Collide engine throttle script.
In my most recent scenes, in the script that the collide engine has for the throttle, (The invisible box that changes size in the engine) you would need two keys to throttle it; one for increasing throttle and another for decreasing throttle. Could anyone change my script I have to make it where you press a key and it increases the throttle, but when you let go of the key, the throttle decreases back down to the smallest size. It would be much appreciated if you help me on this, I've tried to do it on my own and I failed horribly.
Epic
-
InsertNameHere - Posts: 60
- Joined: Tue May 27, 2014 11:31 pm
- Location: Claremore Oklahoma
Re: [Help] Collide engine throttle script.
What I'd do is declare a local variable in your throttle-box, and name it _limit or something. Then put in poststep some script that uses keybinding to recognize whether you pressed whatever throttle key you wanna use (I do up arrow or W), then an if clause that adds to the width of your box based on whether you are on the throttle! Then declare a second variable called _throttle or something, and set it up so the box cannot get bigger than a specified size, aka _throttle cannot exceed _limit.
If that was hard to understand, here's a scene explaining it
If that was hard to understand, here's a scene explaining it
(/)(°,,,°)(/)
-
pnvv - Posts: 670
- Joined: Tue Aug 26, 2014 11:46 pm
- Location: Disunited States of America
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests