lionz's Forum Posts

  • Well random(1,12) is going to pick the same number sometimes, so you want it to spawn only once per imagepoint? My approach for this would always be to use an array with all relevant values pushed onto X then pick something from 0 to array.width. You then delete that X from the array so it can't be picked again.

    This could also work if something was destroyed on an imagepoint, you could add the number back into the array so it's selectable again if your game requires this.

    Also watch out with random(1,12) as that picks decimals so you probably want to use floor(random to get a whole number.

  • You could calculate the distance between the two so distance(player.x,player.y,object.x,object.y) to start with and the smaller the value the more points they get.

  • Hmm the logic seems ok. Maybe the object doesn't have a collision box? It's guesswork without the original file.

  • Add timer behaviour to player object.

    Have a global variable for shuriken ammo that starts at 5 and reduces as you use them. For shuriken reload you can say if ammo less than 5, start "timer" for 3 seconds, on "timer" completed add 1 to shuriken ammo. So if shurikens are not full it will keep adding more ammo until max is reached.

    For shuriken fire have a global bool variable that is set to true by default, which means you can fire a shuriken. You can say on shuriken fired (button pressed), start "timer" for 2 seconds, and set bool to false. Then say on "timer" completed, set bool to true. This locks out firing of shuriken for 2 seconds.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You have a global variable for attack damage and when you pick up a soul you add 1 to the same global variable. So it could start as 3, when you pick up an object it becomes 4.

  • It's your events we need to see if it's not doing what you expect.

  • Your current logic will create the flame at image point 0 on the plane, I guess that's still in the centre? If you created other image points then the simplest way is 'flame set position to another object' where you can select a different image point.

  • Ya it's just getting a little confused because it's all happening in the same tick. If you pull the car has defect checks into a function, and after you've created the parts add a small wait or timer before calling the function then it's fine.

  • I did some investigation. It's because you don't update HP_Max until the enemy dies once. The initial HP_Max is 0 so your calculation for starting animation frame always ends up as 0.

  • I think the array is possible but if you are going for a game as in depth as mewnbase it could create problems. Looks like you were on the right track with it though :) but yes objects are a bit easier.

  • Ya this is why I mentioned on the mewnbase post that putting the whole game into an array could become pretty complex, it's possible though. Also have you thought of using letters or words instead of numbers in the array? Might be easier to see things but of course you know what the numbers refer to so maybe it's fine.

    Depending on how the power works you could run something like, when you right click to remove a connecting tile, get its X and run everything across that x-1 looking for green tiles and set them to red. Then also go for x+1 until you stop finding a green tile and set them to red as you go. But then again I don't know how the power sources work really, if you remove a middle one but it can still be powered from the right by another generator then that won't work as they would remain green. You'll have to come up with something that you want in relation to the proper game design.

  • What didn't work? I opened your file and added stop animation under disable platform and it's fixed, because the problem is with the animation playing.

  • If you can't share the file you'll have to do some debugging yourself. Increase the time from 5 seconds for testing. Does the global variable increase as expected? Are the car parts created using that value for their assigned variable?

  • Hard to give any input on this without some context, only you know what the game is really doing. What's the generator? What do the 3 different symbols mean and do? What is 'disconnecting' in this game and where is the problem?