dop2000's Forum Posts

  • I'm not sure if I understood your question, but if you are looking for a way to spawn the same sprite with different pre-defined animations and values, you can use templates.

    Put all these sprites on an unused layout, configure their instance variables and set animations. Give a template name to each instance. You can then specify template name in "Create object" and "Spawn object" action to create an object from a particular template.

  • There should be a file with the same name as your project, just run it on mac.

  • Run your game in Debug Mode (Shift+F4) and you should be able to see what happens with those objects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You mean different offsets in one tilemap? It's not possible. You can put multiple tilemap instances, each with a different offsets.

  • You can use "Dictionary For Every Key" event to go through all keys. Say, to check if the character is wearing any armor:

    Dictionary For Every Key
    find(Dictionary.CurrentKey, "armor")>=0
    Dictionary.CurrentValue>0
    
  • No need for Javascript. You can check tile ID using "Tilemap Compare tile at" condition. Say, if it's a ground tile - spawn an earth creature. If it's a water tile - spawn water creature.

    To convert between layout and tilemap coordinates use these expressions:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/tilemap

  • Use "System Is between values", because I think the angle may not always be exactly 90 degrees.

    Note, that this is an inverted condition (right-click, Invert)

  • It really depends on the game. Sometimes instance variables will be better, sometimes a dictionary, sometimes a combination of both.

    In terms of performance dictionaries are very fast and you won't notice any difference.

  • You can compare the reflection angle and stop the loop.

    anglediff(LaserTurret.LineOfSight.ReflectionAngle, Ray.angle) expression will give you the difference between two angles.

  • No worries, glad it was helpful!

  • Wow, then can even pull each other. Great solution as always!

  • Is KnightTurret in the same container with the Knight? If not, then the code that pins them will not work correctly.

    "Acquire target" means a single target - a particular goblin instance among all other goblins. So you need to pick that instance before acquiring! Like I said, it's up to you how to pick it (by visibility, distance, lowest HP etc.), but you need conditions to pick the goblin instance. Please read some tutorials about picking in Construct, it's very important to understand how it works.

    Another option is automatic targeting - use "Add object to target" action. Then turrets will automatically select the target in range. This target can be identified by UID. If you want the knight to move to it, pick the instance by UID first:

    Every 0.5 seconds
    For Each Knight
    Goblin pick by unique ID = KnightTurret.Turret.TargetUID
     -> Knight Move To Goblin
    
  • You could move them toward each other if the distance is greater than 300.

    That was my first idea too. But it won't work very well if there are obstacles. It's better to move objects by changing velocity values, then the 8direction behavior will handle things like collisions and sliding properly.