Effregy's Forum Posts

  • create family genEnemy -- Families let you make make stuff affect multiple objects - enemy a the flier - enemy b the slug w/e

    instance variables

    -maxSpeed

    -slowTimer

    genEnemy on created

    - set max speed to genEnemy.maxSpeed

    - set genEnemy.slowTimer to 0

    on genEnemy hit

    - genEnemy set max speed to ((genEnemy.maxSpeed*(8/10)) - for 20% decrease

    - set genEnemy.slowTimer to 20

    if genEnemy.slowTimer = 0----invert --- i.e. if slow timer does not = 0

    -set genEnemy.slowTimer to (genEnemy.slowTimer - dt) -- might need to be a sub event ---- system - every tic - set genEnemy.slowTimer to (genEnemy.slowTimer - dt) --- not positive though =p

    else

    -set genEnemy max speed to 400

  • This is driving me nuts... I'm trying to make a megaman zero/fortune summoners inspired game, and i want the player to be able to wall jump ++ wall slide

    so i fiddled for a while and got both working for the right side

    when you try it on the char's right - it works perfectly

    however, left side has a bounce when the player collides with the wall

    player collides with wall and is smoothe on the right side

    https://www.dropbox.com/s/7gga1wjnvtakkxt/bounceCorrect.png?dl=0

    players collides with wall on left and bounces before becoming smoothe

    https://www.dropbox.com/s/67oy72qojqm4plq/bounceBad.png?dl=0

    I can't figure it out.

    This is a temp char - who only has the wall jump + wall slide code - the wall jump code does not affect it

    https://www.dropbox.com/s/t23j4g5a81196ay/wallLog1.png?dl=0

    https://www.dropbox.com/s/1mem477tz611sij/wallLog2.png?dl=0

    https://www.dropbox.com/s/dks5lzvxmy39xxi/wallLog3.png?dl=0

    https://www.dropbox.com/s/jvb7hi97f106zkd/wallLog4.png?dl=0

    Any help would be appreciated.

    Edit: added urls for images since the forums don't feel like displaying them

    Edit 2: Capx -- added the code to the platformer template - still has glitch

    https://www.dropbox.com/s/qxap11uxruisvf3/wallSlideBounce.capx?dl=0

    Also - something that's been nagging me - how do i stop keyboard input? - like

    if gamePaused = True - accepting keyboard input = false

    because time scaled based pausing doesn't stop the player from being able to act =<

  • Sweet after causing a black screen from having an the parent the container spawn an object in the container - I unbroke it and it works perfectly!

    I'll still try the tint method for smaller enemies, but containers, fixed the problem I'd have with larger enemies, and gave me some ideas for modular boss designs

    I'll update the original post with the final code to achieve this result.

    Thanks for helping =]

  • I didn't actually notice the effects stuff...

    I'd seen containers, but had no idea what they were for, thought it would be something like a more specific family, i/e not something that would fix the issue I'd had

    But I will definitely look into both methods

    thanks for the reply =]

  • <img src="http://s18.postimg.org/6a3n4pnl5/problem.png" border="0" />

    This doesn't work <img src="smileys/smiley5.gif" border="0" align="middle" />

    what happens, is it's either at 0 opacity or max

    and even when the valkyrie should have full health, it's at max opacity

    I knew why it was having trouble connecting each valkyrie to it's damg version, but I don't see how to fix it. I figured it'd be something with the uid's, but even then, when one valkyrie was low on health, all of them were displaying as heavily damaged

  • I'm going to have to look up a tutorial on For Each, I've never used it lol

    Also

    With what I was trying to achieve -- more damg = more opaque, a percentage based method makes more sense, since the opacity is based off a range of 0 invis - 100 opaque

    besides I took a simple problem

    20 out of 100 you'd want 80

    10 / 100 you'd want 90

    15/35 you'd want 57.1ish

    ect

  • I'm going to have to play with that before I grasp it fully and see what it'd be useful for

    However...I broke my brain again... I added multiple enemies, and I can't figure out how to get the enemy to spawn the damage version and have it only be affected by the enemy that spawned it

    Valkyrie A B and C spawn

    ValkyrieA spawns DamgValkyrie

    ValkyrieA loses 20 health of 35

    ValkyrieA should be the only one with a damg version showing

    however, A B and C are all becoming Damaged =/

    Valkyrie - on created

    >>Valkyrie - spawn ValkyrieDamg

    >>ValkyrieDamg - set position to Valkyrie

    >>Set Angle to Valkyrie.Angle degrees

    >> ValkyrieDamg set affector to self.UID

    >> Valkyrie set affectorCall to ValkyrieDamg.UID

    Valkyrie - health < self.maxHealth

    -ValkrieDamg self.Affector = Valkyrie.affectorCall

    >> Set Opacity -- Self.initialOpacity+((valkyrie.maxHealth-valkyrie.health)/valkyrie.maxHealth)*100

    Edit: Haven't figured out what that expression would be useful for lol

    //(3 - 2) * (15 - 8) / (7 - 2) + 8 //

    gives 9.4 - first I'd though maybe range of damage verse armor, but then you'd prob use something like

    -damg = random(2,8) -armor = 5 -pierce of 20%

    so something like damg-armor+(pierce*damg)= dealt damg

    so base 7 - 5 + (0.2 * 7) = 3.4 total damg

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because my brain is broken, this took a moment to figure out, so for funsies, I'll release the final result I came up with....

    System Every Tick >> heliBossDamage - Set Opacity >> Self.initialOpacity+((heliBoss.maxHealth-heliBoss.health)/heliBoss.maxHealth)*100

  • I come from a background of game maker and there is a function you can call or script yourself that changes the color through programming

    I figured there would be something similar in Construct 2 that would allow the same affect.

    However, just using opacity is a perfectly good way + you got me to look up blend modes. And for what I'm trying to achieve that method works perfectly fine.

    Witch is why I edited my original reply =p

    Thanks again <img src="smileys/smiley36.gif" border="0" align="middle" />

  • Sweet- I'll try both out

    Thanks for the help <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Problem - Causing an enemy to become redder, as it becomes more damaged - a visual indicator to how much life it has left

    Like so....

    <img src="http://s28.postimg.org/xme4qrsjh/health_Color.png" border="0" />

    ---Solved thanks to

    -Little Stain

    -Insignia

    -Squidget

    Method

    Create 2 objects

    1 Enemy object ----------- valkyrie

    1 Enemy damaged object --- ValkyrieDamg

    Set the enemy damaged object into a container of the enemy object

    Valkyrie - on created ->>ValkyrieDamg - set position to Valkyrie

    Set Angle to Valkyrie.Angle degrees

    System Every Tick - >> Set Opacity -- Self.initialOpacity+((valkyrie.maxHealth-valkyrie.health)/valkyrie.maxHealth)*100

    This method allows you to transpose a damaged version in varying opacities over the original object.

    An alternative method is to use the tint effect to cause the color change.

  • If you need to facepalm yourself... you're probably tired lmao

    <img src="smileys/smiley41.gif" border="0" align="middle" />

    Thats like the only thing I didn't check...

    The ways its set up...

    system-every tick>>>>scroll to>>>xBound.X && playerBox.Y

    Allows player to control what height, and path they want to take.

    Thunder Force 4 did a lot of this.

  • I'd heard about *dt stuff somewhere and wanted to try it out lol.

    Yeah, just ignore the movement stuff. <img src="smileys/smiley34.gif" border="0" align="middle" />

    The scrolling works, but the Green square it's supposed to keep in center view, scrolls off screen.

    <img src="smileys/smiley13.gif" border="0" align="middle" />

    It also does not allow for cam changes in movement angle

  • I'm trying to make a Thunder Force style Shootemup as my first game.

    For 3hours or so now, I've been trying to get a scrolling view - that the player can freely move in, but not out of.

    So far, I have Thunder Force like camera with constraint to view.

    Every Tick >> Scroll To xBound.X && xBound.Y

    This lets you have really tall levels if you want.

    The Scroll To function is acting odd.

    I have "xBound" object with Bullet behavior, speed of 50.

    In game, the views is supposed to be constantly moving Right.

    It does, but the xBound object moves off screen right.

    It bothers me... <img src="smileys/smiley7.gif" border="0" align="middle">

    -----------------

    Capx

    ----------------

    ----------------

    Edit: Forgot Ctrls

    Arrow Keys - Mvmnt

    Num 1-3 Debug Weap Select

    "A" - boost

    "D" - fire

  • Check this tutorial out... It's quite rediculous how easy he makes it seem

    scirra.com/tutorials/468/part3-basic-fighting-game-tutorial-video-series