Raised This Month: $ Target: $400
 0% 

Track when a sequence ends?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-22-2010 , 23:18   Track when a sequence ends?
Reply With Quote #1

I mean, lets take this situaion by example:
I have an entity, that entity has a model, that model has sequences. I need to set that entity's sequence to 0, and after sequence 0 has ended, i must put sequence 3 (this is just a example). So i can't set sequence 3 right after sequence 0 ends just by doing this:

Code:
entity_set_int(ent, EV_INT_sequence, 0)
entity_set_int(ent, EV_INT_sequence, 3)
obviously don't works...
So, there's any way to track a sequence?

I've already tried to get EV_FL_frame hoping it stores the actual sequence's frame the entity is in, but it never gets updated...

I don't think setting a task with the time in seconds that the sequence has and setting the other sequence on the function called by the task is the right way... Anyone knows how to do that, if it's possible to do so?
alexx109 is offline
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-23-2010 , 09:33   Re: Track when a sequence ends?
Reply With Quote #2

Sorry for the bump but i'm really needing this and this seems to be an interesting question
alexx109 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 07-23-2010 , 10:22   Re: Track when a sequence ends?
Reply With Quote #3

To start a sequence you must do this

PHP Code:
entity_set_float(entEV_FL_framerate1.0)
entity_set_float(entEV_FL_animtimehalflife_time())
entity_set_int(entEV_INT_sequenceSEQUENCE_NUMBER
With this, EV_FL_frame should be updated
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
alexx109
Junior Member
Join Date: Jun 2010
Location: Brazil
Old 07-23-2010 , 11:13   Re: Track when a sequence ends?
Reply With Quote #4

Sad to say, but EV_FL_frame is still not updated...

a part of the code (this is just a test plugin):

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_float(entEV_FL_animtimehalflife_time())
 
entity_set_int(entEV_INT_sequence0)
 
drop_to_floor(ent)
 
entity_set_float(entEV_FL_nextthinkhalflife_time() + 0.2)
 
}
 
public 
thinkSummon(ent){
 new 
Float:frame entity_get_float(entEV_FL_frame)
 
client_print(0print_chat"Frame eh: %f"frame)
 
entity_set_float(entEV_FL_nextthinkhalflife_time() + 0.2)

i get the EV_FL_frame every think of the entity (about 5 times a second)
and it never gets out of 0.000000

i don't think there's any way to track the frames nor the sequence end :X
alexx109 is offline
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:17.


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