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 to make a memo appear on item pickup?
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#1
How to make a memo appear on item pickup?

How do I make a memo appear (or memento or whatever it is called) after I pick up and read through a letter?

How do I make a monster appear after picking up an item such as a key?

Also: How can you make a sound like a monster growling without the monster appearing when you pick up an item?

Thank you!
(This post was last modified: 10-18-2011, 05:28 AM by MissMarilynn.)
10-18-2011, 05:08 AM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#2
RE: How to make a memo appear on item pickup?

Study this: http://wiki.frictionalgames.com/hpl2/amn..._functions

The function you're looking for would be:

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

string& asName would be the name of the object interacted.

string& asCallback would be the name of the function you want to call (Make a monster spawn, play a sound, etc.)

bool abRemoveOnInteraction is either true or false. It's asking if you want to remove the effect of the interaction on the object.

edit: http://www.youtube.com/watch?v=WfgFEG4TSCE

(This post was last modified: 10-18-2011, 05:44 AM by Russ Money.)
10-18-2011, 05:42 AM
Find
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#3
RE: How to make a memo appear on item pickup?

(10-18-2011, 05:42 AM)Russ Money Wrote: Study this: http://wiki.frictionalgames.com/hpl2/amn..._functions

The function you're looking for would be:

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

string& asName would be the name of the object interacted.

string& asCallback would be the name of the function you want to call (Make a monster spawn, play a sound, etc.)

bool abRemoveOnInteraction is either true or false. It's asking if you want to remove the effect of the interaction on the object.

edit: http://www.youtube.com/watch?v=WfgFEG4TSCE
Are you sure it isn't AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
10-20-2011, 07:12 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: How to make a memo appear on item pickup?

No. AddEntityCollide is when 2 things collide. Player or area. Picking up item is picking it up, not colliding with it Smile.

void SetEntityCallbackFunc(string& asName, string& asCallback);
   Calls a function when the player interacts with a certain entity.
  Callback syntax: void MyFunc(string &in asEntity, string &in type)
  Type depends on entity type and includes: “OnPickup”, “Break”, “OnIgnite”, etc

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 10-20-2011, 07:27 PM by Elven.)
10-20-2011, 07:27 PM
Find
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#5
RE: How to make a memo appear on item pickup?

(10-20-2011, 07:27 PM)Elven Wrote: No. AddEntityCollide is when 2 things collide. Player or area. Picking up item is picking it up, not colliding with it Smile.

void SetEntityCallbackFunc(string& asName, string& asCallback);
   Calls a function when the player interacts with a certain entity.
  Callback syntax: void MyFunc(string &in asEntity, string &in type)
  Type depends on entity type and includes: “OnPickup”, “Break”, “OnIgnite”, etc
*facepalm* I feel stupid Tongue
10-20-2011, 08:25 PM
Find




Users browsing this thread: 1 Guest(s)