Funman
Member
Posts: 53
Threads: 10
Joined: Apr 2011
Reputation:
0
|
Simple scripting
Hey, I've been trying all sorts of scripting and NOTHING WORKS. So, as a starting point, can someone give me what the entire scrip file would look like for having a door shatter when the player grabs it? Thanks.
|
|
08-28-2011, 11:01 PM |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
RE: Simple scripting
(08-28-2011, 11:01 PM)Funman Wrote: Hey, I've been trying all sorts of scripting and NOTHING WORKS. So, as a starting point, can someone give me what the entire scrip file would look like for having a door shatter when the player grabs it? Thanks.
This may help out
http://www.frictionalgames.com/forum/thr...l#pid78624
|
|
08-28-2011, 11:04 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
|
08-28-2011, 11:05 PM |
|
Funman
Member
Posts: 53
Threads: 10
Joined: Apr 2011
Reputation:
0
|
RE: Simple scripting
Ok, so this is my code for doing what I mentioned before, but it doesn't work. Could someone see if there's a mistake?
void OnStart()
{
SetEntityPlayerInteractCallback("mansion_1", "Break_Door", true);
}
void Break_Door(string &in entity)
{
SetPropHealth("mansion_1", 0);
}
void OnEnter()
{
}
void OnLeave()
{
}
Is something required in the entity tab?
(This post was last modified: 08-30-2011, 01:46 AM by Funman.)
|
|
08-30-2011, 01:22 AM |
|