Dan Blast's Recent Forum Activity

  • Got it running!

    The thing was I had the line 6 set every 5 seconds to subtract .05 when I changed that to .5 it sped up enough for me to see it faster.

    Thanks so much!

    Now I just have to get it working in the other event pages.

  • Made the changes you suggest but the health bar moves slightly then stops with no further changes. Can't pin down what I'm doing wrong.

    Edit: Actually I see it (the health bar) going down it's just slower that's why I didn't catch it. But when it hits zero the hungry animation is not playing. I changed the line 6 to -.5 instead of -.05 and its working now.

    Thanks so much.

    Now I've got to get it working across the other layouts.

  • I deleted all references to hungerscore on all other event pages it's just the eat event page. Still not working.

    drive.google.com/file/d/1_YdmMttmQytx2hRCvZ-SeejYtIv68WV8/view

    If you want to take a look.

  • I know you said don't copy but I'm kind of stuck and trying to catch up. I ran the code you gave as an example it deducts .5 and shows on the health bar but then stops subtracting and stays there.

    Thanks for being patient with me. I'm trying to learn as best I can.

    Any ideas?

  • Yikes that's a bit complicated I don't understand how to get that number amount field under that Onfunction ChangeHungryScore line.

  • dop2000

    I tried to follow your example but I got lost on how to add the burpamount and fartamount (sounds silly when I type it LOL!) to the family.

    Am I making a new global variable? or trying to add a new instance variable to the food family? I tried that but then when I go to add it as an action it won't appear as an option.

    BTW I missed your last post and saw it after i posted.

  • My bad, since I'm new to using families. I appreciate you introducing me to that. It will be very helpful in the future.

    Now I'm running into this issue. (I Fix one brake another I guess).

    I'm trying to have when the hunger score gets to zero to have a hunger animation play.

    The problem is it loops not the animation but the command and constantly restarts the animation so it looks like it does not play. In addition I tried also to add a stomach growl sfx but since it loops it sounds terrible.

    I need to get the animation to loop but for the hungerscore to stop subtracting after it hits zero.

  • Hmm just gave that a try and can't seem to get that to work.

    I eliminated the specific code block for the cheese for example and grouped all the food items under one family.

    Changed to code as in the example but the cheese can be dragged but does not interact (disappear) when over the mouth.

  • Ah very interesting. I did not know about this.

    Thanks I'm going to play with this and see what I can do.

  • Here's a screen shot of the event sheet with the relevant code.

  • Just sent you a few coffee's thank you for all your help.

    I think I'm following you a little bit.

    In this part of the game there are four foods (Cheese, Cookie, Sushi,Roll). I can make them one item with four animation frames and call that food. If you suggest that. But then I run into the issue of when the 'food' collides with the mouth resetting it it and having four different animation frames moving back to the original point they were dragged from.

    I have an invisible sprite called 'mouth' when the 'food' sprite collides then add 4 (full health) to the health variable called "hungryscore".

    Then set the health bar sprite to full animation frame 4.

    And make the character hungry animation invisible and turn back on the character neutral animation.

    I have a system every 1 second subtract 1 from the "hungryscore"

    When hungryscore is <=0

    Set the health bar sprite to empty animation frame 0.

    Turn off the character neutral animation

    Turn on the character hungry animation.

    I hope I'm explaining it clearly apologies if I'm not.

    Here's a video demonstrating how it works now.

    youtu.be/KNX3YaQw28o

    I'd love to simplify the code I'm trying to get my skill level and understanding up to the task.

    Here is a link to the file:

    drive.google.com/file/d/1txTu26urW49n5ldZIVjTErcfy7xy9WL8/view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I figured it out. For anyone interested:

    add the following at then end of the embed line in the iframe field.

    &autoplay=1

    You can also start a video at any time and end at anytime the same way.

    &start=10 (10 seconds in)

    &end= (whatever time you want to end)

Dan Blast's avatar

Dan Blast

Member since 14 Oct, 2013

None one is following Dan Blast yet!

Connect with Dan Blast

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies