i need my spell to shoot just straight and so it also uses MP... right now it homes and it uses something like mp... but i want it to use mp and to shoot straight until it hits something with density, then it will "explode". this is what i have
mob/var/spelltimer = 0 in 0 to 10
mob/var/magicRate = 1 in 1 to 10
mob/New()
..()
while(1)
sleep(11-magicRate)
if(spelltimer) spelltimer -= 1
mob/verb/fireball(var/mob/M as mob in oview(5))
if(spelltimer) return
spelltimer = 10
missile(/obj/fireball,src,M)
if(!M.client) return
M.HP -= rand(20,25)
DeathCheck(M)
obj/fireball
icon = 'fireball.dmi'
ID:178372
May 23 2002, 6:26 am
|
|
May 23 2002, 10:12 am
|
|
You need a new fireball mob. Have it's direction equal to it's caster's direction. Then move it forward. Bump() will tell if it runs into something dense. When it does, explode (if you want it to have range, have the exploding as a proc and call it for both the range and Bump())
|
In response to Garthor
|
|
about the mp thing....i thought u would have been smart enuff to figger it out....i guees not....gimme the warp and the teleport verbs.... but uit goes liek this
at the top make a var var/mp then amke this proc/MagicCheck() if(usr.mp = 0)//cahng ethe indent and then u might have to fool wi this line im not sure about it now usr << "YOU DONT HAVE ENUFF MP!" return//try either one of these postitioned returns, im not sure return then go to the spell and add this; put it somewheres im not gonna tell u whre usr.mp -= 5//change this to toggle how much mp it uses then put M.MagicCheck//do this and it will go to the pro/magiccheck i made everytime u cast a spell and if u dont have enuff mp then it will reutrn and the spell wont werk.... GIMME THEWARP AND TELEPORT VERBS! I CNAT BELIVE U DIDNT KNOW HOW TO DO THIS!!!!! |
In response to Garthor
|
|
You could go about it like this.. NOT TESTED
mob/verb/Shoot() src.mp -= 5 var/O = get_step(src,src.dir) var/obj/S = new/obj/spell(O) walk(S,src.dir,0) mob/Bump(atom/movable/A) if(isobj(A) && istype(A, /obj/spell)) flick("boomie",A) del(A) Heh |
In response to Super16
|
|
furgot to tell him to make a var called mp lol he dusnt know u have to do that i don think
var/mp |
In response to Super16
|
|
the bump proc thing isnt working....
|