Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 4 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone need help?
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
RE: Anyone need help?

(05-19-2011, 11:10 PM)DannieWest Wrote: Gosh, how did I manage to scroll past it? ;o Well, thanks anyway ^^

You're welcome. Smile

05-19-2011, 11:17 PM
Find
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
RE: Anyone need help?

Oh btw, is there any way of making the player react as when sanity is ... and he falls to the floor all f*ed up, without the ringing nor falling to the floor? :o Just blurry and when turning around the camera is a lil after you know :o
(This post was last modified: 05-20-2011, 12:52 AM by DannieWest.)
05-20-2011, 12:51 AM
Find
Wonderbread Offline
Junior Member

Posts: 19
Threads: 2
Joined: May 2011
Reputation: 0
RE: Anyone need help?

(05-19-2011, 02:29 AM)Kyle Wrote:
(05-19-2011, 01:43 AM)Wonderbread Wrote: One more quick question.. how would I make it so a grunt is spawned when I enter a area only if I have a certain item?

Try this:

void OnStart()
{
     AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
     if (HasItem("ItemName") == true)
     {
          SetEntityActive("MonsterName", true);
          return;
     }
}

The event isn't triggered when I step into the area when I have the item, also every key I pick up is names Machine Room Key and not the name I specified in the Extra_English.lang file, I think this may be part of the problem. Here's my code:

AddUseItemCallback("", "key_study_1", "mansion_2", "UseKey1", true);

AddEntityCollideCallback("Player" , "MonsterArea_1a" , "CollideMonsterArea_1a" , true , 1);

void CollideMonsterArea_1a(string &in asParent , string &in asChild , int alState)
{
    if (HasItem("key_study_1") == true)
    {
        SetEntityActive("servant_grunt_1" , true);
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_10a", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_11a", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_12a", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_13a", 0, "");
}
}

Also, my monster stops at every pathnode for a couple seconds. I assumed where the 0 is above was how long the monster stays at a node but he stills sits there for a while before moving on..

Sorry for all the questions Tongue This is my last one haha
(This post was last modified: 05-20-2011, 05:58 AM by Wonderbread.)
05-20-2011, 05:47 AM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
RE: Anyone need help?

I have a question. I want to make it so that when a door is closed, a light goes on, and any other time, it's off. Simple as that. However, I can't find anywhere if "OnClosed" is a type (like OnPickup, OnIgnite, etc.)

Here's my script:
void stoveopen(string &in asItem, string &in asEntity)
    {
    if(asType == "OnClosed")
        {
        SetLightVisible("PointLight_9", true);
        }
    else
        {
        SetLightVisible("PointLight_9", false);
        }
    }

It gives me an error saying that type is not defined. Help?

(For anyone curious, this script isn't a necessary one, it's an eyecandy one. It tells the game to turn on a small pointlight within a stove (the ones with the slotted doors that open) whenever the door is closed, and this pointlight is tied to a bunch of billboards. When the door is closed, the billboards turn on, and shine through the slots. If it works, it'll be beautiful. Big Grin)

[Image: signature-2.png]
(This post was last modified: 05-20-2011, 06:10 AM by Streetboat.)
05-20-2011, 06:06 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
RE: Anyone need help?

(05-20-2011, 06:06 AM)Streetboat Wrote: I have a question. I want to make it so that when a door is closed, a light goes on, and any other time, it's off. Simple as that. However, I can't find anywhere if "OnClosed" is a type (like OnPickup, OnIgnite, etc.)

Here's my script:
void stoveopen(string &in asItem, string &in asEntity)
    {
    if(asType == "OnClosed")
        {
        SetLightVisible("PointLight_9", true);
        }
    else
        {
        SetLightVisible("PointLight_9", false);
        }
    }

It gives me an error saying that type is not defined. Help?

(For anyone curious, this script isn't a necessary one, it's an eyecandy one. It tells the game to turn on a small pointlight within a stove (the ones with the slotted doors that open) whenever the door is closed, and this pointlight is tied to a bunch of billboards. When the door is closed, the billboards turn on, and shine through the slots. If it works, it'll be beautiful. Big Grin)

I see what you're trying to do. Try this:

void OnStart()
{
     SetEntityConnectionStateChangeCallback("DoorName", "stoveopen");
}
void stoveopen(string &in asEntity, int alState)
{
     if (alState == 1)
     {
          SetLampLit("LightName", true, true);
          AddTimer("", 5, "TimerFunc");
     }
}
void TimerFunc(string &in asTimer)
{
     SetLampLit("LightName", false, true);
}

05-20-2011, 10:53 AM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
RE: Anyone need help?

Didn't work. Sad It doesn't crash, though... but it doesn't do anything.

[Image: signature-2.png]
05-20-2011, 07:01 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
RE: Anyone need help?

(05-20-2011, 07:01 PM)Streetboat Wrote: Didn't work. Sad It doesn't crash, though... but it doesn't do anything.

Are you naming everything correctly? :/

05-20-2011, 07:56 PM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
RE: Anyone need help?

Yeah, I was. It's okay though, I found a workaround. The fruits of your labors:
[Image: Amnesia11.jpg]
[Image: Amnesia10.jpg]

[Image: signature-2.png]
05-20-2011, 08:01 PM
Find
Wonderbread Offline
Junior Member

Posts: 19
Threads: 2
Joined: May 2011
Reputation: 0
RE: Anyone need help?

Hey kyle, just wondering if you saw my question above. Its the last of my problems and Ill be done. Thanks
05-20-2011, 09:04 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
RE: Anyone need help?

Try this. Click on the key in the editor and go to it's properties. At the bottom, under "CustomSubItemTypeName", and type the name you want from the .lang file for the key to use.

05-20-2011, 09:13 PM
Find




Users browsing this thread: 3 Guest(s)