if(M in get_step(usr,usr.dir))
I tried
if(!M in get_step(usr,usr.dir))
and
if(M in !get_step(usr,usr.dir))
But they didn't work.
ID:272322
Jun 7 2008, 12:06 pm
|
|
How would I change this code to make it an else if then the opposite of this code?
if(M in get_step(usr,usr.dir)) I tried if(!M in get_step(usr,usr.dir)) and if(M in !get_step(usr,usr.dir)) But they didn't work. |
Jun 7 2008, 12:10 pm
|
|
You may want to look up turn()
|
It should be mandatory to run at least a quick search before posting. [link]
|
In response to GhostAnime
|
|
...It worked but what I was hoping to get fixed didn't get fixed, because for some reason when my character is next to a person he attacks but it doesn't subtract health and doesn't do anything to the opponent.
if(usr.icon == 'Goku.dmi' && usr.can_attack == 1 && usr.clash == 0) |
In response to Element Hero creator
|
|
If you want to find a mob in a turf, use locate():
var/mob/M = locate() in get_step(src,dir) Do NOT loop through every single mob in the world and check its location. |