megatronx's Forum Posts

  • Try this:

    First make the event in the second image a sub event to "On collision with the bullet" event. Change Bot to Enemies. Your health Value should be Family Variable and not Instance Variable. You still will be able to set it for different types of instances the way you want it, at spawn, or in the editor for example. But if you're checking for collisions with enemies, you got to keep it this way.

    And for future reference, if you want to pick specific instance, what you do is: Pick Instance BOT by UID = Enemies.UiD ( If On Enemies Collision with an object for example, in your case)

    Hope that helps!

  • Give arrow turret behavior!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You just need to add condition that will either limit or reset the bar, or both.

    To limit it would go like this: If bar health < 100%, then add life

    to reset the bar, Make MaxHealth and Health instance variables and in event you would do something like this: if health > then varMaxHealth, set bar 100%, set varHealth to varMaxHealth

  • >

    > I understand where you coming from. I tell you about my pattern of working. Might help you organize things for now. Basically, I try to keep things simple. Have a look at this image.

    >

    I fully understand what you mean and think everyone that comment there code, find ways to do it so its easier to work and keep track of things, I do that my self as well.

    But in my opinion comments used in the way you do it, is only due to you not having the right tools available and therefore you do it that way, which is logic. But I think most people that uses functions, name them so from the name it self you know what it does. So normally you wouldn't need to comment a function call at all. But rather you would comment the function it self. So in my opinion it is just an area where C2 could help the users a bit better. And its not really something you would see the greatest importance of, if you were working on a small project, because they ofc are fairly easy to track.

    I agree. I work on big one too. However i would still comment due to comments being easier to read. And when I come back after some time to that particullar section is good to remind myself the logic i was following.

    But yeah, that would be useful to have that "go to function" option. However my priority right now is to push "Disable collisions only between two objects". Other wise got to write whole events group with custom collisions and hope that they will work under performance stress!

  • Yeah agree it could be useful, but already using a lot of comments. And in your case it would work. But when you have events where there might be 9-12 lines before a function call and maybe even several calls after each other which again call other functions. It start to take quite some time to track through the code. You would almost end up having more comments than code

    I understand where you coming from. I tell you about my pattern of working. Might help you organize things for now. Basically, I try to keep things simple. Have a look at this image.

    [attachment=0:2otxalc4][/attachment:2otxalc4]

  • You could just place a comment above the event where the function is!

    [attachment=0:bnmsjmy4][/attachment:bnmsjmy4]

  • 'Disable collision with': why not just add a condition that skips testing collisions with objects you don't want to test collisions for?

    This one is problematic, because I might want one type of instances to test collisions with let's say bullet, but not with the solid objects on the map, and both can't couple, at least from my experiments.

  • You've made your request. No point in arguing. If Ashley is going to do it, then it will certainly not happen now. Meanwhile you can try this. Use some free software to export single frames from gifs, and i'm sure there is a software that you can import those frames and export as tiles, and then import trough animation stripe.

  • You can import animations from tiles.

  • same of which object: sprite or arrow?

  • There is a tutorial how to make enemy ai. https://www.scirra.com/tutorials/40/bas ... and-arrays

    For flying enemies use 8 directions or custom movement behaviors.

    Are you doing this for mobile or pc? 20 enemies shouldn't be that bad on performance! For performance, just make them shoot less often, because I assume they're shooting on tick? ( can't open capx cause im on 163 )

    Then set it to every 0.5 sec for example. Also make sure that whatever is not necessary to be turned on, will be off if its not used.

  • Looks brilliant!

  • My engine overlay is only at 352 event atm, which is surprisingly low for what I've got in there, and I nest a lot! Probably will end up somewhere between 1000 - 2000 events.