PhoenixNightly's Forum Posts

  • Basically you can start with the main mechanic of picking and placing items. For the placement you can make the base of the pizza z index 0 then have a global to keep the current zindex as a variable and increment as they are placing toppings making the next topping they place on top of the current items. Being that you have to have one of each it you going to use somewhere in you project I usually make a dummy layout for holding all my spirited I will use. And you just spawn a copy when the person choose their topping.

  • I suggested "on touched" cause once it's set to 1 you don't have to set it again. "on is touching" would keep running every tick which isn't necessary. From what he explain he need it to switch set the animation speed to 1 when the button is touch which what "on touched object" will do. The animation doesn't change again until they stop touching. On is touching will keep running as long as it is true and keep setting the speed to 1 even when it already is one.

    To stop the inverted event from running every tick add a secondary check to see if the animation is even running should be done. So if they are not touching and the animation frame isn't 0 do this.

  • Also instead of checking just for touch start you should see if they actually touching your button with 'On touched object' to trigger the animation. Cause right now they touch anywhere would trigger the event to play the animation.

    **Edit**

    Actually you first screen shot is almost there except instead you have an invert "is in touch" which should instead be "is not touching Sprite" and not be a subevent

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not at my computer but you should be able invert the 'Is touching object' event cause that might be what you need to see if their not touching your button.

  • If you use the command stop all at the start of layout then start that level music does that work??

  • I know Internet Explorer ask you if you want to allow the scripting to run. You can try that.

  • You have to take the not touch outside of the touch trigger event. Right now it's a sub event of if touch is true. And the not touch event doesn't have code to stop the animation unless you removed it before you took the screenshot.

  • Or compact it to this with one event and 1 action

  • What is the likelihood they would use this ~ or this ^?

  • I think this should work... well it appears to work for me

    [attachment=0:3twz8fou][/attachment:3twz8fou]

  • That would be the best way. And the layouts can use the same eventsheet for the core mechanics of the game.

  • nimos100

    Since he called it one time the second time would not run being that the bullet was destroyed in the first event called the second call with not trigger cause the bullet was destroyed so the collision does not exist. Hence the reason I said there shouldn't be a reason to make the same call twice. 1 thing you can change one thing to make a bug. Besides it would be inefficient to keep making the same collision calls/checks on the same thing using unnecessary process usage. A bad habit that shouldn't be started or encouraged. If you called it once then that one time should do everything that needs to be done.

    Frame Matt

    I will look at it again. It was more of a drive by look. The reason the second time didn't trigger was cause the bullet was destroyed in the first trigger call so that would make the second trigger called false. But it doesn't make logical sense to not do everything in that one call. As your game gets bigger you have chances of using more processing because you are calling the same events 4-5 times which is unnecessary. If there are certain thing you want done at certain times of the trigger event then that is when you should be making sub-events of that one trigger. Besides if you have the same event call here and there when you are trying to debug it would take more work cause you would have to sit there and find ever same trigger event call that you made instead of having it all sub-evented under that one call.

  • You are calling on collision twice for no reason so the second isn't running if you move you actions from the second call to the first on collision event call it should work as you want. (I tested and each time the plane was hit the health bar went down)

    [attachment=0:24gwc1s1][/attachment:24gwc1s1]

    Side note:: This is just my personal opinion but the 'on start of layout' should be the first event on the eventsheet.

  • Boy was I stumped when I was working on my small project. Then I looked it up.

  • Thx Billy