Frictional Games Forum (read-only)
Pick Up note event - need this answered ASAP - 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: Pick Up note event - need this answered ASAP (/thread-5433.html)



Pick Up note event - need this answered ASAP - Gamemakingdude - 11-14-2010

How could i make it when i pick up a note, an event happens?


RE: Pick Up note event - need this answered ASAP - Akumasama - 11-14-2010

I'm not sure, but maybe use

if(AddNote(string& asNameAndTextEntry, string& asImage))
{
stuff here
}

I'm kinda new to scripting C++, but this should work in Flash...
But you better wait for someone else to react xD

Edit:
Try giving yor note a callback func.
Then use AddEntityCollideCallback.
Sorry if there are typos, ipods arent good with forums Tongue


RE: Pick Up note event - need this answered ASAP - Gamemakingdude - 11-14-2010

(11-14-2010, 03:07 AM)Akumasama Wrote: I'm not sure, but maybe use

if(AddNote(string& asNameAndTextEntry, string& asImage))
{
stuff here
}

I'm kinda new to scripting C++, but this should work in Flash...
But you better wait for someone else to react xD

Edit:
Try giving yor note a callback func.
Then use AddEntityCollideCallback.
Sorry if there are typos, ipods arent good with forums Tongue

PHP Code:
void OnStart()
{    
AddEntityCollideCallback("Player""Note_Warning""EndOfDemo"false1);

    if(
ScriptDebugOn())
    {
        
GiveItemFromFile("lantern""lantern.ent");
 
        for(
int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i"tinderbox.ent");
    }
}

void EndOfDemo(string &in asParentstring &in asChildint alState)
{
    for(
int i=1;i<2;i++) SetEntityActive("Infected3_"+i,true);

This is the code
Please note that its a part of my code.

I've put the Callback func for the note OnPickup and added the Entity collide thing but it doesn't do anything at all.


RE: Pick Up note event - need this answered ASAP - Everlone - 11-14-2010

void Interact_Note_1(string &in asEntity)
{
your event
}

and in the editor you must be add a callbackfunction on the note named Interact_Note_1 (or whatever you will named)


RE: Pick Up note event - need this answered ASAP - Gamemakingdude - 11-14-2010

(11-14-2010, 10:16 AM)Everlone Wrote: void Interact_Note_1(string &in asEntity)
{
your event
}

and in the editor you must be add a callbackfunction on the note named Interact_Note_1 (or whatever you will named)

I do not understand?

[EDIT]

Never mind thanks Everlone.