dop2000's Recent Forum Activity

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

  • Yeah, there's a lot of code and without the project file it will be really difficult to help.

    I noticed that you assign a tag "Active spell" to the clicked spell. But do you clear the tag from the previously equipped spell?

  • In the exported game press F12 and check error messages in browser console. Make sure Steam client is running.

    If there is a problem with Steam integration, there will be an error immediately when you start the game. If something is wrong with the achievements, you should see an error message when you try to activate them.

    And another little thing: I’ve got two special fonts in my game that I’ve downloaded and installed on my windows and linux. How to automatically install them when someone download and install my game through steam without installing these fonts separately?

    You can't install fonts on user's PC for obvious reasons. You need to import the fonts into the project and then select these fonts for all text objects.

  • Add a temporary text object and this event:

    + Keyboard: On any key pressed
    -> Text: Set text to Keyboard.LastKeyCode & " " & Keyboard.TypedKey
    

    This will tell you if the key codes are correct.

    Maybe the problem is that your script only sends "on pressed" and "on released" events, and not "key is down" (which is required for continuous movement). Again, you can use debug events to check this.

  • Didn't you ask this question a few days ago?

    Use "AreaSprite On collision with Enemy" event - it will pick all enemies inside the area. If the area needs to deal damage over time, you can do something like this:

    Every 0.5 seconds
    AreaSprite Is overlapping Enemy : Enemy subtract 10 from HP
    
  • What I want is for each Sprite 2 that's attached to then have anchors to attach to other Sprite 2s, but only when attached to Sprite 1. I'm thinking heirarchy and having children of Sprite 1 be Sprite 2 might solve the problem of in which order, but when I press Space I also want the Sprite 2s to shoot out and remake-available the anchors once present.

    Can you draw a picture, showing sprites before attaching, after attaching, after shooting-out, and different combinations of them? How long can these chains get?

    If you need to re-use the anchor points, then don't destroy them. Instead use a instance variable, for example "occupied". When attaching a new sprite, pick nearest anchor with occupied=0, change it to 1. After detaching change it back to 0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is what happens when I add a blank tilemap, immediately resize it to 10x10 tiles, then draw some tiles on it.

    "tilemapData": {
    "width": 10,
    "height": 10,
    "max-width": 53,
    "max-height": 30,
    "data": "9x0,5,29x0,5,29x0,5,29x0,5,29x0,5,29x0,5,29x0,5,29x0,5,29x0,5,29x0,5,1310x0"}
    

    As you can see, Construct remembers the initial size and stores lots of zeros for tiles which are beyond the 10x10 area. (Here tile indices start with 1, and 0 is an empty tile. For example "29x0" means 29 empty tiles.)

    Of course, it's a negligible overhead - just a few extra bytes of data and perhaps an extra microsecond to parse them. But if you have lots of tilemaps in your game, it may be a good idea to create them with the correct size from the beginning:

    "tilemapData": {
    "width": 10, 
    "height": 10, 
    "max-width": 10, 
    "max-height": 10, 
    "data": "9x0,5,9x0,5,9x0,5,9x0,5,9x0,5,9x0,5,9x0,5,9x0,5,9x0,5,9x0,5"}
    
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