I'm having an issue currently with the Treasure Chest, I've set currently only 2 locations for it which means the only 2 available are; start_chest chest1
Although I'll be adding more eventually but originally I created my own treasure chests (same box as most maps) and it somewhat worked as normal, the box itself worked and eventually you'd get the teddy bear and the box starts jiggling, raising and disappears, however the box returned back in the same location.
After a lot of messing around I kind of thought that maybe I was missing an entity or something misspelt and ended up finding Sniperbolts Treasure chest. I added his prefabs; start_chest chest1 But the same happened, even after stamping the prefabs in their location but still wouldn't work.
After this I want to my mapname.gsc and check the boxArray which I saw by default was;
Because I though with the other names in the array it might be trying to access them on move but it turns out it wasn't the case and the exact same thing happened again, It put it's self in the same location.
And decided that I'm beat as far as trying to figure thing out goes. So if anyone else has had this problem and found a way to fix it, I'd greatly appreciate the help.
Many Thanks, DuaLVII Post Merge: December 16, 2013, 10:16:06 amUpdate;
After reading elsewhere about Treasure Chest moving issues I found that on script; _zombiemode_weapons.gsc
Code Snippet
Plaintext
level.box_moved = false;
Is set to false by default, However after setting this to true;
Code Snippet
Plaintext
level.box_moved = true;
The same thing `STILL` happens, Teddy appears, Box raises and jiggles, disappears and then reappears in the same spot.
I did the same thing again as I said on my first post;
For the KVP's I wasn't sure originally when I made the boxes myself which is why I switched to Sniperbolt's but it turned out they are the exact same (Other than entity dimension differences) But I've been over them all and their correct.
As for the _zombiemode_weapon.gsc of coarse is in my mods and has been compiled.
Many Thanks, DuaLVII Post Merge: December 16, 2013, 04:46:37 pmPosting this in-case something else can be found
My _zombiemode_weapons.gsc - Treasure Chest related
if(level.script == "nazi_zombie_sumpf" || level.script == "nazi_zombie_factory" ) { // 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:) { // 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; } }
- are you sure you don't have multiple of the same box in your map by mistake? like a "start_chest" and 2 "chest_1"s? - are you doing this in the Der Riese mod? - are you sure you ticked the _zombiemode_weapons.gsc in your mod builder?
- try re-extracting a fresh set of Sniperbolt prefabs - try a fresh _zombiemode_weapons.gsc script
- are you sure you don't have multiple of the same box in your map by mistake? like a "start_chest" and 2 "chest_1"s? - are you doing this in the Der Riese mod? - are you sure you ticked the _zombiemode_weapons.gsc in your mod builder?
- try re-extracting a fresh set of Sniperbolt prefabs - try a fresh _zombiemode_weapons.gsc script
- There are only 2, start_chest and chest1 - Yes - Of coarse
I'm having the exact same problem as stated above. I know this is an old topic but if anyone can help fix this it would sure be great. I've tried everything even copying zombiemode_weapons.gsc from working maps but the crate still wont move. There has to be a fix somewhere.
The sound of God is the screech of tires, lights and magnets, bolts and wires. Strayed from the road, this very one, still to come. The sound of tires is the sound of God, the electric version.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
The only reason you had to download his _zombiemode_weapons.gsc is because you are already trying to use his edited prefabs. If you were using the original 3arc prefabs I'm fairly certain they already work fine with the default _zombiemode_weapons.gsc
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
Totally forgot about this post, made it last year.
I can send an unmodified weapons script and prefabs later which all work. Prefabs are actually sniperbolts although I spent time in centralizing them so their easier to place into maps.