dop2000's Recent Forum Activity

  • Here are some changes:

    There are 3 variables to control the spinning, you don't actually need any of them!

    Make sure to use delta-time (dt) when changing anything on every tick, like the animation speed.

    I don't understand what events 45-46 are supposed to do, so I can't tell you how to fix them.

  • Nope, no disadvantages!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure if I understand the question. Why do you need to invert these conditions?

    If you need combine two "on key pressed" triggers like this:

    On Down key pressed
    OR On Shift key pressed
    

    then this is possible. Create one trigger, right-click it and change it to an OR-block. After that you will be able to add another trigger.

  • You do not have permission to view this post

  • If you load the game on start of layout, but also want sometimes to restart the layout without loading, here is the easiest solution:

  • See the "Text editor" example above. "Read" action is asynchronous, you need to wait for "On file operation complete" trigger.

  • Find out what's using the most space. My guess would be music and sound files. If that's the case, try re-encoding them at a lower quality, for example, using mono instead of stereo.

    If you have a lot of graphics, try exporting with lossy compression. It’s not like JPEG, and it won’t ruin your pixel art. Chances are, you won’t even notice the difference.

    Another option is to export with PNG images and then compress them using Pngquant. Again, you likely won’t see any visual difference, but image sizes can be reduced by 30–50%.

  • How big is the project? Do you have enough free space on your hard drive?

    If you have multiple drives, make sure there are at least a few gigabytes free both on the drive you're trying to save to and on the system drive.

  • You can also use ternary operator. Say, to increase the number up to 10, then reset to 0:

    Set var to (var<10 ? var+1 : 0)

  • The easiest way to link three objects together is to use a container. That way, you won’t need the ID variables — picking one instance (like the hitbox) in events will automatically pick the other two objects in the same container.

    Another option is to use a hierarchy, with one object as the parent and the others as children. Then you can use "Pick parent" and "Pick children" conditions. Hierarchies also let you move all the objects as one unit.

    You can even combine both approaches: container+hierarchy for ultimate flexibility!

    .

    The way you organize your events is pretty inefficient. Running a For Each loop on every tick and nesting everything inside it (even triggers) will hurt performance, especially with many enemies. Triggers should generally not be placed inside other events.

    Never use "Trigger once" condition with objects that have multiple instances or inside loops - it only leads to bugs that are hard to debug.

    Finally, you need to tell the DEATH function which enemy instance to destroy, otherwise it may destroy the wrong enemy. Add a parameter EnemyUID, and pass enemy.UID in this parameter when calling the function.

    So the correct code should look like this:

    // Parent event
    Player on collision with Enemy
    Player is not dead yet
    
    ... // sub-events
    ... Player is immune -> Call function ENEMY_DEATH(Enemy.UID)
    ... Else -> kill the player
    
  • You don't need JS. The core logic can be done with like 5 events.

    I don't know why you chose that tutorial and not my example which is a lot simpler.

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