keepee's Recent Forum Activity

  • If you know for sure what the value of the instance variable is on the object you want to affect.. you could just do:

    +on object collision with object

    +object.variable = [number]

         ->your actions

    If however, you don't know what the value is.. but need to check for the one with a lower value for example.. (like health points) you could do:

    +on object collision with object

    +for each object ordered by object.health ascending

         -> stop loop

         -> your actions etc

  • Have you looked at the toon effect? (just making sure)

    It doesn't do opacity thickness or colour but I guess it would be a good place to start..

  • The reason the distance was increasing is because on every single tick it moves in a straight line that is 90 degrees from the direction to the centre.. In a sense it's not truly curved, the angle is just corrected 60 times a second.

    Imagine what happens on a single tick, and if that distance was 200 pixels instead.. i think that makes it easier to see why it's moving further away from centre.. i hope .. I can totally understand the confusion though.

    edit: you should try something like this, it's more or less what newt was saying.

    <img src="https://dl.dropbox.com/u/53374990/Forum/orbit.png" border="0" />

  • ptbcomposer

    int(clock) will clear the decimals

  • Nope, it just returns a random number in between the two values.

    and if you only put one number in like random(5) it will interpret that like random(0,5)

  • How does the button actually work? Is it fading out, or animated?

    What does it do before it allows you to click on it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Click the mouse to spawn random sized objects:

    bouyancy

    There are two instance variables for each object

    "bouy"

    Which is like the base bouyancy rating. The higher the value the more it'll float, and if you set it low enough it will sink.

    and "bouyMod" which goes from 0 to 1 depending on how submerged the object is.. 0.1 being only a tiny bit in and 1 being full submerged.

    then the actual Y force is -(sprite.Bouy*sprite.bouymod*sprite.physics.mass)

    Another thing you could add is a way to increase the linear damping when in the water, and to reset it back to normal when it comes out of the water.

    ..also maybe a crash variable.. that reduces the objects speed when it collides with the water.

  • If you make the clock a global object, this means it won't get destroyed on layout changes.

  • whiteheat

    haha yep, i know the feeling..!

  • whiteheat

    random(-50,50) works too.

    spawn object at player.x+random(-50,50), player.y+random(-50,50)

  • Right.. sorry, I should have tested this.

    The error is because after it has waited, it doesn't remember what loopindex it was on at the time.

    also The trigger once just needs to go above the repeat condition.

    To solve the angle problem, I did this instead:

    <img src="https://dl.dropbox.com/u/53374990/Forum/01.png" border="0" />

    the angle is set by an instance variable that gets added to on each shot.

  • Events don't ever affect objects that aren't in the layout..

    Because they aren't there :p

    Or do you mean if they're on screen? Because in that case it should still apply to them.

    What were you hoping to do?

keepee's avatar

keepee

Member since 6 Jan, 2012

None one is following keepee yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies