NavigationUser login |
MonsterParent: build Functions used for building monsters (obj/monster.lpc). Refer to for the official functions. Inherits baseobjectfunctions The following functions are extra functions. set_roommove set_roommove(dist,freq,randdist, randfreq); In the following example the monster will move in a random direction 0.3 mud units every 5 seconds: set_actionwheninit set_actionwheninit(action, withintime) For example a cat with the following function will 'meow' sometime within 60 seconds. set_actionwheninit("meow",60); set_attackresponse set_attackresponse(arg,arg2); Arg2 is an array of number between 0 and 5 where In the following example when attacked the monster would say 'You asshole!'. He will then attack in 2 attack cycles but dodge for the remaining and then stop fighting until attacked again: set_attackresponse("say You asshole!!",(({0,0,1,1,1,1,1}))); Another example is: set_attackresponse("",(({3}))); which means the monster will attack forever while the attacker is in the room. |