LittleStain's Forum Posts

  • Well your explanation confuses me, while I understand..

    distance(x1,y1,x2,y2) returns the distance in pixels between point 1 and point2

    angle(x1,y1,x2,y2) returns the angle between point 1 and point 2

    to get halfway between the two objects you could move something 0.5*distance() at angle()

    another way would be to create an object at x=lerp(x1,x2,0.5) y=lerp(y1,y2,0.5)

    If you use

    dist(myObject1.x, myObject1.y, otherObject2.x, otherObject2.y) < distancetestvalue

    it will check if object2 is within a radius of distancetestvalue of object1

  • with the lowest instance you mean the one with the highest y-position?

    I guess a system for each sprite ordered y ascending event setting a variable to the sprite.uid and picking sprite by uid = variable would work..

  • With a timer you can time things, so yes, the time can be different..

    if you want an order of things to fall, you could just do it with a textvariable

    "1;5;3;4;2;1;5;4:3"

    set nextspawn to int(tokenat(textvariable,0,";")

    set textvariable to right(textvariable,2*tokencount(textvariable)-1)

    I guess you could do timing intervals in exactly the same way..

  • Well, you are spawning every 0.2 seconds so f the same color is spawned twice in a row, this is the distance..

    if you put it to 0.4 the closest distance would be the distance between the lightblue ones..

    Another way would be to turn the spawner off for the first creation after the spawn..

  • should work if your event is correct..

    You should reference both the animal and the plant in your event..

  • ah i get it ok but when i have HEALTH BAR i lose 90% for first hit (no make randome) i dont know why.

    I don't know why either..

    Without seeing your events and how you have everything set up, I don't think anyone can give you an answer to that..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It would be nice if we knew a bit more about your issue, but without further explanation we have to assume this is a variable of some sort..

    Losing means subtracting, so..

    If it's a global variable the action would be

    System subtract from variable : random(100)

    if it's an instance variable the action would be

    Sprite subtract from variable : random(100)

    this will subtract something between 0 and 100

  • Hi

    I am trying to learn how to Load Image from URL. Here is my project file.

    https://drive.google.com/open?id=0B19-3 ... W5DRU5XbUU

    I cant seem to get it working after several tries.

    Please could I get your help on this?

    Thanks

    Are you sure you linked the right capx?

    I don't see any event or action regarding load from url..

  • The images are very small and as such your events cannot be read..

    Are you adjusting the infinite jumping example shipped with Construct2?

  • How come you didn't find the solution?

    https://www.scirra.com/tutorials/1461/h ... age-plugin

    This tutorial shows exactly how to use local storage..

    It even has an example capx to download..

  • Did you search the forum for ladder?

    If I remember correctly there should be examples..

  • It would be easier to answer your question if you told more about what you do want instead of what you don't..

    What is the setup you are using right now, what kind of timing would you like?

    If you don't want random, you could use a timer and/or condition based spawning..

  • If you can explain what is happening, what your current events are and what you expect to happen, it will be a much easier question to answer..

  • system For each animal?