UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: jiggy22 on February 28, 2017, 10:36:29 pm

Title: Set Vision Script Fix
Post by: jiggy22 on February 28, 2017, 10:36:29 pm
For my mod, I have this simple script set up to change the vision to something a little nicer-looking:

Code Snippet
Plaintext
PowerVision_init()
{
flag_wait( "all_players_connected" );
players = get_players();
for ( i = 0; i < players.size; i++ )
players[i] thread PowerVision();
}
PowerVision()
{
self endon("disconnect");
set_all_players_visionset( "aftermath", 0.1 );
}

However, this only goes into effect after I restart the level. Otherwise, my first game features no changes to the vision. Any way this can be fixed? Thanks!
Title: Re: Set Vision Script Fix
Post by: death_reaper0 on February 28, 2017, 10:59:18 pm
why dont you change it in the mapname_art.gsc where its suppose to be set?

Code Snippet
Plaintext
	level thread maps\_utility::set_all_players_visionset( "zombie_factory", 0.1 );
}
Title: Re: Set Vision Script Fix
Post by: jiggy22 on March 01, 2017, 02:56:03 am
why dont you change it in the mapname_art.gsc where its suppose to be set?

Code Snippet
Plaintext
	level thread maps\_utility::set_all_players_visionset( "zombie_factory", 0.1 );
}

Whelp, I'm stupid! Thanks again as always :)