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

Display Location in Top Left Corner like in Black Ops 4

broken avatar :(
Created 5 years ago
by mobofthedead123
0 Members and 1 Guest are viewing this topic.
1,937 views
broken avatar :(
×
broken avatar :(
Location: gbEngland
Date Registered: 21 December 2018
Last active: 4 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
mobofthedead123's Contact & Social Links
In Black Ops 4, you can see the name of your location in the top left hand corner. I would like to do this in COD WAW. Any help would be greatly appreciated. Thanks.
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0'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.
decided to make this real quick add this to the bottom of your mapname.gsc file
Code Snippet
cpp
location_display()
{
players = get_players();
for(i=0;i<players.size;i++)
players[i] thread location_display_text();
}

location_display_text()
{
hint_hud = create_simple_hud(self);
hint_hud.alignX = "left";
hint_hud.alignY = "top";
hint_hud.horzAlign = "left";
hint_hud.vertAlign = "top";
hint_hud.fontscale = 2;
hint_hud.color =  (1, .2, .2);
hint_hud.x = 2;
hint_hud.y = 2;
hint_hud.alpha = 1;
text = "";
while(1)
{
text = self get_location_text();
hint_hud SetText( text );
wait .1;
}
}

get_location_text()
{
text = "";
zone_name = "";
zkeys = GetArrayKeys( level.zones );
for( z=0; z<zkeys.size; z++ )
{
zone = level.zones ];
for (i = 0; i < zone.volumes.size; i++)
{
if (self IsTouching(zone.volumes[i]) )
zone_name = zone.volumes[i].targetname;
}
}

switch( zone_name )
{
case "start_zone":
text = "Spawn Room";
break;

case "power":
text = "Power Room";
break;

default:
text = "zone not defined";
break;
}

return text;
}
add
level thread location_display();
under
level thread DLC3_threadCalls2();
at the bottom of the main()
now how it worksat the bottom fuction of this ( get_location_text() ) theres this bit
Code Snippet
Plaintext
	switch( zone_name )
{
case "start_zone":
text = "Spawn Room";
break;

case "power":
text = "Power Room";
break;

default:
text = "zone not defined";
break;
}
this is just an example part ive added, for it to work in your map youwil need to modify this.
the part that says - case "start_zone"
this is the name you gave the zone in radiant
the part directly under it, the part that says "Spawn Room" is what will be displayed when your standing in this zone.
change the example ones to two different zones you have with a name you want to give them and for every other zone you have copy and paste this part and change it to be as you need it
Code Snippet
Plaintext
		case "start_zone":
text = "Spawn Room";
break;
hope this is easy enough to understand,let me know if you have any issues
Last Edit: January 05, 2019, 11:59:13 am by death_reaper0
broken avatar :(
×
broken avatar :(
Location: vn
Date Registered: 23 February 2015
Last active: 3 years ago
Posts
208
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
Joeycx's Groups
Joeycx's Contact & Social Links
decided to make this real quick add this to the bottom of your mapname.gsc file
Code Snippet
cpp
location_display()
{
players = get_players();
for(i=0;i<players.size;i++)
players[i] thread location_display_text();
}

location_display_text()
{
hint_hud = create_simple_hud(self);
hint_hud.alignX = "left";
hint_hud.alignY = "top";
hint_hud.horzAlign = "left";
hint_hud.vertAlign = "top";
hint_hud.fontscale = 2;
hint_hud.color =  (1, .2, .2);
hint_hud.x = 2;
hint_hud.y = 2;
hint_hud.alpha = 1;
text = "";
while(1)
{
text = self get_location_text();
hint_hud SetText( text );
wait .1;
}
}

get_location_text()
{
text = "";
zone_name = "";
zkeys = GetArrayKeys( level.zones );
for( z=0; z<zkeys.size; z++ )
{
zone = level.zones ];
for (i = 0; i < zone.volumes.size; i++)
{
if (self IsTouching(zone.volumes[i]) )
zone_name = zone.volumes[i].targetname;
}
}

switch( zone_name )
{
case "start_zone":
text = "Spawn Room";
break;

case "power":
text = "Power Room";
break;

default:
text = "zone not defined";
break;
}

return text;
}
add
level thread location_display();
under
level thread DLC3_threadCalls2();
at the bottom of the main()
now how it worksat the bottom fuction of this ( get_location_text() ) theres this bit
Code Snippet
Plaintext
	switch( zone_name )
{
case "start_zone":
text = "Spawn Room";
break;

case "power":
text = "Power Room";
break;

default:
text = "zone not defined";
break;
}
this is just an example part ive added, for it to work in your map youwil need to modify this.
the part that says - case "start_zone"
this is the name you gave the zone in radiant
the part directly under it, the part that says "Spawn Room" is what will be displayed when your standing in this zone.
change the example ones to two different zones you have with a name you want to give them and for every other zone you have copy and paste this part and change it to be as you need it
Code Snippet
Plaintext
		case "start_zone":
text = "Spawn Room";
break;
hope this is easy enough to understand,let me know if you have any issues
There's seems to be a bad syntax here
Code Snippet
Plaintext
zone =  level.zones ];
 so i changed it to
Code Snippet
Plaintext
zone = ( level.zones );
it loads but doesn't display the text.
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0'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.
should of been this, my mistake
Code Snippet
Plaintext
zone = level.zones[ zkeys[z] ];

 
Loading ...