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 How to make item unlootable?
IWT Offline
Junior Member

Posts: 5
Threads: 2
Joined: May 2012
Reputation: 0
#5
RE: How to make item unlootable?

(01-18-2013, 01:20 AM)TheGreatCthulhu Wrote: If the item doesn't have to move around (like, bounce back when the player runs into it), you can just open the Level Editor, select the item, go to the Entity tab, and check, "StaticPhysics"; when done, just place a script area around it, and do something like this in the script file (inside OnEnter() function):
PHP Code: (Select All)
SetEntityInteractionDisabled("itemname"true);

// and then (for player "hand-based" interactions):
SetEntityPlayerInteractCallback("ScriptArea_1""MyFunc"false);

// or rather (to use an item on it):
AddUseItemCallback("internalCallbackID""itemToUseID""ScriptArea_1""MyFunc"true); 

Of course, replace "itemname", "itemToUseID", "ScriptArea_1" and "MyFunc" with the names you're using, and "internalCallbackID" with whatever you want.

Thanks, really helps me out! I guess the Demo is finished soon. Just fixing and decorating and some debugging and it's done.
01-18-2013, 01:06 PM
Find


Messages In This Thread
How to make item unlootable? - by IWT - 01-18-2013, 12:38 AM
RE: How to make item unlootable? - by Daemian - 01-18-2013, 12:47 AM
RE: How to make item unlootable? - by IWT - 01-18-2013, 01:06 AM
RE: How to make item unlootable? - by IWT - 01-18-2013, 01:06 PM



Users browsing this thread: 1 Guest(s)