LittleStain's Recent Forum Activity

  • Is it possible to make the p1x and p1y variables of the objects or is there any other way to create a reference between the objects and their desired pin-position? if so you could just make a function.

    on object dropped call function"CheckDistance" with parameters (object.x,object.y,object.pinlocationx,object.pinlocationy)

    on function "CheckDistance"

    (subevent) - Sytem compare values : distance(param(1),param(2),param(3),(param(4)) < 22

    and add your actions.

  • If it's for 50+ objects you should probably look into doing it with the function object and/or families. Also if many of those objects are instances of the same object you should look into picking instances.

    the distance(x1,y1,x2,y2) is just a value you can put into your system compare values event.

  • What's wrong with the way you do it now?

    You want to check for two different things, but do it in 1 line?

    You could change the compare two values to

    if distance(objectname.x,objectname.y,p1x,p1y) < 22

    but that would make a circle of 22 pixels around your variables instead of the square you use now.

  • for the webstorage part,instead of set key in the start of layout you should do something like:

    system set value score to webstorage.localvalue("score")

  • Did you read my last post?

    I'm talking about adding an instance variable to a global object or setting the value in a global array and retrieving it after resetting the global variables.

  • Would using a global object to get the variable from one layout to the other work?

  • If you have a lot of global variables already it wouldn't hurt to make one more for the global score that you don't reset.

  • So actually your throwing something away that you want to keep?

  • I thought global variables are only reset if you have an event to reset them?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • system every tick - character platform simulate pressing right.

  • Easiest way is to use bullet behaviour with gravity.

  • You should use subevents.

    After you pick the insect which is hungry, pick the insect to chase in a subevent. In another subevent (as long as it is a direct subevent if your for each) if you reference an insect it will be the one originally picked.

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies