
Posts
369
Respect
94Add +1
Forum Rank
Perk Hacker
Primary Group
Scripter
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
init()
{
precacheModel("bo2_p6_dogtags_friend");
dogtags = getEntArray("dogtags_ee", "targetname");
for(i=0;i<dogtags.size;i++)
dogtags[i] Hide();
thread button_press();
}
//Function that handles the button pressing
button_press()
{
button = getEnt("button","targetname");
button_trig = getEnt("button_trig","targetname");
button_trig setCursorHint("HINT_NOICON");
button_trig sethintstring("Press &&1 to do something exciting");
button_trig waittill("trigger", player);
button_trig disable_trigger();
button hide();
IPrintLnBold("Let the Games Begin");
thread dogtags();
thread model_spin();
}
//Function that handles the dog tags appearing
dogtags()
{
dogtags = getEntArray("dogtags_ee","targetname");
for(i=0;i<dogtags.size;i++)
{
trig = Spawn("trigger_radius", dogtags[i].origin, 60, 32, 60);
trig linkto(dogtags[i]);
trig setCursorHint("HINT_NOICON");
trig setHintString("Press &&1 to collect Dog Tags");
trig thread init_dogtag_events(dogtags[i]);
}
}
init_dogtag_events(model)
{
thread dogtags_trig(model, self);
model Show();
model thread model_spin();
}
dogtags_trig(model, trig)
{
while(1)
{
players = get_players();
for(i=0;i<players.size;i++)
{
if( players[i] isTouching(trig) && players[i] UseButtonPressed() )
{
model Hide();
trig Delete();
}
}
wait .01;
}
}
//Time to make it spin
model_spin()
{
while(1)
{
self rotateyaw(360,5);
wait(5);
}
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
well i can finally collect them but the text is a bit off to the side, if im right on top of the dog tags it has a hand symbol but lets me collect them, and i noticed the text comes if i go off to the side of it
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |

i know you asked me that before but i thought you meant multiple for just 1 dog tag not multiple as in all triggers the same
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
If you are trying to trigger 1 dog tag out of several then you can set up unique targetnames per dog tag as well as unique names per trigger. (dog_tag1, dog_tag1_trig, etc...) Then getent on both for each set of dog_tag and triggers and then call or thread something that will wait for the trig, once the button is hit. You could even use a flag or something if you wanted and have each wait for the flag before the enable trigger, model show, and wait trigger.
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
Thats the way i wanted at first but then i figured my script would be too long because 10 dog tags 10 different functions, this way is easier to handle
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
init()
{
precachemodel("bo2_p6_dogtags_friend");
level.numberoftags = 10;
thread button_press();
}
//Function that handles the button pressing
button_press()
{
//hide all the tags
thread handletags(0);
//get ready for the button
button = getent("button","targetname");
button_trig = getent("button_trig","targetname");
button_trig setCursorHint("HINT_NOICON");
button_trig sethintstring("Press &&1 to do something exciting");
//wait for trigger
button_trig waittill("trigger", player);
button_trig disable_trigger();
button hide();
//begin the game for the tags
thread handletags(1);
IPrintLnBold("Let the Games Begin");
}
handletags(see){
for(i=0;i<level.numberoftags;i++){
thread eachtag(i,see);
}
}
eachtag(i,see){
tag = getent("dt" + i, "targetname");
tag_trig = getent(tag.targetname + "_trig","targetname");
if(see){
//what to do when button hit
tag show();
tag thread model_spin();
tag_trig sethintstring("Press &&1 to collect Dog Tags");
tag_trig wait("trigger", player);
tag_trig disable_trigger();
tag delete();
}else{
//what to do if button not hit yet
tag_trig setCursorHint("HINT_NOICON");
tag hide();
}
}
//Time to make it spin
model_spin()
{
while(1)
{
self rotateyaw(360,5);
wait(5);
}
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Well it would be 10 sets of getent but only one function. You wouldcallthread this function for each set.
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
one thing though, the model still doesnt spin? how do i fix that
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
It might be the thread model_spin() line in button press? Might need to delete that.
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Oh wow... I seriously left that thread there? Derpedyderpderp. Idk if it'll fix the problem but you should indeed delete the model_spin thread from the button_press function.