Nervly
Junior Member
Posts: 40
Threads: 2
Joined: Feb 2012
Reputation:
0
|
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.
|
|
06-21-2012, 01:10 PM |
|