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
Script for after you read something?
Gladoshatesyou Offline
Junior Member

Posts: 20
Threads: 5
Joined: Apr 2014
Reputation: 0
#1
Script for after you read something?

Hello. I want to make a script for after you read a note, you look at an object behind you, and then the game ends. I have no idea how to start or do this, Help maybe?
04-26-2014, 09:35 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Script for after you read something?

void PickNote(string &in asEntity, string &in asType)
{
    //Stuff to happen
}

If you want the player to look at something use StartPlayerLookAt.

Derp.
(This post was last modified: 04-26-2014, 09:46 PM by Neelke.)
04-26-2014, 09:46 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: Script for after you read something?

This function is also needed.

PHP Code: (Select All)
void SetEntityCallbackFunc(stringasNamestringasCallback); 

Spoiler below!
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

Use in "void OnStart()" or "void OnEnter"

This page is very useful, ya know.
04-26-2014, 11:32 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Script for after you read something?

Or add PickNote into youe leveleditor -> inside the note's entitie -> on PlayerInteractCallback add PickNote.
Then the void SetEntityCallbackFunc(string& asName, string& asCallback); is NOT nessesary
(This post was last modified: 04-27-2014, 05:14 PM by DnALANGE.)
04-27-2014, 05:06 PM
Find




Users browsing this thread: 1 Guest(s)