getting centerprint to player when they aren't activator
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
getting centerprint to player when they aren't activator
this should be really simple but i'm failing and wondered if anyone here could offer a tidbit of advice.
i want a centerprint message sequence to play to the player via various trigger_relays. the only problem is that it's activated by a bot triggering its own special entity, so messages won't display due to this section in SUB_UseTargets:
i'm trying to modify it so regardless of the activator, the centerprint will always show to the player (or any player in the game, if it's a coop match)
any ideas?
thanks in advance
i want a centerprint message sequence to play to the player via various trigger_relays. the only problem is that it's activated by a bot triggering its own special entity, so messages won't display due to this section in SUB_UseTargets:
- Code: Select all
if (activator.classname == "player" && self.message != "")
{
centerprint (activator, self.message);
if (!self.noise)
sound (activator, CHAN_VOICE, "misc/talk.wav", 1, ATTN_NORM);
}
i'm trying to modify it so regardless of the activator, the centerprint will always show to the player (or any player in the game, if it's a coop match)
any ideas?
thanks in advance
- rj
- Posts: 5
- Joined: Thu Jul 03, 2008 9:23 pm
- Code: Select all
local entity ent;
if (self.message != "")
{
ent = find(world, classname, "player");
while (ent != world)
{
centerprint(ent, self.message);
if (!self.noise)
sound(ent, CHAN_VOICE, "misc/talk.wav", 1, ATTN_NORM);
ent = find(ent, classname, "player");
}
}
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest