ID:156093
 
how would i make a wave attack where it shoots like a 3 tiles across object that then leaves behind a trail of like water or lava or something and then deletes the head of it when its done firing but leaves the trail for a few minutes or w/e
In the Move proc, when the projectile is created and sent in a direction, you should make new objects behind it. After it has moved so many steps (you can have a variable inside move that increments, or over a sleep() time) you delete the main object.

I suggest, if you are having issues with this, to look over some of the things I suggested in Demos or the Reference.
Mastergamerxxx wrote:
how would i make a wave attack where it shoots like a 3 tiles across object that then leaves behind a trail of like water or lava or something and then deletes the head of it when its done firing but leaves the trail for a few minutes or w/e

/obj/projectile/wave
name = "wave"

mini
name = "wave"

New()
return

New()
..()
new/obj/projectile/wave/mini(get_step(src, turn(src.dir, 90)))
new/obj/projectile/wave/mini(get_step(src, turn(src.dir, -90)))

Move()
..()
var/obj/trail/T = new()
spawn(10) del(T)

/obj/trail
name = "trail"
In response to Xerif
and how would i implement that into a verb im a tad lost as to whats on its own and whats made for the verb
Mastergamerxxx wrote:
how would i make a wave attack where it shoots like a 3 tiles across object that then leaves behind a trail of like water or lava or something and then deletes the head of it when its done firing but leaves the trail for a few minutes or w/e

Basically the example shows how to do it with 1 tile. You would want to add 2 overlays to the main object and create a trail in their locations also (using the same method as below)



obj/projectile/wave
bmid //This is the main object
New(loc,direction) //get the direction when you create it
..()
src.dir = direction //set the direction
walking() // start the main object walking
proc/walking()
while(1) //create a loop to keep walking
step(src,src.dir)//walk
new/obj/trail/wave/mid(src.loc) //create a new trail.
if(prob(10)) //if critera is met
world << "Condition Met"
break //leave the loop
sleep(10) //sleep 1 seconds and go back to begining of loop.
del src //delete the object
proc/create_olays()
//create the other paths here
return
obj/trail/wave // this is the trail that gets left behind
var
mins = 2 // last for 2 minutes
New()
..()
spawn()
sleep(mins*600) // sleep for timeout seconds
del src
top //icon 1
mob/verb/createnew() //This is a test verb
new/obj/projectile/wave/bmid(src.loc,src.dir)
In response to Nerion
when i try to compile it it says
                new/obj/trail/wave/mid(src.loc) //create a new trail.

has a undefined path
In response to Mastergamerxxx
You really need to learn how to program basics, and in general, before you try doing something. It says it has an undefined type path, because you never defined an object called /obj/trail/wave/mid .

http://www.byond.com/developer/articles/start
In response to Nerion
well i managed to fix it now i get this error and have no clue whats wrong

runtime error: Cannot read 1.dir
proc name: New (/obj/projectile/New)
usr: Mastergamerx (/mob/Player)
src: the bmid (/obj/projectile/wave/bmid)
call stack:
the bmid (/obj/projectile/wave/bmid): New(Grass (5,3,1) (/turf/Grass), 1)
the bmid (/obj/projectile/wave/bmid): New(Grass (5,3,1) (/turf/Grass), 1)
Mastergamerx (/mob/Player): createnew()

In response to Mastergamerx
In response to Mastergamerx
anyone know how to fix this?
In response to Mastergamerx