drunkenmonkey's Recent Forum Activity

  • Why not just put your full health bar image in a Tiled Background and decrease the width? That'd be so so much easier than this system.

    I tried that way already and I just wanted to compare it to my other method. After messing around with health bars for a day I would have to say that Rich's example is probably the easiest and it can look good too. It's a pain to make a ton of animations. Thanks for the examples Rich

    By the way, I found out why the frames were moving around. It was because I did not set a hotspot for each frame!!! SIMPLE mistake.

  • I just found out that the frames do not completely disappear. The animation frames change position on the X and Y coordinates down and to the left until I can't see them.... even though I have the X and Y coordinates set and for that particular layer scroll is disabled...weird.

  • I did not like the way some of the previous health bars I created looked so I tried a new method. I created 35 animations of the health bar and just trimmed a tiny bit off of the right edge each time. Here is what I set:

    -global variable "health" 98 or greater --->animation "health decrease"

    --->animation set frame 1

    -global variable "health" equal to 97 --->animation "health decrease"

    --->animation set frame 2

    -global variable "health" equal to 96 --->animation "health decrease"

    --->animation set frame 2

    and so on.....(I pretty much just guessed how big the health bar would look at the current "health" variable and set "equal to" on every number from 0-100)

    The problem is that after some damage is dealt, frame 1 (FULL health) disappears completely and no other frames are ever set. I will try to upload a sample of what is happening later in the day.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the event where the subtracting happens, "'c' is pressed" or something like that, you must add an additional condition to test whether you have enough mana! For skill requiring 20 mana, click "insert new condition" on the menu in event editor and test if private variable 'mana' is 20 or greater.

    Worked perfectly thanks. I messed up because I put mana 20 or greater on "animation is playing" which is a sub event of "c" instead of putting it DIRECTLY on "c"

  • In my Platform School tutorial, starting with lesson two, there's a health bar of hearts up in the HUD. They're set up like Rich described for a reason... when it comes time for adding or reducing health all you have to do is + or - 32 pixels from the width of the health bar

    Or

    > +Always
       -> healthBar: Set width to global('playerHealth')*32
    [/code:3ca6p33m]
    
    But that's going in a future tutorial 
    

    Yea I saw your platform school tutorial. Its explained EXTREMELY well. Now that I understand the health bar its simple thanks.

  • There is another issue that I need help with also. I have 2 private variables (health & mana.) My "mana" is set to regenerate +1 every 1 second. Let me explain the problem... ok lets say I set "c" to subtract 20 mana from the player and the player has 20 mana TOTAL. If I use "c" it makes the player reach zero mana BUT if I use it AGAIN the player goes to NEGATIVE 20 and if used AGAIN it goes to NEGATIVE 40 and so on. How do I set mana to NOT DECREASE if the player does not have enough to use?

  • Thanks a lot for the tips. I'm going to try the tiled background method & see how it looks.

  • First and most importantly, what command do I give to make a sprite follow my player (I want it to walk up to me and start punching.) I've tried multiple things but I cant seem to get it to follow me properly (it's a platform game by the way.)

    Secondly, if I wanted to have a health bar visible, would I have to create a sprite of each possible health amount (full health, half health, no health, etc.) and just have Construct replace the health bar each time the character is hit while reducing private variable points? Is there an easier method?

    Any help is appreciated.

  • I searched the forum but could not find a tutorial on how to create smart AI. I was wondering if anyone could briefly explain it to me (I know smart AI are very difficult to create & take a ton of time.) But I need a starting point.. like what default behavior is the best to start with? And how do I make it trigger a button on its own when it gets close enough?

    Any help is appreciated. Thanks.

    Never mind, I just found some useful information that will help me begin. Looks even more difficult to program AI to do what I expect them to do

  • I searched the forum but could not find a tutorial on how to create smart AI. I was wondering if anyone could briefly explain it to me (I know smart AI are very difficult to create & take a ton of time.) But I need a starting point.. like what default behavior is the best to start with? And how do I make it trigger a button on its own when it gets close enough?

    Any help is appreciated. Thanks.

  • Fixed.

    You were telling Construct to set your running/standing animation without any regard for whether the throwing animation was playing. So it would start the throw, but then the very next tick it would set back to standing. You have to be careful about the order of your events, and make sure that you're not canceling your own events out accidentally.

    I added a "NOT Animation "kakashi throwing" is playing" condition, and made your running and standing events into sub-events under it.

    I also set your throwing animation to not loop, and added the "Set to frame 1" and "Play" actions to the On Key event. It works fine now.

    http://willhostforfood.com/files3/7264753/Unnamed.cap

    THANKS!! At least now I understand why it was twitching lol. By the way, your platform tutorial helped me out a lot. I'll be back with more problems in the future lol.

  • Ok I got it on rapidshare. "Z" is the button I want the throw on.

    http://rapidshare.com/files/174490900/Unnamed.cap.html

drunkenmonkey's avatar

drunkenmonkey

Member since 18 Dec, 2008

None one is following drunkenmonkey yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies