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
Doors??
Brothersvv09 Offline
Member

Posts: 57
Threads: 29
Joined: Aug 2012
Reputation: 0
#1
Doors??

How did they do the Cry Oni doors.. where when you touch them you go into the other room?? I tried copying it from the games HPS file but it didnt work... How?
08-18-2012, 09:22 PM
Find
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#2
RE: Doors??

Can you post your HPS file here?

[Image: 25F7U37.png]
08-18-2012, 09:29 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Doors??

You need to do more than just copy the script used. You also have to set it up the same in the level editor. For each door you need at least one player start area of its own.

Tutorials: From Noob to Pro
(This post was last modified: 08-18-2012, 09:33 PM by Your Computer.)
08-18-2012, 09:32 PM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#4
RE: Doors??

(08-18-2012, 09:32 PM)Your Computer Wrote: You need to do more than just copy the script used. You also have to set it up the same in the level editor. For each door you need at least one player start area of its own.
That's too much work.
08-18-2012, 09:38 PM
Find
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#5
RE: Doors??

(08-18-2012, 09:38 PM)Statyk Wrote:
(08-18-2012, 09:32 PM)Your Computer Wrote: You need to do more than just copy the script used. You also have to set it up the same in the level editor. For each door you need at least one player start area of its own.
That's too much work.
If this is too much work already, you should not start with this project.

[Image: 25F7U37.png]
08-18-2012, 10:13 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Doors??

(08-18-2012, 09:32 PM)Your Computer Wrote: You need to do more than just copy the script used. You also have to set it up the same in the level editor. For each door you need at least one player start area of its own.
You mean it is teleporting?

So 1 PlayerStartArea at each side of the door.

then 1 ScriptArea at each side of the door.
When you collide with the area SetLocalVarInt("Door1_CollideLeft", 1);
When you don't collide with the area SetLocalVarInt("Door1_CollideLeft", 0);

Then when interacting with the door:
if(GetLocalVarInt("Door1_CollideLeft") == 1)
{
TeleportPlayer("PlayerStartArea_1");
return;
}

if(GetLocalVarInt("Door1_CollideRight") == 1);
{
TeleportPlayer("PlayerStartArea_2");

return;
}

Something like that at each door?

Trying is the first step to success.
08-18-2012, 10:13 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Doors??

(08-18-2012, 09:38 PM)Statyk Wrote: That's too much work.

Not to mention thinking about naming conventions for the sake of minimizing code.

(08-18-2012, 10:13 PM)beecake Wrote: You mean it is teleporting?

Yeah, teleporting is involved. As for your code, i would have tried to figure out a way to use the same interact callback for teleporting the player in and out of the rooms. For example, using one local map variable of the int type for keeping track of whether or not the user is in a room. I would give the two player start areas the name of the door with a prefix (though a suffix would work too) of the exit states of the player (i.e. "exit" and "enter"). I don't think there would be any issue with the one local map variable, as the user can only interact with one door at a time. 0 would represent that the player is outside of a room, 1 would represent that the player is inside the room.

Tutorials: From Noob to Pro
(This post was last modified: 08-18-2012, 10:24 PM by Your Computer.)
08-18-2012, 10:21 PM
Website Find




Users browsing this thread: 1 Guest(s)