Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple scripting
Author Message
Funman Offline
Member

Posts: 50
Joined: Apr 2011
Reputation: 0
Post: #1
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
Find all posts by this user Quote this message in a reply
Russ Money Offline
Senior Member

Posts: 360
Joined: Dec 2010
Reputation: 3
Post: #2
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
Find all posts by this user Quote this message in a reply
Elven Offline
Posting Freak

Posts: 868
Joined: Aug 2011
Reputation: 26
Post: #3
RE: Simple scripting
and if you scroll little bit down in titles, that will also help you:

http://www.frictionalgames.com/forum/thread-10017.html

The Interrogation
Chapter 1

My tutorials
08-28-2011 11:05 PM
Find all posts by this user Quote this message in a reply
Funman Offline
Member

Posts: 50
Joined: Apr 2011
Reputation: 0
Post: #4
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
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)