Hey All. I have been messing with a custom mystery box and have basically bee trying to figure out what all the bits do. I have been using sniper bolts tutorial prefab version and I basically copied that and mad modifications to it. I have only made the start chest and chest1 so far but Im quite sure I have all the kvps correct and in place replacing all the 0's with 1's for chest1 and so on. The first chest works perfectly and looks good doing what it should but when it comes to re spawning, it keeps coming back to the same place. What causes this and how do I stop it?
Hey All. I have been messing with a custom mystery box and have basically bee trying to figure out what all the bits do. I have been using sniper bolts tutorial prefab version and I basically copied that and mad modifications to it. I have only made the start chest and chest1 so far but Im quite sure I have all the kvps correct and in place replacing all the 0's with 1's for chest1 and so on. The first chest works perfectly and looks good doing what it should but when it comes to re spawning, it keeps coming back to the same place. What causes this and how do I stop it?
Cheers guys!
level.DLC3.useChestMoves in your mapname gsc, set to true, will allow the box to move according to weapons gsc function treasure_chest_move. The var level.chests in your weapons gsc treasure_chest_init function, which also handles the randomization of the initial box if you selected it to, gets all the boxes in your map. treasure_chest_move increments your box locations. If it keeps coming back to the same spot, I would check the level.chests array size to see if it is 1.
Adjusting the following in weapons gsc at the treasure_chest_init function could help determine what the issue is.
Code Snippet
Plaintext
testbox(){// I added this function flag_wait( "all_players_connected" ); wait(3); if(IsDefined( level.chests )) IPrintLnBold( level.chests.size, " box(es) are in this array" ); else IPrintLnBold( "level.chests isn't defined" ); } // for the random weapon chest treasure_chest_init() { flag_init("moving_chest_enabled"); flag_init("moving_chest_now");
level.chests = GetEntArray( "treasure_chest_use", "targetname" ); thread testbox();// I added this line
Last Edit: October 15, 2015, 01:55:32 pm by MakeCents
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