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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
I've been adding a lot of weapons to my map recently and I've been running into some problems. If you can help me out, let me know!
1. Some weapons do not get included into the map, seemingly at random. For example, I have included all weapons in _zombiemode_weapons, dlc3_code, and MAPNAME.csv. Most weapons work except for a few exceptions. When I go up to the wall to buy the spas, for example, it takes my money and gives me literally nothing. Other times, when I triple PaP the M72 Law, the third time it gives me nothing back. There are no errors when compiling the map that pertain to missing weapons.
2. All intended weapons show up in box, but some do not give me the weapon. This is in rare cases with only a few, seemingly random weapons. The model shows up in the box but I receive no weapon when I press 'use'.
3. Some reload/re-chamber sounds do not play. Once again, this is only for a select few weapons. I have included ALL the sounds and sound aliases and included the correct lines in mod.csv in launcher. The scavenger does not have any sound what so ever.
4. Some weapons that I assign 2,3, or 4 round burst become full auto. I thought this may have to do with Rate of Fire, but I made a burst weapon that shot really fast as a test (0.00000000009 firetime lol) but it worked perfectly. ???
5. Bam's most recent version of Mule Kick only gives me a third weapon when I use the box. Not for wall buys.
I would like to note that I am using UGX Weapon Editor (Biblical program, absolutely love it). Also, these problems did not occur when I added these weapons to a test map a while ago. Seems like more are popping up as I add more weapons. (109 weaponfiles according to my mod's weapon folder.) If I can provide any another information to help you help me, let me know.
4. Some weapons that I assign 2,3, or 4 round burst become full auto. I thought this may have to do with Rate of Fire, but I made a burst weapon that shot really fast as a test (0.00000000009 firetime lol) but it worked perfectly. ???
If you are referring to the burst weapons becoming full auto/having a slow fire rate in the final set of bullets in the mag, the lastfiretime must be set to 0 and then fireTime is whatever the fire rate is for your gun (for example, the M16 from BO1 uses 0.064 for the fireTime).
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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
If you are referring to the burst weapons becoming full auto/having a slow fire rate in the final set of bullets in the mag, the lastfiretime must be set to 0 and then fireTime is whatever the fire rate is for your gun (for example, the M16 from BO1 uses 0.064 for the fireTime).
No I mean that its alwaysfull auto, no matter how much ammo.
If you are referring to the burst weapons becoming full auto/having a slow fire rate in the final set of bullets in the mag, the lastfiretime must be set to 0 and then fireTime is whatever the fire rate is for your gun (for example, the M16 from BO1 uses 0.064 for the fireTime).
'lastfiretime' doesn't exist in any WAW weapon files, it's only present in BO1 weapon files onwards, are you sure this fixes the last mag burst fire bug?
Edit: Just tested and it actually appears to work + fucking 1
2nd edit: It appears to work on some guns, but not all..
Last Edit: February 10, 2015, 12:50:42 am by steviewonder87
Regarding 1 & 2, it sounds like you don't have the weapons precached - Usually you can't give a weapon or set a model without it being precached before load or atleast if you ran your map in developer it would complain about it not being precached.
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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Regarding 1 & 2, it sounds like you don't have the weapons precached - Usually you can't give a weapon or set a model without it being precached before load or atleast if you ran your map in developer it would complain about it not being precached.
Do all the weapons need to be precached or just ones that are messed up? Where exactly do I precache?
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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
I have that in zone_source/nazi_zombie_MAPNAME.csv because it seems to allow more weapons than putting it in mod.csv, unless thats whats causing problems. Ill put the missing weapons in there and see if it works.
Do all the weapons need to be precached or just ones that are messed up? Where exactly do I precache?
Any weapon added to _zombiemode_weapons.gsc is automatically precached. However, just for the sake of testing try adding this to the top of you mapname.gsc in main():
That is NOT how you precache a weapon. All that does is tell the compiler to grab all of the weapons assets(models, anims, fx, etc) instead of having to include them individually. Precaching is done by script.
Last Edit: February 11, 2015, 05:19:01 am by daedra descent
Any weapon added to _zombiemode_weapons.gsc is automatically precached. However, just for the sake of testing try adding this to the top of you mapname.gsc in main():
Code Snippet
Plaintext
PrecacheItem( weapon_name );
That is NOT how you precache a weapon. All that does is tell the compiler to grab all of the weapons assets(models, anims, fx, etc) instead of having to include them individually. Precaching is done by script.
Adding on top of this how precache weapons work for zombiemode is from the function add_zombie_weapon.
You need to do this to load the weapon into the map, include_weapon() is for adding it into the box.
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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Any weapon added to _zombiemode_weapons.gsc is automatically precached. However, just for the sake of testing try adding this to the top of you mapname.gsc in main():
Code Snippet
Plaintext
PrecacheItem( weapon_name );
Where exactly in main should I precache it? Top of main? Bottom of main? somewhere in between?
Use the function add_zombie_weapon instead of manually precaching it. By doing add_zombie_weapon you'll be able to use include_weapon so it can be added into the box. It'll also give less errors when you actually try to use it in game.
Also side-note: if you added the weapon into your mod.csv and IWD (by ticking it), if you do give weaponname and get the weapon that means the gun is loaded into the map but you can't give by script as it's undefined by script, so precaching it will make it work.
Use the function add_zombie_weapon instead of manually precaching it. By doing add_zombie_weapon you'll be able to use include_weapon so it can be added into the box. It'll also give less errors when you actually try to use it in game.
Wait what? Just preaching the weapon won't give you errors...
But yeah you need to use add_zombie_weapon and include_weapon either way. They are required for wall weapons and the box obviously.
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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
I actually just got the missing weapons working by moving 'weapon,sp/WEAPONNAME' from root/zone_source/MAPNAME.csv (Where I have all other weapons) to mod.csv. Didn't even need to precache. Thanks for your help.