Frictional Games Forum (read-only)
Activate monster in other map when picking up item from a different map? - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Activate monster in other map when picking up item from a different map? (/thread-10316.html)



Activate monster in other map when picking up item from a different map? - SonOfLiberty796 - 09-14-2011

So my title might not make sense (lol) but ill explain here.

What I want to do is make a monster active when the player picks up a key. I know how to do that already, however, I want it to work when the player picks up the key from lets say Map 1. Then, Map 2's monster gets activated due to the player picking up the key from Map 1....is that possible? please help and thanks


RE: Activate monster in other map when picking up item from a different map? - GraphicsKid - 09-14-2011

Global variables are your friend.
SetGlobalVarInt(string& asName, int alVal);

And let's not forget
GetGlobalVarInt(string& asName);



RE: Activate monster in other map when picking up item from a different map? - SonOfLiberty796 - 09-14-2011

(09-14-2011, 03:36 AM)GraphicsKid Wrote: Global variables are your friend.
SetGlobalVarInt(string& asName, int alVal);

And let's not forget
GetGlobalVarInt(string& asName);
Ah, as I was roaming through the original Amnesia hps files, I was thinking it was that function.

However, do you think you can explain what I have to do with those script functions? I would love to know how to use them.

EDIT: Wait! Never mind, I didn't really need that script, I needed this:

void name(string &in asParent , string &in asChild , int alState)
{
if (HasItem("name")==true)
{
function
}
}

that should work hopefully.


RE: Activate monster in other map when picking up item from a different map? - aidan499 - 09-14-2011

I dont think it is possible but i am no good a scripting so i might be possible.


RE: Activate monster in other map when picking up item from a different map? - RawkBandMan - 09-15-2011

(09-14-2011, 03:39 AM)Xvideogamer720X Wrote:
(09-14-2011, 03:36 AM)GraphicsKid Wrote: Global variables are your friend.
SetGlobalVarInt(string& asName, int alVal);

And let's not forget
GetGlobalVarInt(string& asName);
Ah, as I was roaming through the original Amnesia hps files, I was thinking it was that function.

However, do you think you can explain what I have to do with those script functions? I would love to know how to use them.

EDIT: Wait! Never mind, I didn't really need that script, I needed this:

void name(string &in asParent , string &in asChild , int alState)
{
if (HasItem("name")==true)
{
function
}
}

that should work hopefully.
Yes I believe that will work...