Noughts & Crosses tutorial

Index

Attached Files

The following files have been attached to this tutorial:

.capx

nought-crosses.capx

Download now 277.81 KB

Stats

1,653 visits, 4,029 views

Translations

This tutorial hasn't been translated.

Tools

Before we add more oxoSquare, first we need to create 3 INSTANCE VARIABLES therefore create 3 instance variables and name it:

1. xPostion = 0

2. yPostion = 0

3. playerNumber = 0

Now using CTRL drag and drop oxoSquare on Sprite_Squre nine times so it looks like below:

As we already have Array assign for this function we have to give each oxoSquare Instance Variable, which means CELL 1 will have xPostion = 0, yPostion = 0, PlayerNumer = 0 and next cell shown in picture is 1, 0, 0 and so on

xPostion = 0 xPostion = 1 xPostion = 2

yPostion = 0 yPostion = 0 yPostion = 0

PlayerNumer = 0 PlayerNumer = 0 PlayerNumer = 0

xPostion = 0 xPostion = 1 xPostion = 2

yPostion = 1 yPostion = 1 yPostion =1

PlayerNumer = 0 PlayerNumer = 0 PlayerNumer = 0

xPostion = 0 xPostion = 1 xPostion = 2

yPostion = 2 yPostion = 2 yPostion = 2

PlayerNumer = 0 PlayerNumer = 0 PlayerNumer = 0

Now lock this layer and unlock layer Square Grid, create sprite with 2 frames name it oxoScore

create sprite with 3 frames.

This is BLANK frame

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!