Jump to content

Help with a script


Syn3r

Recommended Posts

I'm trying to create a script that adds ammo to the player everytime the weapon is fired/reloaded or something like that.

I tried this but kept getting errors

Begin OnEquip
Additem.Ammo44magnum 10
end

I couldn't find a better begin point. I stink at scripting but any help is appreciated.

Link to comment
Share on other sites

You don't need a script. Create a custom weapon, set ammo to NONE = infinite ammo, no reloading, if that's what you want.

 

Obviously you have to put it into the game.

 

Otherwise try player.additem Ammo44Magnum 10 (if that's the correct id).

 

Have a look at this mod https://www.nexusmods.com/fallout3/mods/17666. It does some of what you want and keeps the reloading animations for a better playing experience, but you will need FOSE.

 

I haven't used this mod so I can't confirm if it works but looking at the scripts should point you in the right direction. (You will need to load GECK through FOSE as well to save any FOSE scripts).

 

After a bit of fiddling, here's a simple non-fose script to do what I think you want:

scn zzinfweapontest

begin gamemode

if player.isweaponout == 1	 
	if player.getitemcount ammo44magnum < 6
		player.additem ammo44magnum 6
	endif
endif

end

Create the script, create your custom weapon - I couldn't find a non-scoped magnum in the GECK but there's a mod to add one - then add the script to the weapon and put it into the game. Only marginally tested but seems to work. No guarantees I haven't overlooked something though.

 

You could have a more generic solution by attaching the script to a quest (without the isweaponout test). It would look the same in action but you could use it with any magnum (or any weapon you put in the script).

Edited by blackrat99
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...