dop2000's Recent Forum Activity

  • No, that's not correct.. See this demo:

    dropbox.com/s/gk6xktdvn0p9cn0/SwipeControls.c3p

  • Touch of course!

    This is swipe to the right:

    System Compare two values: Touch.SpeedAt(0)>200
    System Touch.AngleAt(0) Is Between Angles -45 and 45
    
  • You can't prevent the clicks from coming through. But you can add a filter to your events. For example, if you deactivate layers by making them invisible, you can add this condition to all "On clicked" events:

    Is Layer Object.layerNumber visible

  • Start small - with checking the speed and angle only. Maybe it will be enough for your purpose.

  • Stylesheet? Did you mean event sheet?

    You can use "System Compare two values" condition for Touch.SpeedAt()

    and "System Is Between Angles" or "System Is Within Angle" to compare Touch.AngleAt()

    Note though, that if you want to detect swipe gestures properly, these are not enough. You also need to check that the finger is not changing direction, compare time etc.

  • pirx Using "On Created" is a clever idea, as it's triggered immediately. Anyway, at the moment I am quite happy with the current system. If in the future (very distant I hope), old functions stop working, I'm sure I'll find some replacement.

  • Ashley, and what will trigger those layout-specific functions?

    There is about a dozen different ways players can interact with items in the game. Besides, every scene is heavily scripted. All of this is currently handled by the MAIN event sheet (200+ events). I can't move this code to layout event sheets, this will not make any sense.

    .

    Anyway, I didn't mean to hijack this thread, sorry :)

    I am not trying to say that the old functions are better, only that in some cases they are more convenient.

  • Another approach would be to have unique functions on every layout

    This is not possible in my project. Like I said, all core mechanics is in the MAIN event sheet - it performs a bunch of different checks, gestures recognition, modifies instance variables, enables/disables behaviors etc. And only then it calls a custom function from layout event sheet for some finishing touches.

    The only way for me to use new functions here is to call them by string name from a script, as chadorireborn suggested. And I will still end up with a thousand function names in the list..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you want the camera to follow the player smoothly, the most common way to do this is with lerp:

    Camera set x to lerp(self.x, player.x, dt)

    If you want to move the camera only when needed (for example, when player walks into another room), the easiest solution would be using MoveTo behavior.

  • C3 has Drawing Canvas object. Unfortunately, there are no other alternatives.

  • You start animations in some other events, you can run your code there, or call a function. For frame changes use "On frame changed" event, it's triggered only once for every frame per each object instance.

    I also use this little trick, where I define an image point on one frame in a long animation, to mark it as a "key" frame:

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies