non-playable characters not animating.

Started by pixg, Tue 06/11/2012 14:16:03

Previous topic - Next topic

pixg

I have a character stuck on frame 2 of his walk cycle, he does not animate when speaking.
he does animate when he walks but then returns to frame 2 (not frame 1 as he should)
his views are set corectly: seperate views for walking and talking and he is standing on a walkable area.
(he is not the main character)

my main character is fine, he walks and talks normaly..

the only differences i can think of is that the non-playable character is set to say something on a timer and my main character is lip synced to certain letters/vowels.



I have had this problem in the past and i figured out how to fix it, but this was about a year ago and i cannot remember how i fixed it :(

would appreciate suggestions.


thanks,
pickle green.

Khris

Did you lock the character's frame somewhere and forgot to release it again?
Something like that must be the case if your character's frame doesn't revert to frame 0 during inactivity.

pixg

#2
no, he's not locked.

the character in question is SWEET MAN


HERES THE CHARACTER INFO..........


appearnce
adjust volume with scale : false
Blinking view: 0
idle view: 0
normal view: 22
speech animation delay: 5
speech color: 248,252,0
speech color number: 65504
speech view: 24
thinking view: 0
useRoomAreaLighting: true
UseRoomAreaScaling: true
DESIGN
Clickable: true
ID: 2
Realname: Sweet Man
ScriptName: cSweet
Starting room: 1
Start x: 430
StartY: 438
MOVEMENT
AdjustspeedWithScale: False
AnimationDelay:4
DiagonalLoops: true
MovementLinkedToA.. True
MovementSpeed: 3
Solid: true
TurnBeforeWAlking: true
Uniformmovement: True
PROPERTIES



HERES MY SCRIPTING.........


// room script file

function hLamp_Look()
{
cJlg.Say ("&58 its broken");
}

function hLamp_PickUp()
{
cJlg.Say("&42 are you insane?? i can't lift that!");
}

function hFishstall_Look()
{
cJlg.Say("&29 That's a proper flash i've got on my fish stall today dude!");
}

function hFishstall_PickUp()
{
cJlg.Say("&42 are you insane?? i can't lift that!");
}

function room_AfterFadeIn()
{

AudioChannel* chan = a22_Market.Play();
chan.Volume = 30;



}

function room_LeaveRight()
{
cJlg.ChangeRoom(2, 280, 391);
}

function room_LeaveLeft()
{
cJlg.ChangeRoom(5, 908, 536);
}

function hHotspot3_WalkOn()
{
cJlg.ChangeRoom(6, 529, 583);
}

function hHotspot3_UseInv()
{
cJlg.ChangeRoom(6, 529, 583);
}

function room_Load()
{
SetTimer(1, 400);
SetTimer(2, 800);
}

function room_RepExec()
{
  int i;
  if (IsTimerExpired(1)){
    i = Random(6);
    if (i == 0) cSweet.Walk(420, 438, eNoBlock, eWalkableAreas);
    if (i == 1) cSweet.SayBackground("any cake a pound");
    if (i == 2) cSweet.Walk(317, 464, eBlock, eWalkableAreas);
    if (i == 3) cSweet.SayBackground("any bag of crisps a pound");
    if (i == 4) cSweet.Walk(200, 485);
    if (i == 5) cSweet.SayBackground("these fruit cakes are made by a well known shop, i'm not allowed to say sparks and darts");
    SetTimer(1, 900);
    }
   
   
    {
  int j;
  if (IsTimerExpired(2)){
    i = Random(6);
    if (j == 0) cTax.Walk(656, 504, eNoBlock, eWalkableAreas);
    if (j == 1) cTax.SayBackground("mumble mumble mumble");
    if (j == 2) cTax.Walk(463, 504,  eBlock, eWalkableAreas);
    if (j == 3) cTax.SayBackground("grumble grumble grumble");
    if (j == 4) cTax.Walk(697, 516, eNoBlock, eWalkableAreas);
    if (j == 5) cTax.SayBackground("thrumble dumble crumble");
    SetTimer(2, 900);
    }
   
   
   
}
   
   
}

pixg

there is one more difference between him and the main character, the second character (sweet man) has no up or down in his view, just left and right on both walk and talk.

pixg

**************UPDATE**********************

The character is now animating his speech:

the problem was *SayBackground* this does not animate the character
SOLUTION = replace *SayBackground* with *Say*

The Character is using his walk animation, but stil returning to frame 2 while idle and not frame 1.

SMF spam blocked by CleanTalk