Frictional Games Forum (read-only)
Can I ask you something(code) - 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: Can I ask you something(code) (/thread-20901.html)



Can I ask you something(code) - 888t - 03-24-2013

I don't know why it doesn work properly!

AddEntityCollideCallback("Player", "messageline", "startmessage", true, 1)
--
void startmessage(string &in asParent, string &in asChild, int alState) {
StartPlayerLookAt("agrippa", 1, 1, "");
SetPlayerActive(false);
SetMessage("Messages", "m1", 0);
AddTimer("timer1", 2.3f, "");
SetMessage("Messages", "m2", 0);
AddTimer("timer2", 2.3f, "");
SetMessage("Messages", "m3", 0);
AddTimer("timer3", 2.3f, "");
SetMessage("Messages", "m4", 0);
GiveItemFromFile("key_study", "key_study_ent");
SetEntityActive("brute2", true);
StopPlayerLookAt();
SetPlayerActive(true);
AddEnemyPatrolNode("brute2", "breakthrough", 0, "");
SetMessage("Messages", "m5", 0);
AddTimer("timer4", 2.0f, "");
SetMessage("Messages", "m6", 0);
}

is there any other way that show messages better than above??

when collide It only show the last message(m6) and doesn't look at agrippa .


RE: Can I ask you something(code) - Hardarm - 03-24-2013

To make the messages appear time after time you have to make multiple functions that start with one script, and each script should make start the next function subsequently.

Of course they don't work and only the last one works, because you are calling different scripts at the same time! The last message calls because the time is different than the others.

Also, are you sure the agrippa entity the player must look at is really called "agrippa" ? Check if it's called "agrippa_1", doublecheck names before claiming a script doesn't work Wink

As I said before, make a message with a timer start with a function. and in THAT other function you make ANOTHER time start.


RE: Can I ask you something(code) - 888t - 03-24-2013

(03-24-2013, 01:19 PM)Hardarm Wrote: To make the messages appear time after time you have to make multiple functions that start with one script, and each script should make start the next function subsequently.

Of course they don't work and only the last one works, because you are calling different scripts at the same time! The last message calls because the time is different than the others.

Also, are you sure the agrippa entity the player must look at is really called "agrippa" ? Check if it's called "agrippa_1", doublecheck names before claiming a script doesn't work Wink

As I said before, make a message with a timer start with a function. and in THAT other function you make ANOTHER time start.

Thank you! I got it and solved it! Big Grin