Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with my FAST MONSTER script
Author Message
NaxEla Offline
Senior Member

Posts: 416
Joined: Dec 2012
Reputation: 28
Post: #11
RE: Need some help with my FAST MONSTER script
(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?

In Ruins [WIP]
(This post was last modified: 12-22-2012 10:45 PM by NaxEla.)
12-22-2012 10:44 PM
Find all posts by this user Quote this message in a reply
BeeKayK Offline
Posting Freak

Posts: 1,940
Joined: Mar 2012
Reputation: 75
Post: #12
RE: Need some help with my FAST MONSTER script
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

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
12-22-2012 10:55 PM
Find all posts by this user Quote this message in a reply
DnALANGE Offline
Senior Member

Posts: 350
Joined: Jan 2012
Reputation: 17
Post: #13
RE: Need some help with my FAST MONSTER script
(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!!

12-23-2012 01:00 AM
Find all posts by this user Quote this message in a reply
DnALANGE Offline
Senior Member

Posts: 350
Joined: Jan 2012
Reputation: 17
Post: #14
RE: Need some help with my FAST MONSTER script
(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!

(This post was last modified: 12-24-2012 12:40 AM by DnALANGE.)
12-24-2012 12:26 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)