Raised This Month: $ Target: $400
 0% 

Stopping a falling entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 04-20-2008 , 11:38   Stopping a falling entity
Reply With Quote #1

How can I stop a falling entity? I want to make entities stay in the air like players in noclip mode. How can I do that?
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 04-20-2008 , 12:04   Re: Stopping a falling entity
Reply With Quote #2

MOVETYPE + reset velocity.
I dunno, worth a try.

Code:
#define	MOVETYPE_NONE                   0           // Never moves
#define	MOVETYPE_FLY                    5           // No gravity, but still collides with stuff
#define	MOVETYPE_NOCLIP                 8           // No gravity, no collisions, still do velocity/avelocity
#define MOVETYPE_BOUNCEMISSILE          11          // Bounce w/o gravity

Last edited by [ --<-@ ] Black Rose; 04-20-2008 at 12:07.
[ --<-@ ] Black Rose is offline
skyjur
Junior Member
Join Date: Nov 2006
Location: Lithuania
Old 04-20-2008 , 12:07   Re: Stopping a falling entity
Reply With Quote #3

have you tried to change move type of the entity and set its speed to 0 ?

set_pev(ent, pev_movetype, MOVETYPE_FLY);
set_pev(ent, pev_velocity, {0, 0, 0});
skyjur is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 04-20-2008 , 12:42   Re: Stopping a falling entity
Reply With Quote #4

I can't change the move type. It doesn't work even if I change the move type and return it to normal by setting a task.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-20-2008 , 13:09   Re: Stopping a falling entity
Reply With Quote #5

It is an engine entity, or a created one?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 04-20-2008 , 13:29   Re: Stopping a falling entity
Reply With Quote #6

It is a Counter-Strike weapon dropped by a player.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-20-2008 , 13:46   Re: Stopping a falling entity
Reply With Quote #7

Try to use EngFunc_SetSize

E.g:

engfunc( EngFunc_SetSize, i_Ent, { -16.0, -16.0, -16.0 }, { 16.0, 16.0, 16.0 } ); will appear like you want.

engfunc( EngFunc_SetSize, i_Ent, { -16.0, -16.0, 0.0 }, { 16.0, 16.0, 16.0 } ); ; Setting to 0, weapon will appear on the ground.
__________________

Last edited by Arkshine; 04-20-2008 at 13:49.
Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-20-2008 , 14:00   Re: Stopping a falling entity
Reply With Quote #8

Quote:
Originally Posted by Shaman View Post
It is a Counter-Strike weapon dropped by a player.
Try to hook FM_SetModel forward and set pev_movetype to MOVETYPE_FLY...if that don't work, then you can't make that on an engine ent.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 04-20-2008 , 14:05   Re: Stopping a falling entity
Reply With Quote #9

I can make it fly, but players can't pick it when it's not MOVETYPE_TOSS.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-20-2008 , 14:30   Re: Stopping a falling entity
Reply With Quote #10

Quote:
Originally Posted by Shaman View Post
I can make it fly, but players can't pick it when it's not MOVETYPE_TOSS.
Hum...then try to set a task and reset the pev_movetype flag, should work
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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