EpicRaid's Forum Posts

  • Hiya,

    Does this piece of coding make sense?

    Basically, if B17 (player) drops bombs (space) while it is within the event 40's y coordinates, it should add 10 points to Score. That part works.

    But if you drop a bomb outside the y coordinates (event 41) it should subtract 10 points from Score. For some reason 'nothing' happens, the score just stays the same.

    Thanks in advance for any replies.

    Regards R

  • Kind of an 'old' post of mine being bumped, I dropped the concept at the time since I was way in over my head - and still am. Working on a much smaller and different game at the moment! Are you saying you're working on a similar type of game Gearworkdragon?

    • R
  • Thanks for your reply.

    I have still not found out why it doesn't work in my project.

    It was supposed to spawn on imagepoint 5 indeed, it did exist, it was an error of mine.

    I decided to take another approach and pin the Smoke to the B17 from the start, and make it invisible untill it needs to be visible. It looks less subtle ingame, but at least it works.

    Still wondering what the heck the problem is, it's supposed to work as you said.

  • Hiya,

    currently I have:

    I have trigger once otherwise it'll spawn infinite Fire and BomberSmokeBlack particles. Anyone know how to spawn it just that one time but not one time ever?

    Anyway, the problem is that both the Fire and BomberSmokeBlack particles always spawn on the origin point of the object B17. Even though I set it to imagepoints which are not center point at all.

    However, it does spawn the particles correctly when I set the B17 health to 50 or less initially.

    I managed to recreate the pin to imagepoint without using the plugin, before I started using the plugin, and I had the exact same result; it only spawns the two particles Fire and BomberSmokeBlack when B17 health is set to 50 or less initially.

    Thanks. - R

  • Thanks, blackhornet. Did the trick.

  • Thanks guys!

    What does 'loopindex' do exactly though? I want an object to spawn (drop) bombs, but have the bombs dropped shortly after each other.

    Now it seems like the bombs are dropped exactly 1 second after each other. I want to decrease that time, I tried changing loopindex+1 to loopindex+0.2 for example but that doesn't change anything. I'm confused.

    Thanks. - R

  • Hi all,

    searched the forums, did some testing but I might be overlooking something.

    I want to call a function a bunch of times in a row, I sense it's not the way to go, but I don't know any better at the moment.

    Instead of copy pasting with 'wait x seconds' between them, is it possible to have a function run an x amount of times in a row with waits between them?

    Thanks. Regards R

  • Hi chadorireborn,

    thanks so much. It's working perfectly now.

    Regards R

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I've been searching and fiddling but can't figure this one out.

    I have an object that has bullet behavior that moves to the right when created from a random Y position and fixed X position.

    I also have a player controlled object that can move freely with the arrow keys.

    I'd like the bullet to move towards the last position of the player when the bullet is created, however, not follow it. So basically the bullet would spawn and move in a straight line to the right and pass the player outside the window.

    Sorry if I'm overlooking something really simple. In my previous attempts the objects move towards Player.X but I'd like the bullet to pass the player by in a straight horizontal line.

    Thanks in advance for any replies.

  • Would like to know as well.

  • Thanks so much guys, it works perfectly now. And the solution was so easy.

    Regards

  • Hello there,

    I've been checking out some capx samples and did some reading on tutorials and forums but have not been able to fully understand it yet and adapt it to my specific case.

    So hence I'm asking it here on the forum.

    When the aircraft shoots bullets and hits the T72 5 times the T72 is destroyed. But currently it destroys ALL the tanks that are spawned every x seconds. I have a global variable 'T72health'.

    This is the bit I have and think needs change?

    I know I have to pick instances but I just don't understand how to implement it.

    Thanks for any help.

    Regards R

    I can post more bits if necessary.

  • Thanks man, got it to work using your sample.

    Thanks for your help!

    Regards - R

  • Hi Jomnitech,

    thanks man! That works well. I'm currently trying to figure out the formulas. My shadow image is 75x72 pixels and I'm not sure what the numbers in the formula mean or *do*. So my shadow is a bit skewed. Where did you get the numbers? 200, 40, and 500? And the 3 and 5?

    I'd like the shadow to move to the top more when moving the plane, but haven't figured out how to do it yet. I fiddled with the numbers but got unsatisfying results.

    Regards

  • Hey Jomnitech,

    exactly like that! Thanks.

    Only also have the height changed too when moving?

    So that it'll scale in width and height at the same time?

    And if possible, how do I make the shadow still 'follow' the plane when the plane moves around? So that I get that 'distance' effect.

    How do you know all this coding? What to use and where to put it? I'm still learning but formulas confuse me a bit. How'd you learn it?

    Thanks.