Spray91's Recent Forum Activity

  • Nevermind, figured it out myself ^^

    I needed to update the move-to target AFTER a collision 😄

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi y'all, I've been trying for a few days to create a simple ai behaviour for the 'enemy' sprites in my game, I've tried three methods (collision, distance, and a mix of both) so far and none of them have worked for me (probably doing something wrong though).

    What I would like to happen is; sprite (Enemy) collides with sprite (Trap), (Enemy) begins "attack" animation, when finished (if trap still exists within X-range), deal damage, repeat if trap is still "alive" if not continue moving.

    ^ Unless there is a better way of achieving the same result, of course.

    C3P & video/gif attached, thanks in advance for any help!

    Event Group: Enemy Behaviour V3 (E-119)

    ^ or the 2 above disabled groups (older attempts)

    <iframe src="https://giphy.com/embed/Q0TVTcI6B12sd252hp" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/Q0TVTcI6B12sd252hp">via GIPHY</a></p>

    dropbox.com/scl/fi/yi1zdun54l8imrn173h4y/TD-Test.c3p

    dropbox.com/scl/fi/qeatlxcn3emnfuhef7xiz/TD-Test.mp4

    Tagged:

  • For the offset images, open them in animations editor and look at the origin point of those traps, it is not in the centre. You can right click origin and quick assign to the middle.

    I thought it might be something silly I overlooked ^^

    For movement anything would really work for this game even as a bullet behaviour could work unless there are specific gameplay elements to do with paths other than moving in a straight line? If it should stop when colliding with certain things you can do this with events.

    So the bullet behaviour you think would be most suitable?

    Tracking statuses, such as ?

    I figured this one out myself shortly after posting :'D

    For the building spot, first change the condition to pick the Trap object, not system condition for hp. Then you can say 'Trap is overlapping BuildingSpot', this will pick the correct one.

    This worked perfectly!

    Thanks for all your help Lionz! <3

  • Oh another thing I forgot to add;

    When a "trap" is destroyed, I refresh the "available" building slots but doing so refreshes ALL of them, even if it already is "occupied".

    (Event 57)

    Unsure how to specifically select the appropriate "BuildingSpot" :<

  • Hi all, I have been working on this TD game for a few weeks now while learning how to use Construct and so far its a pleasant experience!

    I have one issue I haven't been able to solve myself so far;

    When placing "traps" (see attached .c3p) they for some reason align themselves off-centre to the left. (apart from the Trap.Chest which when it animates moves to where it should be)

    I am also looking for general advice/feedback for this type of game, such as; which movement system for this TD-intended purpose is most suitable (so far tile-based seems okay but occasionally the sprites will walk "around" solid objects), how to track statuses, which systems are most appropriate for interactions between sprites and how to make my code more efficient.

    Thank you in advance for any and all help :-)

    https://www.dropbox.com/scl/fi/av5triniy34gwvruuxo14/TD-Test-1.c3p?rlkey=1d9169is3tqiqaftv8aj2ve9w&st=scjwib2o&dl=0

Spray91's avatar

Spray91

Member since 21 May, 2024

None one is following Spray91 yet!

Trophy Case

  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies