print bold to everyone

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

print bold to everyone

Post by Pedsdude » August 21st, 2006, 2:20 am

Instead of having it showing to the person who triggered it, is it possible to trigger it for everyone in the server?

The example I was thinking of was that say for instance somebody called "brian" pressed use on a trigger_use, targetname "silly1" (bare with me :P). This then sends a message to everyone in the server saying "brian rules".

I have tried doing it (so has sam), but we've both failed, Drofder? :roll:
Image
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 21st, 2006, 5:22 am

Thats easy, just take off the user in

Code: Select all

trigger waittill("trigger",user);
so it will be

Code: Select all

trigger waittill("trigger");
then when you get to those inprintlnbold or inprintln just have it simply like that without user in front of it.

so dont do this:

Code: Select all

user iprintlnbold("Brains");
but this

Code: Select all

iprintlnbold("Brains");
Now I will laugh at you both: Ha ha ha
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » August 21st, 2006, 10:18 am

I think he meant so it shows the players name in the message, so everyone can see it :P

I haven't tested this, and I have a feeling it will work the same as the ("trigger",user) method, but worth a try

Code: Select all

trig waittill ("trigger",other);
player = other;
iprintlnbold (player.name + "brian is gay ");

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 21st, 2006, 2:24 pm

the way I use works, just look in nm_grenade. I took off all the user's in the script and it shows it to everyone.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 21st, 2006, 3:16 pm

Code: Select all

rule()
{
  trigger = getent ("trigger_rule","targetname");
  while(1)
{
	trigger waittill ("trigger",user);
	user iprintlnbold("^1You Rule");
	iprintln ("^1" + user.name + " ^7Rules");
	wait(5);
}
}
there
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 21st, 2006, 4:00 pm

Thank you, will try it now.

Just to make it clear to everyone, I want it so that EVERYONE IN THE SERVER SEES THE NAME OF THE PERSON WHO TRIGGERED IT.
Image
Image

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 21st, 2006, 5:00 pm

Tested it and it works perfectly, thanks a lot :)
Image
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 21st, 2006, 7:22 pm

no problem, now I will laugh at you two

hahahaha
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 21st, 2006, 10:09 pm

I couldn't agree more :lol:
Image
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 21st, 2006, 11:29 pm

well you too KS, because you couldn't find it either :D

hahaha :P
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 22nd, 2006, 1:54 am

Retards.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 22nd, 2006, 1:59 am

lol :D
Image
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 22nd, 2006, 2:51 am

this is going no where, i might as well lock this topic

And drofder is jealous because I beat him :P



j/k
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 22nd, 2006, 1:31 pm

Nightmare wrote:this is going no where, i might as well lock this topic

And drofder is jealous because I beat him :P



j/k
not really because I would've used a more efficient code. One that sent messages to each person individually.

You code send 2 messages to the person who triggers the trigger, whereas mine would send only 1..

So there :P
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 22nd, 2006, 6:07 pm

Indeed, I get the last laugh, end of.
Image
Image

Locked

Who is online

Users browsing this forum: No registered users and 4 guests