Yann's Recent Forum Activity

  • I agree with Ash but if it's just to show off a bit, you can try adaptating r0j0's cap into a capx (you need to download construct classic)

    http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=8368&p=63821&hilit=pathfinding

    I think it's pretty doable, all functionalities you need are in c2 already (except for the foreach ordered... But it's just to set random start and goal on start of layout)

  • Put all the inventory items in different animation frame of ONE only sprite.

    Then resend your capx I'll show you.

  • Well it does what you asked

    What you want is pathfinding. That's a bit more complex than the rule you described.

    Well, pathfinding can be a bit hard on CPU maybe you can avoid using that by rephrasing the rule of your little ship. Basically what you want is not comparing Y, but comparing the relative position of the ball in object space. As if you rotate coordinates to align with the ship.

    And it's really more complicated.

    Though, I know how to do that. Hmmmm ok I'll do a capx.

    avoidBalls.capx

    There ya go

    You will need to avoid placing balls to close together, the missiles have to have enough room to go betwen them (well they behave unexpectedely well if they get stuck they wiggle a bit and then turn around but the wiggling isn't really cool)Yann2011-12-30 15:09:29

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Send a PM to Animmaniac if you want his answer. I must admit I also wonder how he did it. I did the same effect on construct classic using a kind of chain reaction with instant hit bullets to get some coordinates and drawing lines between them. But I don't think it's doable like that in c2.

  • Zetar is right, using one object is the way to go. If they are really that different (different variables, different behavior) it's weird that you would want to do the same thing with all of them. But still, you just have to put all these variable in this object (hp and damages could be the same variables it often represent something similar)

    if they share different behavior you often can deactivate behavior on a per object basis.

    So yeah, you then just need something like For instance

    Mouse: On Left click
       -> Object: set X to 100

    And all of you objects will move in position

    If you want one object to do something on this object can do

    Object: animation frame = 2
       -> Object: deactivate Bullet behavior
       -> Object: Activate 8 dir behavior

    Only the object with the proper animation frame will move

    If you use animation frames, you won't be able to have specific animation per object. But it can be overcome, if you use different animation instead of different animation frame, you will then compare the animation name.

    It will always be easier than copy pasting.

    It's what I use when I want to emulate families

  • wandering.capx

  • look at r0j0's post http://www.scirra.com/forum/3d-carousel_topic47038.html

    For your question you better use the same object, if you want other images to show up, just add animation frames, set the animation speed to 0 and then change the initial frame in properties.

  • You sure you don't want to use the in-built platform behavior?

  • canvas (the html element where all the c2 magic occur) is just an array of pixels on which we draw with js to display the game. The engine to draw in canvas isn't the same as the engine that handle text in your browser. (:

  • hehe nice, the green of the leaves is a bit acid though you should make them match the green of the tree a bit more.

    also maybe the little boy could be a solid sprite so leaves will fall on him :D

    It's cool anyway. Is that all the "game" you mentionned or is it just a test?

  • Remind me of a custom platform movement I did before the corresponding behavior was created.

    Did you do that as an exercise?

    You should use dt to ensure smooth and non fps-dependant movement.

    add 50*dt to xSpeed will add 50 per seconds but bit by bits every tick ('cause dt is the time between two ticks)

    And then set X to player.X + xSpeed*dt you will go at xSpeed px/seconds

    Also as Weishaupt said it's better if you provide the capx, there's some other information we need to judge your work or at least to try it.

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann