Jump to content

How to properly equip grenades/mines/throwables ?


svartberg

Recommended Posts

I'm making a mod to equip landmines, using the function "player.equipitem"

 

The problem is it only equip one of the mines - once it is thrown (shot) it switches to fists instead of the remaining mines.

(btw I get the same problem with grenades and other throwables)

 

I want it to work properly like when you equip them ingame, e.g. you throw one and it equips the next one (instead of fists), any ideas ?

Link to comment
Share on other sites

No worries mate, here's my code below

basically it checks the mine count every frame, and if it got subtracted by one, and no weapon is equipped, then it means the mine got thrown.

set mineCount to player.getitemcount mineType
if (mineThrown == 0)
  if (mineCount == mineLastCount - 1)
    if (player.GetEquippedObject 5 == 0)
     set mineThrown to 1 
     ;printc "thrown"
    endif
  endif
endif
Edited by svartberg
Link to comment
Share on other sites

Well the thing is I'm trying to make a weapon require all 3 specific weapons mods attached to it in order to be able to replace it with a different gun at a crafting bench, similar to weapon mod kits from fallout 3, but not nearly as complicated.

 

Let's say the player has the gun with only 2 weapon mods on it out of the 3 possible mods, the option will be unavailable or grayed out in the crafting bench, but if all 3 are attached to it, then the player can choose to replace it with a different weapon, similar to the way a railway rifle or rock it launcher is made, it takes the gun with all 3 attachments on it, and gives the player a new one in place of it (it is a set weapon, not random) and this new weapon has no weapon mods on it, obviously, so you can further upgrade it.

 

Think you can help me with that? Or is that too far beyond what you know? I'm just looking for people that can help me out with it cause I know absolutely no scripting with fallout.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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