Frictional Games Forum (read-only)

Full Version: problems with scripting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Im not very good with levers im still trying to get my head around it try playing around with.


void StateChange(string &in EntityName, int alState)
{
if(alState == 1)
SetLeverStuckState(asMainEntity, -1, true);
SetSwingDoorLocked("Ceiling", false, true);
SetEntityActive("Exit_Guard01" , true);
PlaySoundAtEntity("LeverExit01", "levelexitopen.ogg", "Player", 0.5f, false);
AddEnemyPatrolNode("Exit_Guard01", "Path9", 0.1f, "true"); // There are more pathnodes, but then my post would explode... xD
}
Oh and dont forget the callback:

SetEntityConnectionStateChangeCallback("YourLeverName", "StateChange");
Sadly this line exist in my script... Confused
And it doesn't work. I had never thought, that is it so hard to make levers and buttons... I had tried everything. But I am sure, there is just a very, very small mistake... Rolleyes
So the problem still exist. Would be nice, when you told me how to make a lever from beginning.
This means, what scripts must I wrote and what must I adjust in the editor. Rolleyes
So guys,
I think, I should give you some secret infos Big Grin

I am making a custom story, that could interest you, maybe I will release a demo next weekend!

But YOU must help me with scripting. Just show me how to make levers, and maybe other stuff, I should asked you. Tongue

I will promise you will don't dissapointed!
Pages: 1 2 3