AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pev_frame/EV_FL_frame not updating!? (https://forums.alliedmods.net/showthread.php?t=133303)

alexx109 07-23-2010 22:43

pev_frame/EV_FL_frame not updating!?
 
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 :x

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 --'

alexx109 07-24-2010 10:57

Re: pev_frame/EV_FL_frame not updating!?
 
Sorry for the bump but i'm still needing this >.>

any ideas?

alexx109 07-25-2010 03:14

Re: pev_frame/EV_FL_frame not updating!?
 
more than 24h past and not even a single answer :(

please post at least an i dunno :x

RedRobster 07-25-2010 03:26

Re: pev_frame/EV_FL_frame not updating!?
 
Quote:

Originally Posted by alexx109 (Post 1250793)
i dunno :x


alexx109 07-29-2010 16:32

Re: pev_frame/EV_FL_frame not updating!?
 
6 days after original post, and nothing =/ any ideas guys?

Drak 07-29-2010 23:38

Re: pev_frame/EV_FL_frame not updating!?
 
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;
      }
  }
}



All times are GMT -4. The time now is 00:07.

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