ActionScript 3.0 :: Working On A Basic, Horizontal Shooter Platform Game - Make Enemies Move Smart, Towards The Player?

Oct 3, 2011

i am an newbie as3 developer, and i am working on a basic, horizontal shooter platform game.and my question is: how can i make enemies move smart, towards the player? ( but ofcours you are in able to dodge)so like, an enemy is moving to me so when i am not dodging, it will hit the player.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Platform Game 0 Can't Get Enemies To Face Hero

Nov 24, 2010

I'm making a platform game. The hero can move around, but the enemies are stationary. My problem is that I want the enemies to face the hero. The first enemy behaves correctly, but the subsequent enemies only behave correctly if I kill all the preceding enemies. I have added the hero and the enemies as Objects and put the enemies into an array called enemies. Both the hero and enemy objects have a direction property and an mc property that refers to their movie clips. This for loop gets called every frame.

for(var i:int = 0; i < enemies.length; i++)
{//face hero
if(hero.mc.x < enemies[i].mc.x) enemies[i].direction = -1;
else if(hero.mc.x > enemies[i].mc.x) enemies[i].direction = 1;
enemies[i].mc.scaleX = enemies[i].direction;}

View 4 Replies

ActionScript 3.0 :: Flash Platform Game Random Enemies?

Feb 22, 2011

we just recently defended our graduation project which is a platform game like mario. one of the modifications suggested by our panelists is to make level 1 generate random places for enemies and coins after one of them said that mario was a stupid game because you already know where the enemies are, the powerups, etc. i said i'll give it a go and see what i can do. but recently i realized that i havent played any platform game that generates random places for the enemies, coins and other objects. it is only in rpg games like ragnarok that i have seen enemies spawning at random places.

View 1 Replies

ActionScript 3.0 :: Developing An Horizontal Shooter Game?

Jan 10, 2012

I just started developing an horizontal shooter game, but how can i make enemies ( movieclips ) moving randomly around the screen?

View 1 Replies

ActionScript 2.0 :: Make An Overhead Shooter Game?.

May 18, 2011

Im attempting to make an overhead shooter game. Ive got the basic movement down already, and rotation towards mouse. For when he shoots, ive set it to duplicate a bullet movie clip, but i only understand how to set it towards one graphical direction(ex: x +, y -)

The code i know ive gotta fix is

onClipEvent (enterFrame) {
this._x += laserMoveSpeed;
if (this._x>1000) {
this.removeMovieClip();
}
}

The little x + part has to be fixed, but i have no idea what to substitute in order to make it shoot from the front.

View 3 Replies

Java :: Platform For Web-based Multi-player Game?

Sep 28, 2010

I'm developing a web-based fantasy football game. Most of the game is a straight-forward web application built on top of Linux/Apache/Php/MySQL.

I'm trying to figure out how to implement the draft application. The draft date and time will be scheduled in advance by each league's owner. Up to 32 users may be logged on for a given league's draft, and there is no limit to how many drafts may be happening concurrently. The users will take turns selecting players, and each user's turn will have a time limit. I'd like for all the users to be able to see whose turn it is, how much time that user has left to select a player, who they select, and which players are still available. If there are users in the league who are not logged in during the draft I'd like to be able to detect that and automatically assign players to them rather than waiting for the time to run out on their turn. Ideally I'd also like to have a chat window so the users could chat with one another during the draft.

My background is in desktop application development, so if necessary I could write server code in C#/.NET or Java. As far as I can see these are the options: PHP/AJAX - It seems like it would be possible to have all the state for the draft in the database and have the operations for the draft run in PHP triggered by requests from the clients? I guess in this case the draft doesn't start until at least one user logs in, and it seems like it would be a lot of polling requests to the server if I want everyone notified quickly when a user makes a selection.

[Code]...

View 2 Replies

ActionScript 3.0 :: Make A Game That's A Top Down Shooter Kind Of Like Asteroids

Jul 29, 2010

