GameSalad

Stick to character's tongue

LemonKicksLemonKicks Posts: 64Member, PRO

Hi everyone,

I have a question where I can't seem to find the answer to. I have an actor (frog) that has a tongue that shoots out if a button is pressed. After the tongue shoots out, it retracts again. I have an ice cream actor which I would like to stick to the tongue and move back in with the tongue (so I can animate the frog eats it). I have no idea how to make the ice cream "stick" to the end of the tongue and make it move back in along with the tongue.

Does anybody know a good way of setting this up?

Comments

  • SocksSocks London, UK.Posts: 12,711Member, PRO

    "a tongue that shoots out if a button is pressed"

    This could mean just about anything, are you able to say what this 'tongue' is ? An actor that moves, an actor that stretches, an animated image sequence that moves, a static animated image sequence . . . etc etc . . ?

  • LemonKicksLemonKicks Posts: 64Member, PRO

    Sorry @Socks, I'll try to explain it better. The "tongue" is also an actor. I have added the rules of the tongue to make it clearer ("The word Uit" is Dutch for "Out").

    Replicate & Extend

    Retract

    Trigger retraction

    Destroy tongue

    I would like the ice cream to "stick" to the actors tongue.

  • ToqueToque Posts: 952Member, PRO
    edited February 15

    I've done this. I just use a move to behavior in to the frogs mouth. Make it fast and it will fool the eye. Or interpolate. Lots of timing fiddling. The tongue was just for show. A good snap sound helps sell it.

    Are positions variable? Or frog sits in one spot?

    See my Fly Frog Croak game. Though I could do a better job of it now.

  • LemonKicksLemonKicks Posts: 64Member, PRO

    @Socks and @Toque - the frog actor sits in one spot. I do have a demo project, but don't know how to implement it into my own game. Whatever Im trying, it doesn't seem to work. I tried to copy the rules of the "Grabable" (in TongueDemo.zip) into my ice-cream actor but it doesn't work.

    This is the demo project file of how it should be working.

  • ToqueToque Posts: 952Member, PRO

    Here is a demo of how I did it. Without details it would be hard to say how yours would need to work.......
    https://www.dropbox.com/s/h3mjum3e58b5v0k/sticky tongue.zip?dl=0

  • SocksSocks London, UK.Posts: 12,711Member, PRO
    edited February 16

    Like Toque says, without details it's hard to guess at what's needed, for example no one besides you knows what the target object is doing, it could be moving, it could be static, its interaction with the 'tongue' actor could be range specific, it could be time specific (etc etc) . . . anything anyone does is subject to a decent chance of 'yeah that's great, but it won't work for me as I need it to also do X' . . . attached is another approach, but like I say I'm not sure how much of this would be applicable to your needs ?

    Click anywhere on the screen to extend the tongue and grab the target.

  • LemonKicksLemonKicks Posts: 64Member, PRO

    Thank you so much @Socks and @Toque for your help. The files were very helpful! :smiley:

Sign In or Register to comment.