Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Accelerating Rockets

| Inside3d Forums Forum Index -> QuakeC Programming

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 |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group