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 Use Problem

broken avatar :(
Created 10 years ago
by nabaro
0 Members and 1 Guest are viewing this topic.
2,108 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
Rather than display the HintString I gave it, the trigger_use I made just shows that hand icon and does not perform the function it is supposed to. Here is the script (in radiant I gave the trigger_use a targetname of button_jug_trig):

Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_anim;

main()
{
flag_wait("all players connected");
players = get_players();
level.zombie_cost = players.size * 200;
thread generator_process_jug();
}

generator_process_jug()
{
while(1)
{
button_jug_trig = getEnt("button_jug_trig", "targetname");
button_jug_trig SetCursorHint( "HINT_NOICON" );
button_jug_trig SetHintString("Press &&1 to activate the generator [Cost:" + level.zombie_cost + "]);
activator = undefined;

button_jug_trig waittill("trigger", activator);
if (activator.score >= level.zombie_cost)
{
button_jug_trig disable_trigger();
activator.score = activator.score - level.zombie_cost;
jug_timer = create_simple_hud();
jug_timer.foreground = true;
jug_timer.sort = 4;
jug_timer.hidewheninmenu = false;
jug_timer.alignX = "left";
jug_timer.alignY = "top";
jug_timer.horzAlign = "left";
jug_timer.vertAlign = "top";
jug_timer.fontScale = 1.5;
jug_timer.x = 5;
jug_timer.y = 5;
jug_timer.color = (1,0,0);
jug_timer setTimer(12);
level.custom_jug_timer = jug_timer;
wait(12);
level notify("juggernog on");
jug_timer destroy();
break;
}
else
{
wait(0.05);
}
}
}
   
   
   
   
   
   
   
Last Edit: March 27, 2014, 08:31:18 pm by nabaro
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 5 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Well if your trigger_use has a targetname of jug_button_trig then the button_jug_trig = getEnt("button_jug_trig", "targetname"); needs to be change to button_jug_trig = getEnt("jug_button_trig", "targetname");
So basically the targetname based on what you wrote are different causing only a hand to be seen. You may however keep button_jug_trig = getEnt("button_jug_trig", "targetname"); but in radiant your targetname of your trigger_use has to be button_jug_trig.
Last Edit: March 27, 2014, 08:33:08 pm by PROxFTW
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 January 2014
Last active: 3 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
nabaro's Groups
nabaro's Contact & Social Linkschelseafan122099nabarogamerblast11
Sorry, that was a typo in my original post. It is "button_jug_trig" in both the script and in Radiant.
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 5 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Ok try this button_jug_trig SetHintString("Press &&1 to activate the generator [Cost:" + level.zombie_cost + "]");
It seems you missed a quotation at the end of the setHintString
broken avatar :(
×
broken avatar :(
[UGX] Developer
Location: nlLimburg, Netherlands
Date Registered: 28 October 2013
Last active: 5 months ago
Posts
764
Respect
Forum Rank
The Decider
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
[UGX] Developer
×
Lukkie1998's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
UGX Chat Moderator Has the ability to mute, kick, or ban chat members for being abusive or breaking the rules of the forum.
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
2015 Participant
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Did you call the main function in your _zombiemode.gsc or MAPNAME.gsc?
otherwise it won't load the script and doesn't recognize the trigger. Also, make sure you checked it in your mods builder.

Lukkie1998
Marked as best answer by nabaro 10 years ago
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 4 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter Elite
My Groups
More
×
YaPh1l's Groups
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
Code Snippet
Plaintext
flag_wait("all players connected");
You are missing the underscores in the flag's name. Same with your notify.

- Phil.

 
Loading ...