lionz's Recent Forum Activity

  • I've done it here in 2 easy events. No need for variables in the end, it relies on the bar width only. Have a look. I've kept your old logic in there but disabled.

    https://dl.dropboxusercontent.com/u/495 ... dited.capx

    You MAY need to relate it to a global variable in future, it's easy to adjust, or you could still rely on the width of the bar if you wish i.e. if width=1 then show character's tired animation, reduce speed etc something like that.

  • I can fix up the logic but it'll be later on today. If someone else fixes it in the meantime that's fine, otherwise I'll take a look.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Either one but make sure it's only one. If you plan to have stamina bars for enemies and other characters then using local variable would probably be best, then linking only the player stamina to the UI bar. If it's just the player that has stamina then just use a global variable. If it's still not working as intended with the global variable 'Stamina' then we can take another look.

  • Pretty good guess. Event 27 your idle animation logic is always playing when you right click and overrides the shooting animation. If you disable this you'll see it go into the shoot animation on right click. You'll need to split scenarios so that when you are going to shoot, the idle animation does not apply. At the moment it plays whenever the player is touching the floor and the stutter jump you are seeing is the jump to start with 40ms blend logic or resetting of the idle animation.

    For the bullets passing through, the idea sounds good. Just make sure to enable bullet collision again when not in contact with the player. It will need some fine tuning though I guess.

  • You could probably find it but why would you need to? You can clear browser cache to clear data. If you locate the actual file it's probably just a load of encryption.

  • The logic is randomly swapping between a global variable called Stamina which is always between 0-300 and a local variable on player called Stamina which keeps reducing constantly into negative amounts every tick and never recovers. The local variable seems broken, I don't see where it relates to the bar? If you set up two text boxes separately to display Global Stamina and Player Stamina every tick you can see what they're doing. Too confusing for me to look through as it just says Stamina everywhere.

  • If you're having trouble then the best way is to post on the Bugs section and possibly attach a .capx so that someone can recreate the crash and assist you.

  • ah spot on thanks.

  • If object > Is on-Screen(inverted) > do the thing

    As for memory usage:

    Off-screen objects are not still rendered. Construct 2 does not issue draw calls for objects that do not appear in the window, and the GPU is also smart enough to know not to render any content that appears outside the window - even when a single image is only partially on-screen.

    The layout size also does not have any direct effect; larger layouts do not use more memory or require more processing, unless you use more objects.

  • Changing the 'is touching' events to 'on touched' will only destroy the touched object rather than mass destroy every flashy thing in view. I had to disable the fading though to see this in action, the fading makes it irrelevant whether an object is destroyed or not, right? Will assume you are going to add future logic like re-enabling the fade-in on undestroyed objects or something, tough to work out exactly how you want your game to work.

  • Just a quick one as I don't use physics too often.

    I've set my player up with platform behaviour. The physics objects move around as expected. I seem to be unable to push physics objects though unless I also give the player the physics behaviour, which has weird results. I assume there is a way to do this without giving the player the physics behaviour.

    What's the usual way for allowing the player to push objects, do you have to simulate it yourself with object move x,y on player touch etc? Or are all the cool kids adding the physics behaviour to the player?

  • You probably have some overriding idle animation logic. But yes this is kinda impossible without the .capx, cut it down and link!

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 72 followers

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

24/44
How to earn trophies