Drag&Drop + Start_x = don't exist anymore?

0 favourites
  • 4 posts
From the Asset Store
Tap the ball, control it, avoid touching spikes and score higher!
  • Hi everyone.

    I see some tutorials on youtube to use the Drag&Drop behavior but it not works.

    My goal is to snap a sprite to another one. And if Drap in a wrong place, I want to return my sprite to his original position. In youtube videos, they use the "start_x" function. But I try to use it in Construct 3 and this function don't like to existe anymore... Someone know another function or technic to do this please.

    Youtube link to help you

    youtube.com/watch

    -- See at 4:23

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • start.x is an instance variable of the sprite, you can add instance variable called start.x on your sprite, then set variable of start.x to self.x on start of the layout or from sprite properties. So you can call the start.x function as well. Hope this answer your question !

    He also puts instance variables on his video. check at 1:11 to see how to add instance variables.

  • Just a little correction - you can't use dots in variable names. So your instance variable can be start_x or startX, but not start.x

  • Just a little correction - you can't use dots in variable names. So your instance variable can be start_x or startX, but not start.x

    Yes that ! my mistake.

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