dop2000's Recent Forum Activity

  • System -> For each (ordered) , object: Sprite, order by: random(1)
       Sprite set animation frame to: loopindex
    [/code:1t3be6dm]
    
    Also make sure to set animation speed to 0.
  • x=0.666666666

    Set text to int(x*10)/10

  • angle(Player(0).x, Player(0).y, Player(1).x, Player(1).y)

    Or you add two temporary variables tempX, tempY, pick the first Player instance, set tempX=Player.X, tempY=Player.Y

    Then pick the second player instance and use angle(tempX, TempY, Player.x,Player.y)

    Or you can create a family with Player object, then you'll be able to pick Player and PlayerFamily in the same event and do angle(Player.x,Player.y, PlayerFamily.x, PlayerFamily.y)

  • Ok.. If I understand you correctly, the first bullet kills the zombie. Then the zombie starts playing "Dead" animation. If you shoot again, the second bullet should fly through the zombie (not collide with it). Is this correct?

    You can disable collisions after the first bullet and disable Platform behavior for the zombie.

    Or you can check if animation "Dead" is playing on bullet collision:

    Bullet on collision with Zombie:

    and Zombie animation "Dead" NOT playing (right-click and invert this condition)

    ...Bullet destroy

    ...Zombie start "Dead" animation

    ...Zombie set collisions disabled

  • What is your native language?

    It may be easier to understand you if you use Google Translate.

  • Gamepad object has a few expressions, you can use them to check gamepad buttons and axes state in System-Compare values event.

    Gamepad.Button(Gamepad, Index)

    Gamepad.LastButton(Gamepad)

    Gamepad.Axis(Gamepad, Index)

    etc.

  • I need an effect like this:

    https://www.dropbox.com/s/fuvcgcj1qfrfz ... .capx?dl=0

    But the problem is, within 10 seconds as more particles are created, the FPS drops significantly, especially on mobile.

    Is there another way to make this random fog/smoke, which does not affect the performance?

  • You can use & and | operators to make this condition:

    System-> Compare two values -> ((x = 1 & y = 2) | (z = 3)) equals 1

    Of course if you need to compare things like "is overlapping" or "is mirrored", you can't use them in the formula.

    In this case you might need to add a local boolean variable and do something like this:

    Sprite1 overlapping A

    (and) Sprite2 overalpping B -> Set tempBoolean to 1

    tempBoolean=1

    OR Sprite3 overlapping C -> do things

  • Here is the formula to get the angle in 0-360 degrees range:

    a=(Player.8Direction.MovingAngle+360)%360

    If you want to have just one formula, I guess you can do something like this to get numeric value 0-3 for player direction:

    d = (a>315 | a<=45) ? 0 : (a>45 & a<=135) ? 1 : (a>135 & a<=225) ? 2 : 3

    Then set animation frame to d.

    Or you can name your animations "A0", "A1", "A2", "A3" and set animation to "A" & d

  • If your question is about organizing data, you can do this with multiple array instances.

    Create a separate instance of the inventory array for campfire, box, backpack etc.

    To know which each array instance is for, add an instance variable "InventoryType".

    Then insert as many elements as you need.

    Or you can make an array of arrays - "master" array that stores UIDs of all "secondary" arrays.

  • I don't think there is a better solution other than comparing the angles and changing animations.

    System-> Is between angles -> Character.8Direction.MovingAngle between -45 and 45 : Character set animation frame 0

    System-> Is between angles -> Character.8Direction.MovingAngle between 45 and 135 : Character set animation frame 1

    etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sprite -> On animation finished -> Sprite destroy

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies