mob/verb/Laser()
var
laser = 0
if(laser == 0 )
var/bullet = new /mob/bullet(src.loc)
walk(bullet,src.dir)
laser = 1
spawn(20)
laser = 0
Please help me fix this, thanks!
ID:175500
Apr 15 2003, 7:49 pm
|
|
For some reason my timer wont work. Im trying to make it so every 2 seconds you can use your lasers, and in you dont wait nothing happens. Here's my current coding:
mob/verb/Laser() Please help me fix this, thanks! |
Apr 15 2003, 8:03 pm
|
|
It has to be mob/var/laser = 0 , otherwise it's just a local variable for the single instance of the verb. Oh, and it should be var/mob/bullet = new /mob/bullet(src.loc), but even so, I think you want objs, not mobs. mobs are for letting clients connect to. objs aren't.
|
In response to Garthor
|
|
When it was an obj the bump proc on the bullet wouldnt work
|
In response to Koolguy900095
|
|
http://www.byond.com/docs/ref/info.html#/atom/movable/proc/ Bump
Notice that it belongs to movable atom. That means there is exactly 0 difference between a mob's Bump() proc and an obj's Bump() proc, unless if you change them. The problem then, of course, would be your Bump() proc, not the use of obj instead of mob, which is ONLY an issue when you want clients to connect to them. |