I'm trying to make a game that's a top down shooter kind of like Asteroids, but there are no asteroids, just enemy ships. Anyway, I'm trying to make a radar for it. The area for the ships to shoot eachother in is 2400 pixels length and height. The stage is 650 x 500 pixels. The radar works fine for when I'm traveling up and down, but the enemy ships on the radar move in the opposite direction as the enemy ships on the screen when I move left to right. When I move left the enemy ships on the radar also go right, instead of left.[code]this code is called from a move objects function which is an ENTER_FRAME event if that helps any.

View 8 Replies

ActionScript 3.0 :: Make Player Move Towards Mouse Not Working

Oct 1, 2011

[Code]....

Here is my main.as. I am using FlashDevelop to program this. why the Enemy object (which is displayed as a certain sprite) does not move towards the mouse?

View 1 Replies

ActionScript 2.0 :: Make A Platform Game Im A Newb In Flash?

Jan 25, 2003

make a platform game im a newb in flash

View 4 Replies

IDE :: Make A Platform Game - Create Multiple Levels?

Mar 27, 2010

trying to make a platform game using a tutorial on emanueleferonato.com, but I dont know how to create multiple levels. How could I create a door that when touched by the hero is sent to the next level? The tutorial is here:

http:[url]......

View 1 Replies

ActionScript 3.0 :: Way To Show 'enemies' On Random Base On Platform Screen

May 17, 2010

I'm getting an error: [code]I'm also looking for a simple way to show my 'enemies' on random base on my platform screen. I already made an array with the x and y coordinates but I don't know how to make AS3 print them on a random way on the platform windows.

View 4 Replies

ActionScript 3.0 :: Make A Basic Escape The Room Game In Flash?

Feb 9, 2012

I'm currently trying to make a basic escape the room game in Flash, and for some reason the last couples of entries I have made for the code aren't working. Right before adding these lines, everything worked and I already know that each object has been converted into a movie clip or button and has the correct instance name.

[Code]...

View 1 Replies

ActionScript 3.0 :: Basic 2D Game "camera" - Move The Character Using The Keyboard?

Jul 27, 2009

Everything going well so far except for camera control. I want the character to always be in the center of the screen. only when the side boundaries are reached, the character should leave the center of the screen to be able to reach the sides of the screen.Somewhat like this: http:[url]....I've tried 2 ways but both without succes:

- move the character using the keyboard, but somehow keep it in the center of the screen (have no idea on this one)

- move the entire area except the character to simulate movement.

This seems kind of ineffeciant but it worked out better that the previous attempt, the only problem is that the character doesn't return to the center of the screen when he leaves the boundary.The .fla's are available for download here http:[url]....

the actionscript is all in the first frame.try not to be too hard on the crappy visuals Ignore the comments too, theyre only there to help me understand what I did.The boundaries seem to be a bit sketchy aswell when moving to the sides, but that's not a big problem right now.

View 4 Replies

ActionScript 2.0 :: Platform Game - When The Mouse Is One Side Of The Screen "player" Flips?

Nov 4, 2010

im working on a shooting game in flash 8, and i am having some troubles. I want to make it so when the mouse is one side of the screen "player" flips and looks at it, and when its on the other, it flips and looks at it.It is what the player does in this game: http:[url]....I want to get the player to act like that when the mouse is on one side.

View 12 Replies

Professional :: Make IPod Game Horizontal?

Nov 29, 2010

I'm using Flash CS5 to make an iPod app/game. The provided layout makes the default setup 320x480, which is the standard way to hold your iPod VERTICALLY. I want to flip these dimensions to hold the iPod on it's side during gameplay.

So here's my question: If I just flip the document...to (480x320) will the iPod know how to manage the game from that point on? Or do I need to draw everything horizontally and animate that way too? I tried to do just that, but when I test the scene, it only wants to flip that first frame, so everything flops off screen and it ruins the animation. So how do I develop a HORIZONTAL iPod app/game?

View 1 Replies

Android :: Cross Platform Game - IOS : Develop A Very Simple Game For Iphone/ipad?

Mar 7, 2012

I am going to develop a very simple game for android and for iphone/ipad I have the option to develop it in cocos2d or in adobe flash air (i am not a developer, but i have 2 developers who are offering me the service)I have a developer that states that cocos2d is better and other one that states that adobe flash air.I want it in cross platform.the cost offered by both developers is the same..i have heard that adobe air has the flaw that it is very slow, is this real? if you had the 2 options which will you use to develop your game and why?

