EpicRaid's Recent Forum Activity

  • Something like this perhaps?

  • Yeah you need to make the tiled background twice as wide, if it goes from left to right or other way around.

    So if the tiled background moves left (with bullet behavior), and your layout viewport is 500 pixels wide, you make the tiled background 1000 pixels wide. Then you can set its X position back to 0 when its X position reaches -500.

    This example is for screen filling backgrounds, but you can make the tiled background smaller of course, you just need to figure out the coordinates together with the objects width.

  • I'm currently using the tween behavior for an arrow pointing at moving objects.

    When the player is near the moving object, the arrow moves smoothly to the moving object in say, 1 second.

    The problem is that when the tween is in motion, it doesn't 'update' the moving object's position X and Y so it will always end the tween too early and to an outdated position of the moving object.

    How can I solve this?

    Tagged:

  • That'd be awesome. Can't wait! Thanks in advance.

  • Thanks for your reply.

    If I wanted to change the code so that the cars only turn right, (so they circle a block, or possibly around four blocks) what would I need to change? I intend to use it for enemy cars, so they won't Wrap, and the enemy cars will drive around a block on the map.

    I also want to use the same code so that cars only go straight ahead (This one does use the Wrap behavior) and will give way to cars coming from the right. This code will be used for all other, regular traffic then.

    What would I need to change?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anyone?

    I tried adding and changing parts of the code in the link (you can still open the .capx in C3 ;)) but after hours of fiddling I gave up. I was hoping someone with more knowledge could help out!

  • Maybe it's trying to connect to (by default) an incognito window in Chrome. Otherwise, check the browser settings of Chrome, maybe it does clear the cookies/cache automatically.

  • Hey all!

    I found an 'old' car traffic example by R0J0hound;

    construct.net/out

    Which I'm really grateful for!

    But I noticed, as well as by reading an old topic of mine where the link was posted, that it wasn't completely finished.

    Main problem is that there is congestion at the junction, when too many cars want to go in different directions. Problem: They get stuck. They do move tiny bits, but through eachother. I'd love to see it solved, I'm sure many others would get great value from this.

    So what I was thinking is, if there are three or more cars entering the junction, and they are all waiting for eachother (and the code 'knows' this in advance) have a car take another turn, instead of the turn that would cause trouble between the cars at the junction.

    I couldn't figure out what lines to adapt/add and where, partly because I don't understand what everything 'does'.

    P.S. I posted this in C3 section because I used the code in a C3 project.

    Tagged:

  • OK, so if I insert a sprite, with the car facing right, and rotate it 90 degrees then the cone of view would turn 90 degrees along with it? What do you mean by tight though? That the events are programmed in a specific way?

  • I'm trying to create a traffic system where cars stop when they see another.

    So if you have a 4-way junction, and you use LoS, the car seems to only check it from one direction. In this case, using 360 cone is not an option.

    Is there a way to set which angle the cone of view must check? or an alternative to LoS? It seems to be 'default' to 0.

    So when you copy-paste the cars and set their angle to 0, 90, 180, and 270 for all traffic directions, some cars 'see' the other cars in time but others don't. I assume it has to do with the cone.

    Also, if the latter is solvable, is there a more simple way to get the cars moving again once they stop? I mean in the proper order of course.

    I thought this was easy to set up, but now it's giving me a headache, so to speak.

  • Thanks, I think it works though as I put the objects seperately in the container. And they are linked. I replaced and cut down a lot of lines of code, but still a lot of quirky things are happening. Not sure how to fix them. But on the upside, I learned a lot of new stuff like how to code more efficiently. I can't imagine ever doing that treadmill work again which I did a week ago, lol, so inefficient and time consuming.

    P.S. Maybe a bit of a personal question, you mentioned you are currently not subbed, are you not (interested in) making games anymore? Or are you perhaps using another editor, like Unity etc.? Sometimes I take a long break myself, but I always seem to come back, when thing work out it can be a lot of fun to make games.

  • Hey, thanks.

    I significantly reduced the number of variables.

    I believe it is also possible to 'link' the objects if they are in the same container, correct?

EpicRaid's avatar

EpicRaid

Member since 13 Feb, 2015

Twitter
EpicRaid has 17 followers

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies