mumu64's Recent Forum Activity

  • I'm also interested in seeing more of this.

  • Same

  • Thank you, I will look into that.

  • Looks great!

  • hello,

    I was wondering for a best practise for the following example:

    Player (sprite) has animation Idle and Running.

    Example:

    if sees enemy: play animation running

    if does not see enemy: play animation idle

    If player is running: play animation running

    if player is not running: play animation idle

    Now I think: I also want a hit animation.

    The only way I know to edit the code (and insert the hit animation) is to use global or instance variables to make a clear seperation of what a player is doing and when an animation to play.

    I would add:

    if player overlaps SomeSprite: play animation hitting.

    My example from above would change to:

    if sees enemy, and does not overlap SomeSprite: play animation running

    if does not see enemy: play animation idle

    If player is runningand does not overlap SomeSprite: play animation running

    if player is not running: play animation idle

    By adding something new in the same "area", I have to edit all existing events that have to do with this. (because it effects eachother)

    Can this be done easier/more efficient?

  • While debugging you can change variables live

  • I realised that one of the benefits of making groups, is that the debug feature shows how heavy my computer is thinking per group.

    And I have read somewhere as a tip to make a layout where you can place all your sprites, to be used later in the game. I call it: the basement, or attic^^

    Yesterday I pulled this off, by using some information from the forums here.

    I am doing this from work, so I might make a mistake, and someone please correct me if I am wrong.

    I first gave the sprite an instance variable. (this is going to be the y-value of the sprite)

    I made an event with condition: order by (that instance variable)

    And the action was: sent to top?

    I also just found this -->

    'For each ordered' is a good way - it's not CPU intensive if it's not nested with any other loops.

    Sort by Y co-ordinate:

    + For each Sprite order by Sprite.Y ascending

    -> Sprite: send to front

    Sort by any old number:

    + For each Sprite order by Sprite('some_variable_with_z_number')

    -> Sprite: send to front

    Then you can set any old number to the 'some_variable_with_z_number' private variable, and it'll sort the Z order from that.

  • Thanks for all input!

  • I am looking for 2 examples of a function that returns a value - and how to re use that value.

    And what is the best practise to use a function that returns a value?

    I could not find any in the tutorial or forum section...

    Thanks in advance!

  • A newgrounds plugin! That would be great <3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks!

mumu64's avatar

mumu64

Member since 8 Feb, 2009

Twitter
mumu64 has 2 followers

Connect with mumu64

Trophy Case

  • 15-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies