Frictional Games Forum (read-only)
Need some help with my FAST MONSTER script - 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: Need some help with my FAST MONSTER script (/thread-19622.html)

Pages: 1 2


RE: Need some help with my FAST MONSTER script - NaxEla - 12-22-2012

(12-22-2012, 10:16 PM)dnalange Wrote:
(12-22-2012, 09:24 PM)beecake Wrote: Please explain a bit more.

What do you mean by touched? There is only one way to interact with entities.
Do you mean that an entity collides with the door?


I would like to do this -->

Player toutches a door { like you want to open a door , hehe }

But it's locked -> all 4 doors are locked!

when toutched the 4th {randomly, ""the doors are in a circle"" door, one of the doors open let's say door 4 opens..Or unlocks OR anything..

Do you understand now?

So there's 4 doors and the player is in the middle of them. All doors are locked. Once the player has touched each door at least once, a random door chosen from the 4 doors will unlock.

Have I got that right?


RE: Need some help with my FAST MONSTER script - FlawlessHappiness - 12-22-2012

Yes.

In the interact-tab in the doors properties you write: Interact4Doors

script:

void Interact4Doors(string &in asEntity)
{
if(GetLocalVarInt("4Doors") == 4)
{
SetSwingDoorLocked("Door_"+RandInt(1,4), false, true);
}

else
{
if(GetLocalVarInt(asEntity) == 1)
{
return;
}
AddLocalVarInt("4Doors", 1);
AddLocalVarInt(asEntity, 1);
}
}

This means the 4 doors should be named: Door_1, Door_2, Door_3, Door_4


RE: Need some help with my FAST MONSTER script - DnALANGE - 12-23-2012

(12-22-2012, 10:55 PM)beecake Wrote: Yes.

In the interact-tab in the doors properties you write: Interact4Doors

script:

void Interact4Doors(string &in asEntity)
{
if(GetLocalVarInt("4Doors") == 4)
{
SetSwingDoorLocked("Door_"+RandInt(1,4), false, true);
}

else
{
if(GetLocalVarInt(asEntity) == 1)
{
return;
}
AddLocalVarInt("4Doors", 1);
AddLocalVarInt(asEntity, 1);
}
}

This means the 4 doors should be named: Door_1, Door_2, Door_3, Door_4

I am gonna check it out!
Thank you for the fast response!
Keep you up if works ..
IT WILL hehheh! Just to let you nkow!
THANKS!!


RE: Need some help with my FAST MONSTER script - DnALANGE - 12-24-2012

(12-22-2012, 10:44 PM)NaxEla Wrote:
(12-22-2012, 10:16 PM)dnalange Wrote:
(12-22-2012, 09:24 PM)beecake Wrote: Please explain a bit more.

What do you mean by touched? There is only one way to interact with entities.
Do you mean that an entity collides with the door?


I would like to do this -->

Player toutches a door { like you want to open a door , hehe }

But it's locked -> all 4 doors are locked!

when toutched the 4th {randomly, ""the doors are in a circle"" door, one of the doors open let's say door 4 opens..Or unlocks OR anything..

Do you understand now?

So there's 4 doors and the player is in the middle of them. All doors are locked. Once the player has touched each door at least once, a random door chosen from the 4 doors will unlock.

Have I got that right?


IT'S WORKING!!!

Ohhh it was me again...
one of the doors was Door_43 ... hehheee
THANKS!!!
Probly come soon with some more questions..

how could i make it like door_3 will only get oens... and NOT randonly???
Would be a bit more easy to build the scripts in one hallway..

Also fixed!!
I'm getting here!!

Are you interested in what the FC would look like?
are there ANY people still interested?

Would like to show a very experienced person how it looks like

You would like to see it trough skype.. for around 5 min of your time!