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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pick Up note event - need this answered ASAP
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#1
Pick Up note event - need this answered ASAP

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

Rep if like me or im helpful or you love my stories!
Stephanos house
11-14-2010, 03:02 AM
Find Reply
Akumasama Offline
Member

Posts: 122
Threads: 2
Joined: Nov 2010
Reputation: 0
#2
RE: Pick Up note event - need this answered ASAP

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
(This post was last modified: 11-14-2010, 03:25 AM by Akumasama.)
11-14-2010, 03:07 AM
Find Reply
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#3
RE: Pick Up note event - need this answered ASAP

(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: (Select All)
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.

Rep if like me or im helpful or you love my stories!
Stephanos house
11-14-2010, 05:26 AM
Find Reply
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#4
RE: Pick Up note event - need this answered ASAP

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)

[Image: 555233.jpg]
11-14-2010, 10:16 AM
Find Reply
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#5
RE: Pick Up note event - need this answered ASAP

(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.

Rep if like me or im helpful or you love my stories!
Stephanos house
(This post was last modified: 11-14-2010, 12:45 PM by Gamemakingdude.)
11-14-2010, 11:15 AM
Find Reply




Users browsing this thread: 1 Guest(s)