Problems with poles
Well, I'm creating a kind of maze where you need to hit different poles in a kind of order. When I made this script and tested it I got confronted with a problem...
When I want to keep the pole (Sequence 425) at Frame 1 it seems to scroll to Frame 6 when I enter the screen. I tried a few things to solve this problem but it's still scrolling to Seq 425 Frame 6
Here is the script.
Note that &poles is a global variable
void main (void)
{
if (&poles > 0)
{
sp_seq(¤t_sprite, 425);
sp_frame(¤t_sprite, 6);
}
if (&poles == 0)
{
sp_seq(¤t_sprite, 425);
sp_frame(¤t_sprite, 1);
}
}
void talk (void)
{
say("A strange looking pole.", 1);
}
void hit (void)
{
&poles = 1;
sp_seq(¤t_sprite, 425);
sp_frame(¤t_sprite, 6);
}
Anyone knows how to fix this?
Thanks in advance
When I want to keep the pole (Sequence 425) at Frame 1 it seems to scroll to Frame 6 when I enter the screen. I tried a few things to solve this problem but it's still scrolling to Seq 425 Frame 6
Here is the script.
Note that &poles is a global variable
void main (void)
{
if (&poles > 0)
{
sp_seq(¤t_sprite, 425);
sp_frame(¤t_sprite, 6);
}
if (&poles == 0)
{
sp_seq(¤t_sprite, 425);
sp_frame(¤t_sprite, 1);
}
}
void talk (void)
{
say("A strange looking pole.", 1);
}
void hit (void)
{
&poles = 1;
sp_seq(¤t_sprite, 425);
sp_frame(¤t_sprite, 6);
}
Anyone knows how to fix this?

Thanks in advance
Try using sp_pseq and sp_pframe in the main procedure instead of sp_seq and sp_frame.
Edit: And of course make sure &poles is actually 0. You'll need to reset it to 0 on entering the screen or something unless you want the poles to stay bent after a screen change.
Edit: And of course make sure &poles is actually 0. You'll need to reset it to 0 on entering the screen or something unless you want the poles to stay bent after a screen change.