Saurygiel's Recent Forum Activity

  • Pathfinding only needs a start location and a destination to work... so yes this should be possible.

    What you need to do is pick a destination which is directly away from the danger and a distance proportional to how much danger the deer is feeling.

    So if your deer is at dx,dy and your wolf is at wx,wy then you want to pick a destination zx,zy as:

    closeness = distance(dx, dy, wx, wy)

    if closeness <= maximumVisionOfDeer

    howFarToRun = maximumFarToRun / closeness

    dangerAngle = angle(dx, dy, wx, wy)

    safeAngle = dangerAngle + 180

    zx = dx + cos(safeAngle) * howFarToRun

    zy = dy + sin(safeAngle) * howFarToRun

    endif

    Then you can pathfind from dx,dy to zx,zy.

    Note: maximumFarToRun is the maximum distance the deer will run if the wolf is right next to it (closeness = 1), if your wolf can get even closer than 1 (e.g. 0.1) then this won't work the same and you might want to limit the values into the equation.

    Note: if zx,zy is inside a tree, you either need a pathfinding algorithm that will go as close as it can (and not just fail), or you should jiggle the destination a bit with a random offset until it is not in a tree.

    There are tons of other things you could add, but this will work to get you started I think.

    This is very hard for me to understand, do you think a cap.x would be possible?

  • I'm currently in the works of a dream game of mine, but the AI will be the hardest aspect and I need some of your help for it.

    Q: Is there a way to make a certain object use the pathfinding behavior to create a path AWAY from said specified item? For example: A deer running away from a wolf, avoiding solid trees.

    I really need this, and if it isn't possible to do so with pathfinding, is there any other method? I'll take any other method I can get considering this outcome.

    A Contruct 2 cap.x would be very useful, but text is fine too!

    • Thanks in advance.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Update!: I re-uploaded the update for the 3rd / 4th time and it works now!

  • A few days ago I updated Pixel Carnage with Version 0.7.5 which added difficulty options to the 'Scientist' character.

    I just finished the 'Pathfinder' Character today for Version 0.8.0 and once it finished uploading I noticed that it was playing Version 0.7.4...

    When testing the game with the test button in Construct 2 everything ran fine, I even triple checked that everything worked and nothing was wrong.

    Is this simply a client-side error of the Scirra Arcade or something else? I will report back here if it magically starts working and using the correct update. Thank you for the help!

  • If you are simulating a shotgun spread fire, you don't need multiple image points. Just give the bullet a "bullet" behavior, than on created, adjust some of their angles to give the spread out formation. You could use the "random" code to give it slight variations.

    Thanks a lot rekjl!

  • Hello, I'm making a game called Pixel Carnage and I'm creating a shotgun character. One problem I'm running into is how to make the shotgun shoot multiple bullets in a spread while keeping the same image point.

    Also, if possible, could any of you kind people tell me how to randomize the spread? Or would that require more image points etc.?

    Thank you for helping, the best reply someone gives me will go towards the honorable mentions of my credits.

  • I couldn't find help anywhere else so I'm asking here. I added some new features to my game and tried updating it on kongregate (was already uploading there before i added the new features) and the files are there but nothing changed. It's still the same as the earlier version.

    Help?

  • So, I have a certain enemy that spawns twice every 6 seconds, but I don't know how to set the random spawning. For my previous swarming enemy, I made 4 spawn every 4 seconds, one on each of the 4 sides of the layout. I did random spawning for each of the 4 (random as in where on that side of the layout they spawn).

    Now, because I only have 2 enemies spawning every X amount of seconds, I want one of them to spawn on random areas on either the top & right side of the layout / the other to spawn on random areas on either the bottom & left side of the layout. They spawn outside of the layout (about 50 - 100 pixels from the edge) and the game is top-down survival shooter.

    So basically the outcome will be having 2 of these types of enemy spawning every X seconds, one of them on either the top or right side of the layout (and in a random area on it. For example : more to the left or to the right? More towards the bottom or the top?) and the same for the second except the second on either the bottom or left of the layout.

    Sorry for repeating myself a million times, it's hard to explain. Hoping someone can help me. Thanks!

  • It sounds like the collision bounds on your boss character are set incorrectly. Double click the boss object to open the Edit Image dialog and on the menu on the left you click on the bottom icon. It looks like a bunch of dots connected by lines. This will display the collision bounds of the boss.

    Thank you very much! I fixed it now and it works great .

  • So, in my game I have a large boss that comes and melee attacks you and it's sprite is pretty large, and whenever I try doing Sprite : On collision with Commando, it only works when the Commando collides with the middle of the large boss's sprite. The bullets also only collide in the area as well. Any help on why this is and any way to fix it?

    Thank you!

  • Thanks a lot for the feedback, but I've run into another similar problem. This time I have an enemy that spits acid at you but I can't seem to find a way to make them shoot independently at a constant rate. I've tried timers but I'm not sure if I did them right so now I'm using System : Every 1.0 seconds + Sprite : Is on screen and the action Sprite : spawn spit to make them fire. The problem is that they all shoot at the same time .

    Help? A contruct 2 example would be SO helpful. Thank you!

  • Hello, I'm making a top-down shooter and am trying to have the character shoot a fully automatic weapon instead of having to click for every shot. I want to be able to hold down left mouse button to shoot the weapon at a certain pace.

    I've tried : Event : Mouse : Left mouse is held down : Action : System : wait 0.2 seconds

    Action : 'Commando' : spawn object : bullet

    Unfortunately, this only created a delay for the time before the 'Commando' starts firing. It want the player to be able to hold down left-click and be able to shoot, say, 1 bullet per 0.2 seconds.

    Help?

Saurygiel's avatar

Saurygiel

Member since 27 Mar, 2015

None one is following Saurygiel yet!

Trophy Case

  • 9-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies