Frictional Games Forum (read-only)
Lever isn't working? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Lever isn't working? (/thread-29886.html)



Lever isn't working? - Amnesiaplayer - 05-04-2015

My lever doesn't work, somehow.
I thought this may be another "problem" since the lever isn't full at begin. you have to attach the lever to the mount. after doing that, Lever and Mount are Deactivated, and the FullLever is activated.
So now, I tried this :

PHP Code:
SetEntityConnectionStateChangeCallback("FullLever""MoveWall");

void MoveWall(string &in asEntityint alState)
{
     if (
alState == 1)
     {
     
SetMoveObjectState("Wall",1.0f);
     
PlaySoundAtEntity("""quest_completed.snt""MoveWall"0false);
          return;
     }


But it doesn't work, I know the Wall wouldn't work, but the sound also don't start.
I tried some other things. but nope, to make sure, the FullLever doesn't have anything filled in Entity tab.
And about the wall, It's just a custom Plane. I think this can't move unless you make an entity of it, and make it moveobjectstate right?! because I need this wall to move. not that already made castle one.


RE: Lever isn't working? - FlawlessHappiness - 05-04-2015

Where did you put

SetEntityConnectionStateChangeCallback("FullLever", "MoveWall");

?


RE: Lever isn't working? - Amnesiaplayer - 05-04-2015

(05-04-2015, 04:11 PM)FlawlessHappiness Wrote: Where did you put

SetEntityConnectionStateChangeCallback("FullLever", "MoveWall");

?

Here:

PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player""ScareArea""BodyFall"true0);
PlayMusic("Temple_Inside"false111false);
AddTimer(""5,"BloodDrip");
AddEnemyPatrolNode("MonsterWalk""1"0.01f"");
AddEnemyPatrolNode("MonsterWalk""2"0.01f"");
AddEnemyPatrolNode("MonsterWalk""3"0.01f"");
AddEnemyPatrolNode("MonsterWalk""4"0.01f"");
AddEnemyPatrolNode("MonsterWalk""5"0.01f"");
AddEnemyPatrolNode("MonsterWalk""6"0.01f"");
AddEnemyPatrolNode("MonsterWalk""7"0.01f"");
AddEntityCollideCallback("Lever""AttachLever""FullyLever"true0);
SetEntityConnectionStateChangeCallback("FullLever""MoveWall");


(Also, a little thing, how to make the monster dissappear after MonsterWalk 7, It worked for me on my old custom story but I really forgot how I did this..)


RE: Lever isn't working? - FlawlessHappiness - 05-04-2015

Is "MoveWall" also an entity?
Otherwise, you're playing the sound at an entity that doesn't exist.


The monster thing:
Place an area at the patrol node. When he collides with the area, make him disappear.


RE: Lever isn't working? - Amnesiaplayer - 05-04-2015

(05-04-2015, 05:05 PM)FlawlessHappiness Wrote: Is "MoveWall" also an entity?
Otherwise, you're playing the sound at an entity that doesn't exist.


The monster thing:
Place an area at the patrol node. When he collides with the area, make him disappear.

Oh okey, and the Entity... is Actually a "plane" from Static_Objects.... xd
I know it isn't possible but i tried to test the "sound" but yeah.
Is it easy to replace the Texture of that moving wall (castle one) into a Picture I want?!?
Like, copy, and paste (another name) and Erase the Picture, and place the one I want "(and re name the picture to the same name of all other things) ??


RE: Lever isn't working? - FlawlessHappiness - 05-04-2015

Sorry, no idea. I'd guess, yes, but I cannot promise you anything


RE: Lever isn't working? - Amnesiaplayer - 05-04-2015

(05-04-2015, 05:18 PM)FlawlessHappiness Wrote: Sorry, no idea. I'd guess, yes, but I cannot promise you anything

Oh, I'll try Smile