ID:162783
 
obj
var
damage//define a damage var so objects can deal damage

obj
Fireball
icon ='Fireball.dmi'//example icon
damage = 10//how much damage the fireball will do

mob
verb
Incendio(mob/M in oview(10))//allows you to select who(mobs) to attack within 10 tiles around you. The mob you selected is now reffered to as M
if(usr.mp >= 15)//checks to see if their mp is greater than or equal to 15
var/obj/Fireball/F = new//create a new var named F which is a Fireball object
F.loc = usr.loc//makes the fireball appear at the usr's location
walk(F,M,0)//this makes the fireball(F) walk towards the person you chose(M) with 0 lag between movements
M.hp -= F.damage//this takes away how much damage the fireball can do from the victim. In this case, M is dealt 10 damage
del(F)//delete the fireball
else//if you don't have enough mp
usr << "You don't have enough mp!"//you can't use the spell



This isnt my code and its just copyed and pasted could you help me to make it into a firebolt that fires in a streight line not a homing
Noone is going to help you if its not your coding. But to do so(I will not replace the code). Check the byond Help for the Walk() command.