SimoneT's Recent Forum Activity

  • Ezekiel

    Did you build this layer on a separate layout without an event sheet? Have you seen this video? :

    Subscribe to Construct videos now
  • You do not have permission to view this post

  • You do not have permission to view this post

  • kiugetski

    No, it is a shortcut.

    Your problem, I think, is that you were dealing with an unreferenced object. Check out the paragraph on unreferenced objects here: https://www.scirra.com/manual/75/how-events-work

    If you don't reference an object at the beginning of your event, it will act on all instances of that object. In my example, "create object" is the reference the system uses to choose which Sprite instance to act upon. Therefore, only the newly created instance changes frame.

    I hope this helps!

  • EdwardJT92

    Use % (modulus operator).

    If PointsValue is equal or greater than 1000000 => set SuperCoinValue to SuperCoinValue+floor(PointsValue/1000000); set PointsValue to PointsValue%1000000

    If you did not know, % calculates the remainder of a number divided by another:

    5 % 4 = 1 4%4 = 0

  • Armouredank

    Hi,

    Add a bullet effect to your turret. Make sure that the Set angle property is No and default speed is 0.

    On Turret shoot=> Set Turret's bullet speed to x, set Turret bullet angle of motion to (Projectile.Bullet.AngleOfMotion+180)%360, Wait x secs. and set Turret bullet speed to 0

    Experiment with bullet speed and wait time to achieve desired effet.

    Hope this helps

  • skdf

    Do you want the Enemy to stop forever, or just pause, and get back to moving? Do you want it keep going but to bounce off at an angle like a billards ball?

    (In my examples I have a TiledBackground called Wall)

    Stop forever:

    Enemy: On collision with Wall=> Enemy: Set bullet disabled

    Stop and pause:

    Enemy: On collision with Wall=> Enemy: Set bullet speed to 0

    Bounce off:

    No events needed, just make sure the Wall has Solid behavior and the Enemy has its Bullet behavior setting to Bounce of solids set to yes.

    Hope this helps, if not, give me more details on what you want to accomplish!

  • skdf

    It is also important to note if you are using a "Every x seconds" condition, the event won't be triggered until x seconds have passed. If the bullet speed is set at 400 by default and your sprite flies off the layout before the x seconds have passed and subsequent actions are implemented, it might seem like its not working. Try adjusting the default speed in the properties window to the left to the desired speed, or to 0.

    That done, if it still does not work:

    Every 2.0 seconds=>

    (sub-event)For Each Enemy=> set bullet speed to ...(40?), set bullet angle of motion to random(360), Wait 1.0 sec, set bullet speed to 0

    That should do it!

  • skdf

    Hi,

    Are you sure you are setting the bullet speed, and not the animation speed for your sprite?

  • Domse65

    I used oosyrag 's approach to solving the problem, but applied it to a 2d array:

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

SimoneT's avatar

SimoneT

Member since 25 Jun, 2014

None one is following SimoneT yet!

Trophy Case

  • 10-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies