dop2000's Recent Forum Activity

  • Text object or TextBox object? Could be anything, you need to post your project file or at least a screenshot of your events.

  • Possibly, but it uses testOverlapSolid method for "Platform Is by wall" condition. So if you need to check if character is touching the ceiling, it will be the same method.

  • You need to include event sheets:

    scirra.com/manual/82/includes

  • I guess not many people need this condition.

    And no, when checking for walls Platform behavior doesn't use raycast, at least not in C2. It moves the character 2px to the left/right and checks if it's overlapping a solid.

    It's easy to modify Platform behavior to include check for ceiling condition, but Scirra doesn't approve this. So I suggest using "Overlapping at offset", because it's basically the same.

  • This doesn't make sense. "Is on screen" works fast, I tested it with 10000 objects and it didn't make any noticeable difference in performance. Definitely shouldn't matter for 50 objects.

    In your case you don't really need this check, because you are only changing a bunch of variables. It's useful when you have CPU-intensive behaviors applied on objects, like Platform or Physics. Then you can disable these behaviors when objects are off-screen and improve performance.

    I don't know why your code runs faster with this condition disabled. I'm guessing that off-screen object instances have empty values in these variables (direction, animation, lastX, lastY) and some other events don't work effectively with them.

  • Here is my version:

    dropbox.com/s/3kjdpsn1nizae56/PlatformerWithShadow.capx

    Note that the shadow has Source Atop blend mode and should be on the same layer with platforms.

  • You can simply check for "Overlapping at offset":

    Character Is Overlapping SolidFamily at offset X=0, Y=-2

  • I think this can be done a bit easier, with a single string variable.

    On each key press add this key to the end of the string, and check if the last characters in the string are "SDB". If no keys pressed for 1 second - reset the string to "".

    Here is how I added Doom cheat codes in my game:

  • On collision with ground you can check the bullet speed (to know if the ship landed or crashed), then disable Bullet behavior.

  • You don't need physics, this can easily be done with Bullet behavior.

    On collision with the ground check rocket bullet speed and if it's small enough, then it landed successfully.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • brunopalermo is right, if you simply need to set different values for two variables, event groups is a huge overkill.

    If you don't like his solution, just create one variable Difficulty and a function SetDifficulty:

    Function SetDifficulty
    	if Difficulty=1 : set life=50, lifeMax=50
    	else if Difficulty=2 : set life=100, lifeMax=100
    	else if Difficulty=3 : set life=200, lifeMax=200
    

    When player chooses game difficulty, set the variable, write it to local storage and call this function.

    On start of layout read this variable from local storage and call the function:

    On start of layout
    	Local storage get "difficulty"
    	System wait for previous action
    	set Difficulty=max(1, LocalStorage.ItemValue)
    	Call SetDifficulty()
    
  • You can add NoSave behavior to things you don't want to save.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 260 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