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?
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
RE: Anyone need help?

Does the script support arrays? It seems to give me an error when I attempt to use them but I'm not sure that's the problem.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
05-17-2011, 11:05 PM
Find
Kyle Offline
Posting Freak

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

I pretty sure I saw someone use a script for one of them.

The main thing is, I never could find a use for arrays in scripting. :/
(05-17-2011, 10:50 PM)Rownbear Wrote: 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

That's cool. Then why you try to bug me with your script? Tongue

(This post was last modified: 05-17-2011, 11:24 PM by Kyle.)
05-17-2011, 11:23 PM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
RE: Anyone need help?

Arrays are extremely usefull. At least for me since I was used to script multiplayer games so it was common this thing;

Array[MAX_PLAYERS];//where MAX_PlAYERS was a define

In here it has many uses as well. Even better if there were enumerators which I can't seem to be able to use here either.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
05-17-2011, 11:45 PM
Find
Kyle Offline
Posting Freak

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

(05-17-2011, 11:45 PM)nemesis567 Wrote: Arrays are extremely usefull. At least for me since I was used to script multiplayer games so it was common this thing;

Array[MAX_PLAYERS];//where MAX_PlAYERS was a define

In here it has many uses as well. Even better if there were enumerators which I can't seem to be able to use here either.

Got any sort of better example that can be used for an Amnesia custom story?

05-18-2011, 12:30 AM
Find
nemesis567 Offline
Posting Freak

Posts: 874
Threads: 65
Joined: May 2011
Reputation: 10
RE: Anyone need help?

I don't know, they may not be so efficient in OOL, but they may come in use someday.

Today I dreamt the life I could live forever. You only know that when you feel it for you know not what you like until you've experienced it.
(This post was last modified: 05-18-2011, 02:43 PM by nemesis567.)
05-18-2011, 02:42 PM
Find
Sennep Offline
Junior Member

Posts: 47
Threads: 6
Joined: Apr 2011
Reputation: 0
RE: Anyone need help?

How do you set concaves? Do you really have to manually pull them all into position?
05-18-2011, 07:00 PM
Find
Kyle Offline
Posting Freak

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

(05-18-2011, 07:00 PM)Sennep Wrote: How do you set concaves? Do you really have to manually pull them all into position?

Concaves? What? I don't know what you mean.

05-18-2011, 07:58 PM
Find
Wonderbread Offline
Junior Member

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

How would I make it so all of the torches to turn off when I enter an area?
(This post was last modified: 05-18-2011, 09:30 PM by Wonderbread.)
05-18-2011, 09:19 PM
Find
Kyle Offline
Posting Freak

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

(05-18-2011, 09:19 PM)Wonderbread Wrote: How would I make it so all of the torches to turn off when I enter an area?

You can try this after adding an entity collide callback:

SetLampLit("LightName", false, true);

05-18-2011, 09:48 PM
Find
Wonderbread Offline
Junior Member

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

(05-18-2011, 09:48 PM)Kyle Wrote:
(05-18-2011, 09:19 PM)Wonderbread Wrote: How would I make it so all of the torches to turn off when I enter an area?

You can try this after adding an entity collide callback:

SetLampLit("LightName", false, true);

Okay cool, so would this work?

// Makes the Player look at the door after it closes behind them, looks back down hallway, lights go out, and grunt is seen walking.

{

AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwoArea", true, 1);

}

void CollideRoomTwoArea(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorClosed("mansion_1", true, true);
    StartPlayerLookAt("mansion_1", 3.0f, 4.0f, "");
    Addtimer("", 1.5f, "EndLook1");
}

void EndLook1(string &in asTimer)
{
    StopPlayerLookAt();
}

{
    StartPlayerLookAt("default_wall_180", 3.0f, 4.0f, "");
    Addtimer("", 2.5f, "EndLook1");
    SetLampLit("Torch_6", false, true);
    SetLampLit("Torch_7", false, true);
    SetLampLit("Torch_8", false, true);
    SetLampLit("Torch_9", false, true);
    SetLampLit("Torch_10", false, true);
    SetEntityActive("servant_grunt_2" , true);
    AddEnemyPatrolNode("servant_grunt_2", "MonsterPath2a", 1, "");

}

void EndLook1(string &in asTimer)
{
    StopPlayerLookAt();
}
(This post was last modified: 05-18-2011, 10:17 PM by Wonderbread.)
05-18-2011, 10:14 PM
Find




Users browsing this thread: 1 Guest(s)