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
Door open script
iFondue Offline
Junior Member

Posts: 28
Threads: 6
Joined: Apr 2012
Reputation: 0
#1
Door open script

Hello,

Quick question, which script function do i have to use when I want to open a door when walking trough a script area?

Don't uderstand me wrong I know how to make Callbacks for the script area, I only want to know the script function for the door... Blush


Greets

iFondue

Working on a Custom Story: "Untold Mysteries"
30% Complete!


08-06-2012, 09:50 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Door open script

The two functions you need are:

SetSwingDoorDisableAutoClose(string& asName, bool abDisableAutoClose);


disables the auto close of a door

and

AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);


Adds force to a prop. (be sure to use "world" as the Coordinate System)

Hope that helped.

I rate it 3 memes.
08-06-2012, 10:03 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: Door open script

The script would be like this:

void OnStart()
{
AddEntityCollideCallback("Player", "name of script area", "Open wished door", true, 1);
}

void Open wished door(string &in asParent, string &in asEntity, int alState)
{
AddPropForce("Name of door", 0, 0, 0, "world");
}
void OnEnter ()
{

}

void OnLeave()

{

}

I don't know what coordinates you should put, but you can test it.
It should be something like this. Hope it helped.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 08-08-2012, 01:38 PM by The chaser.)
08-06-2012, 04:49 PM
Find




Users browsing this thread: 1 Guest(s)