I had problems with WME crashing while changing between some new scenes. I spend some time to figure out what's wrong. Now I found it but I can not explain myself why there was a bug.
This is the old object script of a door to another room (that one crashed occasionaly):
#include "scripts\base.inc"
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
actor.GoToObject(this);
}
////////////////////////////////////////////////////////////////////////////////
on "LeftDoubleClick"
{
actor.GoToObject(this);
actor.PlayAnimAsync("actors\looky\uu\take1short.sprite");
Sleep(300);
Game.ChangeScene("scenes\skintop_wohnzimmer\skintop_wohnzimmer.scene");
}
////////////////////////////////////////////////////////////////////////////////
on "RightClick"
{
actor.GoToObject(this);
Game.Interactive=false;
actor.Talk("Eine Tür.");
Game.Interactive=true;
}
My aim was to let him go to the door and while he grabs it fade the scene out and change it.
This is what I had to change it to, to make it work (doesn't crash anymore, changing scenes for half an hour now):
#include "scripts\base.inc"
////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
actor.GoToObject(this);
}
////////////////////////////////////////////////////////////////////////////////
on "LeftDoubleClick"
{
actor.GoToObject(this);
actor.PlayAnim("actors\looky\uu\take1short.sprite");
Game.ChangeScene("scenes\skintop_wohnzimmer\skintop_wohnzimmer.scene");
}
////////////////////////////////////////////////////////////////////////////////
on "RightClick"
{
actor.GoToObject(this);
Game.Interactive=false;
actor.Talk("Eine Tür.");
Game.Interactive=true;
}
Is it not possible to let the actor play an animation while the scene changes ?
Regards
Mac