Jasper's Forum Posts

  • Here you go.

    dl.dropbox.com/u/87237423/D%26D.capx

    Notes:

    dragX is the X position on the sprite of where the mouse took hold of the sprite. (can you figure out what dragY is? <img src="smileys/smiley1.gif" border="0" align="middle" /> )

    As soon as the mouse clicks on the object you want to drag & drop the local boolean PickedUp is set to true, as soon as the mouse releases the button Picked Up is set to false.

    First we test whether the mouse is within the area of where drag and drop-ing is allowed. If it is > we set the sprite to the Mouse.X en Mouse.Y.

    If its not, we test whether the mouse is too far to the right or whether it is too far down. In the first case we set the sprites x to the furthest allowed x and set the y to Mouse.Y. Second case works like this.

    Then, at last, we test if the mouse is both too far to left and and too far downwards, and we set the position of the sprite to the furthest allowed position.

    If you got any questions just let me know ;)

    PS: I too late realised I could use imagepoints (I used to make games with Gamemaker which has not imagepoints ;d), so these might be handier instead of using Sprite.height/2 etc (also only works when the origin is in the middle of the image!)

  • Replace the drag and drop behaviour by your own events.

    I'm creating an example for you right now so I don't have to explain it, hold on a minute

  • This should work:

    <img src="http://img59.imageshack.us/img59/9155/naamlooskco.png" border="0" />

  • Great game! I would however try setting a maximum speed for the bal, sometimes it gets a little to fast IMO.

  • You can test whether a finger touches on an object using the Touch -> On Touched Object event. Select the object you want to rotate, and in the events you add the Rotate clockwise (or counter-clockwise) action for the object.

    If you want to test for the mouse however you should add the Mouse button is down condition, right click it and select add another condition. This time choose Cursor is over object. Then you can add the events to rotate the object.

    Note; You can't simply use the 'mouse on object clicked' event because this way you'd have to click it multiple times to rotate it (and not instead holding the mouse button down).

    If you want to allow the object to be only rotated to 45, 90, 135, 180, etc, you should be a little more specific. Do you want to make the object rotate immidiately 45 degrees after a second passes (and not smooth)? Or do you want it to rotate a little (eg 5 degrees) as long as the object is touched? In the last case, should it rotate to the nearest interval(-thing? 45 or 90 or 135 or etc)? Or should it always rotate upwards (so if the angle is say 60 and the object isn't touched anymore it automaticly rotates futher to 90).

  • Nice graphics!

  • Can't you just give the bullet the speed & direction the player has at the moment of shooting and then adding the bullet's own speed & direction? So if you'd shoot the same direction as you were walking the bullet's speed would be the players speed + its own speed. It should be possible to calculate the bullet's speed & angle when the player shoots in a complete different direction using sin, cos and/or tan. I can help you with that if you'd like (if you didn't try this method before and you don't know whether it works, I'm not completely sure either ;) ).

    If that doesn't work out you could also consider making bullets which hit at the moment of shooting, so fast it can not be seen. You could use a thin rectangle for the bullet sprite, which will test for collisions with other objects as soon as is created (and after that it is immidiately destroyed).

    Edit: I created an example of my first mentioned solution:

    Download

    Note; Because I made the bullets so slow it might look a little weird, but this way the effect is seen best. If you have a question about it let me know ;)

  • dat graphics

  • This looks pretty cool, but do you think it's possible to fill the polygon with a sprite which would then get 'stretched' up nicely? <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Take a look at this by Rojohound

    http://www.scirra.com/forum/topic61959.html

    Not exactly what I want, but it comes close.

    I want to be able to change the coordinates of the vertices of the sprite at runtime.

  • This plugin might be what you are looking for: http://www.scirra.com/forum/topic62075.htmlIt's not exactly what I'm looking for because I can't fill it with a sprite

  • Hello,

    I was wondering whether it is possible to make sprites appear differently without making the new sprite myself but instead letting Construct 2 do it for me. Because English isn't my primary language I'm having some difficulty explaining the effect I would like to create, so I drew what I want:

    <img src="http://img209.imageshack.us/img209/8518/effectf.png" border="0" />

    I want the corners to move around a little, scaling eg the upper part down (making it smaller) and the lower part up (making it bigger).

    I hope you are able to understand what I�m trying to explain, if not please tell me so I could try to make it clear another way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So the problem is with your Graphics Card. What model is it ?

    It's an Intel? HD Graphics 8.15.10.2622

  • Does anything else look odd in Chrome? Have you tried creating other suff in C2 and testing them?Yes, pretty much everything looks blurry.

    Have you absolutely tried updating your graphics card drivers?Yup. But since I only have this problem in Chrome I think its not the fault of my graphics card drivers...

    Looks OK here. Is it running on WebGL or Canvas ?WebGL is on. I turned it off to see if there were any changes and the graphics got the same as in IE. So I guess I'll be running my game with WebGL turned off. Does this affect anything else?

  • Are you using Windows XP?

    Nope, windows 7