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
Simple scripting
Funman Offline
Member

Posts: 53
Threads: 10
Joined: Apr 2011
Reputation: 0
#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
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#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
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#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
Funman Offline
Member

Posts: 53
Threads: 10
Joined: Apr 2011
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)