cagtzn's Recent Forum Activity

  • Another way of doing it: set wait to 1+loopindex*1. This method skips some objects if there are too many so I have a destruction array.

    Destruction Array:

    When the game ends do an ordered loop for each tower(I usually choose tower.y ascending) and write each tower's UID and time of destruction.

    set destructionarray(loopindex,0): Tower.UID

    set destuctionarray(loopindex,1): time+1+loopindex

    after creating the array you can:

    Compare at XY (0,1): whever this value is smaller than time(the system expression) destroy the tower with UID destructionarray(0,0) and delete this array value. When your array has 0 values the game ends.

  • I1) You don't have to indicate "Every Tick". if conditions are met the event works, since on the 12th line there is no condition it will always work = every tick

    2) https://www.scirra.com/manual/126/system-expressions , as you can see find function returns -1 if it cannot find anything.

    Just click on Player from you Objects tab and change any value you want, it will be the default value.

    So how does it work? You seach if UID of the enemy is already written in your hitid variable(which is freshly created each time you swing your sword)

    As I told before the default is , because I'm always checking for ","&UID&","commas are important otherwise you can't differentiate between single, double or triple digits. That's why after a collision you add UID&"," instead of just UID

    , number1, number2, number3, number4,......(without space) as you can see now each number is enveloped.

    ps: UID is the unique id of an object, it's different(well unique :p) for each object so it is useful here.

  • I'm glad you like it. I can try to answer if you have questions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply, would it make a difference in bandwidth usage (multiplayer object sync)?

  • My game will have around 15 projectiles and I was wondering if I should make one master projectile with lots of animations OR 15 objects with 1 animation(code with family)?

  • www . filedropper . com / meleeswordanswer

    I forgot to enable dying for the enemy before uploading...

    Changes:

    C and B only work when he is playing the default animation

    Pressing C or B starts attack1 animation and spawns a hitbox object.

    Hitbox object has a variable called hitid. Default set to ",". Also it has fade (0.3 sec) attack animation takes 0.4 seconds(plus some delay)

    Hitbox is set to imagepoint1 every tick

    Upon collision it checks if ","&Enemy.UID&"," is a part of hitid if not it adds enemy.UID&"," to hit id and deals damage [shit. this part is wrong in the capx too. It works because there is one enemy but you have to fix it if you like this solution.]

cagtzn's avatar

cagtzn

Member since 16 Aug, 2016

None one is following cagtzn yet!

Trophy Case

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

Progress

10/44
How to earn trophies