The Dink Network

wizard magic

January 14th 2007, 08:59 PM
wizardb.gif
I need to know how to make a wizard shoot magic out.
January 14th 2007, 10:02 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
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(&current_sprite, -1);
int &mholdx = sp_y(&current_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, &current_sprite);
sp_brain_parm2(&junk, &mshadow);