View previous topic :: View next topic |
Author |
Message |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Mon Sep 03, 2007 9:05 am Post subject: Accelerating Rockets |
|
|
In errors tutorial on accelerating rockets, you have to create a new function. Where does this bit go?
Code: | .float rspeed; // counter for how many times the rocket changes speed
void() RocketSpeedChange =
{
if (self.rspeed < 10) // 10 is the max speed changes
{
self.velocity = self.velocity * 2; // up the speed by 2x
self.rspeed = self.rspeed + 1; // up the counter to tell it to stop
self.nextthink = time + 0.5; // redo this function
}
}; |
_________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Mon Sep 03, 2007 12:53 pm Post subject: |
|
|
Anywhere before you need to use the function... meaning above the touch function for rockets, most likely. |
|
Back to top |
|
 |
|