dop2000's Recent Forum Activity

  • "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.

  • 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 
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to pick the gun instance which belongs to this particular enemy.

    There are different ways to do this, depending on how you build your game. You can use a container or a hierarchy, then the gun will be destroyed automatically when the enemy is destroyed.

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

    construct.net/en/blogs/construct-official-blog-1/lets-talk-scene-graph-1569

  • I found some strange routines expressed by the AI.

    I really don't recommend using it for Construct. As a test I asked it a few C3-related questions and the results were total nonsense (although seemingly convincing).

  • Just change the properties in the same event you spawn the object.

    -- Object Spawn Object

    -- Object Set Height 200

  • ChatGPT doesn't know Construct as well as other programming languages. It can only help with very basic questions. And will very often give wrong and confusing results.

    It can help with Javascript code, if it's not Construct-specific.

    Construct is intended for people with little or even zero programming experience. Study a few tutorials and built-in examples, and you could start making games in Construct in no time!

  • but in my exported NWjs game file, the locations are the same, being NWjs.UserFolder & "savefile.json"

    And you see the file actually created in that folder?

    It's hard to tell what can be wrong. Add "Browser Log" actions to both events to see which one is triggered. Export the game with DevTools enabled, press F12 and check messages in the console log.

  • Can you show your events and JSON string?

  • An invisible layer for the dialogue may not be such a bad idea. It's probably the easiest solution. Make sure to disable "interactive" in layer properties until you need it, to prevent clicking invisible buttons.

    Alternatively you can create this dialogue on an unused layout, add all objects to a hierarchy. And then when you need to show it - create the entire dialogue from the hierarchy.

dop2000's avatar

dop2000

Member since 26 May, 2016

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