HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: NPC animation issue  (Read 3760 times)

Malumm

  • General Accounts
  • *
  • Posts: 35
    • View Profile
    • SynapticSwitch
NPC animation issue
« on: Apr 27, 13, 04:04:34 PM »

Hey Everyone. Does anyone know why my NPC animations will not loop anymore? I'm not sure if this has been broken since the HE2 update or maybe a recent smaller patch, but it was working before. When I play an animation on my character it works fine, but the same animation played on the NPC will not loop.

Here is my Behave command sent from the server :

$Behave._SendBehave(npcNodeRef, "anim AnimAllBody anim_name always 1 40.00 seconds false true 0.1 false")
« Last Edit: Apr 27, 13, 04:07:46 PM by Malumm »
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: NPC animation issue
« Reply #1 on: May 01, 13, 10:21:58 AM »

Malumm, we are able to use the behave command to loop animation on an NPC in our tests. 

I assume, since you imply that the command runs the animation once on the desired NPC, that you have the correct npcNodeRef.  It is possible there is some script issue in your world causing the issue.  Perhaps the character controller is preventing the looping somehow?
Logged

Malumm

  • General Accounts
  • *
  • Posts: 35
    • View Profile
    • SynapticSwitch
Re: NPC animation issue
« Reply #2 on: May 03, 13, 03:32:31 PM »

Hey Bennett, Thanks for the response. I am able to play the animation on the NPC and so the NodeRef is correct. I have not made any changes to the HE character controller but I will have a look there today. I have tried removing everything in code that could cause the NPC to stop it's animation.

Is there an alternative way to play animations on our NPCs that I can try?
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: NPC animation issue
« Reply #3 on: May 06, 13, 10:44:39 AM »

You could try using the animation panel to run some looped animation on an npc.  It is just a GUI that sends a behave command, so you'd basically be checking that the command you are trying to use is valid.  This isn't a bad idea though :)
Logged

Malumm

  • General Accounts
  • *
  • Posts: 35
    • View Profile
    • SynapticSwitch
Re: NPC animation issue
« Reply #4 on: May 06, 13, 12:51:10 PM »

After further testing it seems the anmation looping works but the hold doesn't. Our NPC animations will only hold for a short amount of time while the character animations will hold for the number of seconds we tell it in the behave command. I have tested through the Animation Panel and it does the same thing.
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: NPC animation issue
« Reply #5 on: May 06, 13, 01:05:07 PM »

hmmm interesting, I'll see if I can reproduce that.
Logged

Malumm

  • General Accounts
  • *
  • Posts: 35
    • View Profile
    • SynapticSwitch
Re: NPC animation issue
« Reply #6 on: May 06, 13, 05:52:39 PM »

Thank you very much for taking the time. We are urgently needing a solution to this and I have done everything I can think of in script. I have tried removing the AiAgent from the NPC to no avail. I have tried debugging the NPC but there are no prints that come up when the NPC goes back to idle for no reason. There are no timers or anything that could stop the NPCs animation in script.
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: NPC animation issue
« Reply #7 on: May 07, 13, 04:00:57 PM »

I can't seem to reproduce the issue with the hold command, I have no trouble looping an animation for an npc for whatever length of time specified. Hmmmm.
Logged