R0J0hound's Recent Forum Activity

  • I'm in. Thanks.

  • You're almost there.

    Given:

    s distance

    t time

    v final velocity=0

    Find:

    u initial velocity

    a acceleration

    (1)

    v=a*t + u

    solve for u

    => u= 0-a*t or u=-a*t

    (2)

    s = 1/2 * a * t^2 + u * t

    substitute u with -a*t and solve for a:

    a=-2*s/t^2

    and you also get u by plugging a into equation 1

    u=2*s/t

    Here's a example:

    http://dl.dropbox.com/u/5426011/example ... ration.cap

  • Opps, you need to set the text again in the second event. You could also make the second event a sub event of the first.

    [quote:t8cck72c] MouseKeyboard: On key 1 pressed

    System: Create object dmgText on layer 1 at (eneTest.X-20, eneTest.Y)

    -> dmgText: Set text to global('dmg')

    -> System: Set global variable 'dmg' toClamp(floor((1+random(0.225))*(global('ATK') *1.0 - eneTest ('DEF')*3))+1, 0,99999999999)

    System: Is global variable 'dmg' Greater or equal 100000

    -> System: Set global variable 'dmg' to str(Int(global('dmg')/1000))&"K"

    -> dmgText: Set text to global('dmg')

  • Just change the event order.

    [quote:2id0okz0] MouseKeyboard: On key 1 pressed

    System: Create object dmgText on layer 1 at (eneTest.X-20, eneTest.Y) -> dmgText: Set text to global('dmg')

    • > System: Set global variable 'dmg' toClamp(floor((1+random(0.225))*(global('ATK') *1.0 - eneTest ('DEF')*3))+1, 0,99999999999)

    System: Is global variable 'dmg' Greater or equal 100000

    -> System: Set global variable 'dmg' to str(Int(global('dmg')/1000))&"K"

  • Just add a action to event 4 when the bones are mirrored to invert the angle as well.

    -> bone: Set angle to 360-MouseAim.Angle

    Cool rig btw.

  • You can also use python to do the calculations as I think it may use higher precision floating point numbers.

    And if that still isn't accurate enough you could try the python decimal module which allows extremely high precision floating point calculation and storage.

    http://docs.python.org/library/decimal.html

  • Yep, it's the "Spell Effect" sprite that is using all that vram. Without it the vram usage drops down to about 20 mb.

    A

    You could delete every other frame of it's animations and reduce the vram usage by half, at the expense of having slightly less smooth animations.

    B

    Another solution would be to take the images you imported re-size them by half and re-import them into construct. That would reduce the vram usage to one forth of what it uses now. The quality reduction will not be too noticeable since the animations are of fire and smoke, which are by nature a bit blurry.

    If either of those is not enough you could do both and reduce the usage to one eighth of the current.

  • Hey... Do you know a way to get the number of objects with opacity = 100??

    I'm trying

    condition:

    pick 'object' with opacity=100

    action:

    text: set text to object.Count

    but it's getting objects with different opacities too..

    object.Count always gives the total number of instances.

    Use CountMatching(object.OID) to get the number of picked objects.

  • [quote:410xqhgh]Is there a way in construct to store excessively large or small numbers.

    Construct uses floating point numbers so it should handle it just as well as any other program.

  • The python functions take the same number of arguments as their event counterparts. So events are the reference.

    If the argument in events is a color then in python it is in this form:

    System.rgb(255,128,0)

    so to set the filter of Sprite to red:

    Sprite.SetFilter( System.rgb(255,0,0) )

    If the argument in events is a object then in python it is the OID of that object.

    If the argument in events is a combo box then in python it is the index of the list, starting from zero.

  • [quote:1h1jk10v]What version of construct can this be used with?

    Any version should work.

    [quote:1h1jk10v]...or get examples in 1.1

    I converted the examples to 0.99.96 here:

    http://dl.dropbox.com/u/5426011/plugins ... s09996.zip

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:2csx415z]Also, might check the wording Rojo. The action reads kind of opposite of what you would expect.

    Thanks, it's now fixed. Just re-download.