Spud1212's Forum Posts

  • 13 posts
  • So i have my code setup where

    collision with(enemyfamily)at offset set bullet disabled&Play attack animation

    or is overlappying with enemy family

    then under it as a sub category i have it call every second to spawn what would be the invisble arrow to simulate my melee damage

    then i have my else statement

    else

    for each player

    if collsiion offsets (playerObstacle) set bullet disabled, start animation "Idle" with an else statement under that one with Wait 1 second,set bullet enabled

    I want the code to make the players and enemies stop for the families under certain conditions and for some reason the families i am using make it to where they dont stop for friendly characters they just keep walking until they see the enemy

  • Im making an Age of war type game and im struggling to make my sprites move and stop when needed. I currently have both my knight and my skeleton run where if they see eachother at the same offset they will set movmeent to 0 and start the attack animation, Else set moving to 1. What happens is they overlap and instantly keep moving no matter what. Im wondering if the else statements are making it stay set 1 because i also have it to where if a knight sees a knight in front of it it will stop moving using the same offsets and else statement.

  • i may just be dumb, but i need to make my gold system work wait until the play button is pressed in order to start building up gold. I have it to where every second 3 gold is added , and i need it to wait till the mode is selected. Right now i have it to where

    If easy button clicked- set gold(0)

    Every 1 second- add 3 gold

    but once i click the easy button ill start the game with 15 or however long it took me to hit the play button in amount of gold

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nevermind i fixed it

  • Ok so i know how else statements should work. But when im using them they aren't working. im trying to use collision offesets to make my sprites stop moving if there is something in front of them so its like

    If collision offsets-Stop moving

    else-keep moving

    But im unable to to put the else statements below what i want them to do. so right now i have it being more like

    else

    every tick

    if collsiion offsets- set movement to 0(off), set movmenet to 1

  • Wait Now the else statements aren't working , they started to push eachother again

  • This Worked! Thank you so much i've been struggling with my movement system for AI for days

  • this works to make them stop thank you! but how do i make them start moving again when the one in front of it dies/moves

  • So i want to use raycasting to make a sprite check in front of it but i want it to keep a constant distance in front of it such as using Line of site. I want the sprite to stop moving if it has the line of sight to the one in front of it, and move once the one in front of it moves out of its line of sight. I have attempted this with the Line of sight behavior but the sprite will just keep pushing the one in front of it like it can't see it. So i hope with ray casting i can make it to where it will check 25 units in front of it at a time and if it sees a sprite in front of it, it will then stop and wait till the one in front of it moves.

  • I have it coded to where when a spawn is in the LOS with another clone it will stop but it doesn't stop. They both spawn from the same spawner and cost gold and the first spawn will stop at the enemy base and attack it, but as soon as a second one is behind it it just pushed the initial sprite through the base instead of stopping and waiting for the game to end or for the one in front of it to die

  • Im making an age of war type game and im attempting to have my friendly units stop once they reach the enemy base which i have set up with line of sight. This worked at first but then any other knights i had kept on moving forward and caused the stopped on to start moving and go off screen. I do have a event where if a knight is in front of another knight it will stop and set its speed to 0 and then call for a instance variable of ""Is moving" when the variable is called it sets the bullet speed and waits. then i have it call for an instance of "is moving" = 0 which means to stop and then once the one in front starts to move again it will set "is moving"=1 which i have making the ones behind it continue to move at that point.

  • That worked thank you !

  • Im making an age of war type game and currently im trying to make my enemy skeletons move until are in the knights FOV then i have the knight making an attack animation and causing a collision. Right now i have a global variable where every time the animation plays it subtracts health until it is below or equal to 0, then it destroys the skeleton. But when it destroys the skeleton it destroys all other skeletons spawned as well as prevents more of them from spawning?

  • 13 posts