Contagion
Mitchell 15 May, 2014 @ 7:16pm
How do u make messages for the player via phone?
Im just starting out with hammer and wanted to know how i can seand a text message to the player?
< >
Showing 1-15 of 19 comments
Ayredyl 16 May, 2014 @ 12:42am 
You cant. The text messages are automated in "Extract/Escape" modes.
You can, however "buzz" other players in Hunt in order to set their text tone off to find out their position. Just press "B" and hit your LM..B on a green name
Ayredyl 16 May, 2014 @ 12:44am 
As far as I'm aware, the texts you get in Escape are there as a sort of guide to help you through the maps so you dont get lost. i.e "found the key to the kitchen" -> "Heading out to the back alleyway through the kitchen door"
[DCC] Dec 16 May, 2014 @ 3:34am 
This is done using VScripts.

If you go to your Contagion/contagion/addons/losmuertos_tutorial/ folder there is a whole example of a map with a simple gamemode, if you look at how the scripts work in this it will help you to learn.

The function used it:
ThePresident.SendObjective( "TEXT" );
Last edited by [DCC] Dec; 16 May, 2014 @ 9:21am
Mitchell 16 May, 2014 @ 8:19am 
Originally posted by Dec1234:
This is done using VScripts.

If you go to your Contagion/contagion/addons/losmuertos_tutorial/ folder there is a whole example of a map with a simple gamemode, if you look at how the scripts work in this it will help you to learn.

The function used it:
ThePresident.SendObjective( "TEXT", 0, 0, 0 );
Thanks for the reply i will take a look at it.
Light08⁧⁧ ⭐ 16 May, 2014 @ 9:12am 
Originally posted by Dec1234:
This is done using VScripts.

If you go to your Contagion/contagion/addons/losmuertos_tutorial/ folder there is a whole example of a map with a simple gamemode, if you look at how the scripts work in this it will help you to learn.

The function used it:
ThePresident.SendObjective( "TEXT", 0, 0, 0 );
Question. How do you set the message so the player's character name who triggered the message appears? "Eugene: I found the keys" for example.
[DCC] Dec 16 May, 2014 @ 9:21am 
Originally posted by 8-BitZ | ライト08:
Question. How do you set the message so the player's character name who triggered the message appears? "Eugene: I found the keys" for example.

Like this:

ThePresident.SendObjective( GetNearestPlayerName( "entity_name" ) + ": It's over here!" );

The function GetNearestPlayerName will return a string with the nearest players name to a specific named entity.

Also the "0, 0, 0" on the end of the Send Objective are wrong, my bad.

It should be one of two functions:

ThePresident.SendObjective( "TEXT" );

or

ThePresident.SendObjectiveWithTarget( "TEXT", 100.0, 0.0, 100.0 );

The last three numbers are X,Y,Z world positions of the target that the phone will track.
Last edited by [DCC] Dec; 16 May, 2014 @ 9:21am
Light08⁧⁧ ⭐ 16 May, 2014 @ 10:20am 
Originally posted by Dec1234:
Like this:

ThePresident.SendObjective( GetNearestPlayerName( "entity_name" ) + ": It's over here!" );
Thanks a lot. :) Did you perhaps even coded a way to display the players name too? I guess not, right? Anyway, char name will be enough for me.
Jowo 21 May, 2014 @ 3:35pm 
Originally posted by Dec1234:
Originally posted by 8-BitZ | ライト08:
Question. How do you set the message so the player's character name who triggered the message appears? "Eugene: I found the keys" for example.

Like this:

ThePresident.SendObjective( GetNearestPlayerName( "entity_name" ) + ": It's over here!" );

The function GetNearestPlayerName will return a string with the nearest players name to a specific named entity.

Also the "0, 0, 0" on the end of the Send Objective are wrong, my bad.

It should be one of two functions:

ThePresident.SendObjective( "TEXT" );

or

ThePresident.SendObjectiveWithTarget( "TEXT", 100.0, 0.0, 100.0 );

The last three numbers are X,Y,Z world positions of the target that the phone will track.

Sorry if this has been addressed elsewhere but am I right in thinking that all messages come from the president?
Also do you have a fuller list of VScript functions for Contagion that we can look over? Or is most of it used in other games too?
Light08⁧⁧ ⭐ 22 May, 2014 @ 7:52am 
Originally posted by Jowo:
Sorry if this has been addressed elsewhere but am I right in thinking that all messages come from the president?
Also do you have a fuller list of VScript functions for Contagion that we can look over? Or is most of it used in other games too?

1. I don't think that they are somehow related to the "president". I have my own guesses but that's something I asked myself too. You thought because of the "objective" messages? Well, this class can also force zombies to spawn...
ThePresident.CreateZombiesConstant( );
So it probably isn't related to the president, more likely they choose the name just as a joke or something. Also, when you play on an official map all the messages come from the characters (depending on who triggered the event that is giving the message) and not someone else.

2. Since Contagion is unique from other source titles for using their own features, they also bring new codes and scripts with it. Commands you find in the vscript like "ThePresident.CreateZombiesConstant( );", "ThePresident.SendObjective" or "ThePresident.CreateWeapon( )" are coded within Contagion itself. You won't find these commands or something similar in other source titles since they have no use for it and cant use them. Also, I'm still learning to code and script but the sourcecode of Contagion, aswell as in all other source games, are encoded, which means you can't find out all the available commands to use, except they released them in a file but I think you can't find them out by yourself. Which means that the devs would have to release a list of all available commands to use, something I've been waiting for a long time already.
Rally Cat 29 May, 2019 @ 12:18am 
The chances of a reply here are slim to none, But where do you put the .nut file in order to get the map to recognize it?
Gavyn 29 May, 2019 @ 4:05am 
I never got that deep into mapping for this game, one of the people here should know how though. :Batcat:
Rally Cat 30 May, 2019 @ 5:41pm 
@Gavy εїз Wow I didn't expect people to actually respond. I got It to work but my script had to be in the losmuertos VScripts folder.
Light08⁧⁧ ⭐ 31 May, 2019 @ 9:09pm 
Thanks for replying to a 5 year old comment.
Tiniestkuriboh 31 May, 2019 @ 9:10pm 
Originally posted by Phoenix from the void:
The chances of a reply here are slim to none, But where do you put the .nut file in order to get the map to recognize it?

Create a mod pack that contains your vscript. There are some tutorials for making custom weapon scripts (limited functionality). The concept is for levels is the same.
Tiniestkuriboh 31 May, 2019 @ 10:17pm 
Originally posted by Light08 ✩:
Thanks for replying to a 5 year old comment.
Rip I just now noticed that. I wasn't paying attention since this thread popped up on the recents.
< >
Showing 1-15 of 19 comments
Per page: 1530 50