Frictional Games Forum (read-only)
[REQUEST] Scripting 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: [REQUEST] Scripting help! (/thread-10336.html)



Scripting help! - Bearscar - 09-15-2011

I am a very noobie guy who is trying to make a amnesia custom story and I only know a few things and I have tried to get the monster to be active when I etc. open a door but with no sucsess. Can anyone help me with this? Some scripting help. Ps: my skype is bjosmep Wink



RE: Scripting help! - AmnesiaIsScary :S - 09-15-2011

I added you on skype ... im the one with the weird picture ...



RE: Scripting help! - TheSnakesneaker - 01-31-2015

Hello! I may be able to help you! Assuming that you've not done the basic scripting start, ill write exatly how you'll do :) Just make sure to remove the Spaces i've done and replace them using the "tab" button.

So, if you wonder what things mean, look here:
"KeyOne" is the Entity that should trigger the monster activation, if it is a door, it could be something like "mansion_1".
"MonsterActivation" is the callback, it'll be explained underneath the OnStart column.
True is if you want the event to remove it self after it has happend. If false, you can open the door several times and trigger the monster.

I use a Key as an entity (named KeyOne in the level editor) so this should be easy to follow :)

void OnStart()
{
SetEntityPlayerInteractCallback("KeyOne", "MonsterActivation", true);
}

void MonsterActivation(string &in item)
{
SetEntityActive("enemy_grunt_1", true);
}

So, this means that the monster (in my case named enemy_grunt_1) must be inactivated in the level editor from the beginning. Like this:
[Image: 21njmg9.jpg]

On this picture, i've done the script in Geany, and added some explanation on a few things:
[Image: vxlmgw.png]

Tell me if it's not working and i'll help you as well as i can!

Add me on Skype if you wish: ZekeSnakey


RE: Scripting help! - Slanderous - 01-31-2015

Necro Fucking Bump.


RE: Scripting help! - DnALANGE - 01-31-2015

O M G!
What you said Lazzer. LOOOL!
That bump hahhaha Wink
CLosed within minutes Tongue By Tragey who else Tongue


RE: Scripting help! - PutraenusAlivius - 01-31-2015

God damn, a four year necro post!


RE: Scripting help! - Kreekakon - 01-31-2015

Bye bye ye old crypt.

-Locked