Quote:
|
Originally Posted by snikr
Quote:
|
Originally Posted by humordwarf
attack desire will be adden only if distance_to_creature < 200
|
With this can I make a guard kill a player who has become PK in front of him? (Now the guards won't kill him unless he goes away and then come back with karma).
|
i dont think so...
guard handler is just:
Code:
EventHandler SEE_CREATURE(creature) {
if (creature.karma > 0) {
AddAttackDesire(creature, 0, 1500);
}
}
// 1 functions called (1+0)
1. called periodicaly but not frequently (or by some logic) for existing players.
2. called each time when new player appears nearby
3. called ? after EnableMakingSeeEvent() (not tested, if its true - add this using AddTimerEx(), handlers CREATED, TIMER_FIRED using e.g. 30 seconds)
you can also try to use handler from class guard_move_around
Code:
EventHandler NO_DESIRE() {
AddMoveAroundDesire(5, 5);
}
only make sure your guard will not go too far from point
or try put there EnableMakingSeeEvent(); instead of around desire...
anyway... more expeiments = better results