LittleStain's Forum Posts

  • Bullet has a gravity setting in it's properties, creating the "lob" should be easy..

    You could choose to subtract from the speed on collision with the floor, to prevent the bounce to be too big..

  • I'm still not sure what it is you are aiming for..

    Will the (moving) green squares be visible in the final result or are they only there to interrupt the movement?

    How random would you want the movement to be?

    If the green squares are only meant to create the movement, it would be easier to create the smooth movement without them..

  • If you look at the numbers in the middle of the screen, you'll see the actual mouse.x and mouse.y coordinates and the clamped mouse.x and mouse.y coordinates..

    Clamp prevents a value to go above and below specified values..

    This example was made to always keep the "cursor" within the play-area..

  • I had this example in my dropbox using the clamp:

    Clamp mouse cusor

  • could be as simple as:

    touch is touching arc - light set position to to touch.x,touch.y

    on any touch end - light set invisible

    A lot of it depends on what you want..

  • Thanks LittleStain. Got it to work somehow. I am trying to create random enemies after traveling certain distance. As I mentioned, my game is vertical scrolling, is it possible to create a different enemy after y distance from the beginning?

    If you can get the travelled distance into a variable, this would be quite easy..

    You'd just have to use a system compare two values condition to decide which enemy to spawn..

  • Ok so wouldn't changing the "touch is touching" to "touch is touching object arc" do what you want?

    There are obviously many other ways to do it..

    Using either the clamp()-expression or "is between angles" condition, maybe in combination with the distance() expression..

  • > The only way to do that at this time is upload the capx to the internet and inserting the download-link in your post...

    >

    Why were Attachments removed? Is there any reason for that?

    You should ask Scirra, I'm just a user of the program like you..

  • You'd know fix it in the capx?

    Yes..

  • If you would like the name saved, so it will be used if the program is closed and restarted, you should use local-storage..

    Without that it would be in pseudo-code:

    on layout1 you have a button play..

    on button play pressed

    -- if global variable heroname is not ""

    goto layout 3

    -- else goto layout 2

    on layout 2 you have an input field and a button ok

    on button ok pressed

    set global variable heroname to inputfield.txt

    goto layout 3

  • The only way to do that at this time is upload the capx to the internet and inserting the download-link in your post..

    Commonly used places for upload are Dropbox, Google drive and sites like mega-upload and the likes..

    The first two are probably more appreciated than the latter..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not quite sure what the effect is you want..

    Right now you are changing the direction of the bullet 180 degrees immediately on collision.

    It's not really strange that this produces a "corner", going from 400px per second Left to going to 400px per second Right

    There are many ways to "solve" this, depending on your needs.

    Decreasing the speed depending on the distance to the turning-point would be the easiest way while keeping the rest of your setup nearly the same,

    but there are probably much better ways of achieving this (using different behaviours and/or without behaviours) if it was clear what you are trying to achieve and when and why..

  • I thought perhaps I had misunderstood LittleStain

    That makes two of us..

  • https://www.scirra.com/tutorials/902/lightning-fast-raycasting

    I think this tutorial is what you are looking for.

    Besides this (great) tutorial there are actually multiple examples on this forum..

    Typing laser in the search box and checking the topics should get you somewhere..

  • >

    > > No, the example is done with the mouse not to touch.

    > > I want with a click (touch) to rotate the figure and once placed on the board with one click you can change rotation

    > > <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    > >

    >

    > So the problem is you don't understand the events in the event-sheet well enough to see how to change them?

    > You don't just want to change mouse events for touch events, you want to change the mechanics of the capx..

    > Which is doable, if you understand the mechanics..

    >

    > From what you explain, you'd like to use an "on tap" and "is overlapping draggable" event for the rotation.

    > you can replace all on left mouse button down conditions with "is in touch"

    > you probably want to change the mouse.x and mouse.y within expressions to touch.x and touch.y

    >

    > that should get you a good way in the right direction..

    >

    I did as you said and it does not work <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Someone can make me an example <img src="{SMILIES_PATH}/icon_neutral.gif" alt=":|" title="Neutral">

    https://www.dropbox.com/s/fbl8wlt0wsgs108/check2.capx

    I'm not sure why you did what you did, but I guess that's ok, for it seems to me neither do you..

    Why did you make it so that when touching an object the dragging is turned of (event 2 in the sheet)?

    You replaced a "mouse - on left button released" with a "touch - is touching" condition, you do understand why that is wrong?