About Store Forum Documentation Contact



Post Reply 
Question about IsEvent.
Author Message
Xhizors Offline
Member

Post: #1
Question about IsEvent.
I have a question about IsEvents funciton, I believe it does not function properly as it should. I added an event "Hit" on the attack animation. Next I detect it like this in the update runtime.

Code:
if( anim_attack[0].isEvent( "Hit", Tm.d() ) )
{
   //Run event.
}

This works just fine, But sometimes it's like the update time past this "Hit" Event time and it does not get called.

I did run a simulation on this and the result was like.

0, Called.
1, Called.
2, Called.
3, Called.
4, Called.
5, Called.
6, Not Called.
7, Not Called.
8, Not Called.

9, Called.
10, Called.

Any ideas? Anyone else had this problem?

Thanks.
(This post was last modified: 10-19-2009 10:17 AM by Xhizors.)
10-19-2009 09:07 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Question about IsEvent.
is this Motion class are you talking about?

what 'updateAuto' parameters are you using? if you use 'time_speed==2' then you need to use if( anim_attack[0].isEvent( "Hit", Tm.d()*2 ) )

ill try to simplify this in the future
10-19-2009 01:21 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #3
RE: Question about IsEvent.
(10-19-2009 01:21 PM)Esenthel Wrote:  is this Motion class are you talking about?

what 'updateAuto' parameters are you using? if you use 'time_speed==2' then you need to use if( anim_attack[0].isEvent( "Hit", Tm.d()*2 ) )

ill try to simplify this in the future

Yes it's the Motion, I did what you said and that was it.

if(!motion.updateAuto( 3, 3, pAttackSpeed ))anim_attack.remove(i);

if( anim_attack[0].isEvent( "Hit", Tm.d() * pAttackSpeed ) )

Now it call the "Hit" event each time.

Thanks.
(This post was last modified: 10-19-2009 02:55 PM by Xhizors.)
10-19-2009 02:54 PM
Find all posts by this user Quote this message in a reply
Dampire Offline
Member

Post: #4
RE: Question about IsEvent.
How I can catch event in standard animation (run / step / jump / etc)?
05-17-2010 06:46 AM
Find all posts by this user Quote this message in a reply
Dampire Offline
Member

Post: #5
RE: Question about IsEvent.
Hm... Okay, new question. How you guys makes footstep sound playing for AIs?
(This post was last modified: 05-17-2010 06:13 PM by Dampire.)
05-17-2010 06:12 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Question about IsEvent.
catching events is done basing on checking isEvent methods for the most active current animation,
most current animation is taken from blending values and time value of Chr.anim
but I don't have the .h files in front of me now (I'm on different computer)
so I don't remember if they are private/public
they most definitely are accessible when having Game::Chr sources (pro license)
as for other license - not sure
05-17-2010 06:17 PM
Find all posts by this user Quote this message in a reply
Post Reply