dop2000's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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

  • I'm trying for days.

    You should've asked earlier!

    Two methods:

    1.

    On every tick
    LayoutAngle<180
     -> Set layout angle to min(layoutAngle+90*dt, 180)
    

    2. Add Tween behavior to any sprite.

    On start of layout
     -> Sprite: Tween "ang" value from 0 to 180 in 2 seconds
    
    Sprite: Is Tween "ang" playing
     -> System: Set layout angle to Sprite.Tween.Value("ang")
    

    With tween you can select cool easing effects.

  • If there's a tilemap, you can use Tilemap.snapX(player.x) and Tilemap.snapY(player.y) expressions.

    Or use these formulas:

    x = int(player.x/16)*16+8

    y = int(player.y/16)*16+8

  • Wow, you didn't make it easy.

    and replacing the current active scroll, moving that scroll back into the inventory.

    Where exactly is this code that should move the previous scroll back into the inventory? Perhaps it should work like this:

    1. Check if there's an item in the Active Slot. If true - re-add it to the inventory, then destroy the item in the Active Spell slot.

    2. Move the clicked item to the Active Spell slot.

    .

    But to be honest, I don't like that the item is essentially removed from the inventory when it goes to the active slot. What happens if you pick up another copy of the same scroll - should it go to the active spell slot, increasing its quantity, or to the main inventory? How do you swap items in the active slot when the inventory is full?

    It will be a lot easier if the item assigned to the active slot stayed in the inventory. Just use a global variable, say ActiveSpell="invisibility". On right-click find the invisibility spell in the inventory, reduce its quantity by 1. If none left, remove invisibility spell from the inventory, reset the ActiveSpell variable to "". This is how it's done in most rpg games.

  • Could you explain how to add different items to the inventory, how to open it, steps to reproduce the issue?

  • No errors when using dev tools and achievements not working in Steam, can't understand why :(

    There must be some messages in the console log. Double-check that the code that activates the achievement actually runs.

  • - What to do in case of error when using F12?

    Depends on the error.

    - How to import fonts in the project?

    Right-click on Fonts folder.

dop2000's avatar

dop2000

Member since 26 May, 2016

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