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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help New Question: How to create a door
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#22
RE: 3 Questions: Cave In and Destroying bookshelf

(06-21-2012, 01:28 PM)FastHunteR Wrote: After a bit of trial and error, I made a test map and I see what your problem is. Do the following:
Open the model editor
Open the shelf you want(under amnesia root>entities>storage)
Go to setting and user defined variables
at the top, change the type from static object to object, with the subtype static.
save as, make a new folder in your custom story named "entities" and save it inside
in level editor, select your shelf and under entity file, browse to your custom story and select the new made shelf.
That's it! however, i forgot to add a SetEntityActive("shelf02_1, false);
So, place it under the playsound function.


I'm getting this FATAL ERROR when I start my custom story (image attached)
Here is the script with the SetEntityActive added:

Quote:void OnStart()
{
AddUseItemCallback("", "stone_hammer_1", "shelf02_1", "DestroyShelf", true);
}
void DestroyShelf(string &in asItem, string &in asEntity)
{
//Do your stuff, whatever you want to do, here. Example:
FadeOut(2);
AddTimer("Timer_1", 2, "PlaySound");
}
void PlaySound(string &in asTimer)
{
PlaySoundAtEntity("", "break_wood.snt", "shelf02_1", 0, false);
SetEntityActive("shelf02_1, false);
AddTimer("Timer_2", 1, "FadeInFunction");
}
void FadeInFunction(string &in asTimer)
{
FadeIn(2);
}


Attached Files
.png   FATAL ERROR.png (Size: 39.89 KB / Downloads: 144)

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
06-21-2012, 02:15 PM
Find


Messages In This Thread
New Question: How to create a door - by Nervly - 06-20-2012, 12:55 PM
RE: 3 Questions: Cave In and Destroying bookshelf - by Nervly - 06-21-2012, 02:15 PM



Users browsing this thread: 1 Guest(s)