Raised This Month: $ Target: $400
 0% 

pev_frame/EV_FL_frame not updating!?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-23-2010 , 22:43   pev_frame/EV_FL_frame not updating!?
Reply With Quote #1

Hello!

I need to track the model sequence's frame so i can do some stuff (like change sequence) when it reaches frame X. But actually the frames don't seems to be updating, nor pev_frame nor EV_FL_frame, i've tried both ways

A bunch of the code:

PHP Code:
public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_clcmd("say /teste1""criaEntity")
 
register_think("summon""thinkSummon")
}
 
public 
criaEntity(id){
 new 
Float:origin[3], Float:mins[3], Float:maxs[3]
 
 
entity_get_vector(idEV_VEC_originorigin)
 
origin[0] += 50.0
 ent 
create_entity("func_breakable")
 
 
entity_set_float(entEV_FL_takedamage1.0)
 
entity_set_float(entEV_FL_health500.0)
 
 
entity_set_string(entEV_SZ_classname"summon")
 
 
entity_set_model(entmodel)
 
 
mins[0] = -31.0
 mins
[1] = -31.0
 mins
[2] = 0.0
 maxs
[0] = 31.0
 maxs
[1] = 31.0
 maxs
[2] = 70.0
 entity_set_size
(entminsmaxs)
 
 
entity_set_origin(entorigin)
 
 
entity_set_int(entEV_INT_solidSOLID_SLIDEBOX)
 
entity_set_int(entEV_INT_movetypeMOVETYPE_TOSS)
 
 
entity_set_float(entEV_FL_framerate1.0)
 
entity_set_int(entEV_INT_sequence0)
 
entity_set_float(entEV_FL_animtimehalflife_time())
 
entity_set_float(entEV_FL_frame0.0)
 
 
drop_to_floor(ent)
 
entity_set_float(entEV_FL_nextthinkhalflife_time() + 0.2)
 
}
 
public 
thinkSummon(ent){
 
client_print(0print_chat"Frame eh: %f"entity_get_float(entEV_FL_frame))
 
entity_set_float(entEV_FL_nextthinkhalflife_time() + 0.2)

as you can see, the frame is checked every think (about 5 per second)...
in the game frame is aways 0.0000000, it only changes if i set it manually to some other value, and that still doesn't affects the current sequence...

i've already tried to get the framethrough fakemeta (pev(ent, pev_frame, floatVariable)) and engine as you can see...

any other ideas? frame simply doesn't get updated --'

Last edited by alexx109; 07-25-2010 at 03:13.
alexx109 is offline
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-24-2010 , 10:57   Re: pev_frame/EV_FL_frame not updating!?
Reply With Quote #2

Sorry for the bump but i'm still needing this >.>

any ideas?
alexx109 is offline
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-25-2010 , 03:14   Re: pev_frame/EV_FL_frame not updating!?
Reply With Quote #3

more than 24h past and not even a single answer

please post at least an i dunno
alexx109 is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-25-2010 , 03:26   Re: pev_frame/EV_FL_frame not updating!?
Reply With Quote #4

Quote:
Originally Posted by alexx109 View Post
i dunno
RedRobster is offline
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-29-2010 , 16:32   Re: pev_frame/EV_FL_frame not updating!?
Reply With Quote #5

6 days after original post, and nothing =/ any ideas guys?
alexx109 is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-29-2010 , 23:38   Re: pev_frame/EV_FL_frame not updating!?
Reply With Quote #6

pev_frame/EV_FL_frame is not what you think. If you go through the HL-SDK (client-side) you'll see render functions that show how frames are received from models. I don't think you can get this server-side. The pev_frame is internal ent data, that is added manually. See here:

Code:
void CGonomeSpit::Animate( void )
{
   pev->nextthink = gpGlobals->time + 0.1;

   if ( pev->frame++ )
   {
      if ( pev->frame > m_maxFrame )
      {
         pev->frame = 0;
      }
   }
}
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
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 00:07.


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