Raised This Month: $ Target: $400
 0% 

drop a object with velocity and on touch doesnt work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-01-2009 , 13:32   drop a object with velocity and on touch doesnt work
Reply With Quote #1

Hi, i made this code

PHP Code:
new Float:iVelocity], Float:iOrigin];
velocity_by_aimidrandom_num80400 ), iVelocity );
pevidpev_originiOrigin );
set_peventpev_originiOrigin );
set_peventpev_classnamegClassname );
engfuncEngFunc_SetModelent,MODEL );
engfuncEngFunc_SetSizeentMINSZMAXSZ );
set_peventpev_solidSOLID_BBOX );
set_peventpev_movetypeMOVETYPE_TOSS );
set_peventpev_velocityiVelocity );
dllfuncDLLFunc_Spawnent );
// engfunc( EngFunc_DropToFloor, ent );
fm_set_renderingentkRenderFxGlowShell02550kRenderNormal70 );
cs_remove_user_nvgid ); // a stock... ^^ 
the problem is, when i use dllfunc( DLLFunc_Spawn, ent ); the object will dropped with nice velocity but i cant touch him... and if i use engfunc( EngFunc_DropToFloor, ent ); the velocity doesn't work and i can touch the model. I need a little help
__________________

Last edited by tuty; 03-01-2009 at 15:38.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-01-2009 , 13:46   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #2

What do you mean exactly by 'can't touch him' ?
Arkshine is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-01-2009 , 13:57   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #3

i mean if i touch the object to remove it....
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-01-2009 , 13:58   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #4

@arkshine
If he uses EngFunc_DropToFloor, then the velocity doesn't work, but the entity is solid.
If he doesn't, then the velocity works but the entity is not solid.


tuty beat me.

@tuty
Always set the entity's size and solid at the last point of creating it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-01-2009 , 15:36   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
@arkshine
If he uses EngFunc_DropToFloor, then the velocity doesn't work, but the entity is solid.
If he doesn't, then the velocity works but the entity is not solid.


tuty beat me.

@tuty
Always set the entity's size and solid at the last point of creating it.

actualy won't work..
In other plugins maded by me with models and solid models works. but in this is something strange..

Can you give me an example .. a good example because won't work..
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-02-2009 , 07:24   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #6

Remove the DLLFunc_Spawn and try.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-02-2009 , 07:50   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #7

i allready do that lol


but if i remove dllfunc spawn will throw but without velocity ... :/
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-02-2009 , 07:53   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #8

What's the entity you want to spawn ? info_target ?
Arkshine is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-02-2009 , 07:56   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #9

yup
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-02-2009 , 08:01   Re: drop a object with velocity and on touch doesnt work
Reply With Quote #10

Try that :

Code:
new Float:iVelocity[ 3 ], Float:iOrigin[ 3 ]; velocity_by_aim( id, random_num( 80, 400 ), iVelocity ); pev( id, pev_origin, iOrigin ); set_pev( ent, pev_classname, gClassname ); set_pev( ent, pev_origin, iOrigin ); set_pev( ent, pev_solid, SOLID_BBOX ); set_pev( ent, pev_movetype, MOVETYPE_TOSS ); engfunc( EngFunc_SetModel, ent, MODEL ); engfunc( EngFunc_SetSize, ent, MINSZ, MAXSZ ); engfunc( EngFunc_SetOrigin, ent, iOrigin ); set_pev( ent, pev_velocity, iVelocity ); fm_set_rendering( ent, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 70 ); cs_remove_user_nvg( id ); // a stock... ^^
Arkshine 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:04.


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