In my game, I have monsters that walk in random directions. Is there a way to make a "wall" that they cannot pass into, but players can walk through?
I want to create this so that players can have some sort of safe area where monsters cannot go (A town).
ID:269277
May 6 2005, 7:55 pm
|
|
In response to Buzzyboy
|
|
turf/NoMonster Ugh. How many times does it need to be repeated that you shouldn't be using usr here? Use the passed in parameter. Though it's still bad form to just test against the mob having a client as you may later decide you want mobs which aren't PCs or monsters to be able to move through(ie. npc helpers) in which case things won't work. It would be best to either give mobs a flag which determines whether or not they can enter town areas or make monsters derived from a monster base class and just deny them specifically. The flag method mob The deny monster type method mob |
In response to Theodis
|
|
Thanks a million. I got it to work.
|
turf/NoMonster
Enter()
if(!usr.client) ..()
else return 0
just place this turf around the town or whereever you want it to be safe.