CurioJoe's Recent Forum Activity

  • In beat em up games, when a player is behind something, enemy, trash can, etc, It's obvious.

    How do I make it obvious that my character is behind something? I'm making a beat em up game.

  • Can u show a screensplash of your "code"?

    I have a little trouble doing that but I can try my best to explain: Every tick that object A has object B in it's sight,

    Event C should play, but event C never happens.

    Event C is that a variable of AI0, changes to AI2. This engages the target to be destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I put line of sight on an enemy so it will attack on sight of the player, Didn't go as planned, it doesn't do anything instead.

    How do I fix this?

  • How do I get an enemy to come to the player/ attack the player on sight or when it gets close?

  • CurioJoe

    Ok. It's a different kind of game altogether from what I was expecting, but I will try to give my initial thoughts on it.

    Create sensor objects (which will be invisible) and place them in the intersections. You can make 4 different sensor objects for 4 directions.

    For example:

    enemy IS overlapping sensor_up

    enemy IS overlapping sensor_down

    enemy NOT overlapping sensor_left

    enemy NOT overlapping sensor_right

    For Each: enemy

    -> stop moving (use a variable to control AI)

    enemy IS overlapping sensor_up

    enemy NOT overlapping sensor_down

    enemy NOT overlapping sensor_left

    enemy NOT overlapping sensor_right

    For Each: enemy

    -> move up (using 8 direction movement)

    enemy IS overlapping sensor_up

    enemy NOT overlapping sensor_down

    enemy NOT overlapping sensor_left

    enemy IS overlapping sensor_right

    For Each: enemy

    -> move diagonal up right (using 8 direction movement)

    and so on, this way, you can create different variations of movement directions (remember, you are using 8 directions, so there are lots of possible movements than just simple left and right in my tutorial). You will still follow the same general logic/idea I used in my tutorial (which is using an instance variable for AI). It would still do you good help to still give it a good read or study my file, it's pretty simple).

    Use FOR EACH: enemy to make each enemy behave independently. This way, you have enemies moving in different directions (like patrolling the streets) when you are not in their sight. Then either use Line of Sight behavior or calculate the distance (there is an expression for distance) between you and each enemy to determine if they will chase you, attack you or keep patrolling.

    Now for attacks, if you have contact (punches, kicks) and long-range (bullets), you have to further divide the AI, enemies shoot you when you are within a range, they punch you when you are directly beside them. Again, I used the same logic in my tutorial (even if it is for sideview platformer) although I haven't updated my tutorial yet with coding attacks.

    To make the AI a little unpredictable, add SYSTEM: Random(1) <= 0.25 meaning it will be 25% chance of happening. It is also in my tutorial file.

    Good luck.

    Thanks i'll try the best with what I can do. Also, what can I do to make them move faster in a direction, The enemy seems to just jerk in motion making rare progress getting anywhere. I used your numbered AI method, btw.

  • this might help

    https://www.scirra.com/tutorials/1320/p ... enemies-ai

    if your game is for 4 directions, up, down, left and right and jump (jump is separate from up) then this tutorial needs a little tweaking for your game since it has 2 more directions for movement (up and down) that weren't taken into account for this tutorial. But concept is still the same.

    8 Directional movement, top down prospective, I wanna try to make him attack when he gets near the player,

    move to the player when player comes close or line of sight, low level stuff ya know?

  • Making the enemy move, make an action like attacking, I haven't a clue on where to start.

  • Yeah, there's a plugin in the plugins section. Never used the plugin myself but a lot of people have.

    Heh, this'll make my job a ton easier, thank you.

  • I believe what you are after is Parallax. What you do is, you put the background on a separate layer. And under that layers 'Layer properties' there's a thing called 'Parallax'. As default it's set at '100, 100'. If you want the background to scroll slower than the foreground; lower the values to e,g '50, 50'.

    Give it a go and test for you self. It's really easy to set up.

    Ah what? It's that easy? Golly..

  • -On 'A' pressed

    -Kick animation NOT playing.

    --Set animation to 'Punch'

    Do that for both attacks and it should work just fine until you start to add more attacks. Then you have to add all of those to all of the other attacks conditions. So I would rather do as shown below if you have for example an 'Idle' animation that activates after an attack..

    -On 'A' pressed

    -'Idle' animation IS playing

    --Set animation to 'Punch'

    This way you just add every attack and they wont interrupt eachother.

    I hope that made sense.

    Thank you so much, you don't know how much this helped me, i've been going at it for two days.

  • Not sure what you mean. Some kind of parallax?

    It would be useful if you could post a link of said Sonic game for reference.

    Sonic 1, 2, and 3 had moving backgrounds, something like that, a 3d immersion.

  • Is Spriter compatible with Construct?

CurioJoe's avatar

CurioJoe

Member since 27 Feb, 2014

None one is following CurioJoe yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies