Dan Blast's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

    youtube.com/watch

    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

  • 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)

  • I'm not understanding how to implement this info with what I posted.

  • I need to do the following:

    Every tik subtract .5 from hungry

    If hungry <= 0 then set boolean stomachgrowl to true

    If stomachgrowl = true play sound growl

    Play animation tummy growl

    My problem is I can't seem to find a system option for if the boolean hungry is true or false to add the follow up commands.

    I know I'm missing something but can't put my finger on it.

    Thanks

  • Is it possible to autoplay a video in an iframe?

    If so what is the command to put into the iframe input field?

    Thanks

  • Happy Holidays everyone and thank you all for helping this Newbie out.

    (Especially dop2000)

    Merry Christmas

    Happy Hanukkah

    Festive Kwanza

    And Happy Yuletide to all!

    Tagged:

  • I figured out (I think) how to embed a youtube video into an iframe at least it works in the default browser.

    Now I'd like to have sprite/buttons that when clicked load in a new link so I can have several 'buttons' to load in different videos.

  • dop2000

    Still a little confused as to how to paste that in. Can you clarify it for me please?