Inside3D!
     

Accelerating Rockets

 
Post new topic   Reply to topic    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

PostPosted: Mon Sep 03, 2007 9:05 am    Post subject: Accelerating Rockets Reply with quote

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
View user's profile Send private message Send e-mail
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Mon Sep 03, 2007 12:53 pm    Post subject: Reply with quote

Anywhere before you need to use the function... meaning above the touch function for rockets, most likely.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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