dop2000's Recent Forum Activity

  • This is definitely a bug.

    I suggest you report it:

    bugs_f151

    But don't post your capx, it's impossible to understand what's going on there!

    Here is a very simple capx demonstrating the problem:

    https://www.dropbox.com/s/017qy6lc3alz9 ... .capx?dl=0

    Basically, when two objects are in a container, and one of them is a member of a family, when you use "create family" event, the second object from the container is created, but it's not "pickable" for a few seconds.

    And adding "wait 0" indeed fixes it, which is really weird as there are no actions after wait.

  • Obi554

    Here is a saved version:

    Why this approach over the native globals

  • I would try to arrange the events in groups and use lokal group variables. For me that is much more clearer and lokal variables are some times the better choice over instance or global variables.

    Since he needs to store variables for several ship instances, neither local nor global variables is a good choice here.

    Instance variables or a dictionary is a way to go.

    If I had to store about 100 parameters for each ship, I would probably use a dictionary ("Ship").

    Add an instance variable ID on the dictionary. Create several instances of Ship with IDs =1, 2, 3 etc.

    Then pick Ship dictionary by ID and set/get its keys.

    One big advantage of the dictionary is that you can loop through its keys. Which you can't do with instance variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check this link:

    There are a few good points why you shouldn't use many global variables in your games.

    You can use that Globals plugin, or any other "dummy" object to store instance variables, for example a small invisible sprite. As far as I know, there is no limit for a number of instance variables.

    Or instead of instance variables you can use a dictionary. Create a separate instance of the dictionary for each ship and store as many keys as you need.

  • It may be setting back to "Mirrored" in event 45.

    Try removing "Set mirrored" from event 45.

  • Here you go:

  • May I also suggest making a better English translation for future videos or hiring someone who can translate them into English.

    Even in that simple video it was difficult to understand you sometimes. If you are planning to release a paid Udemy course and teach more advanced stuff, you will need quality English translation.

  • Hi thanks, but that's not quite what I was aiming for. I did have it similar to this at one point, but it's the opposite to what I'm aiming for.

    The screen (the one that's spinning) should always have a straight selection box, while the actual sprite off-screen can have whatever angle selection as required.

    Don't ask me how, but I did it! I was throwing random sines and cosines into the formulas and BAM! it worked! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://www.dropbox.com/s/lmie9krwnz0kt ... .capx?dl=0

    Well, not random of course, it's based on this rule, but still I was quite surprised when I found the right combination or angles and expressions.

  • Yeah, polygon checks are slow, especially when there are thousands of them performed on every tick.

    But this is not a secret knowledge..

    And there are many situations where you need collision checks, and where it's impossible to replace them with simple events like "compare X/compare Y".

    Are all your optimization tips about decreasing the amount of collision checks?

  • Lots of ways to do this:

    You can place several instances of an invisible sprite named SpawnPoint on the layout and when you need to spawn a fruit you do

    System->Pick random instance of SpawnPoint

    SpawnPoint -> Spawn Fruit

    You can make a single Fruit sprite with multiple animations (apple, pear, orange etc.)

    When you spawn or create a new Fruit, set its animation to choose("apple", "pear", "orange") - this will set random animation.

    You can then get fruit name using Fruit.AnimationName expression.

    Or you can create different sprites for different fruits and add them all into Fruits family.

    When you create/spawn Fruits family, a random family member will be created.

    Also try searching this forum and Tutorials, there should be lots of examples of such games.

  • Or use Replace expression:

    Set text to replace(varLineOfDialog, "[name]", varCharacterName)

  • Wait 0 is not needed, and, in fact it may result in potion being spawned twice if another bullet hit the enemy in next tick.

    Object is not destroyed until the end of the tick, so even if you change the order of actions (destroy enemy -> Create "potion" at enemy.x,enemy.y) , it will still work.

dop2000's avatar

dop2000

Member since 26 May, 2016

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