Asdasing's Forum Posts

  • 6 posts
  • saiyadjin

    It actually works now. Thanks to your tip about using group deactivation wrong, I can now use this all the time. What I did is i made it so the shooting is controlled by a variable instead of event group control. Thank you so much.

    And thank you

    Carbincopy

    LittleStain

    R0J0hound

    for helping me with this as well

    Problem solved.

  • System -> Every tick / Gunman Set Range to distance(Gunman.X,Gunman.Y,Player.X,Player.Y)

    LoopSystem -> For each Gunman

    Gunman -> Range Less than 250 / System Set group "Rapid Attack" Activated

    LoopSystem -> For each Gunman

    Gunman -> Range Greater or Equal than 250 / System Set group "Rapid Attack" Deactivated

    The result is still the same after I made my events for my enemy like this. Every enemy needs to have the player in range so that all of them attack. My game is also a platformer and not a top down shooter, however I definitely do have very nice ideas for a top down shooter after Catman

  • LittleStain

    I am not using multiple sprites, I am using copies of one sprite. Suggest whether it is better to make many sprite enemies and put them in a family or my way. And then explain the method of referencing the correct sprite, because that could be useful later for my game. Thanks.

  • Carbincopy

    Along with the range checking event, I have added the " System -> For each Gunman " and what it did is so that each copy (not clone) of the sprite only shoot if the player is within the range of EVERY enemy. This probably means that the condition is checking for every copy of the sprite to meet its condition and only then the action plays. The other method to check and compare the UID of every enemy sprite copy I do not know how to do. If you can explain it that would really help. Thanks otherwise.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without looking at your capx I can guess you're using the system->compare condition with distance() expression to check the range. You can probably fix it by either using the system->"pick by comparison" condition to pick the objects in range or you could loop over the enemies with a "for each" condition.

    Indeed I am using that exact command to check the range of the player with a range variable. Can you please tell me how do I incorporate your suggestions into an event form? I also don't know how to showcase my catman.capx. The range check command I am using for my enemy is " (RangeVariable) is Greater or equal to distance(Gunman.X,Gunman.Y,Player.X,Player.Y) " and that is for one sprite. I want it so that only the enemy that has the player in range to attack.

  • When I got my enemy ai working, I copy pasted the enemy sprite all over the layout and started playing. When I got to the first enemy, it shot a bullet but then every other enemy shot one when the player sprite wasn't even in the enemy range. How do I make it so that every multiple of the sprite had its own id/ai and know when to shoot?

  • 6 posts