Frictional Games Forum (read-only)
How to make a monster appear after i read a note? - 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: How to make a monster appear after i read a note? (/thread-6682.html)



How to make a monster appear after i read a note? - Raymond - 02-22-2011

As the title said, how to make a monster appear after i read a note? Please help Sad!
For example, when i read a note than the monster appear behind me.


RE: How to make a monster appear after i read a note? - Tanshaydar - 02-22-2011

You need to write a callback function when interacted with note.

Code:
void PickedUpNote(string &in entity)
{
    SetEntityActive("servant_grunt_1", true);
}

Write PickedUpNote in level editor for the not, in "when interacted" part.
Place a grunt or something where you want, then deactivate it, then activate it with note.

Next time, try to search, which will give you much faster and better answers.


RE: How to make a monster appear after i read a note? - Raymond - 02-22-2011

(02-22-2011, 05:04 AM)Tanshaydar Wrote: You need to write a callback function when interacted with note.

Code:
void PickedUpNote(string &in entity)
{
    SetEntityActive("servant_grunt_1", true);
}

Write PickedUpNote in level editor for the not, in "when interacted" part.
Place a grunt or something where you want, then deactivate it, then activate it with note.

Next time, try to search, which will give you much faster and better answers.

I don't quite understand.
(02-22-2011, 06:05 AM)Raymond Wrote:
(02-22-2011, 05:04 AM)Tanshaydar Wrote: You need to write a callback function when interacted with note.

Code:
void PickedUpNote(string &in entity)
{
    SetEntityActive("servant_grunt_1", true);
}

Write PickedUpNote in level editor for the not, in "when interacted" part.
Place a grunt or something where you want, then deactivate it, then activate it with note.

Next time, try to search, which will give you much faster and better answers.

I got an error when i test the map, do i need to replace the "string &in entity" into the note's name? I am new to these things, sorry.



RE: How to make a monster appear after i read a note? - Tanshaydar - 02-22-2011

There should be some interact call back in the level editor for the note. Just write PickedUpNote there, no need to write string &in entity anywhere.


RE: How to make a monster appear after i read a note? - Raymond - 02-22-2011

(02-22-2011, 07:29 AM)Tanshaydar Wrote: There should be some interact call back in the level editor for the note. Just write PickedUpNote there, no need to write string &in entity anywhere.

Thanks, it works!


RE: How to make a monster appear after i read a note? - Mad Aztec - 06-22-2011

(02-22-2011, 07:29 AM)Tanshaydar Wrote: There should be some interact call back in the level editor for the note. Just write PickedUpNote there, no need to write string &in entity anywhere.

I'm afraid I also have a question, Confused, do you mean writing PickedUpNote in the notes CallbackFunc, and writing SetEntityActive in the notes PlayerInteractCallback? I'm a little bit confused right now.