View 1 Replies

ActionScript 3.0 :: Flash - Writing A Simple Game Rule For A Platform Game?

Feb 28, 2011

I'm creating a game at the moment for my university course and it involves the player character jumping on top of boxs twice to break them as opposed to just once.What would be the most efficient/simple way of writing this in Actionscript 3.

View 1 Replies

ActionScript 3.0 :: Create 'smart' Enemy Characters For A Pacman Game?

Mar 3, 2010

how to create 'smart' enemy characters for a pacman game?

View 1 Replies

ActionScript 2.0 ::make A Third-person Shooter Game - "hide" Clip Does Not Receive Any Commands From The Enemy Clip?

Feb 19, 2005

im trying to make a third-person shooter game similiar to those "hide" when you press Down and "attack mode" when you stand Up, sort of like Time Crisis.I've done first person shooter games before.The hero character's move clip contains three clips, one of him in hiding, one in attack mode, and the last being hit. How do I script it such that the "hide" clip does not receive any commands from the enemy clip (which tells the hero clip to advance to "hit" clip and lose a health").

View 3 Replies

Flash :: Horizontal Scrolling Game/Large Horizontal Scene?

Apr 25, 2010

I'm currently learning Flash (CS4, AS3) and am creating a game. I have currently 1 flv file with 4 scenes, I then move from left to right and then to scene 2 and go from left to right. This is the game where items pop up that need to be clicked on and you get points.

Is there any way I can combine these onto 1 scene? Flash only allows you to have a maximum of 2880px wide.The reason for this is the transition between the scenes is RUBBISH and that my AS is not working correctly in between scenes (it loses values).

View 2 Replies

[CS3] Score Counter In A Shooter Game

Nov 24, 2008

I have a simple shooting game set up. 25 monsters appear on the screen, one after another, until no monsters are left. If you hit one before it disappears, the score increases. If you don't, the score stays the same.

In the actions frame, I placed an empty dynamic text box named score, and set it equal to 0 (declared in the main actions frame). But, seeing as though the monster actions are coded into the library item itself, do I have to declare score, and the score increase there instead?

View 4 Replies

F8 :: Glitchy Arcade Shooter Game

Aug 15, 2009

I've only played around with a dressup and dating sim - and coding using actionscript (and coding in general, only done a little bit of VB and Python before). I've been following a nice arcade side-scroller tutorial on this site which has three parts, if you want to view and go over them to help. It was designed for Flash 5 and I'm using Flash 8 Pro.[code]Anyway, as I was going through and coding/drawing the whole thing I came across a lot of problems and glitches (and a lot of times when the game coding would crash and I'd have to abort it and remake the entire coding again). I sort of stumbled around blindly, deleting and editing code to get things to work, and I'm up to the point where I'm almost finished with the thing. It's still glitchy though.I was wondering if any Flash coders could help me out?I'm going to be creating a Flash game for my programming class and I would prefer if it wasn't screwy (if I need to remake it with less cutesy graphics). xD;; If you could download the .Fla file and fix the coding problems I have.

Playable SWF game on my deviantart account.FLA downloadable file (@ Mediafire; no viruses, trojans, blahblah attached)The enemies tend to randomly explode before the missile has even hit them.The original enemy movie clip doesn't even want to explode.The score counter won't tick for each kill.The boundary box (?) of the player/enemy seems to be too big. You die before you should - in certain positions the enemy gets close and I guess the boundary boxes hit, which initiates the hitTest. It seems premature though, I'm wondering if I can reduce the boundary box, or have it so the enemy and player collide on the actual graphic, and not the movie clip box? I have no idea if this makes sense, I hope it does.There seems to be a bunch of other small glitches too.

View 6 Replies

Memory Leak In My Shooter Game?

Oct 20, 2011

I'm very new to flash,and have been digging through google and this site for information on how to piece together an AS2 shooter game.Its going well enough, but I'm having slowdown issues the longer the games runs, and I was hoping someone here could point me in the right direction.To paste an enemy movie clip on the screen, i'm using this:

