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

Getting Index from model ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-02-2012 , 01:22   Getting Index from model ?
Reply With Quote #1

Hi another time.

Well , i have this problem.

i make a grenade in Ham_Think (Grenade), when you fire it , that create a box model ( Only a model )
Code:
engfunc( EngFunc_SetModel, entity, box )

Now my problem , the model has submodels, and i want to set any of these , but i cant set any , how i can set any submodel ?

i tried with

Code:
set_pev( entity, pev_body , 5 )

and not works :/

Any suggerest?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 02-02-2012 , 12:06   Re: Getting Index from model ?
Reply With Quote #2

"Index from model" is an entirely different thing, that's what the precache_model() function returns for use in messages mainly.

Anyway, pev_body should work to set submodels, but if you don't know the values and stuff for them, use Half-Life Model Viewer to see them and their values.
__________________
Hunter-Digital is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-02-2012 , 12:25   Re: Getting Index from model ?
Reply With Quote #3

Yes yes , i know , pev_body works if i create a entity like create_entity("info_target") , but in this case , dont works.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.

Last edited by lucas_7_94; 02-02-2012 at 12:25.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-02-2012 , 14:00   Re: Getting Index from model ?
Reply With Quote #4

So you don't create a new entity, you only set the grenade model ?
Try to create an entity then.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-02-2012 , 14:36   Re: Getting Index from model ?
Reply With Quote #5

yes , exactly connor , but , its mean that cannot be possible ? because , yes , if i create a new entity pev_body works.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-02-2012 , 14:48   Re: Getting Index from model ?
Reply With Quote #6

Dunno, try to also set pev_modelindex to the value returned by precache_model(box).

PHP Code:
engfuncEngFunc_SetModelentitybox )
set_pev(entitypev_modelindexengfunc(EngFunc_PrecacheModelbox))
set_pev(entitypev_body5
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 02-02-2012 at 14:49.
ConnorMcLeod is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-02-2012 , 14:54   Re: Getting Index from model ?
Reply With Quote #7

sorry connor , dont works
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
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 06:02.


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