Time for action — creating the Objectives screen

Now, we are going to add a storyline screen. This is going to inform the player of his objectives. Create another level back in the project Home screen and name it Level 1 — Objectives and double-click it, so we can edit it.

  1. This screen is going to be pretty cool, we are going to create a new game attribute. So click the Attributes tab with the Game button selected, then click the + button to create a new attribute. Select text, then click OK.
  2. Rename your new attribute to Player Name, and change the text to something generic like Commander.
  3. What we are going to do with this is, we are going to get the player to type in their name, and GameSalad will save it. So every time a character talks to you, they will use your name! Cool huh? Ok, let's continue. Create an awesome-looking image for the objective, something that looks similar to the following:
    Time for action — creating the Objectives screen
  4. Import this image into GameSalad and create an actor out of it by dragging it from the Library to the Inspector, then drag it into the scene. Double-click it so we can edit it.
  5. Simply add in a Display Text behavior, and click the italic e button beside the textbox. Now, click the black down arrow button, then click Game | Player Name.
    Time for action — creating the Objectives screen
  6. Change the Font to Futura, Size to 15, and Color to green. Then we need to add in one more behavior; find Keyboard Input and drag it in. Change the settings to Change Attribute: | game.Player Name | Keyboard Prompt | Type in your name.
  7. This will now bring up a keyboard and textbox. You can type in your name and it will display it on our image.
    Time for action — creating the Objectives screen
  8. Pretty cool! Now, we have to continue the writing. For this, we have to create another actor, so create it in the Inspector and name it Text, then drag it into your level, and double-click it so we can add our text.
  9. Add in a Display Text behavior and type in whatever you like. You can explain a little bit of the back story, and your objectives, then change the Alpha to 0. If you don't remember how to do this, it's easy! You will find it in the Color drop-down in the Attributes box of the actor.
  10. Now, create a new rule, and we are going to use the same Tap to Begin behavior. Change it to Actor receives event | touch | is | pressed.
  11. Then drag in a Change Scene behavior and leave it at Next Scene.
Time for action — creating the Objectives screen

Now that that's done, we have to create our first level!

What just happened?

We created a really cool Objectives screen. This screen not only shows the objectives of the current level, but it also allows the player to type in their own name, and the level will use your name within the objectives! Cool!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.208.97