dop2000's Recent Forum Activity

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

  • Turret behavior is rotating the knight.

    Also, with multiple goblins you need to pick a goblin instance first. For example, the nearest goblin instance, or the instance with the lowest HP. Once the correct goblin instance is picked, use "acquire target" action in the Turret behavior to start firing at it..

    Alternatively, allow the Turret to automatically pick its target. And then move the knight to that target. Use Knight.Turret.TargetUID to identify the target goblin by its UID.

  • You will need to disable automatic targeting and use "Acquire target" action instead. For example:

    for each idle turret -> pick enemy turrets in range -> pick nearest of them -> acquire it as a target.

  • You can ask chatgpt all Javascript-related questions, it's pretty good.

  • getAllAnimations() is an array. Here are the names of the first 2 animations:

    runtime.objects.Cannon.getAllAnimations()[0].name

    runtime.objects.Cannon.getAllAnimations()[1].name

  • It's actually officially supported in the API now:

    runtime.objects.Sprite.getAllAnimations()

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/sprite

  • I would then need to add logic that would somehow move the spell already in the active box back to the inventory.

    But you don't need to move it back, because the spell should not have been removed from the inventory in the first place!

    When you assign some scroll/potion to the active slot, the inventory should not change. The item stays where it is. Only the global variable changes, and an image of the scroll appears in the active slot - you can even use a different sprite to make it less confusing.

    .

    That youtube tutorial you found isn't very good.. Usually an inventory system is based on an array or JSON object. All collected items and their quantities are stored in the array. When "I" is pressed, the inventory screen is dynamically generated from the array data.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can pay every year.

    But no, it will not be possible to permanently purchase it, because it's a subscription model.

  • Have you tried simply copying this line (Ctrl+C) and pasting it onto the event sheet (Ctrl+V)?

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"every-tick","objectClass":"System"},{"id":"evaluate-expression","objectClass":"System","parameters":{"value":"LayoutAngle<180"}}],"actions":[{"id":"set-layout-angle","objectClass":"System","parameters":{"angle":"min(layoutAngle+90*dt, 180)"}}]}]}
    

    It should add the event. Then you will be able to study it.

    Also I suggest starting with some tutorials, looks like you need to learn the basics of programming in C3.

  • "Every tick" is a System event, you add it on the event sheet.

    Try just copying+pasting this code to your event sheet:

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"every-tick","objectClass":"System"},{"id":"evaluate-expression","objectClass":"System","parameters":{"value":"LayoutAngle<180"}}],"actions":[{"id":"set-layout-angle","objectClass":"System","parameters":{"angle":"min(layoutAngle+90*dt, 180)"}}]}]}
    
    

    I don't need to rotate sprite.

    It will rotate the layout, not a sprite. I suggest trying the second method with Tween behavior.

dop2000's avatar

dop2000

Member since 26 May, 2016

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