ID:143183
 
Code:where would i put the code that would leave a trail in this obj i know it would be New() but i dont quite understand the rest.
obj
Getsuga_Tenshou
icon = 'IchigoShikai.dmi'
icon_state = ""
density = 1
icon_state = ""
var/mob/O
New(location, owner) // this is for
O = owner
..()
Bump(atom/A) // when it bumps something
if(ismob(A)) // if it is a mob, damage the mob
var/mob/M = A
var/damage = round(O.Reiatsu*0.30)
M.Health -= damage
del(src)


Problem description:

Explain better we dont know what you mean by trail.
In response to Tubutas
Its like when you program a attack and it goes straight and it leaves a trail of the icon like cero
In response to Trane5
Your lucky i watch bleach and know what that is =p.
but still i dont get what you mean by trail your want to make mutiple Gestugas?
In response to Trane5
It would not be in New(), no. It would be in Move().

Simply, every time the object moves, create a trail and set its direction to the objects direction.
obj/projectile
Move()
..()
var/obj/trail/t=new(loc)
t.dir=dir
obj/trail
In response to Tubutas
No i meant like one cero going staight.
In response to Kaiochao2536
=p Kiao you forgot to difine loc =p

Move(loc)
In response to Trane5
Thats exactly how.
In response to Tubutas
this correct
obj/projectile
Move()
..()
var/obj/trail/t=new(loc)
t.dir=dir
obj/trail
icon = 'Cero.dmi'
var/mob/Z
New(location, owner) // this is for
Z = owner
..()
Bump(atom/A) // when it bumps something
if(ismob(A)) // if it is a mob, damage the mob
var/mob/M = A
var/damage = round(Z.Reiatsu*0.10)
M.Health -= damage
M.Frozen = 1
sleep(25)
M.Frozen = 0
del(src)

mob
verb
Cero()
set category = "Zanpaktou Ability"
set name = "Cero"
var/obj/projectile/E1 = new /obj/projectile (src.loc, src)
E1.loc = usr.loc
E1.dir = usr.dir
E1.name="[usr]"
walk(E1,usr.dir)
Doing=1
spawn(30)
src.Doing=0
del(E1)
In response to Tubutas
No need. "loc" is automatically "src.loc".
In response to Kaiochao2536
Kaiochao2536 wrote:
No need. "loc" is automatically "src.loc".

oh good point i didnt notice the ..() before the new.

xD, my bad.
In response to Trane5
The trail doesent delete when i use it
In response to Trane5
Oh, did you say delete? I must not have read that part.

...

obj/trail
New() //When it gets created,
..()
spawn(50)del(src) //it deletes in 5 seconds.
In response to Kaiochao2536
Hmm what would would i do if i i wanted to add a head like a icon that will always be in front. THanks
In response to Trane5
...Change the projectile's icon to the head.
In response to Kaiochao2536
If u you do that what would be the back icon
i tryed this what do u think is it ok

obj/trail1
New() //When it gets created,
..()
spawn(50)del(src) //it deletes in 5 seconds.


obj/trail
New() //When it gets created,
..()
spawn(50)del(src) //it deletes in 5 seconds.



obj/projectile1
Move()
..()
var/obj/trail/t=new(loc)
t.dir=dir
obj/trail1
icon = 'Cero.dmi'
icon_state = "CeroHead"
var/mob/Z
New(location, owner) // this is for
Z = owner
..()
Bump(atom/A) // when it bumps something
if(ismob(A)) // if it is a mob, damage the mob
var/mob/M = A
var/damage = round(Z.Reiatsu*0.10)
M.Health -= damage
sleep(25)
del(src)


obj/projectile
Move()
..()
var/obj/trail/t=new(loc)
t.dir=dir
obj/trail
icon = 'Cero.dmi'
var/mob/Z
New(location, owner) // this is for
Z = owner
..()
Bump(atom/A) // when it bumps something
if(ismob(A)) // if it is a mob, damage the mob
var/mob/M = A
var/damage = round(Z.Reiatsu*0.10)
M.Health -= damage
sleep(25)
del(src)

mob
verb
Cero()
set category = "Zanpaktou Ability"
set name = "Cero"
if(src.Doing==1)
return
if(src.Reiatsu <= 800)
return
var/obj/projectile1/E2 = new /obj/projectile1 (src.loc, src)
sleep(5)
var/obj/projectile/E1 = new /obj/projectile (src.loc, src)
E1.loc = usr.loc
E1.dir = usr.dir
E1.name="[usr]"
walk(E1,usr.dir)
E2.loc = usr.loc
E2.dir = usr.dir
E2.name="[usr]"
walk(E2,usr.dir)
Doing=1
sleep(30)
src.Doing=0
del(E1)
In response to Kaiochao2536
Would i add a next projectiles