dop2000's Recent Forum Activity

  • Rex's Spline addon is pretty straightforward:

  • I posted a suggestion a few years ago for "Is project file exists" condition, but it was declined.

  • Instances on an inactive layout are not pre-created and can't be destroyed.

    When in runtime you need to create an instance of an object, C3 engine will search all layouts for this object. And, once found, will use it as a template. If the object exists on multiple layouts, the first found will be used.

    So my guess is that there is zero performance impact.

    There is another thing to consider though. When you create an object from an inactive layout, there may be a small lag while its images are loaded. (especially if it's a large sprite with lots of animations). Placing an object on the current layout and immediately destroying it allows to pre-load the textures into memory. So the next time you create an instance of it, it's created without a lag. However, you can use "System Preload images" actions to achieve the same result.

  • Why do you need all 8 directions? You can only detect left/right/up/down and the behavior will do the rest.

    Lefx X axis<deadzone : 8direction simulate pressing Left
    Lefx X axis>deadzone : 8direction simulate pressing Right
    Lefx Y axis<deadzone : 8direction simulate pressing Up
    Lefx Y axis>deadzone : 8direction simulate pressing Down
    

    Another option is to calculate the angle:

    Set a to angle(0,0, Gamepad.Axis(0,0), Gamepad.Axis(0,1))

    Then round it to the nearest 45 degrees:

    Set a round(((a+360)%360)/45)*45

    a will contain a number between 0 to 360 in 45 degree increments. For example a=135 means Down+Left.

  • Correct.

  • You will have to do this with events. When such slope is detected in front, change Player position directly, or apply VectorY+VectorX, or temporarily disable Platform behavior and move the character up the slope with MoveTo.

    Look for the examples of ladder implementation in platformer games, it should be pretty similar.

    Here is a simple example, but you can try other methods depending on your game.

  • "For each element", and then you can select: X, XY or XYZ.

    If you only need to search in one row or column of the array (say at Y=7), I suggest using System For loop.

    System For "x" from 0 to Array.width-1
    find(Array.at(loopindex,7), "chocolate")>=0
    
  • For a 2D array use "Array For each XY", or two nested "System For" loops.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instance variables belong to object instances. When you restart the layout, object instances are destroyed and created again. That's why the variables reset.

    You can use global variables to store values which should not reset. Or data objects - arrays, dictionaries, JSON.

    Another option is to set your object as Global. It will not be destroyed as you restart or go to another layout. But be very careful, make sure that you are not creating multiple duplicates of this global object with every restart. Use Debug Mode to check.

  • Are enemy and enemy_gun sprites in the same container? If not, then your events will not work correctly. Because like I said, you need to pick the right instance of enemy_gun, which belongs to each particular enemy. How do you link/attach guns to enemies? Using hierarchy, or pin, or some other method?

  • You can loop through all array elements and use find() expression.

    Array for each element
    find(Array.CurValue, "chocolate")>=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