AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity not dropping to floor (https://forums.alliedmods.net/showthread.php?t=168849)

nikhilgupta345 10-04-2011 22:30

Entity not dropping to floor
 
1 Attachment(s)
In my plugin, when a player dies, the bag does not drop to the ground. It stays suspended in the air, and I've tried changing the movetype to MOVETYPE_NOCLIP, and it still does not work.

I want to leave the aiment there because it allows the bag to follow the player without following behind the player. It stays on top of the player directly at all times.

Hunter-Digital 10-05-2011 05:51

Re: Entity not dropping to floor
 
MOVETYPE_TOSS has gravity, so it should fall.

nikhilgupta345 10-05-2011 16:59

Re: Entity not dropping to floor
 
Quote:

Originally Posted by Hunter-Digital (Post 1568715)
MOVETYPE_TOSS has gravity, so it should fall.

It doesn't fall when I die unfortunately. I have no idea why it's not.

Hunter-Digital 10-05-2011 17:19

Re: Entity not dropping to floor
 
Try setting gravity to 1.0 and velocity to Float:{0.0, 0.0, -50.0} along with that MOVETYPE_TOSS.

ConnorMcLeod 10-05-2011 17:42

Re: Entity not dropping to floor
 
About code, why do you set bag origin each prethink if you have set it's property aiment to player index ?
About the thread, have you tried same thig with different models ? You may simply have to alter model origin offsets with som model editor like jedi model viewer.

nikhilgupta345 10-05-2011 17:54

Re: Entity not dropping to floor
 
Quote:

Originally Posted by ConnorMcLeod (Post 1569087)
About code, why do you set bag origin each prethink if you have set it's property aiment to player index ?
About the thread, have you tried same thig with different models ? You may simply have to alter model origin offsets with som model editor like jedi model viewer.

If I remember correctly, when I tried aiment without setting the origin, the bag would be stuck inside of the player itself. When setting the origin, I set it above the players head so that it is easily visible, and doesn't look retarded altogether :)

I actually have not tried with different models. But I know that this model is off-centered for sure, because when trying to rotate it, it rotates in a circle, rather than in place.

I'm not sure how to alter model origin offsets, but I do have Jed's Model Viewer.

avril-lavigne 10-05-2011 19:23

Re: Entity not dropping to floor
 
drop_to_floor?

nikhilgupta345 10-05-2011 19:54

Re: Entity not dropping to floor
 
Quote:

Originally Posted by avril-lavigne (Post 1569160)
drop_to_floor?

They essentially do the same thing. And there's no point of including engine just for that function when you can do the same with fakemeta, which is already included.


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

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