| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| A problem with doors 
 
				Hi everyone!Well, my problem is the following one:
 
 I want that when the player interacts with a door, it teleports. No keys, only interact.
 But i don't know how to do it. Seriously, i would like to do it myself, but i don't know.
 Please, my CS is almost finished but I must cover this.
 
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan. |  | 
	| 08-31-2012, 01:29 PM |  | 
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: A problem with doors 
 
				SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);Calls a function when the player interacts with a certain entity.
 Callback syntax: void MyFunc(string &in asEntity)
 asName - internal name
 asCallback - function to call
 abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity
 
 Maybe locking the door would be a good idea.
 And then:
 
 TeleportPlayer(string& asStartPosName);
 
 Trying is the first step to success. |  | 
	| 08-31-2012, 01:34 PM |  | 
	
		| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| RE: A problem with doors 
 
				Thanks, beecake. You've helped me a lot.
			 
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan. |  | 
	| 08-31-2012, 02:11 PM |  | 
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: A problem with doors 
 
				No problem ^_^
			 
 Trying is the first step to success. |  | 
	| 08-31-2012, 02:15 PM |  | 
	
		| i3670   Posting Freak
 
 Posts: 1,308
 Threads: 74
 Joined: Oct 2011
 Reputation: 
36
 | 
			| RE: A problem with doors 
 
				To shorten the script a bit you can write the callback name in the door under the entity tab.
			 
 |  | 
	| 08-31-2012, 02:24 PM |  | 
	
		| The chaser   Posting Freak
 
 Posts: 2,486
 Threads: 76
 Joined: Jun 2012
 Reputation: 
113
 | 
			| RE: A problem with doors 
 
				Ok, fixed it. Thanks everyone for being so attentive!
			 
                               THE OTHERWORLD (WIP) ![[Image: k6vbdhu]](http://tinyurl.com/k6vbdhu)  
Aculy iz dolan. |  | 
	| 09-01-2012, 09:54 AM |  |