AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detecting player respawn & touch (https://forums.alliedmods.net/showthread.php?t=131883)

Mxnn 07-10-2010 00:03

Detecting player respawn & touch
 
Any way to detect player respawn, without hamsandwich?

What do you recomends me? Use hamsandwich for only one function or not use it?

An another question..
Is there a way to register the touch of a entity (model) with a non-solid func_wall?

Because i was trying to register the touch of the soccerjam's ball and the goalnet (previously seted with this "entity_set_int(endzone, EV_INT_solid, SOLID_NOT)"). But when the ball runs accross the goalnet nothing it happens :(


Thanks

wrecked_ 07-10-2010 00:39

Re: Detecting player respawn & touch
 
1) Use hamsandwich.

2) You could hook think and get the distance between the two ents. If it's very low you could consider that "touching".

Mxnn 07-10-2010 00:42

Re: Detecting player respawn & touch
 
1) Ok

2) Return a lot of errors like: ball is touching it but is stolen by some one..

wrecked_ 07-10-2010 00:57

Re: Detecting player respawn & touch
 
Quote:

Originally Posted by Mxnn (Post 1233848)
2) Return a lot of errors like: ball is touching it but is stolen by some one..

So prevent them from occuring.

Hunter-Digital 07-10-2010 07:52

Re: Detecting player respawn & touch
 
You could set the "func_wall" as SOLID_TRIGGER so it will register touch but not collide with it.

Quote:

Return a lot of errors like: ball is touching it but is stolen by some one..

You should check if any player has the ball in the touch function... not that hard.

Mxnn 07-10-2010 13:56

Re: Detecting player respawn & touch
 
I tried SOLID_TRIGGER but didn't works..
If I put SOLID_NOT, the players and the ball can walk accross it, but register_touch isn't activate.

wrecked_ 07-10-2010 14:03

Re: Detecting player respawn & touch
 
Quote:

Originally Posted by Mxnn (Post 1234472)
I tried SOLID_TRIGGER but didn't works..
If I put SOLID_NOT, the players and the ball can walk accross it, but register_touch isn't activate.

Quote:

Originally Posted by wrecked_ (Post 1233846)
You could hook think and get the distance between the two ents. If it's very low you could consider that "touching".



All times are GMT -4. The time now is 07:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.