[Help] Collide engine throttle script.

Post your tutorials here.

[Help] Collide engine throttle script.

Postby InsertNameHere » Thu May 14, 2015 7:20 pm

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. :oops:
Epic
User avatar
InsertNameHere
 
Posts: 60
Joined: Tue May 27, 2014 11:31 pm
Location: Claremore Oklahoma

Re: [Help] Collide engine throttle script.

Postby pnvv » Fri May 15, 2015 12:51 am

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 :thumbup:

Rating: rated 5
Filesize: 97.7 kB
Comments: 6
Ratings: 1
download
Image

(/)(°,,,°)(/)
User avatar
pnvv
 
Posts: 670
Joined: Tue Aug 26, 2014 11:46 pm
Location: Disunited States of America


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests

cron