flaye's Forum Posts

  • Thanks I think there's something similar already in place in terms of power and position. Unbounded scrolling is set to no. Actually, it works better when set to yes, but that also wrecks the overall layout.

    The fired object keeps shooting upwards rather than in the trajectory the cannon is aiming at.

    I need also to limit it so that once the object is fired, no more objects can be fired.

    Suggestions?

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you seen this post?

    snap to grid

    Take a look at the .capx that's provided. It should set you on the right path.

  • I've been experimenting with various setups for a relatively simple game based on a circus cannon. I'm still having issues with some elements outlined below. Any ideas how to resolve them

    Here's the file:

    circus cannon test

    Ideally:

    1. As mouse button is pressed, energy increases to a max of 100 (done)

    2. Cannon stops when mouse button is released

    3. Object shoots out in the direction the cannon was aimed, at the speed set by the energy (no luck with this yet)

    5. ScrollTo follows object (somewhat done - but I'd like it to follow and not dissapear once it reaches uper border of screen)

    6. Object is affected by gravity (physics work, but when button is pressed, the object gets lifted up)

    7. Pass control from cannon to flying object. In other words, stop the creation of additional fired objects and instead give "lift" to the currently flying object.

    Next steps:

    Create a visual "flight bar" that gives air push to the object when mouse/touch is pressed, but decreases in value.

    What I have at the moment is not very elegant. Any ways to optimize the logic would be appreciated.

    Thanks for the help.

  • Seems that I'm not quite getting the knack of this.

    The idea is to have the cannon rotate between two points. Once the mouse/touch is released, the bullet flies out based on the direction the cannon was aimed, and the scrollTo function follows it.

    I've created a dummy object that gets destroyed when the mouse-click is released, and instead spawns the actual flying object.

    Ideally:

    1. As mouse button is pressed, energy increases to a max of 100 (done)

    2. Cannon stops when mouse button is released

    3. Object shoots out in the direction the cannon was aimed, at the speed set by the energy

    5. ScrollTo follows object

    6. Object is affected by gravity

    7. Cannot create additional flying objects until it game is over (object crashes)

    Next steps:

    Create a visual "flight bar" that gives air push to the object when mouse/touch is pressed, but decreases in value.

    cannon_test.capx

    Your help is greatly appreciated.

  • drappdev - quick question..

    What did you set the FLOOR variable to? I'm trying to rebuild as per your example, but I can't find the connection of it to the cannon sprite.

    Thanks.

    [edit]

    Nevermind. Floor is a math function.

  • Thank you, drappdev! That works well.

    I guess I was trying to overcomplicate things with variables and loops.

    My thought process was as follows:

    1. Set a starting and end angle variables.

    2. Create a loop that will rotate the cannon from start to end value.If end value is reached, rotate from end to start.

    3. Continue until LMB/touch are pressed. Find stopped angle

    4. Stop rotation of cannon. Play fire animation and shoot projectile at stopped angle value.

    I come from 3D background and do a lot of animation scripting. Sometimes the simple elegance of C2 requires to slow down and smell the roses :)

    So based on your example, the values that are being sent to the text object can then be used to set the projectile angle of the fired object.

    I'm assuming I should use a bullet object with physics, since I want a parabolic arc.

    The point of the game is to keep the fired object afloat as long as possible.

    I'm trying to get mechanics similar to this:

    Subscribe to Construct videos now

    Thanks.

  • Just found the perfect behaviour to do this, compliments of RexRainbow. It's called swing, and can be found here:

    http://www.scirra.com/forum/behavior-swing_topic46029.html

    Thank you.

    My question is: how can this be emulated in the event sheet without that behaviour?

    Cheers.

  • Hi,

    I'm trying to do a simple circus cannon example, where the cannon object constantly rotates from it's pivot (positioned opposite the barrel opening) and upon mouse down/touch, it fires.

    The Sine behaviour is close to what I want, but I can't seem to control the right angle limits of the cannon.

    Any ideas?

    (image explaining concept below)

    http://imgur.com/vYaoiqb

    Thanks.

  • Staying away from ALT then.

    Back to the scaling uniformly from centre question - is there a way to do so in C2, or does it only scale uniformly from a corner?

    Thanks.

  • To clarify:

    I selected a sprite, and (from muscle memory from Photoshop, I guess), pressed SHIFT+ALT+resize handle on sprite, and that crashed C2.

    Is there a way to scale/resize in both width and height from center of sprite?

  • Link to .capx file (required!):

    http://

    Steps to reproduce:

    1. Shift+ALT+resize

    2.

    3.

    Observed result:

    Crashes Construct 2

    Expected result:

    Browsers affected:

    Chrome: yes/no

    Firefox: yes/no

    Internet Explorer: yes/no

    Operating system & service pack:

    Windows 7 64bit sp1

    Construct 2 version:

    r132

  • I teach 3D animation & rigging for games at George Brown college in Toronto. I introduced Construct 2 to my students for one of their assignments, and most of them loved it from the start. It's a really great way to get ideas up and running.

  • Hi,

    I'm wondering if there's a glitch with the Beginner's Guide tutorial page. I tried yesterday to do a walkthrough with my students on the use of Construct2 using the Beginner' Guide, and none of the images were present in the guide.

    I had to use archive.org to go to a previous revision of the site that had the images, and use those instead.

    Any ideas?

    By the way, after using it for about an hour, a few of them seem hooked on the possibilities Construct 2 offers.

    The other engines they're learning are UDK and Unity.

  • Great! Thank you very much.

  • Hi,

    I'm assuming the issue is because of the bounding boxes around the PlayerBox and the Solid behaviour of the ground.

    Is there a way to calculate that if the character is standing on past the border of the platform by X pixels then cause it to drop?

    Thanks.

    [/IMG]