How do I switch the images back and forth depending on the option?

0 favourites
  • 7 posts
From the Asset Store
Helping streamers give their viewers more excitement.
  • C3/Making Mobile app.

    This app is to help children, with a specific cognitive disability, learn to make sentences. The children choose the options, the pictures pop up to make a complete thought and at the end the kids read the sentence.

    The problem comes when the player taps ‘the kids’ or ‘the robot’ then decides what the kids or robots do and then changes the options.

    If the player taps ‘the kids’ the kids pop up. Then if the player taps ‘go trick or treating’ the current image vanishes and a new image appears of kids trick or treating, but if the player Then changes ‘the kids’ to ‘the robots’ the robots pop up and ‘the kids’ are still on the screen with their buckets filling with candy.

    I think I need some kind of toggle, but not exactly sure how to build it. I’ve tried to set global variables and instance variables, but I’m missing a step somewhere.

    Thoughts? Suggestions? Demos?

    C3 download: drive.google.com/open

  • Fixed your project, made it much simpler:

    dropbox.com/s/9l5bs8e8vbguwzr/MakeASentence2.c3p

  • dop2000 That's Brilliant!

    Thank you.

    Now I need to figure out how you put 2 strings in 1 instance - that could save a ton of time.

    Thanks again.

  • You mean Who&What? If Who="Kids" and What="Dancing", then when you concatenate these two variables you get Who&What="KidsDancing"

  • dop2000,

    Well you know me ... after staring at it for 30 minutes, I got a light bulb and figured it out.

    Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000,

    Ok, I thought I figured it out. But 2 days later and .... well not so much.

    I attempted to recreate, clone and copy/paste to learn how you did it, but I've failed.

    I understand the concept of Who&What="KidsDancing" but some component is eluding me.

    I give up. Please, how did you get the images to correspond with the words? And the images not to show on the screen when the page starts?

    I see that the A1txt each have a bunch of instances - that I figured out how to do.

    But getting the text that's clicked to show the image I want shown - I have no idea what you did.

    This is the copy of my failed copied and clone attempt:

    drive.google.com/open

    (I just know after I hit post, I'm going to figure it out.)

  • You need to rename the animations in B1Who2 sprite. For example, where the puppy is playing with the butterflies, the animation should be "PuppyButterflies".

    Other small issues - on "the brown puppy" text, fix the value in the Who variable, it says "Pupply". And you have two copies of B1When2 sprite for some reason.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)