Code:
var spawn =_root.attachMovie("monster1","monster1"+_root.getNextHighestDepth(),_root.getNextHighestDepth())[code]........

I need them stored in an array so that the player's shots can test weather or not they've hit any monster on the bullet's enter frame function, then call that monster's movie clip's take damage function. I'm using a for loop to do this:

Code:
for(var i in _root.player.foes){
if (this.hitTest(_root.player.foes[i])){
_root.player.foes[i].takedamage();}
}

I think the problem with the slowdown is that each time I place an enemy on the screen the array gets bigger and bigger. The slowdown only happens while the player is shooting, and I suspect the ever longer for loop with the hit testing is causing it.

I'm already removing the monster's movie clips as they get killed or exit the screen, I guess what I need is a way to reduce the size of the array at the same time, or at least tell the for loop not to do a hit test unless the monster is still alive.

View 3 Replies

ActionScript 2.0 :: Making A Top-down Shooter Game?

Mar 17, 2004

I'm making a top-down shooter game. I have keyboard input that moves the ship around and fires a laser.everything works perfect except that when the ship moves diagonal up left, or diagonal down right, the laser can't fire at the same time. It will work in any other direction, including the other diagonals. Just not those two

[Code]...

is this a common problem among movement in games? or do I just need to fix something?

View 1 Replies

ActionScript 2.0 :: Defense Game - Randomize Enemies?

Oct 6, 2007

I'm making a little tower defence game but i've run into a problem;I need a code to randomise my enemies (like in which direction they come from, and how many come)

View 1 Replies

ActionScript 2.0 :: Virtual Shooter - Pause The Game?

Mar 14, 2008

I am playing around with the Vertical Shooter by Ernesto Quezada aka _Bruno

link on kirupa: http:[url]....

how can I pause the game.I added a button, but I need the right coding in AS2

View 1 Replies

ActionScript 2.0 :: How To Delay The Fire - Shooter Game

Nov 7, 2004

'm testing functions to make myself a First Player Shooter game and now I have problem with the fire delay. I want a limit of let's say 1 shot per second. I thought that maybe restricting the clickings counted, so it doesn't register the mouse clicks too close to eachother. Or put some kind of interval at the functions delaying the sound and event function, but that seems too hard.

The game so far:[URL]As u see one get multiple sounds when clicking a lot and it's possible to get several points by clicking the ball a lot.Also, when the ball goes behind the tree it's not supposed to be able to shoot. The Flash File: [URL]It's not the exact same, some junk code trying to make the delay...

View 14 Replies

ActionScript 3.0 :: Make The Character In Flash Game Make A Jump When The Player Presses A Key?

Dec 19, 2009

i want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.

View 1 Replies

Arrays :: Remove Bullets On Collision In Shooter Game?

Nov 24, 2011

I'm trying to create a flash shooter game as my first project. But I can't remove the bullets and enemies when they are hit or off-screen.I've searched for a solution on the problem multiple times and copied about 4 of them (plus I've tried my own ideas) but they are not working.The current method of checking for collisions is:[code]How can I remove the enemies and bullets? removeChild and splice?

View 1 Replies

ActionScript 2.0 :: Fire Delay - Shooter Game - Shot Per Second

Nov 7, 2004

I'm pretty new to actionscript and so but I manage to read and understand and alter other people's code a little. I'm testing functions to make myself a First Player Shooter game and now I have problem with the fire delay. I want a limit of let's say 1 shot per second. How do I do that?

I thought that maybe restricting the clickings counted, so it doesn't register the mouse clicks too close to eachother. Or put some kind of interval at the functions delaying the sound and event function, but that seems too hard. The game so far: [URL] As u see one get multiple sounds when clicking a lot and it's possible to get several points by clicking the ball a lot.

Also, when the ball goes behind the tree it's not supposed to be able to shoot. The Flash File: [URL] It's not the exact same, some junk code trying to make the delay... The file I used for help (if someone finds it useful for making a game of their own [URL] Here u see the target isn't shot behind the pics. Is that because it is a button there and a mc in my file?

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved