Frictional Games Forum (read-only)

Full Version: Pick Up note event - need this answered ASAP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How could i make it when i pick up a note, an event happens?
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
(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.
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)
(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.