Sprite Won't Spawn
So perhaps I'm dense, but can anybody figure out why the create_sprite() chunk at the bottom isn't working? I tried making a new variable for it instead of reusing &shad, but it still didn't appear.
I'm stumped.
This is an excerpt from a larger script, by the way. All the variables definitely initialise properly.
EDIT: Nevermind, don't mind me! Literally solved it within a minute of posting I swear I'd been stumped for forever as well... Dude.
I'm stumped.
&spx = sp_x(1, -1); &spy = sp_y(1, -1); &spx += 7; &spy += 2; sp_x(&shad, &spx); sp_y(&shad, &spy); &spx -= 7; &spy += 18; sp_seq(¤t_sprite, 512); sp_x(¤t_sprite, &spx); move_stop(¤t_sprite, 2, &spy, 1); sp_nodraw(¤t_sprite, 1); &spx -= 15; &spy -= 35; sp_nodraw(&shad, 1); sp_active(&shad, 0); &shad = create_sprite(&spx, &spy, 7, 167, 1); sp_que(&shad, -100); sp_seq(&shad, 7); sp_touch_damage(&shad, 35); playsound(24, 22050, 0, 0, 0); sp_active(¤t_sprite, 0); kill_this_task();
This is an excerpt from a larger script, by the way. All the variables definitely initialise properly.
EDIT: Nevermind, don't mind me! Literally solved it within a minute of posting I swear I'd been stumped for forever as well... Dude.
sp_active(¤t_sprite, 0);
what is the ¤ supposed to be?
¤t. Stupid Donk Network turns it into some currencyssymbol or some shit.
Or something.
Or something.
You need to set the sequence to 167, not 7; Then set the brain to 7.
sp_seq(&shad, 167);
sp_brain(&shad, 7);
also you might benefit from a:
preload_seq(167);
somewhere near the start of the script.
sp_seq(&shad, 167);
sp_brain(&shad, 7);
also you might benefit from a:
preload_seq(167);
somewhere near the start of the script.