dop2000's Recent Forum Activity

  • PlatformInfo isn't really a solution. I don't need to detect the platform. I need to know when "On Touch" is triggered - whether it was really a touch event or a mouse click.

    That official example is using Touch with mouse input disabled.

    Just use is overlapping with a dummy object.

    Not sure I understand how it would help. Say, when playing on Steam Deck, you can use the touchpad (mouse) or touch the screen. Or even connect an external mouse.

  • I'm trying to make a game that would work on PC with mouse and on mobile with touch, so I'm using both plugins. Touch plugin has "Use mouse input=YES", because I want it to handle most touch and left click events in the project.

    But I still need to be able to distinguish between left mouse click and touch - to update the UI, hints etc. What's the best way to do it?

    At the moment I have this:

    But I'm worried it may not work on some devices.

    Tagged:

  • ilanfl You need to use dt for opacity too, otherwise the object will disappear/appear almost instantly, especially at high framerates.

    If Player is moving: 
    .. Set TimeElapsed to 0
    .. Obj set opacity to self.opacity+dt*100
    
    Else 
    .. Add dt to TimeElapsed 
    
    If TimeElapsed>3 
    .. Obj set opacity to self.opacity-dt*50
    
    
  • I think citron2010 meant to ask if you are making a game or just an image? An image would be easier to create in any graphic editor.

    In Construct you can do this, if you need a clock with 60 segments:

    Repeat 60 times:
     Create Sprite
     Rotate Sprite (loopindex*6) degrees
    
  • That may be a coordinate from a different layer. Try using Touch.X(layer) expression.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • random(100) returns a random number from 0 to 100.

    random(100)<50 condition would mean 50% chance.

    random(100)<20 condition is 20% chance.

    random(100)<1 condition is 1% chance.

    By changing the number you can change the odds.

  • When using "While" loops I always add this condition to prevent infinite loops:

    loopindex<100000

    So even if you create an infinite loop by accident, at least it won't freeze.

  • If the task is not to spawn too close to the player, you can in first condition filter all spawn points by distance, then pick a random one among them:

    System pick Spawn by evaluate distance(Spawn.x, Spawn.y, player.x, player.y)>200

    System pick random Spawn

  • Everything is possible of course. You can pick all objects in the inventory, loop through inventory slots moving each object to a new slot.

  • Can be global, or it can be an instance variable on the button for example.

  • For example:

    Variable odds=50
    
    On button clicked 
    
    .. If random(100)<Odds : // success
    .. Else : // fail
    
    .. Subtract 10 from odds
    

    Every click will reduce the odds by 10%. Starts at 50%, and after 5 clicks will be zero.

  • You can move multi tile map squares at once but I want each one to count as a "turn."

    Do you want to allow moving multiple tiles at once? Then calculate the distance, divide by tile size and you get the number of turns. Add it to the variable.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 259 followers

Connect with dop2000

Trophy Case

  • 8-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
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies