Calling a script from another script

broken avatar :(
Created 1111 days ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
2,908 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 211 days 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:
#namespace testing;

function test(name){
    wait(5);
    iPrintLnBold(name);
}
In your script you will call it from you will need at the top:
#using scripts\zm\mc_test;
Where you want to call the function you will:
    testing::test("MakeCents");
        -or
    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:
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: 3 days ago
Posts
3,999
Respect
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: 211 days 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: 3 days ago
Posts
3,999
Respect
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: 391 days ago
Posts
315
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

 

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 Twitch
Loading ...