In response to YMIHere
Ah ok thanks YMI
In response to YMIHere
Nuffin happened :/
obj
Turret
icon='Turrets.dmi'
icon_state="Turret"
density = 1
New()
spawn(10)
look()
proc
look()
while(1)
if(locate(/mob) in oview(src,10))
var/list/mobs_in_oview=new
for(var/mob/M in oview(src,10))
mobs_in_oview.Add(M)
var/mob/M=pick(mobs_in_oview)
missile(/obj/Bullet, src.loc, M)
sleep(10)
Bullet
icon='Turrets.dmi'
icon_state="Bullet"
density = 1
Bump(atom/A)
if(ismob(A))
A << "Did that hurt?"
white
icon='White.dmi'
mob
icon='Turrets.dmi'
In response to Skye Reaver
Maybe they weren't kidding in the reference when they said "The effect is purely visual." I figured it made an object, maybe it just makes an image. Instead of using missle you can create the bullet like you were before, and use walk_towards().

var/obj/Bullet/B=new(src.loc)
walk_towards(B, M)


You'll also have to delete the object itself, but you can do that in Bump().
In response to YMIHere
obj
var
reloadtime
picture
Turret
icon='Turrets.dmi'
icon_state="Turret"
density = 1
reloadtime=30
picture="Bullet"
New()
spawn(10)
look()
proc
look()
while(1)
if(locate(/mob) in oview(src,10))
var/list/mobs_in_oview=new
for(var/mob/M in oview(src,10))
mobs_in_oview.Add(M)
var/mob/M=pick(mobs_in_oview)
missile(/obj/[picture], src.loc, M)
sleep(reloadtime)
Bullet
icon='Turrets.dmi'
icon_state="Bullet"
density = 1
Bump(atom/A)
if(ismob(A))
A << "Did that hurt?"
white
icon='White.dmi'
mob
icon='Turrets.dmi'


It should work =/ I want it to be the object specified in the turret or other object that shoots things so i dont have to make a look() proc for everything
In response to N1ghtW1ng
Arg! Not sure what I was thinking, but you don't need another proc. You can spawn() off a recursive call to the proc you want to loop. Sorry. <=)

blah
New()
spawn()
LoopMe()

proc/LoopMe()
world << "Yay!"
spawn(30)
LoopMe()
In response to Skye Reaver
It would have to be a type path. That is a mix of a path and text.
In response to YMIHere
Ah!
Well, here is meh new code, problem- How do I make it delete the bullet? It floods meh screen with Did that hurt? lol
obj
var
reloadtime
Turret
icon='Turrets.dmi'
icon_state="Turret"
density = 1
reloadtime=30
New()
spawn(10)
look()
proc
look()
while(1)
if(locate(/mob) in oview(src,10))
var/list/mobs_in_oview=new
for(var/mob/M in oview(src,10))
mobs_in_oview.Add(M)
var/mob/M=pick(mobs_in_oview)
var/obj/Bullet/B=new(src.loc)
walk_towards(B, M)
sleep(reloadtime)
Bullet
icon='Turrets.dmi'
icon_state="Bullet"
density = 1
Bump(atom/A)
if(ismob(A))
A << "Did that hurt?"
white
icon='White.dmi'
mob
icon='Turrets.dmi'
In response to YMIHere
Thats what I was thinking =P
In response to Skye Reaver
You delete it in Bump() after the player gets the message, but since we want it to delete whenever it hits anything, we'll do it outside of the if statement.

Bump(atom/A)
if(ismob(A))
A << "Did that hurt?"
del src
In response to Skye Reaver
Please explain to me in-depth what this means....

            if(!locate(/mob) in oview(src,10))

I dont know what the ! does. :O
In response to Skye Reaver
! is the not operator. So if there was no mob in oview(src, 10) that would return true.
Page: 1 2 3