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

Simple Intro Text for Beginners

broken avatar :(
Created 9 years ago
by Andy Whelan
0 Members and 1 Guest are viewing this topic.
2,998 views
broken avatar :(
×
broken avatar :(
True Blue Elite
Location: auAustralia
Date Registered: 8 February 2015
Last active: 8 months ago
Posts
688
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Still Kickin'
Signature


×
Andy Whelan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Andy Whelan's Contact & Social LinksAndyWhelanAndyWhelan01AndyWhelan
This is a simple script that allows you to have text pop up in the top left hand corner, nothing to fancy. Just basic since this is my first script I have written :)) I wanted to start with something easy. Please leave constructive criticism if it is required.

How to add -
1. Locate the 'YourMapName.gsc' in your map folder (CoDWaWRoot/mods/MapFolder/maps) and open it.
2. Scroll all the way to the bottom of the script and copy and paste the following code
Code Snippet
Plaintext
//Easy Text Intro - By Andy Whelan
text_intro()
{
trig = getent ( "text_intro", "targetname");
trig waittill ("trigger");
wait (10); //How long it takes to appear on the players screen, change if you want.
iPrintLn ("Office Survival"); //Change the text inside of the "" to whatever you want to appear.
wait (5);
iPrintLn ("Map by Andy Whelan"); //Again change the text inside of the "" to whatever you want to appear as the 2nd line.
wait (5);
iPrintLn ("Don't look down");
}
If you want more text then copy and paste the following
Code Snippet
Plaintext
wait (5);
iPrintLn ("");
and put it under the previous text line ( iPrintLn ("Don't look down"); )
3. Find maps\_zombiemode::main(); in the same file and place this code underneath it.
 
Code Snippet
Plaintext
thread text_intro();
So it should look like
Code Snippet
Plaintext
maps\_zombiemode::main();
thread text_intro();
4. Now the scripting is done, save and close the file.
5. Open up your map in Radiant and in the 2D view right click and select trigger then select the trigger radius.
6. Press 'N' and give it the following KVP   targetname     text_intro
7. Move the trigger to where the players spawn and now save and close radiant.
8. Compile you map and build the mod and then you are done  :)

Give feedback if you want, if you are having trouble just ask.
Give credit when needed please.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
It works, however since World at War has its own intro HUD function(s) i don't see this really having a practical use.

Bit of advice: When getting entities or other types of data that you can't guarantee exist in the level, always wrap an if(!isdefined(<var/ent/player/ai>)) around it to prevent code execution. If testing your map with developer and developer script, you should put something like this in the if condition statement:

Code Snippet
Plaintext
if(!isdefined(ent))
assertmsg("Entity is not defined");

This will cause an error while in developer saying that the entity doesn't exist and ending execution in the process. Otherwise if your not running in developer(which you should), you should do:

Code Snippet
Plaintext
if(!isdefined(ent))
{
iprintln("Entity is not defined");
return;
}

and this will just print the message in the top left corner and end the function.
Last Edit: July 03, 2015, 06:57:18 am by daedra descent
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21'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.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
Ive always wondered this so ill ask

im programming such as this, what does "assert" do/mean?

Ive literally never had to use it, does it write that to console log on failure or something?
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Ive always wondered this so ill ask

im programming such as this, what does "assert" do/mean?

Ive literally never had to use it, does it write that to console log on failure or something?

Yes, it forces a developer error like a script compiler error that you'd see with a poorly made script when launching with developer with the string arg in assertmsg() being the error. Extremely useful for debugging when used with developer and developer_script.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21'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.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
sounds it, wondered why treyarch used it. Ill use it in future
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn'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.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
This seems like a boring method... much rather create some fancy "animated" text then just a simple IPrintLn.

Also asserts are messages spammed onto to player's screens if it ever reaches that point. Only occurs in developer mode iirc.

Assert(value -> correct);
AssertEx(value -> correct, "Message if false");
AssertMsg("Message");

 
Loading ...