List with expressions

This forum is currently in read-only mode.
From the Asset Store
Build Social Apps, Chats and Advanced Lists using Firebase Realtime-Database
  • Hello everyone,

    Is there a list (or any other kind of resource) where I can find the different expressions that can be used in Construct? I've searched on the forum; google and sourcefourge, but didn't find anything yet..

    An example of an expression: Player[Platform].VectorX

    I'm looking for the expression that returns the horizontal speed of the player.

  • In the expression editor, double click those little icons at the bottom. It brings up all the expressions you can use. Click the tab for platform behavior and it will show you those for the behavior.

  • Awesome thanks! Didn't think to search in Construct itself..

  • Hi,

    is it Sprite[CustomMovement].XSpeed what you need?

  • Hi,

    is it Sprite[CustomMovement].XSpeed what you need?

    Well, I've tried that one but it didn't work. I don't have Custom Movement (just Platform Movement). And Construct doesn't allow me to use Sprite[Platform].XSpeed.

    I also couldn't find another option in the library. I've tried .VectorX and .Speed, but those didn't work either..

    Anyone got a suggestion?

    edit: I'm trying to output the horizontal speed of my main character on the screen by setting the text in the HUD. The vertical speed works ( "Vertical Speed: " & Player[Platform].VectorY )

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Add to your sprite the custom movement behavior.

    (click while on layout editor on your sprite and left "behaviors --> add")

    Then you can go to the event sheet editor, make a condition(like allways or whatever)

    and the new action "yoursprite --> custom movement behavior --> expressions".

    edit: oh ok you already edited your post^^ I was too late

  • So in order to read out the horizontal speed, I must add a custom movement behavior?

    (I'm pretty satisfied with the platform behavior and the additions I made and don't want to add unnecessary stuff)

    edit: I've added the custom movement behavior, but XSpeed returns 0. So this doesn't work either.

  • You are doing somthing wrong

    Sprite[Platform].VectorX works fine for me

    Are you sure you are using "set text" action under "Always" condition?

  • Here an example: http://www.mediafire.com/?xfsuzkmqnafxaxs

    You don't need to add the custom movement behavior. Sometimes

    it's just helpfull

  • I really don't get this, but Sprite[Platform].VectorX works now.. I've tried the exact same thing before (by typing it and by using the browser) and it only returned 0 or - then. Now it returns actual numbers..

    Thanks everyone for the help. I guess I should've restarted Construct to try again or something..

    edit: I know what the problem was. My text box wasn't big enough for the numbers to show.. I could either see a 0 or a - because the text box ended at that point.. Rookie mistake i'm sorry.

  • Thats ok, main thing is, it works now .

    If you have any questions, don't hesitate to ask.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)