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?
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
RE: Anyone need help?

How do I get a lever to be stuck when it's pushed to the position that's correct? please help Smile

05-16-2011, 12:04 PM
Find
Kyle Offline
Posting Freak

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

SetLeverStuckState(string& asName, int alState, bool abEffects);

SetLeverStuckState("Lever", 1, true);

05-16-2011, 12:17 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
RE: Anyone need help?

(05-16-2011, 12:17 PM)Kyle Wrote: SetLeverStuckState(string& asName, int alState, bool abEffects);

SetLeverStuckState("Lever", 1, true);
Thanks! Big Grin

05-16-2011, 01:12 PM
Find
DannieWest Offline
Member

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

I kind of need help.. :o Though posted a new thread, should be like right below this one, would be really glad if you maybe have a solution for it :o
05-16-2011, 01:16 PM
Find
Ge15t Offline
Junior Member

Posts: 48
Threads: 8
Joined: Feb 2011
Reputation: 0
RE: Anyone need help?

Silly question, but how would I set out a death hint in the .lang file? As well as set up a script so that the game closes after death (ala Justine)
(This post was last modified: 05-17-2011, 08:22 AM by Ge15t.)
05-17-2011, 08:22 AM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
RE: Anyone need help?

Bumping Post #114, Page 12 Big Grin

05-17-2011, 11:02 AM
Find
Kyle Offline
Posting Freak

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

(05-17-2011, 11:02 AM)Rownbear Wrote: Bumping Post #114, Page 12 Big Grin

Is there an error report? Tell me exactly what isn't working and what is.

05-17-2011, 11:27 AM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
RE: Anyone need help?

(05-17-2011, 11:27 AM)Kyle Wrote:
(05-17-2011, 11:02 AM)Rownbear Wrote: Bumping Post #114, Page 12 Big Grin

Is there an error report? Tell me exactly what isn't working and what is.
It's not an error report but it seems like the function cant change entities like the doors, play a sound AND set the monster active. So when I pick up the key nothing happens. Maybe I have a spelling error or I cant do it this way. So maybe I can use a timer when I pick up the key to set the things to happen instead. If it won't activate by just picking it up.

EDIT: It worked before when it was a script when the player walked into, So I think the function isn't right. But having the player walk into it wasn't what I wanted.

(This post was last modified: 05-17-2011, 12:12 PM by Rownbear.)
05-17-2011, 12:08 PM
Find
Kyle Offline
Posting Freak

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

This was your script:

void OnStart()
{
SetEntityPlayerInteractCallback("castle_key_1", "MonsterActivate3", true);
}

void MonsterActivate3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_3", true);
SetEntityActive("castle_door_5", false);
SetEntityActive("castle_door_6", true);
SetSwingDoorLocked("castle_door_3", false, true);
PlaySoundAtEntity("LookAt_2", "15_bang.snt", "LookAt_2", 0, false);
PlaySoundAtEntity("guardian_distant3", "enabled.snt", "Player", 0,false);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_5", 0, "");
}

When I look at it, I see many errors. Tongue

It should look like this:

void OnStart()
{
SetEntityPlayerInteractCallback("castle_key_1", "MonsterActivate3", true);
}
void MonsterActivate3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_3", true);
SetEntityActive("castle_door_5", false);
SetEntityActive("castle_door_6", true);
SetSwingDoorLocked("castle_door_3", false, true);
PlaySoundAtEntity("", "15_bang.snt", "LookAt_2", 0, false);
PlaySoundAtEntity("", "enabled.snt", "Player", 0, false);
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_5", 0, "");
}

05-17-2011, 09:07 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
RE: Anyone need help?

Oh well thanks for the reply, I used a different method though, When I pick up the key it uses a timer to set a script active in which you stand in, which then sets off monsteractivate3. Oh well not the most pretty function but hey, whatever works xD

05-17-2011, 10:50 PM
Find




Users browsing this thread: 1 Guest(s)