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
#18
RE: 3 Questions: Cave In and Destroying bookshelf

(06-21-2012, 01:05 PM)FastHunteR Wrote: You can't activate the script in the level editor, start the game and start it in either custom stories option or use the development environment to start it immediatly, then you use your hammer on your shelf and it should work.
It's no working :/
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);
AddTimer("Timer_2", 1, "FadeInFunction");
}
void FadeInFunction(string &in asTimer)
{
FadeIn(2);
}

Here is the script. I replaced the sound, the name of the shelf and of the hammer.

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

Please?
[Image: please-please-please.jpg]
06-21-2012, 01:10 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, 01:10 PM



Users browsing this thread: 3 Guest(s)