vee41's Recent Forum Activity

  • I'd do it this way:

    Every 1 seconds

    BuffTimer > 0

    .. Subtract 1 from BuffTimer

    On collision with buff

    .. Set ball.animation to buff.animationVariable

    .. Set BuffTimer to 5

    BuffTimer = 0

    .. Set animation

    .. BuffTimer = -1

    You could have animationVariable in each buff that says the name of the variable it should change ball into, so you don't need separate events for each buff.

    EDIT. nevermind :)

  • Here is an simple example:

    Rotating turret

  • That is certainly another possibility, but it's still more complicated than just storing it in a string. If it is impossible to have multiple lines in a string I'll certainly use some such workaround, but I'm quite perplexed if this is an impossibility.

    Like said before 'newline' works, for randomization you could use single string with something like ;name1;name2;name3;name4.. and then randomize it with tokenat(ceil(random(tokencount(..))), ";").

  • Here is a quick example how you could do it with physics:

    Skeleton arm - physics

    I'm not that familiar with physics behavior, but hopefully this gives you an idea how to do it and you can use this to fine tune your approach :)

  • I'd take a look at physics behavior: scirra.com/manual/98/physics

    More specific; torques and limited revolute joints: scirra.com/tutorials/65/physics-in-construct-2-forces-impulses-torque-and-joints

    You could also do it by limiting angles via instance variables and checking that they are not exceeded.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Vee, thanks so much for taking the time to do this. I noticed one thing in your current capx file. The move angle works perfectly, but the collision with Rock no longer works properly.

    Any idea why this is?

    Oh it seems to be if you fire to the enemy multiple times this happens as enemy does not necessarily collide with the rock again. Added a quick fix for that. :)

  • vee41 Honestly, i'm getting a headache for this. The biggest problem to determine the number of frames and each frame speed.

    The number of frames is in variable Harvester.AnimationFrameCount

    The speed of animation is determined by how fast the harvester gathers stuff, so a single animation frame takes: Harvester.AnimationFrameCount/Harvester.GatherSpeed seconds to display a single frame (I assumed a single gather cycle = one animation cycle).

  • Is this what you were looking for:

    Skeleton arm

    Be sure to rotate your bone frames to face towards right (angle 0) by default, it simplifies many things. I did with arm bones there.

    Also, using physic joints might simplify this if you intend to limit possible joint angles.

  • Do you think we can create new instance variable as "Impact Frame" we type 2 in value field which is related to impact frame?

    Yes, if you have different animations with different impact frames you need to change the action: Wait(Harvester.GatherSpeed/Harvester.AnimationFrameCount)*3

    Change the *3 to whatever your impact frame is, should work. You can have it as instance variable as well if you have separate animations with different impact frames.

  • Here is one approach that I actually did as an example for few other questions:

    Bang bang example

  • Edited the example a bit, added some angle related stuff. Commented it onto the events so ask away if there is something unclear! :)

    RamPackWobble lerp is really useful thing, ever since I learned of it's existence I've been using it on pretty much everything :P

  • Sorry didn't see your reply earlier :)

    Modified the example a bit, added a small delay so the gathering moment now matches with animation frame 3. Other approach would be to modify your animation a bit so it matches with gathering the way you wish, or start your animation on different frame.

    Hope this helps!

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies