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

Trigger Text

broken avatar :(
Created 7 years ago
by Ishooturfaces
0 Members and 1 Guest are viewing this topic.
4,078 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 4 January 2015
Last active: 7 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Ishooturfaces's Groups
Ishooturfaces's Contact & Social Links


Is it possible to modify trigger scripts to change text box....for ex. on a trigger use for a door
change text from standard "hold() to open door" to custom text. I've looked into trigger.gsc scripts and they just refer to a default script for text. Im going to keep digging, but any help would be appreciated.

thanks in advance
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 4 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
Are you trying to change the text on doors in treyarch maps or your own maps?

If you want to change the doors on treyarch maps, I have no idea if that can be done, and if it can, I don't know how.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 4 January 2015
Last active: 7 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Ishooturfaces's Groups
Ishooturfaces's Contact & Social Links
trying to change text in my own map on a custom door with a trigger use...ive narrowed it down to where i can change it in the trigger.gsc...but do not want to modify original script and not sure how to impose a custom version to my map
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 4 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
Well, actually, you don't need to change any stock scripts. On the trigger that you have in your map you should have a targetname assigned to it. so in your code you could do something like this...

Code Snippet
Plaintext
function whatever()
{
trig = GetEnt("whatever", "targetname");//keep targetname, but you would replace "whatever" with the name you assigned targetname to in radiant
trig SetCursorHint("HINT_NOICON");//removes the hand icon
trig SetHintString("Press and hold &&1 for blank");//you can put whatever you want in here and that's what will show in game

trig waittill ("trigger");
//do code
}
and just in case you don't know how to thread the function, in yourmapname.gsc, under the main function, add this...
Code Snippet
Plaintext
thread whatever();//you can put whatever name you want after thread, just make sure it matches the function name

Hope this helps :)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 4 January 2015
Last active: 7 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Ishooturfaces's Groups
Ishooturfaces's Contact & Social Links
thanks..ill try it now

Double Post Merge: July 22, 2017, 02:22:55 am
its workimg other then cost. its not allowing me to purchase. the zombie_cost key isnt working, probably because code is not in my trigger function. any help?
Last Edit: July 22, 2017, 02:22:55 am by Ishooturfaces
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 4 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
The only way I know how to add cost is like this...

add this to the top with all the other #using
Code Snippet
Plaintext
#using scripts\zm\_zm_score;

the go down to your other code and add this
Code Snippet
Plaintext
function whatever()
{
cost = 100;//you can put whatever here
trig = GetEnt("whatever", "targetname");
trig SetCursorHint("HINT_NOICON");
trig SetHintString("Press and hold &&1 for blank");//you can put whatever you want in here and that's what will show in game

trig waittill ("trigger", player);
player zm_score::minus_to_player_score(cost);
}

and when you buy the door, it should take away whatever you set the cost to. Don't forget to change the getEnt again (as this one still says "whatever"), and the function name (as this also says whatever)
Last Edit: July 22, 2017, 03:22:08 am by Wolfilms
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 4 January 2015
Last active: 7 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Ishooturfaces's Groups
Ishooturfaces's Contact & Social Links
so my script ended up being a lot more complex then original. i am trying to setup a brushmodel, script model and clip which are linked to one trigger. I have found that the original zombie_door script will not work and have written my own for my trigger. It compiles but will not work in game. i feel i am missing something. a link script to models or something lol. If i were to pm it to you could you take a look and give me your opinion?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 4 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
Yea, I can take a look at it

 
Loading ...