Inside3D!
     

My Healpad isnīt working.

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Quake123



Joined: 29 Aug 2008
Posts: 3

PostPosted: Fri Aug 29, 2008 10:17 pm    Post subject: My Healpad isnīt working. Reply with quote

Hi here is my code


Code:

void() func_healpad_touch =
{


   if (other.classname != "player")
      return;
self.health =  100;



};


void() func_healpad =
{   
   self.movetype = MOVETYPE_PUSH;
   self.solid = SOLID_BSP;
   setsize (self, self.mins , self.maxs);
   setorigin (self, self.origin);
   setmodel (self, self.model);
   self.classname = "func_healpad";
      self.touch = func_healpad_touch;
};


I added the func_healpad on my map if i go on it, it doesnīt heal me
Back to top
View user's profile Send private message
Chris



Joined: 05 Aug 2006
Posts: 78

PostPosted: Fri Aug 29, 2008 10:46 pm    Post subject: Reply with quote

why are you assigning the health to the healpad?

shouldn't it be other.health = 100; ?

You take the time to check if other isn't a player, you'd think you'd catch yourself on the only other piece of logic in that function Razz
Back to top
View user's profile Send private message MSN Messenger
Quake123



Joined: 29 Aug 2008
Posts: 3

PostPosted: Fri Aug 29, 2008 11:20 pm    Post subject: Reply with quote

Thanks itīs working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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