View unanswered posts | View active topics It is currently Sat Apr 27, 2024 10:32 am



Reply to topic  [ 4 posts ] 
 Disappearing Inventory 
Author Message
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Disappearing Inventory
I was experimenting with Actor:SwapNextInventory(), and came across a weird glitch. The function description in the documentation says:
Quote:
Swaps the next MovableObject carried by this Actor and puts one not currently carried into the into the back of the inventory of this.
From what I've seen, this is not the case. Instead, the "next MovableObject" disappears and the "one not currently carried" is added to the back end of your inventory. The "next MovableObject" weapon then disappears from you inventory :0.

Furthermore, the "not currently carried" weapon does not get added to your inventory until you switch to it. So, it will sit there on the ground until you switch to it, when it then magically appears in your hands.

How the fudge are we supposed to use this function properly? :???:


Sat Jul 18, 2009 2:44 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Disappearing Inventory
By waiting for data to not halfass lua implementation? This may/may not take another year.


Sat Jul 18, 2009 3:05 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Disappearing Inventory
Grif wrote:
By waiting for data to not halfass lua implementation? This may/may not take another year.

Or atleast bring it up to the point where hacks can do enough to work right.


Sat Jul 18, 2009 7:57 am
Profile
User avatar

Joined: Fri Jun 19, 2009 5:57 pm
Posts: 84
Reply with quote
Post Re: Disappearing Inventory
No. What it does is, it takes the next carried object (it omits the currently held one), removes it, and shovels a new object into the back of the inventory. The description should read:

"Swaps the next MovableObject carried by this Actor with one not currently carried and puts it into the into the back of the inventory of this."

In conjunction with the Inventory() func I found, it cycles through the inventory without changing the contents.

It also doesn't need an existing MO object, it takes a reference that you get from CreateHDFirearm or the like. If you spawn the MO object, then yes, it will appear in your hands only when you cycle to it, because objects in inventory are normally removed from the MovableManager, while keeping the references.
I suppose you could use this to make all of the actor's inventory actually appear on him. Would be fun. :)


Sun Jul 19, 2009 11:34 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.075s | 15 Queries | GZIP : Off ]