Help getting models frame
Hello again. I'm trying to get the models current sequences frame, but seems like pev_frame doesn't work. I tried to store it in both integer and float, but it always returns 0 or 0.0. I tried with AddToFullPack(Es_frame). It always returns 1. I'm trying to catch a frame(ex. 21) and do a specific action when the models animation reaches frame ##(ex. 21).
Thanks. |
Re: Help getting models frame
pev_frame works fine. You should have something wrong in your code.
|
Re: Help getting models frame
I registered HamThink for "info_target". My entity thinks every 0.01 second. Every think it check entities sequence. If it matches the DEFINEDSEQUENCE then it checks it's frame.
Code:
static FrameCode:
static FrameCode:
static Float:Frame |
Re: Help getting models frame
Code:
|
Re: Help getting models frame
http://www.amxmodx.org/funcwiki.php?go=module&id=16
Code:
enum {Code:
Quote:
If you want a Float value from pev(), you must reference the variable. |
Re: Help getting models frame
Haha, it doesn't matter. I tried it without a variable, directly putting into log_amx. I tried %f and %d.
Exolent, i noticed that testing it. Thanks. Maybe it doesn't work on entities? I've only seen it work on players, cause i've never used it on entities, i've used only sequences and framerate. |
Re: Help getting models frame
Frame beeing an integer you can use directly pev( entity, pev_frame) without problem here. Are you sure that the sequence is playing ?
|
Re: Help getting models frame
That Exolent didn't even let me to edit the post in time. :@ Anyway, check my edition.
|
Re: Help getting models frame
Quote:
|
Re: Help getting models frame
No. Is it possible to see your code ?
|
| All times are GMT -4. The time now is 01:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.