UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Text Trigger help

broken avatar :(
Created 12 years ago
by animallover
0 Members and 1 Guest are viewing this topic.
2,182 views
broken avatar :(
×
broken avatar :(
Location: gbIsle of Man
Date Registered: 17 July 2013
Last active: 6 years ago
Posts
536
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
- It was a clear black night, a clear white moon -
Signature
<3

AnimalLover

Aranda
Aldenrade
Christmas

<3

×
animallover's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
How to i make text appear on the screen when the play hits/walks into a trigger?
Last Edit: July 29, 2014, 05:34:39 pm by animallover
Marked as best answer by animallover 12 years ago
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Code Snippet
Plaintext
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;

make_text()
{
          trigger = getent("text_trigger","targetname");
          trigger SetCursorHint("HINT_NOICON");
          trigger SetHintString("This is a trigger");

          trigger waittill("trigger");

          IPrintLnBold("TEXT HERE"); //                          THIS IS HOW YOU MAKE THE TEXT TO APPEAR ON THE SCREEN
          trigger delete();
}
To make so the text will appear when you hit the trigger by pressing F or something, make a trigger_use in radiant and name it,
Code Snippet
Plaintext
targetname - text_trigger
To make so the text will appear when you touch the trigger, make a trigger_multliple which you should find at the same place you make a trigger_use. And give it the same targetname I said before.
Last Edit: July 29, 2014, 05:52:28 pm by Ege115
broken avatar :(
×
broken avatar :(
Location: gbIsle of Man
Date Registered: 17 July 2013
Last active: 6 years ago
Posts
536
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
- It was a clear black night, a clear white moon -
×
animallover's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Code Snippet
Plaintext
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;

make_text()
{
          trigger = getent("text_trigger","targetname");
          trigger SetCursorHint("HINT_NOICON");
          trigger SetHintString("This is a trigger");

          trigger waittill("trigger");

          IPrintLnBold("TEXT HERE"); //                          THIS IS HOW YOU MAKE THE TEXT TO APPEAR ON THE SCREEN
          trigger delete();
}
To make so the text will appear when you hit the trigger by pressing F or something, make a trigger_use in radiant and name it,
Code Snippet
Plaintext
targetname - text_trigger
To make so the text will appear when you touch the trigger, make a trigger_multliple which you should find at the same place you make a trigger_use. And give it the same targetname I said before.

I put this into a new gsc file. but it doesnt work, do i need to name the gsc a certain name?
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
I put this into a new gsc file. but it doesnt work, do i need to name the gsc a certain name?
Yes you have to give the file a name, for example,
Code Snippet
Plaintext
text_pop.gsc
When you've done that you have to copy and paste it in,
Code Snippet
Plaintext
root/mods/mapname/maps/
Then open your MAPNAME.gsc which should be in that directory too. ^^
WHen you've open mapname.gsc, search for this line,
Code Snippet
Plaintext
maps\_zombiemode::main();
Under that line, paste this,
Code Snippet
Plaintext
thread maps\text_pop::make_text();
Then add the trigger with the targetname I said in the other post and build mod with those edited scripts and compile the map.

 
Loading ...