Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I make a monster appear after I read a note?
Trucido Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2011
Reputation: 0
#1
Question  How do I make a monster appear after I read a note?

Hi, I am currently new with mapping and all and so far I can only make walls, ceiling, props etc. So I was wondering how do I make a monster to appear after I read a note? And how to I make a note anyways? I do not know anything about triggers and scripts so please explain how simply you can!

Big Grin

Thx for reading!



Rolleyes
02-08-2011, 07:41 PM
Find
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#2
RE: How do I make a monster appear after I read a note?

first create a Callback inside the OnStart() section of you map script. (I am assuming that you have set up everything needed for development...). The callback should be something like this one:
SetEntityCallbackFunc("note_generic_1","note_pickup1");

It makes the function note_pickup1 run when you pickup the note named note_generic_1

Then you have to define note_pickup1, put it outside of your OnStart() OnEnter() and OnLeave():
void note_pickup1(string& asName, string& asCallback)
{
//Put the thing you want to happen here, in your case, activate monster:
SetEntityActive("servant_grunt_1" , true); //true is active, false is not active, servant_grunt_1 is //the name of the monster
}

Ill post the rest (how you make the note text show) later if noone else helps you...Hope that will make the monster come running for you at least Smile.
02-08-2011, 07:51 PM
Find
Trucido Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2011
Reputation: 0
#3
RE: How do I make a monster appear after I read a note?

Ok thanks for that, a little blurry still but I might be able to fix it. Because I am working on a "barricade" map where you read a note the monster will appear and you've been barricading the room (like in Daniel's room in the game) but as I said it will only work if you read the note.
02-08-2011, 07:54 PM
Find
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#4
RE: How do I make a monster appear after I read a note?

Oh and you have to place the monster inside the map and make sure the checkbox for "active" is not on. Then you could have some pathnodes if you want the monster to walk around, but that will take to much explanation from my part when you can just search on how to do it.

To make the note have text:
code to put in .lang file:
<CATEGORY Name="Journal">
<Entry Name="Note_A1_Name">HEADLINE</Entry>
<Entry Name="Note_A1_Text">TEXT</Entry>

On the entity properties for your note write A1 in the note text field.
That should do it Smile.
02-08-2011, 10:54 PM
Find
Trucido Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2011
Reputation: 0
#5
RE: How do I make a monster appear after I read a note?

(02-08-2011, 10:54 PM)Vradcly Wrote: Oh and you have to place the monster inside the map and make sure the checkbox for "active" is not on. Then you could have some pathnodes if you want the monster to walk around, but that will take to much explanation from my part when you can just search on how to do it.

To make the note have text:
code to put in .lang file:
<CATEGORY Name="Journal">
<Entry Name="Note_A1_Name">HEADLINE</Entry>
<Entry Name="Note_A1_Text">TEXT</Entry>

On the entity properties for your note write A1 in the note text field.
That should do it Smile.


I've tried now almost a day and it didn't work for me (probably did something wrong) can you please post a pre made script file?
02-09-2011, 08:15 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#6
RE: How do I make a monster appear after I read a note?

Set the options of the letter like this:
[Image: letterv.th.png]

and put this script into your .hps file.
void PickLetter(string &in asEntity, string &in asType) //Has to be the same name as the callback function.
{
SetEntityActive("servant_grunt_1", true); //servant_grunt_1 is the name of the monster.
}

[Image: 18694.png]
02-09-2011, 10:30 PM
Find




Users browsing this thread: 1 Guest(s)