InadequateChris's Recent Forum Activity

  • I've been playing around with it, and it seems to work when I specify Goon in the action, instead of the Enemy family. Does anyone know why using the family doesn't work here please?

  • Thanks for that Klabundee.

    I just tried it and the variables show up fine, until the new instance is spawned - then the numbers all reset to 0 again.

    With your method of using a dummy layout, do I run the risk of affecting the dummies every time my Event sheet calls an Enemy?

  • Hi all.

    Just trying to spawn an enemy with some variables being applied to its Instance Variables. The result I'm getting is that they're all coming out as 0 when the enemy spawns, rather than containing these numbers.

    I have a suspicion it's because I don't have the object (Goon) dragged on to the Layout in the editor. But I shouldn't need to if I'm Creating the object in the Events, should I?

    For reference, Goon is a member of the Enemy family.

    Thanks for any help.

  • Okay I've ended up writing this code and it seems to work alright:

    (Worth noting that Ken is a sprite in the Enemy family)

    If anyone has a better way of doing it, please let me know. Thanks!

  • Hi! New to the software, learning the ropes.

    In this code I've set the Enemy to Punch if the attackOdds are less than 5.

    However, I'd like this number to be different for each type of Enemy, so I want to avoid hard-coding that 5 and use an expression instead.

    The problem is that the Condition of the Enemy only allows me to select Family Instance Variables.

    Does anyone know the best practice for this please?

  • You do not have permission to view this post

  • Thanks Lionz :)

  • Checking if an animation is playing is straightforward, but I can't seem to figure out how to check if an animation is not playing. Any help appreciated!

    Tagged:

  • Thanks for the response lionz, I'd just figured it out!

    On the button press I've put Set blockLikelihood to random(1, 100).

    And I've put a condition on the enemy that says blockLikelihood <= 25 and put the block animation in there. Works well!

    Cheers.

  • I've made a basic fighting game just to get to grips with this software.

    I've set up an Instance Variable on the enemy sprite called blockLikelihood which I've set as 25 because I want the enemy to have a 25% chance of blocking the player's attack when it lands.

    I can't seem to find out how to call that variable and turn it into "the odds" of the hit being blocked. Am I missing some obvious Conditions/Actions?

    Any help would be appreciated.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
InadequateChris's avatar

InadequateChris

Member since 2 Dec, 2020

None one is following InadequateChris yet!

Trophy Case

  • 3-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies