wizard magic
Some questions for your question. By wizard, do you mean the player, or an npc? By magic, do you mean like a fireball, or Seth's bomb casting, or what? Specify and I can help.
If it is for an enemy, try this(1) file or this(2) one. I don't know which one is better.
Well anyways, if it's for a cutscene or something, below is basically how you'd make an npc shoot a fireball.
//shooting fireball in direction 4 (<--)
//variable for x,y coordinates of our sprite
int &mholdx = sp_x(¤t_sprite, -1);
int &mholdx = sp_y(¤t_sprite, -1);
//this is making our fireball sprite (brain 11 is missile brain)
int &junk = create_sprite(&mholdx, &mholdy, 11, 504, 1);
sp_seq(&junk, 504);
sp_dir(&junk, 4);
playsound(17, 8000,0,&junk,0);
sp_timing(&junk, 0);
sp_speed(&junk, 6);
sp_strength(&junk, 10);
sp_range(&junk, 10);
sp_flying(&junk, 1);
sp_script(&junk, "dam-fire");
//the shadow drawn under the fireball
int &mshadow = create_sprite(&mholdx, &mholdy, 15, 432, 3);
sp_brain_parm(&mshadow, &junk);
sp_que(&mshadow, -500);
//missile cannot damage these sprites
sp_brain_parm(&junk, ¤t_sprite);
sp_brain_parm2(&junk, &mshadow);
If it is for an enemy, try this(1) file or this(2) one. I don't know which one is better.
Well anyways, if it's for a cutscene or something, below is basically how you'd make an npc shoot a fireball.
//shooting fireball in direction 4 (<--)
//variable for x,y coordinates of our sprite
int &mholdx = sp_x(¤t_sprite, -1);
int &mholdx = sp_y(¤t_sprite, -1);
//this is making our fireball sprite (brain 11 is missile brain)
int &junk = create_sprite(&mholdx, &mholdy, 11, 504, 1);
sp_seq(&junk, 504);
sp_dir(&junk, 4);
playsound(17, 8000,0,&junk,0);
sp_timing(&junk, 0);
sp_speed(&junk, 6);
sp_strength(&junk, 10);
sp_range(&junk, 10);
sp_flying(&junk, 1);
sp_script(&junk, "dam-fire");
//the shadow drawn under the fireball
int &mshadow = create_sprite(&mholdx, &mholdy, 15, 432, 3);
sp_brain_parm(&mshadow, &junk);
sp_que(&mshadow, -500);
//missile cannot damage these sprites
sp_brain_parm(&junk, ¤t_sprite);
sp_brain_parm2(&junk, &mshadow);







