Need an example of a /obj using a /mob variable.
|
|
Energyball icon='combomoves.dmi' icon_state="energyball" density = 1 Bump(B) if(ismob(B)) var/mob/M =B if(M == usr) return var/damage = 10 src<<"You attack [M]for [damage] damage!" M<<"[src] attacks you for [damage] damage!" M.hp -= damage for(var/mob/Q in view(0)) step_away(M,src,Q.Strength,0) world<< Q.Strength del src if(M.hp <= 0) usr.UpdateScores() M.icon = 'characters.dmi' M.icon_state = "obserber" M.P1sjoined = FALSE M.P2sjoined = FALSE M.Move(locate(1,10,1)) del src world.reboot()
|
Problem description: So I tried a couple ways to refer to the mob creating the energy ball. I'd like to see multiple detailed ways of doing this if possible. I learn better myself from examples similar to the way I already write my code. I'm thinking one of the only ways to do this is to override new() so I'd like to see some examples.
|