


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 released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | 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 |
/*--------------------
FUNCTION CALLS - PRE _Load
----------------------*/
/*--------------------
FUNCTION CALLS - PRE _Load
----------------------*/
thread YourFunction(); //thread your function here
maps\_zombiemode::main();
maps\_zombiemode::main();
maps\name_of_your_gsc::name_of_function_to_call(); //make sure name_of_function_to_call(), thread other functions in that gsc or your script could get stuck here
#include maps\name_of_your_gsc; //replace name_of_your_gsc with the name of your gsc
CallingFunction(){
flag_wait("all_players_connected"); //wait for players to connect
iprintlnbold("Call the function");
TheFunction();
iprintlnbold("Done with the function");
}
TheFunction(){
wait(5);
iprintlnbold("I just waited 5 seconds, I will wait 5 more");
wait(5);
}
ThreadingFunction(){
flag_wait("all_players_connected"); //wait for players to connect
iprintlnbold("Thread the function");
thread TheFunction();
iprintlnbold("I am not waiting, the function is running now");
}
TheFunction(){
wait(5);
iprintlnbold("I just waited 5 seconds, I will wait 5 more");
wait(5);
}
ThreadingFunctionOnEntity(){
flag_wait("all_players_connected"); //wait for players to connect
ent = getent("ent", "targetname"); //gets your script model entity in radiant
ent.attribute1 = "testing";
ent thread SelfFunction();
}
SelfFunction(){
iprintlnbold(self.attribute1); //will print "testing"
self MoveTo(self.origin + (0,0,100),3); //will move the ent up 100 in 3 seconds
}
ArrayFunction(){
myArray = getentarray("shoot","targetname"); //collects all the triggers with targetname shoot
for(i=0;i<myArray.size;i++){ //loops through the collection of triggers
myArray[i] thread SingleFunction(); //threads SingleFunction on each trigger
}
}
SingleFunction(){
self waittill("trigger", "targetname"); //Each trigger will wait to be shot
myEntity = getent(self.target, "targetname"); //self.target is used to get it's specific script entity
myEntity delete(); //deletes the script entity
self delete(); //deletes itself
}
PassAndLevelFunction(){
level.totalThings = 0; //initialize the level variable once
myArray = getentarray("shoot","targetname");
for(i=0;i<myArray.size;i++){
myArray[i] thread VariablesFunction(myArray.size); //pass the total variable
}
}
VariablesFunction(size){
self waittill("trigger", "targetname"); //Each trigger will wait to be shot
myEntity = getent(self.target, "targetname");
level.totalThings++; //increments totalThings by 1
iprintlnbold("You found " + level.totalThings + " out of " + size + " things"); //You found 1 out of 3 things, numbers based on how many you found so far and how many you put in radiant
myEntity delete();
self delete();
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | 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 |
Dang this saved me from a couple questions already, thanks for making it!