Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Thu 19/03/2015 11:02:09

Title: SOLVED: NPC failing to react to interactions..
Post by: Slasher on Thu 19/03/2015 11:02:09
Hi,

for some strange reason a npc (cBruggerman) will not react to any interactions like look, touch etc

It is fine in room previous but does not react when at next room.

I can't see anything that would conflict with this issue.

Hotspot Interaction:

Just before npc (cBruggerman) changes room (interactions ok up to this point):

Code (ags) Select

cBruggerman.Walk(735, 373, eBlock, eWalkableAreas);
cBruggerman.StopMoving();
cBruggerman.SetWalkSpeed(-2, -2);
cBruggerman.LockView(44);
cBruggerman.Animate(3, 4, eRepeat, eNoBlock);
cBruggerman.Move(738, 80, eBlock, eWalkableAreas);
cBruggerman.UnlockView();
cBruggerman.LockView(44);
cBruggerman.Animate(2, 4, eRepeat, eNoBlock);
cBruggerman.Move(463, 109,   eBlock, eWalkableAreas);
aThump.Play();
Wait(20);
aThump.Play();
Wait(20);
aThump.Play();
Wait(20);
aThump.Play();
cBruggerman.UnlockView();
SetNextScreenTransition(eTransitionInstant);
cBruggerman.ChangeRoom(5); // this is the npc
cConrad.ChangeRoom(5);


And after npc changes to next room:


function room_Load()
{
aCondemned_fight_21.Play();
SetBackgroundFrame(0);
otwirl.IgnoreWalkbehinds=true;
oDisk.IgnoreWalkbehinds=true;
oRock.IgnoreWalkbehinds=true;

cConrad.Loop=2;
Label6.Text=("Death Bog");
osmoke.Baseline=600;
cConrad.IgnoreWalkbehinds=false;

ovine.Tint(20, 250, 70, 60, 20);
ovine2.Tint(20, 250, 70, 60, 20);
ofish.Tint(20, 100, 70, 90, 50);
ofish.IgnoreWalkbehinds=true;
osnake.Transparency=20;
cBruggerman.SetIdleView(45, 5);
object[11].Transparency=100;
cBruggerman.Clickable=true;
RemoveWalkableArea(7);
cBruggerman.Loop=1;

Button29. X=421;
Button29. Y =352;


if(cConrad.PreviousRoom==7)
cConrad.Loop=1;


if(cBruggerman.Room==34){
region[1].Enabled=false;

}
}

function room_FirstLoad()
{
  Health_b=100;

cConrad.StopMoving();
cConrad.SayBackground("Aghhh!");
cBruggerman.SayBackground("Aghhh!");
cConrad.SetWalkSpeed(8, 8);
cConrad.Move(384, 426, eNoBlock, eWalkableAreas);
cBruggerman.StopMoving();
cBruggerman.SetWalkSpeed(7, 7);
cBruggerman.Move(426, 418, eBlock, eWalkableAreas);
aSwim.Play();
SetBackgroundFrame(1);
Wait(6);
SetBackgroundFrame(0);
RemoveWalkableArea(4);
mouse.Mode=eModeWalkto;
mouse.Visible=true;
}


Any ideas? Maybe I have overlooked an error?

Cheers

EDIT:

Something overlooked that would not have been known:

Code (ags) Select

osmoke.Clickable=false; // overlays npc


Solves this issue (nod)