Page 1 of 1

Need help with custom weapons

Posted: Tue Sep 29, 2009 8:34 pm
by STALKER Raince
Hey guys.
I need help!
I tried to script Halo weapons for OC. I now have following problem: ingame the sounds dont work and the Assault rifle and the pistol are suddenly left handed. I made a new Base_Halo script but i know that it somehow it wont work. I would like to know if i have to find a script to make the Base script work. then i want to know if i have to write something in the custom_weapons to swap the hands.

please help me. then i start to make a halo coop map.

Posted: Tue Sep 29, 2009 10:39 pm
by fug4life
Hello.

If your using custom sound scripts then you need the modify.txt (obsidian/maps/cfg) to have it aswell for the map you intend on having the weapons in.

Here is an example of one of mine:

Code: Select all

SpawnItems
{
    "weapon_smg1" "1"
    "weapon_crowbar" "1"
    "weapon_shotgun" "1"
    "weapon_uzi" "2"
    "item_battery" "1"
    "item_ammo_smg1" "5"
    "weapon_healer" "1"
}
"SoundCache"
{
    "Base_CHARGER"		"1"
}
}
}
Note if you experience trouble then add any other defualt scripts that the map may need.

If you want your sounds for all maps then I think you would have to edit an exsisting wepaons script and add your stuff to the bottom, though players and server would need the script.
Your better of using modify.txt's imo.

To swap hands you need some thing like this:

Code: Select all

"BuiltRightHanded" 		"0"
"AllowFlipping" 		"1"
Hope that helps.... (Oh and I hope you'll release your work, we need more content out thar amongst the public, fingers crossed).

Posted: Tue Sep 29, 2009 11:16 pm
by fug4life
Also just a note: Have you checked the weapons in thirdperson view?
If they are shooting out of the player origin (players stomach), you may also not hear the sounds.

If this is the case then your w_models would need fixing.

Posted: Wed Sep 30, 2009 3:36 pm
by STALKER Raince
Thanks. The weapons are now on the right side. But the sounds still dont work. i made a test_scripted_weps_modify.txt for the map (test_scripted_weps) and there wrote "soundcache Base_Halo" but they still dont work. but another question: can i make a static "viewmodel_fov 74" becuz then the weps look better. and oh before i forget: i may need a skinner becuz the materials look retarded and need to be remade. But thanks fug4life. im gonna release the weapons and the map.

Posted: Wed Sep 30, 2009 3:48 pm
by fug4life
I dont know much about weapon models and fov sorry.

Though if your still getting stuck, you could post or pm some examples of your scripts etc for inspection. Or release as beta/work in progress. And I'lll take a look, see if I can help.