Idea is to move two walls upward after pressing a button, then have them close after the player moves past them. A secret passage, if you will.
I tried using propimpulse, just to see if it would work, but it didn't. I've seen people move walls upward watching custom stories, but I've watched so many I don't remember which custom stories this kind of thing was in.
I can't find this anywhere on the forum. Any help would be seriously appreciated!
The entity file has to be changed to a MoveObject in the model editor. Then there's a script to have it move, but I can't remember it off the top of my head... I'm sure someone can fill for that part.
(03-01-2014, 08:43 AM)Statyk Wrote: The entity file has to be changed to a MoveObject in the model editor. Then there's a script to have it move, but I can't remember it off the top of my head... I'm sure someone can fill for that part.
I haven't touched Model Editor once. But trying to load walls into the model editor doesn't seem to be possible. It doesn't show up when trying to open, and opening it by other means causes the editor to crash after it says it can't find other folders.
SetEntityConnectionStateChangeCallback("YOURLEVER", "StartMovingtheSecretDoor");//This is for a Lever
SetEntityPlayerInteractCallback("YOURBUTTON", "StartMovingtheSecretDoor", true);// This is for a Button
Spoiler below!
Quote:---
Quote:void StartMovingtheSecretDoor(string &in asEntity)//This is for a Button
{
SetMoveObjectState("YOUR_SECRETWALL_1", 1.0f);
SetMoveObjectState("YOUR_SECRETWALL_2", 1.0f);
SetEntityInteractionDisabled( "YOURBUTTON", true ); //This will set your Button so, that you can NOT interact with it anymore.
GiveSanityBoostSmall();
PlayGuiSound("quest_completed", 0.6f);//Adds a complete sound
}
void StartMovingtheSecretDoor(string &in asEntity, int alState) //This is for a Lever
{
if (alState == 1)
{
SetMoveObjectState("YOUR_SECRETWALL_1", 1.0f);
SetMoveObjectState("YOUR_SECRETWALL_2", 1.0f);
SetLeverStuckState("YOURLEVER", 1, true); //This will set your lever stuck
GiveSanityBoostSmall();
PlayGuiSound("quest_completed", 0.6f);//Adds a complete sound
}
}
-------
Then make a scriptarea called ClosePassage
When you use the Model Editor, you must use Import Mesh, not Open if you haven't made the entity for it yet. Open uses .ent, Import uses .dae.
Import the mesh, then add a collision box. Set the type to something like Object > Static in the Edit menu on User Defined Variables. Need clearer instructions?
(03-01-2014, 07:20 PM)Mudbill Wrote: When you use the Model Editor, you must use Import Mesh, not Open if you haven't made the entity for it yet. Open uses .ent, Import uses .dae.
Import the mesh, then add a collision box. Set the type to something like Object > Static in the Edit menu on User Defined Variables. Need clearer instructions?
The post is called : Script Help Moving Walls
-
With all the respect, but i''m not sure if the guy needs this { models }
Anyway, this is an extra feature for him to get his custom walls to work as well..
Good job Mud*
(This post was last modified: 03-01-2014, 07:29 PM by DnALANGE.)
Ah, yes of course. The type needs to be MoveObject.
I'm assuming he wants an existant wall model, like the mansion wall, to be possible to move upwards like a secret entrance. Firstly it must be an entity and not a static object, and this is how you'd make one; using the Model Editor.
(03-01-2014, 07:20 PM)Mudbill Wrote: When you use the Model Editor, you must use Import Mesh, not Open if you haven't made the entity for it yet. Open uses .ent, Import uses .dae.
Import the mesh, then add a collision box. Set the type to something like Object > Static in the Edit menu on User Defined Variables. Need clearer instructions?
The post is called : Script Help Moving Walls
-
With all the respect, but i''m not sure if the guy needs this { models }
Anyway, this is an extra feature for him to get his custom walls to work as well..
Good job Mud*
(03-01-2014, 08:20 PM)Mudbill Wrote: Ah, yes of course. The type needs to be MoveObject.
I'm assuming he wants an existant wall model, like the mansion wall, to be possible to move upwards like a secret entrance. Firstly it must be an entity and not a static object, and this is how you'd make one; using the Model Editor.