Jump to content

Preventing player from picking up weapons from...


antstubell

Recommended Posts

You want to remove the weapons rather than unequip. Unequip keeps the weapon in the actor's inventory where it can still be looted. But care should be taken if doing this for every NPC in the game. There are weapons required for quests which need to be picked up from freshly killed NPCs. Being a quest object does not protect it from being removed. The only protection quest objects get is from the player trying to manually move the object from inventory.

Link to comment
Share on other sites

I tried this script but weapon still falls next to dead actor and can be picked up.

 

Actor Property PlayerRef Auto
Weapon Property MyWeap Auto

Event OnDeath(Actor akKiller)
if (akKiller == PlayerRef)

RemoveItem(MyWeap, 1)

Endif
EndEvent

 

 

EDIT- The weapons are either vanilla copies or in my test case a weapon that I have added manually i.e. it has no connection to any quest, reference, etc.

EDIT > EDIT- Player cannot access actor inventory. Actor has no name thus preventing this.

Link to comment
Share on other sites

Another approach is to place a script to the weapon that when the "OnContainerChange()" Event fires will "RemoveItem(Self, 1)" along with a notification (example: weapon got disintegrated), this is optional but i think necessary so that players don't get the impression that the game or the mod is broken.


Example:




Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
if akNewContainer == Game.GetPlayer()
Game.GetPlayer().RemoveItem(Self, 1, True)
endIf
endEvent

.............................................OR...............................................

Weapon Property MyWeapon Auto

Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
if akNewContainer == Game.GetPlayer()
Game.GetPlayer().RemoveItem(MyWeapon, 1, True)
endIf
endEvent


Edited by maxarturo
Link to comment
Share on other sites

I see your approach. The disappearing weapon 'thing', I think needs a visual fx to accompany it. Player picking up a weapon then saying "WTF, where it go?" is not acceptable in the Skyrim world without some valid reason and magic is a good one.

 

EDIT- Or even better dead actor's body turns to a pile of ash, player picks up weapon gets burned, weapon disappears. How do I turn a Nord actor to a pile of ash on death?

 

EDIT- Turn to ash on death - easy. Add spell dlc2ashspawndeathfx01

Link to comment
Share on other sites

I'm just throwing in ideas, the how they might be implemented is up to you and your imagination, only you know the elements of your mod's world, and what can / can not be inserted.

 

If you want to hear my angle :
1) Player picks up weapon and explodes.
2) Weapon upon getting picked up does constant damage to player and stops only when he throws it otherwise player dies from it.
3) The ghost - owner of the weapon keep appearing and attacking the player and stops only when he throws it.
* The weapon should be accompanied by a description saying something like :
"This weapon is bound to its owner and will damage anyone else that wields it."
Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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