Strembitsky
Senior Member
Posts: 254
Threads: 37
Joined: Feb 2012
Reputation:
3
|
RE: How to make a door open when walking into an area?
(02-25-2012, 08:00 PM)MissMarilynn Wrote: (02-25-2012, 07:51 PM)Strembitsky Wrote: If the player doesn't see the door, you could have two entities: One closed and locked, and the other open the amount you'd like.
Use a simple SetEntityActive script for both of them. I like that idea a lot. How do I set the door I have inactive?
How would I put it into this script?
void SpawnMonster(string &in asEntity)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 4, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 4, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 3, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_10", 10, "");
GiveSanityDamage(5.0f, true);
SetMessage("walk","Oh_No",0);
SetSwingDoorLocked("mansion_2", false, true);
} I may be wrong since I do not have the editor with me right now, but I'm sure you can set entities inactive/active in their settings. Click on the door, and under the name there is a checkbox.
Have 2 doors, on each other. In the code, SetEntityActive("Door1", true); and SetEntityActive("Door2", false);
The Nightmares v1.0 - Dreadful Fires WIP
|
|