99Instances2Go's Forum Posts

  • Suppose it is a platformer. Then it depends on if you are using default or custom keys.

    Using custom ? Go with Gearworkdragon. On Timer events must also be in that group.

    Using default? Go with a instance boolean. On Timer events get company of a condition that evaluates the boolean. And there is an action to dissable keyboard for the platform. (when the boolean is true).

  • Dont use 'wait', use timers. In fact, never use 'wait'.

    Then use the system action:

    Set object time scale

    Restore object time scale

    Change the rate time passes for a specific object. This affects the object's behaviors and its own dt expression. Restoring the object's time scale returns it to the same time scale the rest of the game is using.

  • Dude, you do know that you now ask a pro-question coming from a pro to a beginner. I have not handled CSV yet.

    Besides that. There are plugins to translate CSV to an array (or a dictonary). I did not arrive to those yet in my path of learning construct.

    What i wanted to show you is this. If you dont store values on the X-axis, you kinda upgrade the array to a 2D list. A list containing lists. Pretty easy to acces in the way you need to acces it.

    I am stil not sure if you only need to find the index of "BOB". But lets assume you do. Then.

    You could also use a dictionary. With 'BOB' as the key, and in the value an temporal dictionary as AsJSON.

    Finding 'BOB' in the dictionary is easy, not as index but as 'key'.

    When found, set a temp dictionary to the 'value'. And there are all your values.

    See what i mean? Hope i show you some options.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just use 'else', thats why it is for.

    New top-level event ...

    Condition > on powerup clocked

    .....................do all the stuff you need

    New top-level event ...

    Condition > on house clicked

    .....................do all the stuff you need

    For me (personal) this a bit of a PITA. I have troubles reading this code and they need to stay a pair when i start moving events arround. So i usaly do ...

    New EMPTY top-level event

    ....Sub event with the conditions ...

    ....Condition > on powerup clocked

    .....................do all the stuff you need

    ....Sub event with the conditions ...

    ....Condition > on house clicked

    .....................do all the stuff you need

  • Works flawless:

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

    If you would have provided a skinned down capx as the above one, you would have noticed this yourself. (not hitting, just stating). This should be always the first step to debug something like that.

    Okay, so, what else you got in that On Start Of Layout ?

  • Second opnion: post your capx.

  • This is a great example, but I need to be able to have each object know the closest other object without the "is selected." Do you know of any way to do that?

    Thanks for posting this.

    It is the same. Just a iteration more (starting from the selected one), in a nested loop. But, lets mask 'the selecteded one' so you are not able to find it.

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

  • Not that difficult if you store nothing on the X-axis (only using it as index). Most of this code is making the array and displaying results. The list is just to make the array in a lazy way and to avoid typing in the search box (also lazy).

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

    Or ? Do i not understand the question ?

  • > W A S D is totaly unconviened for Azerty users.

    > quote]

    Yes we have a problem with foreign keyboards ...

    Indeed but I didn't want to suggest a custom keybinds menu, since that would include a fair amount of work.

    It's an option though and learning to create such a menu will surely help you with any of your future projects.

    Sure. Here is a simple example. I did my exercises.

    Do you have a game to go with it ?

    https://

    drive.google.com/open?id=0B1SSuCVV8v74SnBseHRpUXRfSEU

  • At the moment i am think that the easyst way is to use LiteTween.

  • W A S D is totaly unconviened for Azerty users.

  • Your own project with a global player. Notice that there is no player in layout 2 in the layout editor.

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

  • I was making you an example for you. And i had the same problem as you do. Bringing the z order out of the wheel event did not even help.

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

    Ashley Seems like Z order sorting does not trigger a redraw when the sprites have a zero animation speed.

    Delete sprite 7 (the only animating sprite) in above project, and Z order does not update in the viewport.

  • Events are easy to colapse that way. For me that is easyer to read the code, as easy as i read my morning paper. And it easyer to drag them arround.

    But. A little warning. If you read the 'optimalisation' articles in the manual, there are words against using empty sub events this way. I never noticed any difference in performance, so i keep using them. Just able to wrap my mind arround things is for me as importand as performance.

  • You have that 'player.y > Tombstone.y' (player compare y) in both the PUSH and PULL group. (in the top condition)

    Well. See. The size of the player = 32*32. The tombstone = 32*32. Both origins are in the middle. Conclusion : Their Y should be the same (in a perfect world) when you push/pull because they stand on the same platform.

    This condition should never be true, and therefor the whole event should never be true.

    But. Positions in C2 go far in the decimals (like 45.458878884). Especialy when there are physics involved. Platform is a form of physics. Meaning: none of both objects is ever exactly 16 pixels above the platform. It is always near 16 pixels. Like platform y position + 16.01178 or platform y position + 15.8988.

    Conclusion: sometimes the players.y is heigher then the Tombstone.y, sometimes it is lower. Why it sometimes works and sometimes not. When you make the player jump, the player gets a new Y when landing. And again, sometimes his Y is lower, sometimes his Y is higher then then the Tombstone.y.

    Solution: offset the overlapper's orgin a few pixels towards the bottom. Now it should not collide on the bottom. And lose that condition 'player.y > Tombstone.y'.

    Not sure if you need it at all.

    You still have a few animation problems too. Hope you read trough the lines of my bad english.