I could not make it work.How about using PlatformDistance to check if player is near the invisible platform that blocks passage to the secret
So,as Player stands near enough after you press the key (space is 46?) a text to be displayed ("you found something")
then SetPlatformTargetTime to move the blocking platform out of the way (and show anything hidden).
I wanted to add to the level controller a line to check if you press space and display message like "you found nothing" or "You search and find nothing".
So,when in some places you get a visual or text hint that there is something hidden there ,to do a quick search with the spacebar. whether player can animate or not.
I imagine more smooth and believable search would be to add two texts,
First "searching..." then a few seconds delay and then display a second text telling you found nothing.
I also tried to animate the player to show that he is searching (although i got no animation for that yet)
with a pawn in low level as when you press a key.
i could not make that work either.I got parse error message near AnimateEntity and i mention this also because i wanted to know if the AnimateEntity works for the player also or just pawns and other animating actors.
Code: Select all
{
Spawn[ ()
{
Console(true);
Gravity(false);
SetNoCollision();
LowLevel("PlayerExplores");
} ]
PlayerExplores[ ()
{
if (IsKeyDown("46") = True)
AnimateEntity("Punch", "Player", false);
} ]
}