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 Help Function doesn't get called after interaction
KingCrimson Offline
Junior Member

Posts: 45
Threads: 14
Joined: Jul 2012
Reputation: 0
#1
Function doesn't get called after interaction

I want my player to get teleported when he uses an altar knife on the floor. But when i interact with it, nothing happens. I leave you my .hps file so you can find the error:

Quote:////////////////////////////
// Run when the map starts
void OnStart()
{
void sleep(string& dreams, string& PlayerStartArea_1, string& asStartSound, string& asEndSound;
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Thanks in advance

Current Projects:
DADDY - 10%
08-05-2012, 01:41 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#2
RE: Function doesn't get called after interaction

Your script is basically empty.
Have a look at the Frictional Games Wiki to get help about scripting.

[Image: 18694.png]
08-05-2012, 04:39 AM
Find
EXAWOLT Offline
Member

Posts: 113
Threads: 14
Joined: Apr 2012
Reputation: 3
#3
RE: Function doesn't get called after interaction

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "knife", "floor", "sleep", true);
}

void sleep(string &in asItem, string &in asEntity)
{
(write the scripts that you want to call here)
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

simply nuff said




(This post was last modified: 08-05-2012, 10:50 AM by EXAWOLT.)
08-05-2012, 10:49 AM
Find




Users browsing this thread: 1 Guest(s)