Page 2 of 2

Re: Level controler

Posted: Fri Feb 05, 2016 11:49 pm
by Veleran
Thank you.The script shows how the language wants the variables to look,although am not sure yet what interactions i have in there.
I will replace the floor 1,2 ,3 with something,like cage up ,cage down,room 1 exit door open etc.

I will later help soon with the levelcontroller if i try Pawns like traps and items you can search,may interact with other trigger events.
I put the pic to show the buttons,1st that lowers the cage is at the pillar on the east wall,second button is also on ground floor north pillar and third button is above it,at the first floor.
I do not know what i may keep from the geometry but so far it is enough to run some basic interactions on them.
In fact the upper floor is just an optional narrow passage for few extra breakables and anything else i can come up with.
Image
img hosting

Re: Level controler

Posted: Fri May 06, 2016 7:45 am
by Veleran
I would like to add something that checks if a key is pressed (U) and if a trigger is active at the same time to activate a moving platform .

I do not think of using PlatformDistance(string PlatformName, string EntityName); because i want to search and activate the platform from a certain spot.

Re: Level controler

Posted: Sat May 07, 2016 8:02 pm
by Allanon
Use IsKeyDown() to check if a key is being pressed and GetEventState() to check if the trigger is active:

Code: Select all

if (IsKeyDown(0x13) = True)
{
     if (GetEventState(Trigger) = True))
     {
          // do something
     }
}

Re: Level controler

Posted: Thu Jul 21, 2016 7:20 pm
by Veleran
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);
	} ] 
}