PDA

View Full Version : Game Setup tutorial


Scott
12-22-2004, 03:46 PM
Setting Variables

Ive made a tutorial that explains how you can setup your flash game.

In this i explain how you can have the person playing your game personalize there character using variables.

First open a new flash document and click on the text and make a text box and write in it Name: then with the text box tool still selected go to the properties panel (Ctrl+F3) and click where it says static text and on the menu click Input Text then put a input text box beside the static text called Name: make the input text box. Then in the properties panel in the box that says Var: type "name" and the Maximum Characters "7". Then add static text and type in "Play" then hit F8 and convert it to a symbol and make it a button.
and give it this action script


on (release) {
gotoAndPlay("Game", 1);

}

Note: if your game wasnt made to start instantly when they go to it then change Play to Stop.

Now insert a new scene and hit Shift+F2 and name the new Scene "Game" and the first scene "Setup". Now on "Game" scene put a dynamic text box (same way you changed to input text box) and put it on the page where you want the person playing the game's name to show and type in it name (just so you can recongize it when making your game) then in properties in the box that says Var: type "name"

Now go back to the Scene Setup and click on the first frame and type in for action script stop();

Now you can test it and type in your name then go play and your name will be in the dynamic textbox on the next scene.

Assigning Skills
Now i will show you how to setup skills like health or strength or smarts

Go back to the setup scene and make a Static text box that says Smarts: then make a dynamic text box right beside it give it the variable "smarts" and then click on the first frame and type in this action script

function randomise () {
_root.smarts=random(10)
}
Note: you can change the 10 to whatever u want the range to be when it randomizes.

Now put a button beside the dynamic text box and gave the button say "Roll" then give it this action script
on (release) { randomise(); }

then go back to the "Game" scene and add a dynamic text box and give it the variable "smarts"" now you can test it and see how you can set your name and how you can roll your skills and now you can add name, age, loaction or whatever you want into your game.

Phreak
12-23-2004, 07:40 PM
Hmm...You'll need to simplify your tutorial. Act like the person you're teaching it to doesn't know anything. I don't know Flash, and that just sounded like argle-blargle goobely gook to me.

Scott
12-23-2004, 08:47 PM
well do you have flash? because its pretty straight forward if you do and i made it for setting up your a game and if you were able to make a game it should make sense because its the easy part of making a game