An advice for you

1

Stats

2,026 visits, 3,571 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 30 Mar, 2012. Last updated 19 Feb, 2019

the walls:

first:insert tiled background and insert a sprite and insert mouse and key board objects and insert any image like a wall in shape

not in colors.must be sprite

second:now rename the image you loaded to wall add solid behavior to the wall.and the second sprite rename it to player and then add (8 directions behavior) and (bound to the layout) and (scroll to) behaviors to the player(note:the mouse and key board objects are hidden)

and you need another sprite rename it monster and add bullet behavior to it and make the speed change speed from 400 to 80

and go to event sheet add event and action you know that

event:mouse->on left button clicked

action:system->create object wall (layer 0 for Y mouse.Y(0) for X mouse.X(0) now run layout

oh no! the monster didn't stopped or bounce when it reach to the wall

and it go outside the layout and never come back and there is no monsters let's fix this problem now!!!!!!!!!!!!!!!!

first add

event:monster->on collision anther object-> wall

action:monster->bounce of object->wall

and add

event:monster->is out side layout

action:monster->set angle toward position for X and Y:monster.angle

and add again

event:system->every .... seconds(set time you want)

action:system->create object monster on layer 0 for X:1400 and for Y:random(1024)

now run layout

i called that a game but there is a small part we didn't make it

the drag and drop:

if you want to drag and drop things add this behavior to the object you want to drag and drop it not for you(but if you add drag and drop behavior to you then you can drag and drop your self but we didn't want that)

add drag and drop behavior for wall now run it

oops! we wait and wait and wait but the wall didn't destroy

if we didn't fix that problem then all the room became walls and we can't move don't worry i show you how to fix that problem

first add the fade behavior to the wall object

second:destroy type is after fade out and make the fade out is 60

(the time with seconds mean the seconds we type equal minute )

watch out! the seconds we type is in the fade out time and wait time and fade in time is 0 because we don't want it in our tutorial

shoot more than bullet in a shoot!

the image points and origins

first: you need to more than one image point,add you want from the image point(must be more than one image point)

to create it go to the sprite you play with it and press on set origin and image points the shape must be like this

now press on it and then you see a tiny shape like a plus press on it

when you press on it there is a image point like this

now determine the image point place and then close press on the set origin and image point tip there is a origin remember the origin shape like this

and determine the origin and press the add tip that is like a plus

there is an image point determine the place again and make this step

again at you want.....

the events and actions

you now where you can shoot we didn't add any events just add actions

in the same event

the first action you make the sprite you play with it spawn the bullet (the shoot)

now add the same action but change the image point and add the same action but change the image point......

now run the layout

you notice that you can shoot more than bullet but in the same direction it's a problem when i fix it i will show you how to fix it

with this properties you can shoot from both directions now i will show you a tiny advice

the warp

it's very easy add the warp behavior to the to the object to warp

(make sure you didn't add the bound to layer behavior)

now run the layout the object is warp you can add this behavior to you to warp

  • 0 Comments

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