Player not frobbing class.

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Player not frobbing class.

Postby Cozmo » Thu Nov 15, 07 9:27 pm

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.
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Allan » Thu Nov 15, 07 11:10 pm

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);
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Cozmo » Thu Nov 15, 07 11:23 pm

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. :(
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 4 guests