Frictional Games Forum (read-only)
Help with scripting - 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: Help with scripting (/thread-6358.html)



Help with scripting - Beatlebattle - 01-23-2011

Hello FG users.

I'm new to the forum and the editor for amnesia dark descent as well. I've done some basic scripting such as closing doors and monster spawning. I find it very difficult to try new things though. For instance I can't get my triggers to turn on when touching the actual triggerbox. Another problem is letting monsters spawn when I hit a trigger instead of picking something up which works perfectly already. I made 5 maps so far for my campaign and I wan't to make it look more proffesional and detailed. The wiki gives me alot of help but I still find it very complicated. I've tried to copy some scripts from the original campaign but it gives me errors like No matching signatures to 'TimerRandomLook(string@&)' and so on. I hope I can get some tips so I can finish my story and upload it for the forum users to test it.

Also the maps with scripts which worked before start to give me errors too. It gives me the same error all the time:
main (9,1 : ERR : Expected ',' or ';'

Here's the script:

void Onstart()

void PickEnemy(string &in asEntity, string &in asType)

{

SetEntityActive("servant_brute_1", true);

}



I hope some one can help me with this. Thanks in advance.


RE: Help with scripting - Vradcly - 01-24-2011

what kind of function is PickEnemy? a collidecallback? an item pickup?


RE: Help with scripting - Beatlebattle - 01-24-2011

Never mind the whole problem, got it fixed. Just me being stupid with scripting.


RE: Help with scripting - Vradcly - 01-25-2011

Good thing you solved it Smile


RE: Help with scripting - Tottel - 01-25-2011

To help other people looking at the thread and having the same issue (you never know), don't forget the curly brackets:

void Onstart()
{

}

...