razorMonkey's Recent Forum Activity

  • But with random numbers you can adjust chance of each object to appear. For example if you want speed power up to appear twice as often as shield power up.

  • Not sure if there is regular way, although I believe you could "cheat" here.

    Create 2 families, and in both put objects you want to collide. Then pick by first UID first family, by second UID pick second family, and them detect their collision.

    They will be objects of the same type, by defined by different family.

  • Great thing with function is that, if you need to change what it does, you need to do it in only one place, function itself.

    For example if you want PlayerObject to do something else than "set animation to Default" now you need to change it in line 36 and in line 37, so on two places. With more conditions it would be more work.

    With function, you would need to change it only in that function (conditions will point on that function).

  • relativePositionX = object.x - anotherObject.x

    relativePositionY = object.y - anotherObject.y

    If you want distance then relativeDistance = distance(object.x,object.y,anotherObject.x,anotherObject.y)

  • My suggestion is If it ain't broke, don't fix it.

    But if you really want lots and lots of conditions you can use function, but remember to pass object UID into function (with parameter), and then, in function, pick it with "pick by universal ID"

  • First you have to be sure right box is picked beforehand by condition.

    Then you can either put all loot in 1 family and then spawn family (which will give you one random object in that family), or you can use compare variable with random number and else:

  • Thanks

  • You could also use tokencount and put as separator. If tokencount is less than 1 (or even 2 in event of email) it should be invalid.

    https://www.scirra.com/manual/126/system-expressions

    Maybe there is some even better condition here.

  • You can have 2 events with 2 subevents each. Events will calculate the difference (first will do it for X, second for Y) and subevents will look for relative position.

  • My first game in Construct 2, (and HTML 5 in general, used to design games in Flash/Actionscript 3 before),

    already hosted on several sites, but without much success (it had some performance issues on some browsers):

    http://razormonkey.net/igra/battleSunKong4/

  • Could this solve your problem?

    I added maxSpeed variable and additional condition on 1. event

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem is, if I am not wrong, that it points on objects which are not picked by any condition beforehand, so it points on all of them.

    You should split them, or put them in one family and then use that condition on whole family.

razorMonkey's avatar

razorMonkey

Member since 4 Dec, 2013

None one is following razorMonkey yet!

Connect with razorMonkey

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies