Remove HE grenade when it touches the ground
Hi everybody, well I want to create a mini game that consists of the players only having the HE grenade and the objective is to throw them at the players, if the grenade touches the player he dies instantly, if the player throws the grenade and fails I want the moment he touches the ground disappears, I don't want it to explode just that it disappears and gives the player another grenade, my questions are first how can I make when the player receives the blow of the grenade dies instantly, second how can I make when the grenade touches the ground or anything other than the player removes the grenade and gives the player a new one, could you please give me an example? ... Thanks in advance
|
Re: Remove HE grenade when it touches the ground
Try this
PHP Code:
|
Re: Remove HE grenade when it touches the ground
ok thanks i will try it when i get to my house, i just forgot to ask something else, how can i do so that the grenade doesn't explode in the air? I mean, when you throw the grenade in the air, it is only removed when it touches the ground or when it hits the player. Another thing if the player hits the player also gives him a grenade. thx for your help
|
Re: Remove HE grenade when it touches the ground
Above code is updated based on your comments.
|
Re: Remove HE grenade when it touches the ground
Good job Bugsy, one question, what is exactly 'call_think' doing? I hope it can be used for smth else beside hegrenade
|
Re: Remove HE grenade when it touches the ground
He used it to safely remove the entity after giving the entity the Flag FL_KILLME
|
Re: Remove HE grenade when it touches the ground
That is how I am killing the grenade entity, after setting the FL_KILLME flag.
|
Re: Remove HE grenade when it touches the ground
Hm okay, interesting
Ps nice timing hah |
Re: Remove HE grenade when it touches the ground
bugsy I tested your code and it works fine but sometimes when I throw the grenade it doesn't give me a new grenade, I think that happens when I throw it to a map entity (func_wall, etc)
|
Re: Remove HE grenade when it touches the ground
Quote:
|
| All times are GMT -4. The time now is 02:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.