Jump to content

1st Person View problem from a script


Recommended Posts

Posted

In FONV I am creating a container and adding a damaged weapon to it from within a player GameMode block like this:

 

 

 

ref itemref

set itemref to player.PlaceAtMe SomeContainer 1

itemref.SetOwnership

itemref.AddItemHealthPercent SomeWeapon 1 0.6

 

 

 

 

Later, when I activate the container by having the player press the "E" key, I do this in the container's script:

 

 

 

begin OnActivate

if (DoOnce == 0)

set DoOnce to 1

RemoveAllitems player 1 0

endif

end

 

 

 

 

I've also tried this from the container, just for a test:

 

 

 

begin OnActivate

if (DoOnce == 0)

set DoOnce to 1

player.AddItemHealthPercent SomeWeapon 1 0.6

endif

end

 

 

 

 

At this point, I'm not worried about the container and its contents. I'm worried about my player 1st person view.

 

In both cases, as expected, a damaged weapon shows up in my player inventory. It's the only weapon of that type I have. Everything is fine until I then try to equip the weapon in the usual way, from the player inventory menu. I get a first person view that looks inverted, as if the player camera was rotated about some axis when the weapon was equipped. The weapon model isn't even in the player's hand. It is floating nearby.

 

When I add the weapon directly to the player by typing

 

player.AddItemHealthPercent SomeWeapon 1 0.6

 

from the console, I don't get the view problem.

 

Does anyone recognize this symptom? Can you tell me what I may be doing wrong?

 

Thank you.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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