dop2000's Recent Forum Activity

  • There are several ways to organize this.

    For example, if all players are instances of the same sprite or family, you can store control type in an instance variable. Then, in keyboard/gamepad events pick the player instance:

    Keyboard On Space pressed
    Players controlType="kbd" : Player simulate jump
    
    Gamepad 0 on A pressed
    Players controlType="gamepad1" : Player simulate jump
    
    Gamepad 1 on A pressed
    Players compare variable controlType="gamepad2" : Player simulate jump
    

    To optimize this code you can create functions or custom actions for each movement - PlayerMoveLeft, PlayerMoveRight, PlayerJump etc. Then call these functions/custom_actions from keyboard and controller events:

    Keyboard On Space pressed
    Players controlType="kbd" : Player Jump
    
    Gamepad 0 on A pressed 
    Players controlType="gamepad1" : Player Jump
    
    Gamepad 1 on A pressed 
    Players controlType="gamepad1" : Player Jump
    
    Player Custom Action Jump 
     Player simulate jump
     Player set "jump" animation
    
    
  • If you don't need to keep another permutation table in AdvancedRandom active, then there shouldn't be any conflicts. You can re-generate permutation tables as often as you like.

  • There are other options:

    You can use a While loop - generate a random frame number, check if there is a button already with this frame. And either repeat or stop the loop.

    Or put all numbers into an array, pick random index and then delete it.

    Or use a string variable with the list of frames - pick random token and delete it.

    But permutation table is easier than any of those.

  • You can also do this without the AdvancedRandom. Add 20 button instances with frames from 0 to 19. Pick the correct one. Pick 4 other random instances, destroy the rest.

  • Create an AdvancedRandom permutation table. For each button set frame to AdvancedRandom.Permutation(loopindex)

    If you need to exclude the correct frame from the table, use a variable instead of loopindex. And skip one entry in the table if it equals the correct frame.

    For Each Button
    .. If AdvancedRandom.Permutation(i)=correct : Add 1 to i
    
    .. Button set frame to AdvancedRandom.Permutation(i)
    .. Add 1 to i
    
  • Try JSON.Get(".nome")

    The "." period should always be used for relative paths.

  • I have the code, but it does nothing. Debugging reveals that when I click on the object, it says that the inspected item is destroyed when it's not destroyed. Which makes me think it's destroying and creating on the same frame.

    That's probably what happens.

    In addition to Debug Mode, use browser logging.

    Add "Browser Log" action to the event where items are created and destroyed. In preview press F12 and open console - you will see how often they are created/destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Save the selected character in a global variable. In the new layout - use the value in the variable to spawn the character object or set the right animation.

  • Jump-thru behavior is pretty buggy. Try making these platforms thicker. If it doesn't help, you might need to add some events that will check if the character is stuck inside the platform and temporarily disable the behavior to "un-stuck" it.

  • You need to store these messages somewhere - in and array, dictionary or JSON.

    Then you generate and display the list of messages from the array. If any message is deleted, you can simple re-generate the list.

    Here is a simple example of a scrollable list:

    howtoconstructdemos.com/scrolling-a-list-of-players-scores-images-etc-example-a-capx

  • Any idea how to release it on Play Store as I have heard that maximum size permitted on play store is 100 MB

    It should be 200 MB now, and that's download size:

    If your AAB is 150 MB, I imagine the download size will be even less.

    But you can reduce the size of exported game by compressing images with lossy compressor. I used pngquant:

    pngquant.org

  • Add a second condition to the event:

    System compare two values: Array.indexOf("cow")<0

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 248 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
  • x4
    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