Raised This Month: $51 Target: $400
 12% 

Entity affected by gravity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 01-29-2014 , 21:48   Entity affected by gravity
Reply With Quote #1

So I start stacking my costume created boxes on top of each other. When I destroy the bottom one they all have to drop to the floor, but they don't.
I've tried adding gravity but no luck there. Any ideas ?

Here is how I create the box.
Code:
BoxCreate(Float: flOrigins[3]) {     new iEnt = create_entity("info_target");         entity_set_int(iEnt, EV_INT_solid, SOLID_BBOX);         entity_set_int(iEnt, EV_INT_movetype, MOVETYPE_TOSS);         entity_set_float(iEnt, EV_FL_takedamage, DAMAGE_AIM)         entity_set_model(iEnt, g_szBoxModel);         entity_set_size(iEnt, g_flMins, g_flMaxs);         entity_set_origin(iEnt, flOrigins);         entity_set_float(iEnt, EV_FL_health, 1.0); }
SpeeDeeR is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 03-11-2014 , 16:55   Re: Entity affected by gravity
Reply With Quote #2

Bump.
SpeeDeeR is offline
jok
Member
Join Date: Sep 2013
Old 03-11-2014 , 17:44   Re: Entity affected by gravity
Reply With Quote #3

use entity_set_float( iEnt, EV_FL_gravity, 1.0 );
jok is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 03-12-2014 , 10:58   Re: Entity affected by gravity
Reply With Quote #4

Quote:
Originally Posted by SpeeDeeR View Post
I've tried adding gravity but no luck there.
Quote:
Originally Posted by jok View Post
use entity_set_float( iEnt, EV_FL_gravity, 1.0 );
No.
SpeeDeeR is offline
Kiske
Veteran Member
Join Date: May 2009
Old 03-12-2014 , 13:10   Re: Entity affected by gravity
Reply With Quote #5

Try with SOLID_TRIGGER.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 03-12-2014 , 14:11   Re: Entity affected by gravity
Reply With Quote #6

Check for upper boxes when you destroy a box then use engfunc(EngFunc_DropToFloor, EntId)

Is this minecraft? O.O
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 03-12-2014 , 17:15   Re: Entity affected by gravity
Reply With Quote #7

Quote:
Originally Posted by pokemonmaster View Post
Check for upper boxes when you destroy a box then use engfunc(EngFunc_DropToFloor, EntId)
Yes. I already solved it like that, but I'm wondering if there is any efficient, more engine handled way.
SpeeDeeR is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 05-12-2014 , 09:10   Re: Entity affected by gravity
Reply With Quote #8

Bump.
SpeeDeeR is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-12-2014 , 09:24   Re: Entity affected by gravity
Reply With Quote #9

Did you try SOLID_TRIGGER as said?
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 05-12-2014 , 10:08   Re: Entity affected by gravity
Reply With Quote #10

SOLID_TRIGGER makes them not solid at all. Bullets, players, everything, except the world, goes through them and immеdiately drop to the ground, stacking together if they are spawned one a top another.
SpeeDeeR 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 05:42.


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