haopl's Recent Forum Activity

  • Hello.

    Each of instance has an instance variable called "animation_number".

    I need to get acces to this variable through expression, similar to:

    sprite.animation_number (certainly not with a dot...)

    Is there any way to acces this instance variable that way?

    Like... sprite.variable(animation_number) or anyway??

    Thanks a lot for any advise.

  • Great answer! Thank you so much. I didn't try it yet, but I see the logic here, which will solve my issue 100% !!!

    Thank you a lot!

  • Hi.

    I have a character, that uses two buttons: one for a PUNCH, another for a KICK. For those events I use "on PRESS".

    Is there any way to trigger pressing PUNCH & KICK at the same time, but not by "ON KEY DOWN" (Key down works differently then press. DOWN triggers the event continuosly, while PRESS triggers is only once /similar to DOWN and immediately RELEASE/).

    I wish to emulate something like:

    -> On key pressed O

    -> On key pressed P

    not like this:

    -> on O down

    -> on P down

    I know that I can't really do the first, because its triggers, and it looks like I can use only one trigger at a time.

    The problem that occures with me is that:

    When I press DOWN the O+P keys, first an event under O starts and then/after, the right O+P event.

    It looks like my character, after pressing O+P, first punch (O), and then do super-move (O+P).

    I also don't want to use ON DOWN for punching/kicking, other wise the player can just hold the button and punching will be run continuosly until player releases it.

    Any help will be appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aher0: image point will not work because after turning 90 degree, the pixel will not be drawned at the cara path anymore. it will appear "after the car". the pixel will turn 90 with car at the same time. i hope i explained it clearly.

    shinkan: what about the situation when someone turns 90 very quickly twice and the car basically turns

    180? and also cars sprite and pixel (it is actually a sprite - square of width/height as car's width) after turning they touches eachother with the its corners. So the pixel/wall should appear about few pixels after the car...

  • Ok i figured it out.

    I had both: "click on object" and "touch tap" event on sprite. I didnt realise, that "touch tap" also works with mouse left click. And that was giving me the "double click" through layouts. I just removed the "click on object" and its fine now.

  • Here is my problem:

    The car is going and it is leaving a pixel behind. Each pixel appears in the middle of the car (central Image point). And if the car hits the pixel (the wall), it explodes.

    I think the concept is clear. But... the car will explode at the start of layout, because it creates a pixel just at its position.

    So... how to do it elegantly, so the pixel has Collision ON, but after it does not overlaps the car anymore?

    I tried with counters, like "Afters a car moves 30 pixels away from pixel, eneble pixel collision" for each pixel. But this solution is very heavy, especially after many hundrets of pixels appear.

    Any "elegant" solution?

    Thanks

  • Oh sorry, its all sprites and I ment LAYOUTS not Layers...... ups

    I will try your suggestions. Thanks

  • I have two Layouts: Layouts1 and Layouts2.

    On Layouts1 there is a button (sprite actually) "Exit game" and on Layouts2 there is a button "Go to Layouts1" exactly at the same position.

    When is set an condition "Mouse click on object" -> "Go to Layouts1" it moves me to Layouts1, but so fast, that I can't release the mouse button in Layouts2. So I release the mouse button on Layouts1, but that triggers another button "Exit game".

    So Is there some sort of condition, that will prevent that behavour?

    Something like: "Release on object"? or "Press down on object" ?

    It seems like "Click on object" works for both "Press" and "Release", and then, "Release" continues on another Layouts, after going there, that triggers things on the new layer.

    Thanks for any help.

haopl's avatar

haopl

Member since 1 Jun, 2016

Twitter
haopl has 1 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies