Pedestrians and Patrons
Thanks!
Moderator: Inside3D Admins
Electro wrote:Have them just roaming around using path_corner and ignoring the player for starters. Then you can worry about doing things
like once you're in range they turn to look at you.
Good luck!
void (entity inflictor, entity attacker, float damage, entity ignore) T_AlarmDamage =
{
local float points;
local entity head;
local vector org;
head = findradius(inflictor.origin, damage); //the damage in this case only specifies the range of the sound
while (head) {
if (head != ignore) {
if (head.takedamage) {
org = (head.origin) + (((head.mins) + (head.maxs)) * 0.5);
points = 0.5 * (vlen((inflictor.origin) - org));
if (points < FALSE) {
points = FALSE;
}
points = damage - points;
if (head == attacker) {
points = points * 0.5;
}
if (points > -1) {
if (CanDamage(head, inflictor)) {
if ((head.classname) == "player") { //so it doesn't effect other players
}
else {
if ((head.targetname) == "good") {
}
else {
if ((head.alarmed) > 0){ //so it doens't keep alarming/hurting the same monsters
}
else {
head.alarmed = 1;
T_DamageAlarm(head, inflictor, attacker, 1); //note how the "damage" specified when the function is called is only for range.
}
}
}
}
}
}
}
head = head.chain;
}
};Return to Artificial Intelligence
Users browsing this forum: No registered users and 1 guest