shoot()
var/obj/cannonball/B = new/obj/cannonball(usr.loc)
B.own = usr
walk(B,usr.dir)
sleep(10)
del(B)
obj
cannonball
icon = 'obj.dmi'
icon_state="cb"
density = 1
var
own
Bump(mob/M)
if(istype(M,/mob/Ships))
world<<"[M] is shot by [src.own]!"
del(M)
//--
when i shoot the cannon, how do i make the cannon shoot from mob/Ships/ship1 instead of the mob the player is playing ?
(meaning the cannonball comes out from mob/Ships/ship1
ID:158815
Jun 24 2009, 10:49 am (Edited on Jun 24 2009, 11:05 am)
|
|
Jun 24 2009, 11:32 am
|
|
Well, one way would be that the usr has a variable that knows what ship he's in at all times. Then instead of having the cannonball start at his location(IE: (usr.loc)) have in start out in the variables location. So say mob/var/Ship is the variable to store the ship in. So it may look something like this.
|