lionz's Forum Posts

  • You can use 1 and 0 for true/false

  • Two things spring to mind, are they set to Custom and not Solids, and did you regenerate the obstacle map which you must do after adding obstacles.

  • That event looks correct for picking the instance that overlaps sensor 1 or 3, are you sure they're not all overlapping the sensor object?

  • I think no because the sprite object has one collision box. If it was one object but you need to click on different areas then you wouldn't be able to detect. You could overlap it with invisible sprites but in that case you may as well create them separately.

    You can put the group of sprites into a container and when you create one object it creates all related objects but I'm not sure if this is useful for a shop, you may as well create everything in the layout.

  • If you designed it that way then yes. Seems it would be easier to design it with one buy and sell button and you navigate between items. Depending on how you stored the items you could use one event for all items even with many buttons.

  • Not using the behaviour, yes you can do it with your own events as mentioned.

  • Enemy.count isn't visible so it must be in an event, let's see a screenshot of the events. Maybe you don't show or update it until 2 have been destroyed.

  • First event should be for each loot slot as you are creating the drag item for each slot. So the first event solves 1 and 2 right because it spawns the item. I didn't really understand the drag/drop bit, the player is dragging the object and why?

  • It's the Anchor behaviour on ToolBarButton, it doesn't like it. You can't force a position with Anchor while at the same time tell it to move.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Like I said kind of impossible to guess we would need the project. Of course after you punch the NPC that will keep the variables set, which I guess is what you are trying to do anyway. Is the player also the same object as the NPC? If this is the case then player will has some variables persisting that maybe should not be, or you talk about containers, what objects are in a container?

  • It's going to be impossible to guess, we'll need to see the project. If the persist behaviour is added to a random NPC that just exists in the level I'm not sure how it would affect the player object.

  • You could use global for simplicity or a local one if you really know what you're doing. Using variables will help you manipulate the array and have control then you should be able to think about what you need and apply those variables.

    The skipping sheets bit i'm not sure, do you have several arrays or are you loading them into one array randomly? You need access to the text and then just call it in the same way.

    Or character images again you could use a variable, set varChar using the same row but a different column like array.at(var,1). Then you set the portrait based on the current value of varChar, the actual text could match the name of the animation or something similar.

  • Get rid of the other 3 conditions except for the has LOS. Then using a variable for whether the laser has spawned, add a condition to that LOS, hasLaser=false. On the actions spawn the laser and set hasLaser to true. This will spawn the Laser once when the drone has sight of the player. For the other event you need drone does not have LOS of player, set hasLaser to false and destroy laser.

  • In the tokenat expression you would change array.at(0,2) to use a variable instead o the 2 so array.at(0,var). Then using a similar condition you have for = 'back', you have = 'next' and then change that new variable, maybe add 2 to it so it skips from 2 to 4. You also need to set chatposition back to 0.

    That would be for column skipping. If you want to change row then you need a variable for the X so array.at(var,2) and then change that variable to signal the row.

  • There's a lot to do here, what did you do so far? Look around the forums for previous posts about creating inventory using arrays.