Frictional Games Forum (read-only)
Anyone need help? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Anyone need help? (/thread-7825.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: Anyone need help? - nemesis567 - 05-17-2011

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.


RE: Anyone need help? - Kyle - 05-17-2011

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


RE: Anyone need help? - nemesis567 - 05-17-2011

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.


RE: Anyone need help? - Kyle - 05-18-2011

(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?


RE: Anyone need help? - nemesis567 - 05-18-2011

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


RE: Anyone need help? - Sennep - 05-18-2011

How do you set concaves? Do you really have to manually pull them all into position?


RE: Anyone need help? - Kyle - 05-18-2011

(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.


RE: Anyone need help? - Wonderbread - 05-18-2011

How would I make it so all of the torches to turn off when I enter an area?


RE: Anyone need help? - Kyle - 05-18-2011

(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);


RE: Anyone need help? - Wonderbread - 05-18-2011

(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?

Code:
// 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();
}