lamar's Forum Posts

  • There is no scroll speed control built in but you could use every so many seconds to control how fast the scroll happens.

    You would need to use scroll to object or position and then use a decreasing variable to set the scroll X and Y to that position with an every so many seconds decrease distance between scroll X and Y and position of object.

    Sounds like a hassle but it could be done.

  • You can always check a sprites position X and Y.

    You can also check angle facing and if a bullet you can check angle of motion.

    Any of those can be used to determine which direction a sprite is moving or will move next.

  • You do not have permission to view this post

  • I tried your capx and the music was playing in both layouts?

    Did you by accident start your game in layout 2 which would not start the music?

  • You do not have permission to view this post

  • Hi,

    I have a main touch event with some action and under it there is a sub-event that contains lot of actions and system waits, now when touch event is raised again(2nd time) before completion of the sub-event(from first touch) I want to stop the sub-event ( from first touch) and start over. How do I achieve it.

    Thanks

    You can use a global variable as a trigger on your sub events just like on the main event.

  • You can do it a few ways. If you don't want to use physics you can make a tree falling animation and play it when your player A collides with the tree.

    OR you can set all your players and the tree and ground to physics and you will need to use physics for all objects the player interacts with.

    I would go with option A for a new designer. Physics has other uses you will learn as you go along.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Where am I multiplying zero by zero? The only multiply I can see is, floor(Random(0,6))*2.

    I can't get choose(0,2,4,6,8,10) to work either, I just want it to be able to pick the zero and give it to me.

    Random uses the first number in the range which you have as zero and you have 0*2 and you can't multiply 0.

    Change range to 1,8 and then subtract 1 from the result and it will give you range 0 to 6.

  • [quote:3t2paafh]0 multiplied by 0 is 0

    That's okay, I need a single 0 as one of the results.

    When the tutorial program is run, it locks up without displaying the results like normal. Same thing with choose(0,2,4,6,8,10). It will not give me a result. If i swap out the 0 like choose(1,2,4,6,8,10), it works, but no zero. I can get this to work though, choose("0","2","4","6","8","10").

    That is because you are trying to multiply by zero. Change it to 1 through 11 and then subtract one from the result and you will get your chosen range.

  • I actually woke up this morning with a solution immediately in my head. I should have used CHOOSE instead of RANDOM in this case.

    I am now having difficulty with getting it to work with the number zero though...

    This works:

    floor(Random(1,6))*2

    or

    choose(2,4,6,8,10)

    But this does not:

    floor(Random(0,6))*2

    choose(0,2,4,6,8,10)

    The crazy thing is, when I make some changes to allow text instead of numbers it works.

    choose("0","2","4","6","8","10")

    Even though the numbers were entered via text, will this cause any problems? Should I just go with this?

    0 multiplied by 0 is 0

  • You don't need "Every tick" condition in the second event

    Yup I left that in there so people like you would have something to find.

    You are welcome lol!

  • Problem Description

    Got this bug error message when I was undoing some actions. I had deleted a sprite and events related to that sprite and then decided I needed them back so I was hitting undo to get everything back when the error screen popped up.

    Didn't seem to crash and I just closed and opened my last good save where I still had that sprite.

    Attach a Capx

    ____ Upload a Capx to this post ____

    Description of Capx

    ____ Concise description of what this CapX does ____

    Steps to Reproduce Bug

    • Step 1
    • Step 2
    • Step 3 etc.

    Observed Result

    ____ What happens? ____

    Expected Result

    ____ What do you expect to happen? ____

    Affected Browsers

    • Chrome: (YES/NO) Chrome Yes
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    ____ Your operating system and service pack ____

    Windows 10 64 Bit

    Construct 2 Version ID

    ____ Exact version ID of Construct 2 you're using ____

    Using R243 latest release

  • Here is a tutorial on getting random numbers without repeats:

    https://www.scirra.com/tutorials/315/generating-random-numbers-without-duplicates/revisions/2089

    You can use that to get a random sequence of numbers for your color of sprites and also for arranging the sprites on screen without repeating the pattern.

  • The error is probably related to over lapping collision boxes. If you lock a sprite with physics in place and there is overlap in the collision boxes it will throw an error every time.

    So.....

    You either need to leave blocks unlocked so their natural physics works which probably has sprites jumping around or turn off physics and lock them in place.

  • You do not have permission to view this post