Hello, I recently got back into waw mapping and I'm having a few issues.
The first issue I'm having is that zombies are going to windows they shouldn't open yet. My map layout is a house with an up and down stairs, you start in the up stairs, but the zombies are breaking down the down stairs windows first. Is there a way to set certain zombies to open certain windows? Like Start_Zone zombies, can only break down Start_Zone windows?
My second issue, is if the zombies do go to the upstairs windows, they don't break down the window at all, they just try to attack me. The only thing I can think of is because it's on a roof and it's slanted it could be causing issues, does anyone know of any solution to fix this? My friend suggested using caulk to make the ground flat, but it's doesn't allow the player to shoot the zombies at the down stairs windows.
I appericate any suggestions that are given, thanks.
Update: To avoid making multiple post, I'm just going to keep using this one if that is ok. I have a few questions in the near future. I'm currently trying to figure out the moving mystery box, if anyone can help me with that. I followed this tutorial https://zombiemodding.com/index.php?topic=3206.0 , except I only need 4 boxes, not all 6 of them. The box keeps spawning in the same place.
For that 1st issue, im 100% sure that already is a tutorial(at least a post) on making zombies to spawn only in the area that you're currently in. As for your 2nd issue, what do you really mean with `` they don't break down the window at all, they just try to attack me``. Do you mean that they pass the window without breaking it(i don't think so) or they just try to attack but stay outside. If it's the 2nd issue try to check how it's placed your prefab but i cannot say anything for sure. But yeah, 1 suggestion: We would really appreciate if you get at least 1 screenshot!!!
So, my first issue isn't about the incorrect zombies spawning, I only have 2 zombie spawners right now for the start zone. It's that they are going to windows that I current don't have access to, and it might be because the pathnodes go close enough to those windows and I was wanting to know if there was a way to make it were only certain zombies go to certain windows. In the image, those 3 bottom windows, most of the zombies keep going to them, and as you can see I'm just trying to see if I can get the zombies to jump on the roof to break down those two windows on the second floor. Is there any solution for that? Here are pictures of that window up close, from both the inside and outside.
As of the second issue, yes they keep trying to attack, but stay outside, I want to say the slope of the roof is causing the issue, but they can walk all the way to the window, so I'm not sure. Also, none of the zombies go to the path nodes on the left side of the screen, they only come in this general direction, any ideas?
For that 1st issue, im 100% sure that already is a tutorial(at least a post) on making zombies to spawn only in the area that you're currently in. As for your 2nd issue, what do you really mean with `` they don't break down the window at all, they just try to attack me``. Do you mean that they pass the window without breaking it(i don't think so) or they just try to attack but stay outside. If it's the 2nd issue try to check how it's placed your prefab but i cannot say anything for sure. But yeah, 1 suggestion: We would really appreciate if you get at least 1 screenshot!!!
Double Post Merge: April 25, 2019, 10:28:09 pmI couldn't add these pictures in my last post, so I'm going to put them here. These show the inside and outside pictures of the windows. I see the traverse thing is in the roof a bit, but is that going to prevent them from breaking down my window? I'm only curious because the other window isn't like that and they won't break that down either.
As for the pathnodes i can say that you need to put them with a bit distance from each other and other things too such as brushes or modelshttps://imgur.com/a/ZIFNJWUAs for the window on the 2nd floor, isn't it a bit small?https://imgur.com/a/79cNtS3i can't say it for sure but also the roof does look like a bit sloped.
As for the pathnodes i can say that you need to put them with a bit distance from each other and other things too such as brushes or models(Image removed from quote.)https://imgur.com/a/ZIFNJWUAs for the window on the 2nd floor, isn't it a bit small?https://imgur.com/a/79cNtS3i can't say it for sure but also the roof does look like a bit sloped.
Sorry for the long delay, I was going through finals and didn't have time to work on it. I was able to get it working. If I placed the zombies on the roof, they would go straight for the window, so I just decided to do that instead.
Now the issue I'm having is the random box. I followed this tutorial https://zombiemodding.com/index.php?topic=3206.0 and I did everything it said except, I don't need all 6 of the boxes, I only need 4 of them. What can I do to make this work. Before when I made my original map, I just used Sniperbolts tutorial, but I couldn't seem to find that anymore, as well as Tom_BMXs Music box. If you happen to know where I can download that again, I would appericate it.
Sorry for the long delay, I was going through finals and didn't have time to work on it. I was able to get it working. If I placed the zombies on the roof, they would go straight for the window, so I just decided to do that instead.
Now the issue I'm having is the random box. I followed this tutorial https://zombiemodding.com/index.php?topic=3206.0 and I did everything it said except, I don't need all 6 of the boxes, I only need 4 of them. What can I do to make this work. Before when I made my original map, I just used Sniperbolts tutorial, but I couldn't seem to find that anymore, as well as Tom_BMXs Music box. If you happen to know where I can download that again, I would appericate it.
Just remove a line instead of adding a new one:
Code Snippet
Plaintext
// Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant boxArray = ; boxArray = "start_chest"; boxArray = "chest1"; boxArray = "chest2"; boxArray = "chest3"; level.DLC3.PandoraBoxes = boxArray;
Thanks for the response and thanks for the tutorial! I did go and add in the prefabs and I'm still having the same issue where the box keeps spawning in the same location. Any ideas? Also, when I copied and pasted that code you sent, it would cause a syntax error for me. Here is a picture of one of the boxes in game, this is the start box and it keeps going back to this one.
Thanks for the response and thanks for the tutorial! I did go and add in the prefabs and I'm still having the same issue where the box keeps spawning in the same location. Any ideas? Also, when I copied and pasted that code you sent, it would cause a syntax error for me. (Image removed from quote.) Here is a picture of one of the boxes in game, this is the start box and it keeps going back to this one. (Image removed from quote.)
I haven't done anything with random boxes before because I always place the prefabs and works without any problems. Maybe it is different on your side:
openup dlc3 _code.gsc and look for this: magic_box_init()
for( x = 0 ; x < level.DLC3.PandoraBoxes.size ; x++ ) { level.open_chest_location[ x ] = level.DLC3.PandoraBoxes[ x ]; } }
is this the same as yours? then openup zombiemode_weapons.gsc and look for this: verify_chest_is_open()
Code Snippet
Plaintext
verify_chest_is_open() {
//for(i = 0; i < 5; i++) //PI CHANGE - altered so that there can be more than 5 valid chest locations for (i = 0; i < level.open_chest_location.size; i++) { if(isdefined(level.open_chest_location[i])) { if(level.open_chest_location[i] == level.chests[level.chest_index].script_noteworthy) { level.verify_chest = true; return; } }
I haven't done anything with random boxes before because I always place the prefabs and works without any problems. Maybe it is different on your side:
openup dlc3 _code.gsc and look for this: magic_box_init()
Code Snippet
Plaintext
magic_box_init() { level.open_chest_location = ;
for( x = 0 ; x < level.DLC3.PandoraBoxes.size ; x++ ) { level.open_chest_location = level.DLC3.PandoraBoxes; } }
is this the same as yours? then openup zombiemode_weapons.gsc and look for this: verify_chest_is_open()
Code Snippet
Plaintext
verify_chest_is_open() {
//for(i = 0; i < 5; i++) //PI CHANGE - altered so that there can be more than 5 valid chest locations for (i = 0; i < level.open_chest_location.size; i++) { if(isdefined(level.open_chest_location[i])) { if(level.open_chest_location[i] == level.chests[level.chest_index].script_noteworthy) { level.verify_chest = true; return; } }
}
level.verify_chest = false;
}
is this also same as yours?
Yep, I double checked, I even put in the dlc3_code.gsc in my map folder and recompiled with the same result. I know what you mean though, the last time I made a map, all I did was use sniperbolts tutorial and it just worked.
Yep, I double checked, I even put in the dlc3_code.gsc in my map folder and recompiled with the same result. I know what you mean though, the last time I made a map, all I did was use sniperbolts tutorial and it just worked.
From what I see in code you need to place your "start_chest" to let it work. Otherwise you can use the sniperbolts prefabs to make it work. O0
From what I see in code you need to place your "start_chest" to let it work.Otherwise you can use the sniperbolts scripts to make it work. O0
I have the start chest placed, in the sniperbolt prefab they are just called "treasure_chest_begin", but the script notworthy says "start_chest" in his tutorial, so I'm assuming they are the same. Where are the sniperbolt scripts located, I couldn't seem to find them.
I have the start chest placed, in the sniperbolt prefab they are just called "treasure_chest_begin", but the script notworthy says "start_chest" in his tutorial, so I'm assuming they are the same. Where are the sniperbolt scripts located, I couldn't seem to find them.
I wanted to make an update on the situation I had. So, I went back and forth between all of the files between Sniperbolts Tutorial and my own, and I couldn't really see anything besides minor stuff here and there. Today, I went through a post on an old thread that said, taking the _zombiemode_weapons files from Sniperbolts Tutorial and using it for yours should work. In my case it did, so if any one in the future has any issues with that, make a copy of your _zombiesmode_weapons file and put this into it, these are directly from the Sniperbolt Tutorial.
default_tesla_weighting_func() { num_to_add = 1; if( isDefined( level.pulls_since_last_tesla_gun ) ) { // player has dropped the tesla for another weapon, so we set all future polls to 20% if( isDefined(level.player_drops_tesla_gun) && level.player_drops_tesla_gun == true ) { num_to_add += int(.2 * level.zombie_include_weapons.size); }
// player has not seen tesla gun in late rounds if( !isDefined(level.player_seen_tesla_gun) || level.player_seen_tesla_gun == false ) { // after round 10 the Tesla gun percentage increases to 20% if( level.round_number > 10 ) { num_to_add += int(.2 * level.zombie_include_weapons.size); } // after round 5 the Tesla gun percentage increases to 15% else if( level.round_number > 5 ) { // calculate the number of times we have to add it to the array to get the desired percent num_to_add += int(.15 * level.zombie_include_weapons.size); } } } return num_to_add; }
default_ray_gun_weighting_func() { if( level.box_moved == true ) { num_to_add = 1; // increase the percentage of ray gun if( isDefined( level.pulls_since_last_ray_gun ) ) { // after 12 pulls the ray gun percentage increases to 15% if( level.pulls_since_last_ray_gun > 11 ) { num_to_add += int(level.zombie_include_weapons.size*0.15); } // after 8 pulls the Ray Gun percentage increases to 10% else if( level.pulls_since_last_ray_gun > 7 ) { num_to_add += int(.1 * level.zombie_include_weapons.size); } } return num_to_add; } else { return 0; } }
// // Slightly elevate the chance to get it until someone has it, then make it even default_cymbal_monkey_weighting_func() { players = get_players(); count = 0; for( i = 0; i < players.size; i++ ) { if( players[i] has_weapon_or_upgrade( "zombie_cymbal_monkey" ) ) { count++; } } if ( count > 0 ) { return 1; } else { if( level.round_number < 10 ) { return 3; } else { return 5; } } }
if(level.script != "nazi_zombie_prototype") { Precachemodel("zombie_teddybear"); } // ONLY 1 OF THE BELOW SHOULD BE ALLOWED add_limited_weapon( "m2_flamethrower_zombie", 1 ); add_limited_weapon( "tesla_gun", 1); }
//remove this function and whenever it's call for production. this is only for testing purpose. add_limited_tesla_gun() {
weapon_spawns[i] thread weapon_spawn_think(); model = getent( weapon_spawns[i].target, "targetname" ); model hide(); } }
// weapon cabinets which open on use init_weapon_cabinet() { // the triggers which are targeted at doors weapon_cabs = GetEntArray( "weapon_cabinet_use", "targetname" );
// returns the trigger hint string for the given weapon get_weapon_hint( weapon_name ) { AssertEx( IsDefined( level.zombie_weapons[weapon_name] ), weapon_name + " was not included or is not part of the zombie weapon list." );
return level.zombie_weapons[weapon_name].hint; }
get_weapon_cost( weapon_name ) { AssertEx( IsDefined( level.zombie_weapons[weapon_name] ), weapon_name + " was not included or is not part of the zombie weapon list." );
return level.zombie_weapons[weapon_name].cost; }
get_ammo_cost( weapon_name ) { AssertEx( IsDefined( level.zombie_weapons[weapon_name] ), weapon_name + " was not included or is not part of the zombie weapon list." );
get_is_in_box( weapon_name ) { AssertEx( IsDefined( level.zombie_weapons[weapon_name] ), weapon_name + " was not included or is not part of the zombie weapon list." );
if(isDefined(level.DLC3.usePandoraBoxLight) && level.DLC3.usePandoraBoxLight) { // Anchor target will grab the weapon spawn point inside the box, so the fx will be centered on it too anchor = GetEnt(level.chests[level.chest_index].target, "targetname"); anchorTarget = GetEnt(anchor.target, "targetname");
level.pandora_light = Spawn( "script_model", anchorTarget.origin ); level.pandora_light.angles = anchorTarget.angles + (-90, 0, 0); //temp_fx_origin rotateto((-90, (box_origin.angles[1] * -1), 0), 0.05); level.pandora_light SetModel( "tag_origin" ); playfxontag(level._effect["lght_marker"], level.pandora_light, "tag_origin"); } // DCS: we need a smaller light in the catacombs for paris, the generic one fills the area under the tower. else if(level.script == "nazi_zombie_paris") { // Anchor target will grab the weapon spawn point inside the box, so the fx will be centered on it too anchor = GetEnt(level.chests[level.chest_index].target, "targetname"); anchorTarget = GetEnt(anchor.target, "targetname");
//PI CHANGE - altered to allow for more than one piece of rubble rubble = getentarray( level.chests[index].script_noteworthy + "_rubble", "script_noteworthy" ); if ( IsDefined( rubble ) ) { for ( x = 0; x < rubble.size; x++ ) { rubble[x] hide(); } //END PI CHANGE } else { println( "^3Warning: No rubble found for magic box" ); } }
// PI_CHANGE_BEGIN - JMA - we want to play another effect on swamp anchor = GetEnt(self.target, "targetname"); anchorTarget = GetEnt(anchor.target, "targetname");
// waittill someuses uses this user = undefined; while( 1 ) { self waittill( "trigger", user );
if( user in_revive_trigger() ) { wait( 0.1 ); continue; }
// make sure the user is a player, and that they can afford it if( is_player_valid( user ) && user.score >= cost ) { user maps\_zombiemode_score::minus_to_player_score( cost ); break; } else if ( user.score < cost ) { user thread maps\_zombiemode_perks::play_no_money_perk_dialog(); continue; }
wait 0.05; }
// trigger_use->script_brushmodel lid->script_origin in radiant lid = getent( self.target, "targetname" ); weapon_spawn_org = getent( lid.target, "targetname" );
//open the lid lid thread treasure_chest_lid_open();
// SRS 9/3/2008: added to help other functions know if we timed out on grabbing the item self.timedOut = false;
// mario kart style weapon spawning weapon_spawn_org thread treasure_chest_weapon_spawn( self, user );
// the glowfx weapon_spawn_org thread treasure_chest_glowfx();
// take away usability until model is done randomizing self disable_trigger();
if (flag("moving_chest_now")) { user thread treasure_chest_move_vo(); self treasure_chest_move(lid);
} else { // Let the player grab the weapon and re-enable the box // self.grab_weapon_hint = true; self.chest_user = user; self sethintstring( &"ZOMBIE_TRADE_WEAPONS" ); self setCursorHint( "HINT_NOICON" ); self setvisibletoplayer( user );
// Limit its visibility to the player who bought the box self enable_trigger(); self thread treasure_chest_timeout();
// make sure the guy that spent the money gets the item // SRS 9/3/2008: ...or item goes back into the box if we time out while( 1 ) { self waittill( "trigger", grabber );
if( grabber == user || grabber == level ) {
if( grabber == user && is_player_valid( user ) && user GetCurrentWeapon() != "mine_bouncing_betty" ) { bbPrint( "zombie_uses: playername %s playerscore %d round %d cost %d name %s x %f y %f z %f type magic_accept", user.playername, user.score, level.round_number, cost, weapon_spawn_org.weapon_string, self.origin ); self notify( "user_grabbed_weapon" ); user thread treasure_chest_give_weapon( weapon_spawn_org.weapon_string ); break; } else if( grabber == level ) { // it timed out self.timedOut = true; bbPrint( "zombie_uses: playername %s playerscore %d round %d cost %d name %s x %f y %f z %f type magic_reject", user.playername, user.score, level.round_number, cost, weapon_spawn_org.weapon_string, self.origin ); break; } }
// // Disable trigger if can't buy weapon and also if someone else is using the chest decide_hide_show_chest_hint( endon_notify ) { if( isDefined( endon_notify ) ) { self endon( endon_notify ); }
while( true ) { players = get_players(); for( i = 0; i < players.size; i++ ) { // chest_user defined if someone bought a weapon spin, false when chest closed if ( (IsDefined(self.chest_user) && players[i] != self.chest_user ) || !players[i] can_buy_weapon() ) { self SetInvisibleToPlayer( players[i], true ); } else { self SetInvisibleToPlayer( players[i], false ); } } wait( 0.1 ); } }
//This keeps multiple voice overs from playing on the same player (both killstreaks and headshots). if (level.player_is_speaking != 1 && isDefined(sound)) { level.player_is_speaking = 1; self playsound(sound, "sound_done"); self waittill("sound_done"); level.player_is_speaking = 0; }
//TUEY - Play the 'disappear' sound playsoundatposition ("box_poof", soundpoint.origin); for(i=0;i<fake_pieces.size;i++) { fake_pieces[i] delete(); }
//gzheng-Show the rubble //PI CHANGE - allow for more than one object of rubble per box rubble = getentarray(self.script_noteworthy + "_rubble", "script_noteworthy");
if ( IsDefined( rubble ) ) { for (i = 0; i < rubble.size; i++) { rubble[i] show(); } } else { println( "^3Warning: No rubble found for magic box" ); }
wait(0.1); anchor delete(); soundpoint delete();
old_chest_index = level.chest_index;
wait(5);
//chest moving logic //PI CHANGE - for sumpf, this doesn't work because chest_index is always incremented twice (here and line 724) - while this would work with an odd number of chests, // with an even number it skips half of the chest locations in the map
level.verify_chest = false; //wait(3); //make sure level is asylum, factory, or sumpf and make magic box only appear in location player have open, it's off by default //also make sure box doesn't respawn in old location. //PI WJB: removed check on "magic_box_explore_only" dvar because it is only ever used here and when it is set in _zombiemode.gsc line 446 // where it is declared and set to 0, causing this while loop to never happen because the check was to see if it was equal to 1 if( isDefined(level.DLC3.useChestMoves) && level.DLC3.useChestMoves) { level.chest_index++;
if (level.chest_index >= level.chests.size) { //PI CHANGE - this way the chests won't move in the same order the second time around temp_chest_name = level.chests[level.chest_index - 1].script_noteworthy; level.chest_index = 0; level.chests = array_randomize(level.chests); //in case it happens to randomize in such a way that the chest_index now points to the same location // JMA - want to avoid an infinite loop, so we use an if statement if (temp_chest_name == level.chests[level.chest_index].script_noteworthy) { level.chest_index++; } //END PI CHANGE }
//turn off magic box light. level notify("magic_box_light_switch"); //PI CHANGE - altered to allow for more than one object of rubble per box unhide_magic_box( level.chest_index );
} //verify if that magic box is open to players or not. verify_chest_is_open() {
//for(i = 0; i < 5; i++) //PI CHANGE - altered so that there can be more than 5 valid chest locations for (i = 0; i < level.open_chest_location.size; i++) { if(isdefined(level.open_chest_location[i])) { if(level.open_chest_location[i] == level.chests[level.chest_index].script_noteworthy) { level.verify_chest = true; return; } }
// Check the pack a punch machines to see if they are holding what we're looking for for ( k=0; k<pap_triggers.size; k++ ) { if ( IsDefined(pap_triggers[k].current_weapon) && pap_triggers[k].current_weapon == keys2[q] ) { count++; } }
// Check the pack a punch machines to see if they are holding what we're looking for for ( k=0; k<pap_triggers.size; k++ ) { if ( IsDefined(pap_triggers[k].current_weapon) && pap_triggers[k].current_weapon == keys2[q] ) { count++; } }
//increase the chance of joker appearing from 0-100 based on amount of the time chest has been opened. if(level.script != "nazi_zombie_prototype" && getdvar("magic_chest_movable") == "1") {
if(level.chest_accessed < level.chest_min_move_usage) { // PI_CHANGE_BEGIN - JMA - RandomInt(100) can return a number between 0-99. If it's zero and chance_of_joker is zero // we can possibly have a teddy bear one after another. chance_of_joker = -1; // PI_CHANGE_END } else { chance_of_joker = level.chest_accessed + 20;
// make sure teddy bear appears on the 8th pull if it hasn't moved from the initial spot if( (!isDefined(level.magic_box_first_move) || level.magic_box_first_move == false ) && level.chest_accessed >= 8) { chance_of_joker = 100; }
// pulls 4 thru 8, there is a 15% chance of getting the teddy bear // NOTE: this happens in all cases if( level.chest_accessed >= 4 && level.chest_accessed < 8 ) { if( random < 15 ) { chance_of_joker = 100; } else { chance_of_joker = -1; } }
// after the first magic box move the teddy bear percentages changes if( isDefined(level.magic_box_first_move) && level.magic_box_first_move == true ) { // between pulls 8 thru 12, the teddy bear percent is 30% if( level.chest_accessed >= 8 && level.chest_accessed < 13 ) { if( random < 30 ) { chance_of_joker = 100; } else { chance_of_joker = -1; } }
// after 12th pull, the teddy bear percent is 50% if( level.chest_accessed >= 13 ) { if( random < 50 ) { chance_of_joker = 100; } else { chance_of_joker = -1; } } } }
if (random <= chance_of_joker) { model SetModel("zombie_teddybear"); // model rotateto(level.chests[level.chest_index].angles, 0.01); //wait(1); model.angles = self.angles; wait 1; flag_set("moving_chest_now"); self notify( "move_imminent" ); level.chest_accessed = 0;
player maps\_zombiemode_score::add_to_player_score( 950 );
//allow power weapon to be accessed. level.box_moved = true; } }
self notify( "randomization_done" );
if (flag("moving_chest_now")) { wait .5; // we need a wait here before this notify level notify("weapon_fly_away_start"); wait 2; model MoveZ(500, 4, 3); model waittill("movedone"); model delete(); self notify( "box_moving" ); level notify("weapon_fly_away_end"); } else {
//turn off power weapon, since player just got one if( rand == "tesla_gun" || rand == "ray_gun" ) { // PI_CHANGE_BEGIN - JMA - reset the counters for tesla gun and ray gun pulls if(isDefined(level.DLC3.useWeaponSpawn) && level.DLC3.useWeaponSpawn ) { if( rand == "ray_gun" ) { level.box_moved = false; level.pulls_since_last_ray_gun = 0; }
model thread timer_til_despawn(floatHeight); self waittill( "weapon_grabbed" );
if( !chest.timedOut ) { model Delete(); }
} } timer_til_despawn(floatHeight) {
// SRS 9/3/2008: if we timed out, move the weapon back into the box instead of deleting it putBackTime = 12; self MoveTo( self.origin - ( 0, 0, floatHeight ), putBackTime, ( putBackTime * 0.5 ) ); wait( putBackTime );
// self is the player string comes from the randomization function treasure_chest_give_weapon( weapon_string ) { primaryWeapons = self GetWeaponsListPrimaries(); current_weapon = undefined;
// This should never be true for the first time. if( primaryWeapons.size >= 2 ) // he has two weapons { current_weapon = self getCurrentWeapon(); // get hiss current weapon
if( weapon_string == "molotov" || weapon_string == "molotov_zombie" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "zombie_cymbal_monkey" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "zombie_cymbal_monkey" ); } // PI_CHANGE_END } if( weapon_string == "zombie_cymbal_monkey" ) { // PI_CHANGE_BEGIN // JMA 051409 sanity check to see if we have the weapon before we remove it has_weapon = self HasWeapon( "molotov" ); if( isDefined(has_weapon) && has_weapon ) { self TakeWeapon( "molotov" ); }