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
Scripting items inside breakable entities?
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#1
Scripting items inside breakable entities?

I wanted to know if it's possible to script items inside say, a vase, through this little option here:
[Image: keygb.jpg]

For example I want to hide the key you need to open a door inside a breakable object in the room, is there another way to do this? Any assistance appreciated.
09-27-2010, 06:26 AM
Find
Neurological Offline
Member

Posts: 71
Threads: 11
Joined: Sep 2010
Reputation: 1
#2
RE: Scripting items inside breakable entities?

I think should be possible a work around. Just an idea as i'm not so much experienced with scripts, but you may be able to attach the key to the vase and set it to not active, then with scriptmake the key active when the vase break. Don't know if is possible to spawn the key as debris.

Neurological - Music Entertainment
http://www.neuro-lab.net
09-27-2010, 11:08 AM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#3
RE: Scripting items inside breakable entities?

Thanks for the reply, I'll do that as a temporary work around. Still, it'd be nice and convenient if you could add script-able items through that in-built option. Would there be any way to add items to that list?
09-27-2010, 12:46 PM
Find
Thomas Offline
Frictional Games

Posts: 2,634
Threads: 184
Joined: Apr 2006
Reputation: 68
#4
RE: Scripting items inside breakable entities?

open the Entity.cfg file in the editor folder

Look for the Object type and then there is a contained item object

you can then add for types of entities that are contained. Or just change the input to a string input.
09-27-2010, 01:04 PM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#5
RE: Scripting items inside breakable entities?

Thanks a bunch, that worked like a charm Smile However I'm having this strange script error when I try to run the map through custom story now "Unexpected End of file (211, 1) Main" there's nothing even at line 211, and it's just a little below "OnLeave()". Really odd, since it was working fine just minutes ago, and I haven't touched the script.
09-27-2010, 02:57 PM
Find




Users browsing this thread: 2 Guest(s)