ID:176586
Dec 31 2002, 6:53 am
|
|
How do i make it that if a player clicks Attack that if they are facing up the "up" attack animation shows? I need the same for the left,right,and down. Also how do i do if a player lays a bomb that the bomb lays in front of him? Btw im making a Zelda game.
|
In response to Hepitank
|
|
thx and for the bomb how do i lay it 1 square away from the dude?
|
In response to Leahcim
|
|
well instead of doing if(usr.dir = stuff....) u can use the get_step proc. like this
mob/verb/attack() var/obj/sword/s = new/obj/sword(get_step(usr,usr.dir))//this creates teh obj in front of them. sleep(5) del(s)//wait a bit and hten delete the sword so lets say you want to make it so that the obj does damage only when it HITS a mob. obj/sword icon = 'sword.dmi'//icon New(Loc) for(var/mob/M in Loc) M.HP-= rand(1,10)//assuming u have a HP var M.DeathCheck()//assuming u have a deatcheck proc and that should do what you want you might also wanna add in like flick iconstates and stuff |
mob/verb/bomb()
if(dir == North)
//generate the bomb here one tile north of the mob.
if(die == South)
//etc, etc.