Page 1 of 1

Player not frobbing class.

PostPosted: Thu Nov 15, 07 9:27 pm
by Cozmo
Hey. I'm trying to make an NPC that can sell an item. It all works, but there's only one problem; it spawns the item but the player doesn't frob it. :? I looked at how it was done in Snakey's mod, Aviator and it should work.

The variable:
Code: Select all
Var(Convo) class<Inventory> ItemForTransfer;


At the top of the function:
Code: Select all
   local DeusExPlayer Player;
   local Inventory TransItem;


And the code for picking up the item:
Code: Select all
               TransItem=Spawn(ItemForTransfer);
               TransItem.Frob(Player, None);


At default, to test it, it was a pistol. All it does, is spawn a pistol in the NPC's legs and the player doesn't frob it. So, anyone see anything wrong?

Thanks, Cozmo.

PostPosted: Thu Nov 15, 07 11:10 pm
by Allan
The player needs to frob the item, not the item frobbing the player. I do that quite a lot. :P

Try this:

Code: Select all
TransItem=Spawn(ItemForTransfer);
Player.Frob(ItemForTransfer,None);

PostPosted: Thu Nov 15, 07 11:23 pm
by Cozmo
LOL. I thought that could be it at first, but it came from a working script, so I assumed it was correct.

Same problem, not frobbing it. :(