EpicRaid's Forum Posts

  • OK, so I tried something new:

    This works, but only if there isn't the same car behind eachother on a lane.

    Example:

    PlayerCar

    Car1

    Car2

    Car3

    Car4

    Car5

    Works fine.

    PlayerCar

    Car2

    Car2

    Car3

    Car4

    Car5

    If the PlayerCar stops at the second example, the second 'Car2' in the row will drive through the other Car2.

    That's the problematic thing with the code I posted above.

    I tried to minimize the code and brought it down to one PlayerCar and one Cars sprite. But the result is the same; if the same instance is put or spawned behind eachother, the bottom Cars sprite will drive through the other and simply not 'listen' to stop for the same Cars sprite. It will stop for the PlayerCar however.

    Thanks.

  • Hello,

    I tried inserting an uploaded image in a post, but it's not working.

    Am I doing something wrong? I'm trying to use the 'img' tags the old fashion and in various ways.

    Uploading an image to a post from the forum also doesn't work? It just shows an ID.

    Thanks.

  • Try Construct 3

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

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

    I'm trying to make car traffic, but don't understand how to code something.

    I'm trying to make the cars 'interact' with eachother and the player car.

    See:

    The top pink car is the player car. The two cars below are 'CPU' cars. When I drive, the cars should too. But always maintain distance to the player, and to the other CPU cars.

    I've tried different things, but can't figure it out.

    See:

    The CPU cars are bullets and drive 50 speed automatically, except when they encounter another CPU or player car it should stop when anything in front of it is stopped too. The player car has car behavior.

    Also, the cars are all in one sprite, except the player car. So the appearance of the CPU cars are already randomly generated.

    Thanks.

    EDIT: How to I show the uploaded image to the forum?

  • I'm really sorry... but... the name should be "Shoot" and not "Shot" because "Shot" is past tense... Sorry!

    There's also a game on Steam called 'Pike and Shot', I guess he used 'Aim and Shot' because the name you suggest has already been taken/used.. a thousand times

  • Subscribe to Construct videos now

    Now THAT looks nice. How did you make the graphics? With which program?

    It looks like it was made in Unity, keep it up.

  • Hello.

    I've got one main project, where I am working on. Now, there's another project I created for testing.

    The test project runs just fine - this technique works as I want it to.

    However, after having copied the 'technique' to my main project, I noticed there is an unexpected result.

    This 'result' is that the bullets spawned by object 'Flak' don't head to the direction of the object B17. The bullet has a speed of 50. As soon as the object Flak is onscreen you can see it shoots to the top and slowly corrects to the direction of the B17.

    However.. when I set the speed of the Bullet fired by Flak (in my main project) higher to say, 200 speed then it will immediately fire to the center of the B17. When I set it to 100, it'll start by shooting to the right.

    And when I change the speed of the bullet down to 50 in the TEST project, it'll work just fine. Heck, I can set it to whatever I want and it will always head towards the center of the B17.

    I'm going nuts here. I've checked the imagepoints, I checked the pivot point directions, everything seems to be the same as in the test project. Well, except from a few additions like resizing etc. that I already tried disabling but still it wouldn't make any difference.

    Yet it doesn't work properly. What the hell is going on?

    So here's the code from the main project:

    And the test project:

    B17Flak.capx

    If anyone can figure this out..? I'd be really grateful!

    • R
  • Allright thanks, you meant removing the first line right? It's working without that line.

    Thanks again for helping me out!

  • Thanks blackhornet !

    Took me some time to adapt it to my own dimensions, but got it working in the end. Am I right that all sprites have to have the same height in order for this to work correctly?

    One thing though, I don't understand what the speed variable does. I mean, the bullet behavior is already there. Does it have to do with the 'every tick'? If I want the bullet speed to be 100, do I need to double the speed variable?

    Programming and logic aren't my best skills I guess.

    Thanks again.

    • R
  • Hi blackhornet,

    Thanks, well they are sprites at the moment so I am using that 'technique' to put the connecting sprite to follow after the other.

    I made the sprites so they can slide down in a loop (sprites have bullet). Now the loop works, it's just that those gaps appear.

    I initially put the trigger once there because otherwise the connecting sprite that is supposed to follow up will forever be placed at that Y position of 0, and never slide down. I'll check if it is still necessary now.

    Anyway, what did you mean by "Don't set them to 0, subtract your max value. IE: Field2 Subtract 1024"?

    How is the code supposed to look like? I don't understand what to change to what.

    Thanks!

    • R
  • roguecore

    I would personally still prefer a bit more elaborate instructions (with images). For example you could cover facts like being able to destroy spawn points or the fact about vibrations that attract enemies. But then again, I would understand you would leave that for the player to find out and let them experience it along the way.

  • Hello!

    I am using 4 reasonably large sprites (320x1024) and they are moving down vertically. Thought I put them down into chunks with the max supported sizes and all.

    Here's the code I use:

    Now, the problem is I get these white 1 high pixel gaps/lines between each sprite. So there's a gap and it's showing the white background.

    Anyone know what's causing this?

    Thanks!

  • Hi!

    You probably are familiar with the endless runner games, except when I take a look at the sample capx from Scirra, I notice that this game doesn't let you control your player. So it's using a set speed with a set obstacle speed.

    Now I'm wanting the player (car) to be able to drive left and right, finish a stage and then have another stage spawn after it.

    Problem is... I can't figure out how to adapt the endless runner sample nor am I able to get some of my ideas to work. Since the layout width isn't endless, I have to come up with something that will relocate the player back to a starting point when it reaches an end point:

    ------StartPoint---------------------------------EndPoint-------

    And I would set the sprite (ground/stage) to a new random frame so it will create a new stage. The car and ground both have physics. Problem with the relocate idea is that it didn't 'remember' the speed it had at the endpoint. Upon relocation it would simply start at 0 speed again, I could use a solution for that!

    Or if anyone has any other ideas to get this done efficiently. Basically the player can drive forwards and backwards. So I was thinking either I need to fix the relocation issue OR the ground would need to move in opposite direction when driving forwards or backwards. Now I tried and asked some stuff about that but couldn't get it to work without some weird occurences (like ground sprites miraculously falling from the sky at certain point).

    Anyway, I'd like to thank anyway who might be able to help.

    • R
  • Hi, Rudi,

    Thanks for taking the time to play and post. You've given me some very useful feedback I think you're totally right about the mouse cursor in the map screen. Even though any click takes you to the next level it feels weird if you've got a cursor, then suddenly have no cursor.

    Yes! You can destroy the spawns. Remember that every time you hit with a bullet it charges up your gun. So if you take a second to destroy the spawns your gun will power up faster and the flying enemies and everything else will become a lot easier.

    The flying martians are very sensitive to seismic vibrations. Any walking will disturb them, so if you need a break to recharge your shields you can stop walking and they will stop coming after a few seconds. This trick doesn't work in the boss area though because the drilling machine is constantly shaking the ground.

    Thanks again

    Also, the name "Children of Apollo" is because the colonists on Mars that you are sent to rescue are the generation of space explorers after the Apollo Moon missions.

    Hi roguecore,

    Ah yes I couldn't remember if there was a tutorial, if there isn't one, maybe consider adding a quick one? Or to fit the retro style, how about you display a booklet/small guide that comes with games, on the screen that you can flip through? You know, with page numbers, a header and then a simple drawing with a few lines of subtext, displaying the tips you just gave.

    Because I was kinda clueless as to what to do in the game (though I guess that fits the theme because 80's games were tough as hell) but you know, you gotta compete with present days games which are often intuitive and easy to understand.

    I guess I also didn't have much patience to try out things in the demo, I'm one of those folks that like to jump right into a game and play without reading too much and learn 'as you go'. Perhaps also make the booklet available ingame (somewhere you can always access it), or display it just before the game starts.

    But hey, this is just an idea, feel free to do something with it or leave it at that. Anyway, good luck with the game!

    • R
  • Thanks! I thought it was a weird bug or something. Was totally clueless, thanks!

  • Hi,

    I'm not sure if this is a bug or something, but when starting a new project, I add some background and name some layers. Then I want to add another layer with a background below the layers I already had. So what do I do, I add the background (this case tiled background) to the layer, and move this layer all the way to the bottom of all the layers. What happens is that the tiled background is displayed behind the white layout.

    I've had this many times and it's super annoying. It also shows up white when previewing the layout in browser. The tiled background was still there and you can select and move it but it's like it's gotten 'behind' the layout layer.

    I'm running the latest Beta, but this also happened many versions before.

    • R