The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SetEntityPlayerInteractCallback!?!?!?
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#1
SetEntityPlayerInteractCallback!?!?!?

So I have been trying to make sort of a dramatic moment in my custom story, and It is not working. So basically there is a knife on the floor and you have to find it all drugged. When you pick it up a bunch of stuff happens.
Here is the script:



SetEntityPlayerInteractCallback("Knife_1", "Murder", true);
}

void Murder(string &in asParent, string &in asChild, int alState)
{
StopMusic(1, 0);
FadeIn(1);
AddTimer("Timer2", 4, "Into2");
GetPlayerSpeed();
SetPlayerJumpDisabled(false);
SetPlayerMoveSpeedMul(0)
}

void Into2(string &in asTimer)
{
FadeOut(1);
AddTimer("Timer3", 2, "Sounds1");
}

void Sounds1(string &in asTimer)
{
PlaySoundAtEntity("", "24_cut.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
AddTimer("Timer4", 27, "Neworld1");
}

void Neworld1(string &in asTimer)
{
ChangeMap("02.map", "PlayerStartArea_1", "", "");
}


I have the OnStart(), OnEnter(), OnLeave()
Have any questions I will be happy to answer them.



EDIT:
In the Level Editor, I named the knife, "Knife_1"
I also went into the .lang and put:



<Entry Name="ItemDesc_knife_1">Knife to cut.</Entry>
<Entry Name="ItemName_knife_1">Knife</Entry>

Special Custom Story for 2 special people!

[Image: LWFcAl]


(This post was last modified: 07-02-2012, 02:52 PM by Jagsrs28.)
07-02-2012, 02:47 PM
Find


Messages In This Thread
SetEntityPlayerInteractCallback!?!?!? - by Jagsrs28 - 07-02-2012, 02:47 PM



Users browsing this thread: 1 Guest(s)