I'm currently coding an ORIGINAL Dragonball game,and would like to make a training verb,that only works when your facing a punching bag at a certain direction.
Would be glad if anyone could explain it to me or send me a Snipet explaining it.
Thanks =]
ID:160293
Oct 5 2008, 6:45 am
|
|
In response to Keeth
|
|
Ok thanks you,I will give it a try and if anything goes wrong,you'll see it in the Code problems section ^^
|
In response to Arochimaro
|
|
Oh yeah.
You can use get_step to return the turf in a particular direction from an object. ie: get_step(mob,NORTH) will return the turf in the supplied direction from the mob (north of the mob, in this case). |
One, you can put the verb on the punching bag and make it accessible to anyone within one tile of the bag (look up "settings (verb)", specifically the src setting).
Then you can check to see if they are actually facing it (you'd use get_dir to get the direction the bag is from the mob, then compare it to which direction the mob is facing).
If they are, do whatever.
Another one, you can simply make a mob verb that accepts an argument: punching bags that are in the turf the mob is facing.
The first one would probably be the best choice, since it can be easily modified to work with any object.