RamPackWobble's Forum Posts

  • I would just go for something like

    every 4 second

    ball.bullet.angle=ball.bullet.angle+random(-0.2,0.2)

    (play with time period and amounts)

    this would correct any stuck balls but not be noticeable during normal game play.

  • Thank you for all these.

  • a better example ?

    capx

  • What is the error ? How are you trying to open it ?

  • One way of doing this sort of thing (A slightly more complex example than you asked about) :

    <img src="https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/Screen%20Capture%20-%20score%20logic%20example.PNG" border="0" />

    edit

    Updated picture (10:01am 11/01/2014)

    I have written it out like this to make it easy to read the logic - this could probably be done in one line using multiple brackets but for this example I thought breaking it up a bit would help ....

  • Here is one way to do it - but I do hope there is a better/correct way

    select target with mouse

    If the selected target goes out of range then I think the gun will lock onto the next target in the list.

    Good luck.

  • Sorry I've never used the platform behavior - so this is all guesswork.

    I guess that mirroring, flipping and making vectors negative then somewhere something is cancelling out the other ?

    I will try to look and learn over the weekend - but I bet someone who uses platforms will be along with the answer before I can work it through.

    Mind you platforms do look interesting ...and there is nothing on the TV...

    (edit)

    Just had another thought - add in your player and pin it to this positional block. Where you were mirroring the block, mirror the player instead ?

  • Not sticking.

    try disabling all the mirrored/not mirrored and see if you still have the same problem.

  • removed post as already suggested/done above

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • could you break it down and see if construct is any happier in smaller chunks

    a=-6*z

    b=(6*q*z)

    c=q-100

    etc

    and stitch it all back together ?

  • version 2

  • First thought.

    Fire two bullets with the second slightly below the first so when they hit the angle between the two bullets should be the same as the edge - set the wall mark to the same angle.

    not tried it though....

    (edit 1)

    ok tried it and it is a start (maybe) although I expect there are much better ways.

    bullet wall angle thingy

    you could take this "found angle" and then match it to the wall angle (if found angle is almost the same as wall than make mark angle =wall angle. else do yo need to add 90/180/270 degrees ?)

    (edit 2)

    If you decide to go with this you will need to look at things like ...

    what to do if second (lower) bullet doesn't hit

    what if you hit a corner and the two bullets hit different edges.

    anyway - its an idea...

    Good luck.

  • yes, of course, you are correct.

    I like the use of colours/shades. A good idea - prepare to be plagiarised ! <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanks again.

  • Thankyou for your replies.

    LittleStain - your push sent me in the right direction - and I managed to get there !

    keepee - you went about it a different way I think (sorry I've not had a proper look at your capx yet but first glace says differently (and probably better)

    Thanks again

    edit -

    capx

    edit 2 - Updated the Capx with correct (possibly not politically correct) comments.

  • and "Thank you" for thanking me, that's all I ask for - and maybe a pint of Guinness if you ever see me out, possibly a packet of crisps and if you ever win the lottery.... <img src="smileys/smiley1.gif" border="0" align="middle" />

    As I understand it:

    lerp (a,b,p)   takes the difference of a and b and then finds p of it

    so lerp (a,b,0.5) would find halfway between a and b

    lerp (5,9,0.5) would give 2

    now in your case you only want a set percentage as we are always going from 0 so you would probably be better with setting gvHealingAmount to be heal*0.5 (if you wanted to take half for example) (we dont need the lerp)

    but if you go with what I said above (one gulp heals half of your lost health) then lerp is ideal.

    ceil (X) just rounds up the the next whole number.

    yes - my version just take some of the health left in the bottle and add it to your players health.