1
Technical forum / Script issue with a 2 frame sprite in a scene
« on: February 26, 2014, 11:28:09 PM »
Hello there, I was hoping someone could help.
I have sprite on my stage that has a 2 part animation to it. Frame 1 ( a crack ) Frame 2 ( a massive cavity) I'm basically going to have so when an object is tossed at the wall the crack opens up (frame 2) and then you can step through to the next scene.
It appears to half work with the script attached
#include "scripts\base.inc"
/////////////////////////////////////////////////
var wallcrack = this.GetSpriteObject();
on "frame1"
{
wallcrack.Pause();
}
It pauses but spits back and error saying...
untime error. Script 'scenes\Room\scr\wallcrack.script', line 5
21:57: Call to undefined method 'GetSpriteObject'. Ignored.
21:57: Runtime error. Script 'scenes\Room\scr\wallcrack.script', line 5
21:57: Call to undefined method 'GetSpriteObject'. Ignored.
Could anyone give any pointers to what I have done?
Thanks for your help.
:-)
I have sprite on my stage that has a 2 part animation to it. Frame 1 ( a crack ) Frame 2 ( a massive cavity) I'm basically going to have so when an object is tossed at the wall the crack opens up (frame 2) and then you can step through to the next scene.
It appears to half work with the script attached
#include "scripts\base.inc"
/////////////////////////////////////////////////
var wallcrack = this.GetSpriteObject();
on "frame1"
{
wallcrack.Pause();
}
It pauses but spits back and error saying...
untime error. Script 'scenes\Room\scr\wallcrack.script', line 5
21:57: Call to undefined method 'GetSpriteObject'. Ignored.
21:57: Runtime error. Script 'scenes\Room\scr\wallcrack.script', line 5
21:57: Call to undefined method 'GetSpriteObject'. Ignored.
Could anyone give any pointers to what I have done?
Thanks for your help.
:-)