EpicRaid's Forum Posts

  • You might have overlooked it.. but there is a condition that does that, two actually, 'Is overlapping another object' and 'Is overlapping at offset'. Perhaps you're trying to test overlap to something other than a sprite object?

    So.. just go Add event > select a sprite object > is overlapping another object > choose the sprite to compare overlap > add actions.

    • R
  • Well, looks like I managed to get what I want with a little help from this tutorial:

    https://www.scirra.com/tutorials/1350/understanding-rotation-and-angles

    And how I got it:

    It works nicely.

  • Hello,

    perhaps a little bit of a noobish question, is rotate towards angle supposed to rotate smoothly, rather than instantly?

    I want my spawned missile to rotate 90 degrees counter clockwise (missile default angle is 0) smoothly. I thought that 'rotate towards angle' did that but I'm not sure.

    Or how would I go about doing this?

    Thanks.

    • R
  • 99Instances2Go You're a champ!

    That works perfectly.

  • 99Instances2Go Wow, that simple? Amazing!

    I'm going to implement it right away.

  • Oops, didn't refresh.

    Let me look.

  • Hello,

    thanks for your reply!

    Yes that does look a lot more simple than what I was trying to do. Your sample .capx works nicely.

    Hey, I own a Construct2 license so I can use families. I did try LOS once, but I had some issues with the cone of view, and it didn't work out for me.

    Since I want the cone of view to 'detect' in a 'straight line', I set the cone of view to 1 or 5 for example. Otherwise it would detect a vehicle above itself or below and I didn't want that. However it only worked for me when I set it to 360.

    Do you think it can still be possible to use LOS then? LOS is something I think I can grasp. Of course, I can use your sample above, but I'm curious as to what I did wrong with the LOS.

    Thanks again.

    • R
  • Ok,

    so I *think* I'm grasping this.

    This is just a portion. I made the same group for BRDMScout, which speed is 35.

    The BMP2 will slow down and adjust to T72 speed.

    However, the BRDMScout adjusts to BMP2 original speed (27) so it's still overlapping the BMP2. How do I make it adjust to the 'new' speed of the BMP2?

    I tried doing something with (local) variables but of course that only works if there are no copies of the same object on screen.

    Any ideas?

  • Try Construct 3

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

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

    thanks, I tried downloading but my browser (Firefox) says it contains a virus, lol, so I can't download it?

  • Hello all,

    Well, I'm wanting to be able to "slide" the object left or right -> dismiss object. On click once object will rotate. Slide up it will go up. I got it made so the object can be "slide" up but I could only choose horizontal or vertical or both.

    Hopefully I made it a bit more clear.

  • Hello wizdigitech.

    Thanks for replying, I tried that once but didn't get the desired results. How would one program this? One sample will do.

    Thanks.

    P.S. There are vehicles which travel at different speeds. For example you could have a row of vehicles where the front one travels at 20, the second 30 and the third 50. Will overlap at offset work for that?

    -R

  • Hi Jeffige,

    thanks for your reply.

    So I delved into adding more conditions but I'm a little confused.

    For example;

    Tank1 drives at a speed of 20

    Vehicle1 drives at a speed of 27

    Vehicle2 drives at a speed of 35

    I'm confused as I'm not sure how it will unfold. I can't really grasp what conditions I need to add and how many?

    Perhaps you could post a small sample code?

    Thanks.

  • Hi!

    Currently I got:

    Tank2 is overlapping Tank1 > set Tank2 bullet speed to 20

    <invert>Tank2 is overlapping Tank1 > set Tank2 bullet speed to 27

    This actually works for me, but not for the other vehicles. These other vehicles are exactly the same way programmed:

    Vehicle2 is overlapping Tank1 > set Vehicle2 bullet speed to 20

    <invert>Vehicle2 is overlapping Tank1 > set Vehicle2 bullet speed to 35

    I've no clue what's wrong.

    I also tried adding the solid behavior to all vehicles as a workaround but that didn't do anything, vehicles just kept overlapping.

    Basically, the vehicles and tanks all spawn on different y positions but I don't want them to overlap when one is going faster than the other.

    I did try detecting collision. However you cannot invert collision. I just want the fastest vehicle lagging behind a slower one, to resume its speed once the slower one is destroyed.

    Does anyone have any ideas?

    Thanks in advance.

    Regards

    -R

  • Hello all.

    Although I'd like nothing more but figure things out myself when Constructing, now and then I need some help, usually math and logic thingies involved.

    I'm amazed by the support given here on this forum. It's truly great.

    But seriously, how do you guys know all this math stuff, let alone kow how to figure out what you're writing? Now math is my weakest point probably. Or am I that noobish, haha. I see things coming by like 'floor' and 'cos' or 'dt' how do you guys know about this stuff?

    Do you perhaps have previous programming knowledge? That you studied (by yourself or in college)?

    Kinda jealous of all that knowledge. I'm more graphics oriented, but I just love to be able to be good at both programming and graphics.

    What did you find a good way to improve your programming efficiency? Tutorials? And what about math stuff? It's been a long while since I finished high school where I learned most of the (forgotten) math.

    Anyway, I'm lovin' Constuct 2. I'm learning new stuff every day. And this community is great!

    • R
  • Hi!

    Thanks, that did the trick. I now have:

    Every tick - Set value of variable 'Accuracy' to (100/ShotsFired)*ShotsHit[/code:7m75tmpo]
    
    That should be it right?
    
    Thanks again for your help!
    
    [ul]
    	[li]R[/li]
    [/ul]