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

Calling a script from another script

broken avatar :(
Created 8 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
5,102 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha

    This tut includes some basic how-to call a script from another script and namespace explanations




- When calling scripts in other gsc's or csc's:
    - Add #using pathandnameoffile
    - Use either the name of the file, before it, or the namespace used before the functions you want, followed by two colons (::) and then the function name.
    - In the zone file for you map you will need to add the script that has the functions in it you want to call.


Example below is for zm or zombiemode scripts:
  The gsc mc_test, with the following inside:
Code Snippet
Plaintext
#namespace testing;

function test(name){
    wait(5);
    iPrintLnBold(name);
}
In your script you will call it from you will need at the top:
Code Snippet
Plaintext
#using scripts\zm\mc_test;
Where you want to call the function you will:
Code Snippet
Plaintext
    testing::test("MakeCents");
        -or
Code Snippet
Plaintext
    thread testing::test("MakeCents");
Open the zone file for your map in a text editor and locate the other related scripts, gsc or csc and add:
Code Snippet
Plaintext
scriptparsetree,scripts/zm/mc_test.gsc

     Only link need selected and build
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
This was something I tried only once and didnt know what to do. Going to follow this next time Im going to add new script. Good and on-point tut!
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
This was something I tried only once and didnt know what to do. Going to follow this next time Im going to add new script. Good and on-point tut!

Cool, I was gonna add my on connect explanation too, in another tut. Think that would be helpful?
Last Edit: October 04, 2016, 01:39:23 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Cool, I was gonna add my on connect explanation too, in another tut. Think that would be helpful?

Definitely. Some Alpha Testers had problems (if i remember correctly) about things not connecting probably, so definitely would be helpful to new comers as well
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 22 September 2013
Last active: 3 weeks ago
Posts
327
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
Personal Quote
Zombie Mapper and Gamer
Signature
My Custom Zombie Maps:

- Nazi zombie Legion
- City of Hell
- The Abandoned Mine
- The Last Undead House (Finished)

more custom zombie maps coming soon
×
gamer9294's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
gamer9294's Contact & Social Links
great tutorial man, good job  ;)  8)

best regards,
Gamer9294

 
Loading ...