|
|
|||||
Topic, Curtain fire shooting game | ||||||
| ||||||
You must register or log in to post a message.If you wanna change the width of a line usually you make use of the height/width property of the symbol For the speed of a bullet, you declare a velocity variable (V) eg. var V = 5; Then you add an ENTERFRAME event listener, every frame you move the bullet by 5 units. For angle, declare a variable in radians (? i think all angles except for .rotation is in radians) eg. var angle = pi/4; *you can either use Math.PI or just use 3.14* Then you resolve the velocity into the x and y direction: Vx = V Math.cos(angle); Vy = V Math.sin(angle); **Do you need to import flash.Math.*?? i forgot... So in the event instead of moving by 5 in one direction you move it separately in two directions: x += Vx; y += Vy; You may have to experiment with the cos and sin functions and the + and - signs because in flash the y direction is downwards. But if I'm not wrong there's a numChildren property that you could use? (though it won't work if you have grandchildren objects) AS2 or 3? So, I'm keeping this list to note my progress, and you can also make suggestions. EDIT: As of 8/14, I lost ABSOLUTELY EVERYTHING. Player Images = X Player Actionscripting = X Object Images = X Object Actionscripting = X GUI = X Game Actionscripting = X Editor Actionscripting = X Music = X | Flash game developmentFirst post of the topicSo, I'm keeping this list to note my progress, and you can also make suggestions. EDIT: As of 8/14, I lost ABSOLUTELY EVERYTHING. Player Images = X Player Actionscripting = X Object Images = X Object Actionscripting = X GUI = X Game Actionscripting = X Editor Actionscripting = X Music = X |