lionz's Forum Posts

  • With a loop when you press right instead of just adding 1, you add 1, then check if itemslot where itemslot.var = globalvar is empty, if so add 1 again. You will need an additional check where if slot returns to 1 after going beyond 6 but maybe you already have this with normal navigation, and also it will loop forever if it's full so you also need an extra condition for if empty itemslots.count = 0 then you can't run this logic.

  • Spritefont is for using a custom font from an image, either you need this or you don't...

  • I would do it like this since Coins is the important object - set the Price on all Coins objects, so Coins.Price. Then if you want to display this on a related SpriteFont you say 'for each SpriteFont, if Coins.Matcher = SpriteFont.Matcher, set SpriteFont text to Coins.Price'

    Also you can avoid most of the above and have a simple event 'SpriteFont set text to Coins.Price' IF you put the SpriteFont and Coins in a 'Container' then they are related without the matcher instance variable.

  • It only creates items when you pick them up so it won't create them again or run the function on the other layout, but if it's about visibility of those icons then make the layer called HUD a global layer and make sure HUD layer is in both layouts.

  • I don't think it's possible if you have solid set as an obstacle because they block themselves and can't all find a path right next to the player. I don't like to give the object doing pathfinding the solid behaviour.

  • What would you like them to do instead ?

  • Don't use trigger once, not required and probably it's fixed.

  • You could just keep the Gameplay related things in the Gameplay event sheet. If you must do it like this there is something called 'include event sheet', you can include your Functions sheet into Menu and Gameplay so it will read Functions all the time. You could also do it another way and taking your Functions sheet as a 'Main' one, then assign this to every layout and 'include' the Menu and Gameplay event sheets. Right-click on event sheet to include.

  • Should follow the properties of the first created instance which should have 'set angle' disabled

  • You run through the functions and end up with 'if EnemyBasicMelee' then do an attack. You could just use this as the only condition and scrap the other functions.

    Also one other thing to note you don't need to forward a UID anymore, you can use the 'copy picked' option in the function, if you tick this then it keeps the picked Enemies instance. Also I disagree about the 'messy' code, I would keep it all in one function when it's simple enough.

    edit :

    And to fix this original problem you need to send through the variable in the second function, so instead of Enemies.UID it is enemyUID the variable.

    And another thing I just noticed your timer in 2nd function also won't work well as it will not pick an Enemies instance, that needs a condition like pick where UID = enemyUID unless you use the copy picked method I mentioned above.

  • The middle function doesn't pick any Enemies instances and i'm not sure the need for it or what's happening in there. You need 3 functions to run an attack? It's a bit convoluted just put it in one function then nothing can go wrong.

  • You can use set size and reduce the height and width every X seconds, set the value for height and width to something like self.height-4 and self.width-4, adjust 4 to make it reduce faster.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the layout properties bar there is an option for event sheet

  • Based on what you're describing in the original post you need to have 'left is down' play animation and 'right is down' play animation. The event for is moving, play animation is not required.