Making a script for a 2D fighting game once involved many hours of programming a complex computer language, developments in game design tools mean this now requires much less effort. A number of companies have made it possible to create fighting game scripts using a simple drag-and-drop graphical interface.
InstructionsNew" then "New Direct X Game".
3. Right-click on the "Layout Editor" tab and select "Insert Object". Double-click the "Sprite" object, then single-click anywhere in the Layout pane to place the sprite. A sprite is a graphic image that can be animated within a larger graphic environment. In the picture editor, press "Control-O" to open an image file. Choose "player.png." Close the picture editor, clicking "Yes" to save the changes.
4. Create movement for the sprite: select the sprite, then click "Add" in the Behaviors heading of the Properties window. Double-click "8 Direction." Test your work so far by clicking "Run>Run All". Press the arrow keys on your keyboard to move the sprite.
5. Make the sprite face the mouse pointer: right-click in the "Event Sheet Editor", and choose "Insert Event", double-click "System", then "Always" to create an event that happens constantly. Click "New Action", double-click the sprite, then double-click the "Set-Angle Towards Position" option. Enter "MouseX" and "MouseY" for the X and Y coordinates. Click "Finish".
6. Add a bullet object, using the same steps you used earlier to make the player object. In the picture editor, load the bullet image.
7. Add behavior for the bullet using the same steps for adding behavior to the player sprite, except choose "Bullet" instead of "8-Direction".
8. Add another object: Mouse and Keyboard, then make the mouse click fire the gun: add an event on the Event Sheet Editor, double-click "Mouse" and "Keyboard", and double-click "on click." Select "Either single or double" for Click Type.
9. Click "New Action", double-click "Sprite", select the "Creation" tab, and double-click "Spawn". Click "Pick an Object," and select the bullet. Click "Finish" to complete the action for the mouse-click event.
10. Test your fighting script by choosing "Run All", and left-clicking the mouse to make the player sprite fire the bullet.
Tags: picture editor, Action double-click, Click Action, Click Action double-click, Click Finish