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(PLUGIN, VERSION, AUTHOR)
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(id, EV_VEC_origin, origin)
origin[0] += 50.0
ent = create_entity("func_breakable")
entity_set_float(ent, EV_FL_takedamage, 1.0)
entity_set_float(ent, EV_FL_health, 500.0)
entity_set_string(ent, EV_SZ_classname, "summon")
entity_set_model(ent, model)
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(ent, mins, maxs)
entity_set_origin(ent, origin)
entity_set_int(ent, EV_INT_solid, SOLID_SLIDEBOX)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS)
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_int(ent, EV_INT_sequence, 0)
entity_set_float(ent, EV_FL_animtime, halflife_time())
entity_set_float(ent, EV_FL_frame, 0.0)
drop_to_floor(ent)
entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.2)
}
public thinkSummon(ent){
client_print(0, print_chat, "Frame eh: %f", entity_get_float(ent, EV_FL_frame))
entity_set_float(ent, EV_FL_nextthink, halflife_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 --'