View previous topic :: View next topic |
Author |
Message |
Quake123
Joined: 29 Aug 2008 Posts: 3
|
Posted: Fri Aug 29, 2008 10:17 pm Post subject: My Healpad isnīt working. |
|
|
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 |
|
 |
Chris
Joined: 05 Aug 2006 Posts: 78
|
Posted: Fri Aug 29, 2008 10:46 pm Post subject: |
|
|
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  |
|
Back to top |
|
 |
Quake123
Joined: 29 Aug 2008 Posts: 3
|
Posted: Fri Aug 29, 2008 11:20 pm Post subject: |
|
|
Thanks itīs working!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
Back to top |
|
 |
|