|
FAQ
• Search • Login
|
Author |
Message |
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Inventory things
Would this work then? Code: function Create(self) self.Bought = self:Inventory() if self.Bought.ClassName == "AHuman" then self.Actor = self.Bought self.ActorInventory = self.Actor:Inventory() end if self.Actor ~= nil then self.SpawnActor = CreateAHuman(self.Actor.PresetName) self.SpawnActor.Pos = self.Pos + Vector(X,Y) self.SpawnActor:AddInventoryItem(self.ActorInventory.Item) MovableMan:AddActor(self.SpawnActor) end end
|
Fri Dec 02, 2011 8:40 pm |
|
|
ramonimbao
Joined: Sat Jan 17, 2009 8:53 am Posts: 79 Location: Philippines
|
Re: Inventory things
Looks like it, though I assume you're going to be deleting the actor from the inventory, so to do that just add
self:SwapNextInventory(nil, false)
just before that last end.
|
Sat Dec 03, 2011 3:17 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Inventory things
Ok I'm going to try it.
Thanks.
|
Sat Dec 03, 2011 8:38 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Inventory things
It did work, but with some minor changes.
Thanks a lot!
|
Sat Dec 03, 2011 10:09 pm |
|
|
|
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
|
|