UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: BrandynNew on October 26, 2016, 01:27:09 am

Title: FEARxReaper's Bonfire Sale Script Help
Post by: BrandynNew on October 26, 2016, 01:27:09 am
Hello, I recently came across FEARxReaper's Bonfire Sale script (http://www.zombiemodding.com/index.php?topic=18785.msg165524#msg165524 (http://www.zombiemodding.com/index.php?topic=18785.msg165524#msg165524)) and was wanting to use it, but wanted to know if there was a way to set it to where it will only spawn past round 12 or something, you know, so people don't have PaP'ed Colts on round 3 that they got for 1000 points. Any help would be appreciated, his post didn't have a reply button at the bottom (sometimes it does, sometimes it doesn't, I haven't figured out when it is avaliable.)
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: death_reaper0 on October 26, 2016, 07:52:50 am
1. youve posted this in the wrong section, nothing you can do about it, need a mod to move it
2. if a topic is locked you cant reply to it, which happened to my script
3. this should do it, but its untested
in _zombiemode powerups find
Code Snippet
Plaintext
	while( powerup == "carpenter" && get_num_window_destroyed() < 5)
{
if( level.zombie_powerup_index >= level.zombie_powerup_array.size )
{
level.zombie_powerup_index = 0;
randomize_powerups();
}
powerup = level.zombie_powerup_array[level.zombie_powerup_index];
level.zombie_powerup_index++;

if( powerup != "carpenter" )
return powerup;

wait(0.05);
}
and place this under it
Code Snippet
Plaintext
 
while( powerup == "bonfire" && level.round_number < 12)
{
if( level.zombie_powerup_index >= level.zombie_powerup_array.size )
{
level.zombie_powerup_index = 0;
randomize_powerups();
}
powerup = level.zombie_powerup_array[level.zombie_powerup_index];
level.zombie_powerup_index++;

if( powerup != "bonfire" )
return powerup;
wait(0.05);
}
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: BrandynNew on October 26, 2016, 11:18:31 am
Looks great, thank you for the help and for the script.
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: Harry Bo21 on October 26, 2016, 12:13:41 pm
Why have a wait in there?

You "want" that to instantly repeat until finding a valid power up if the returned one is invalid
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: arceus on October 26, 2016, 02:15:16 pm
Why have a wait in there?

You "want" that to instantly repeat until finding a valid power up if the returned one is invalid
to avoid a little thing called a infinite loop.
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: Harry Bo21 on October 26, 2016, 02:42:51 pm
It'll never "be" a infinite loop - and in either case it would cause issues

This is computational - it shouldn't have any delay, and it would need to cycle that loop failing each time a significant number of times in s row for that to happen anyway - even with the wait that would still mean this function would get stuck or even in success it would potentially be delayed significantly

If it did and infinite looped then there would need to be a serious mistake in the logic here
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: death_reaper0 on October 26, 2016, 07:01:01 pm
It'll never "be" a infinite loop - and in either case it would cause issues

This is computational - it shouldn't have any delay, and it would need to cycle that loop failing each time a significant number of times in s row for that to happen anyway - even with the wait that would still mean this function would get stuck or even in success it would potentially be delayed significantly

If it did and infinite looped then there would need to be a serious mistake in the logic here

i just used what treyarch used to skip the carpenter powerup, i dont think the wait is too much of an issue since it will most likely settle on a powerup before you can notice
Title: Re: FEARxReaper's Bonfire Sale Script Help
Post by: BrandynNew on October 27, 2016, 12:45:17 am
(this may be the end of my highly underlived mapping career)

Well, I finally got around to adding the bonfire sale script, not even the round-base I originally had a question on, and I receive the error:

Quote
Couldn't find the bsp for this map. Please build the fast file associated with maps/haashallacademy.d3dbsp and try again.

I don't know man. I'm just trying to have an above-average map with custom content. I just did exactly as you said. I don't try to be complicated. I'm sorry.