Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Item Interaction
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Item Interaction

void OnStart()
{
AddUseItemCallback("", "Bone_Saw", "Wooden_Board", "BreakBoard", true);
}

void BreakBoard(string &in asItem, string &in asEntity)
{
SetEntityActive("Wooden_Board", false);
SetEntityActive("Broken_Board", true);
}

That's the code.
Bone_Saw is the Item you use the Entity on.
Wooden_Board is the board that gets replaced by the broken one and the Entity the Item is used on.
Broken_Board is the broken board.

Please note that the bone saw has to be an item in your inventory.

"Veni, vidi, vici."
"I came, I saw, I conquered."
08-13-2013, 06:48 AM
Find


Messages In This Thread
Item Interaction - by Scorch 169 - 08-13-2013, 03:49 AM
RE: Item Interaction - by PutraenusAlivius - 08-13-2013, 06:48 AM
RE: Item Interaction - by FlawlessHappiness - 08-13-2013, 09:36 PM
RE: Item Interaction - by Slanderous - 08-13-2013, 03:32 PM



Users browsing this thread: 1 Guest(s)