lionz's Recent Forum Activity

  • Think I got it working. Note I had to disable an event at line 199 not sure what that does right now but it was interfering with the swap. dropbox.com/scl/fi/5j1ivu7mujkfeur7kypkb/game_edited-3.c3p

  • When you click an item you can grab its details from the itemid ready in case the user tries to swap. If its a drag and drop scenario then you could check if dropping and overlapping slot is not equal to the same itemid then perform a swap as above.

  • Use pickedcount, where card.var=1 if card.pickedcount=3 then 3 are the same.

  • Temporarily store the slot id in a variable and also the details of the item you grabbed, in a separate array, then when the item is dropped onto an existing item, use the slot id of the slot where you are dropping and set all of that item's details to at stored id. Then for the item being placed use the dropped slot id to set the stored details.

    So for example, you picked up item at 6 and plan to drop it onto 2. Store in a variable '6'(itemid) and everything at 6,0 6,1 6,2 etc will be stored in a row of the new array. When the item is dropped onto slot 2, set var id(6),0 6,1 6,2 etc to the details of itemarray at dropped slot id(2),0 2,1 2,2 etc. Then set the dropped slot id(2),0 2,1 2,2 in item array to the corresponding values from the new array.

    Pick up item 6 - > store 6 in var and inv.at(6,y) in secondarray.at(0,y)

    Drop on item 2 - > set inv.at(6,y) to values inv.at(2,y) (swaps 2 to 6)

    set inv.at(2,y) to values secondarray.at(0,y) (swaps 6 to 2)

  • sounds like an ok approach. You would need to have the correct answer ready and then pick a sprite at random and set the answer to it with text or another var, and score instance var to 1. Then the remaining ones with score var default 0 you assign at random the incorrect answers.

  • I would contact them directly for this query construct.net/en/contact

  • The way you've done this is a nightmare for picking instances but also not great for performance as all animations are on the same object. The best way is to create separate objects altogether as you mentioned. Objects that use similar things can be grouped with Families, for example mother and son object could appear in 'NPCs' Family but are also separate objects.

  • When you create the green sprite it is not related to a particular enemy. You can add the green sprite to a 'Container' with an enemy, that means it is created with the enemy at the start (you don't need to create it) and also it is always related with the enemy in picking conditions.

    Then for the actual event if you say green sprite on collision with mine -> destroy green sprite. It would also destroy the enemy with it as they are in a Container. Note : your current condition pick with UID doesn't do anything.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Welcome! Not really a tutorial but check out the example game file with Construct called 'Pop Lab'.

  • Sorted it here, I made the type sword and shield fixed to each slot I don't know if that was the intention but I guessed so since they were named as such and had animations.

    dropbox.com/scl/fi/u130jr1uaqkytf661j21s/game_edited-2.c3p

  • Please post screens using x,y and also a screenshot of the recipes sheet.

  • Your inventory should be made up of slot objects that you can give IDs that match the row ID in the array. So if it is 9 slots across for example, 0-8 in the array account for the first row, then 9-17 in the array account for the second row. You don't need to move between any row of the visible inventory as the array rows (X) each refer to one slot. So the logic you have now, if 0-8 are all occupied it means the first visible row is full and it will then continue onto 9 and beyond which starts the second visible row.

    To expand on the slot object variable ID in case you were not already using that, each slot can have a variable ID that refers to their place in the array. So the first slot.ID=0 and the second one is slot.ID=1. Then for example if you were to show a description on hovering mouse over the slot it would be set text to array.at(slotID,1). The slotID refers to its row in the array.

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 79 followers

Trophy Case

  • 13-Year Club
  • 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
  • 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
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

26/44
How to earn trophies