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 Can't make door explode?
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#4
RE: Can't make door explode?

Change the door to a script area then.

void OnStart()


{
AddEntityCollideCallback("Player", "NAMEOFSCRIPTAREA", "Explode", true, 1);
}


void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("door1", 0.0f);


PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);


PlaySoundAtEntity("", "react_scare", "Player", 0, false);


PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);


GiveSanityDamage(5.0f, true);
}


WARNING: not tested, though it should work.

EDIT: just realized you tried something like this.
The script is perfectly fine, the problem is, the prison section just can't explode. I know for a fact there are some entities/doors that just won't do certain things. Replace the door with a different one, and try the script again. It should explode this time.

Ba-da bing, ba-da boom.
(This post was last modified: 02-03-2012, 11:52 PM by JenniferOrange.)
02-03-2012, 11:50 PM
Find


Messages In This Thread
Can't make door explode? - by GrAVit - 02-03-2012, 10:33 PM
RE: Can't make door explode? - by JenniferOrange - 02-03-2012, 11:42 PM
RE: Can't make door explode? - by GrAVit - 02-03-2012, 11:46 PM
RE: Can't make door explode? - by RawkBandMan - 02-04-2012, 03:43 PM
RE: Can't make door explode? - by JenniferOrange - 02-04-2012, 05:09 PM
RE: Can't make door explode? - by JenniferOrange - 02-03-2012, 11:50 PM
RE: Can't make door explode? - by GrAVit - 02-03-2012, 11:56 PM



Users browsing this thread: 2 Guest(s)