![]() *TIP- keep checking that the script is correct by previewing the game. Put the x value in first, then the y value. ![]() To attain these coordinates, drag the clothing into place, and the coordinates should show up in the Properties tab, under X and Y. In my dress up game, I need to know which items are on the doll in order. These are the x and y coordinates of the item of clothing when it is in it's snapped position. Next Create simple action script pause function to hold timeline for x seconds. Following that, there are two more numbers. Put these numbers into their respective places in the code. In order, the first four numbers you need are: To fill in the number blanks, you need to get the ruler (which can be accessed under the View menu, up the top).īasically, you are inserting the coordinates of an invisible rectangle which if the clothes are dropped in, they will snap to their spot. If(this._x > number here & this._x number here & this._y < number here) Instead, you need to type in the following: If you want to be a bit more fancy, and you want the clothes to 'snap' to the doll/body, then you have to add a little more the script. This has to be repeated for all the clothes. What that does is tell the program that when you click on an item, you will 'pick it up' and then you can drag and drop at will. In the space, type in the following script: When you've finished making an item of clothing, access the actions window by right-clicking and then clicking on Actions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |