Need Help

hiya, i posted up lookin for flash tutes to make my game in flash 4 but i guess it’s virtually impossible to do so… well, now i decided to do it in flash 5. here’s my concept >\r\rit’s basically a game controllling a character to move in grid filled with objects like so > \r1 0 1 0 1 0 1 0 1\r0 0 0 0 0 0 0 0 0\r1 0 1 0 1 0 1 0 1 \r\rwhere 0 (path) is passable n 1 (objects)not… \r\rn i want d character to stand still when not moving and get to an animated frame of it moving when moved in whichever direction.\r\ri guess dat’s all i need for now. please help me with this as like i’ve said, i kinda new to actionscripting.\r\rur help would greatly be appreciated… thanx

here’s a sample file for checking for walls. you’ll just have to animate the walking/movement from one square to the next.\\r[url=“”]\r:) \rjeremy

hey man, thanx for the tip. at least now i have somethin to start on. i’m gonna give u credit in my game for sure. thanx again…\r\rbtw, if u have any idea how i can do dat animation interval between moving n standing still, pls help. i can roughly say i noe about d animation stuff, but will it involve actionscriptin…?

just animate your guy/thing moving from one square to the next in all four directions, then have it do the appropriate animation when it figures out that there’s no wall there.\rthis could be all actions or a combination of actions and animation.\r:) \rjeremy

hey again, i understand what u mean but could u show it to me step by step…? i’m crap at flash so hope u cld guide me…

example:\rlet’s say your squares are 40x40 pixels.\ranimate a thing going from one square to another.\rmake sure that it moves exactly 40 pixels.\rwhen it gets to the last frame of animation reset the ‘thing’ to the center of that movie clip.\rnow, the code works like this:\rthere is a loop with no animation, only the static ‘thing’ and code checking for the user to move the ‘thing’.\rwhen the user makes the ‘thing’ move the movie exits that loop, plays the animation, resets it’s position to the new _x and _y coordinates, then goes back to the loop.\rhope that helps.\r:) \rjeremy

Cld u give me a simple example… thanks

you owe me big…\r;) \\r[url=“”]\r\rhave a nice day,\r:) \rjeremy

heh, thankz man, i guess i’m really gonna owe u big time… i haven’t tried out the animation stuff but i was wonderin abt the tiled blocks u gave earlier…\r\ri see dat the walls are constructed by flash itself using the actionscript set… i was wonderin, is it possible to use a symbol to act like the walls as well, like not letting my character pass thru? \r\rif it is, yes u’ve guessed it, cld u guide me…

sorry, i hope u have not started to hate me… i’m juz someone in distress…\r\ri was gonna ask u whether it is possible to add a symbol above those scripted to appear. Like letting my character get covered half-way when its behind a symbol placed right on the wall area, keeping the grid walls n area intact… \r\rcoz rite now, when in added a symbol, my character will move over instead of under it…\r\ri’m tryin to explain it in simple terms but this is as close as i can get, hope its understandable…\r\rthanx

Why doesn’t my character animate smoothly when i press d direction key to move? when i press once, my character jerks to the next grid and then animates to the grid beside it… it isn’t as smooth as the example u gave me… is there somethin wrong? \r\raslo, when i held a directional key, my character zooms across the stage, unlike urs where it smotthly n slowly moves from 1 grid to the next…

look at the ‘mcPlayerControls’ movie clip. the _x or _y properties aren’t changed until the animation is done. while the ‘mcPlayerControls’ movie is walking along it isn’t accepting input from the keyboard.\rwhat’s probably happening in your movie is that your character is always checking for input from the keyboard, rather than being interrupted by the animation.\rcheck it out and let me know if that helps.\r:) \rjeremy

i’ve looked thru it n yeah, there was a conflict in my script, thanx… now it looks as smooth as silk… (well, kinda)… \r\ranyway, i wanted to put hotspots in my maze where another scene will be played when my character gets in it… so i tried using collision detection only in one spot (Danger Area A) among many which will have the same actions. it works… BUT when i copied that area to another spot, the collision between my character n the duplicated area (Danger Area Copy) doesn’t work… any ideas…?

why not have the grid values be more than just 0 and 1?\ryou could place different values in the grid and depending on those values different things will happen. you would have to adjust the control code a little to accomodate the new types of ground.\ralso, if you want to raise a wall section above the player, just use swapDepth to raise the wall above the player piece. there’s a swapDepth question here in this forum that has some good info…\…=629.topic\r:) \rjeremy

hey , thankx for that swapDepth link… to tell u d truth, i didn’t understand a single word of it… but i found another way n it works… same too for that hotspot thingy… \r\ri’m working on d rest of it rite now, i’ll keep u updated on any problems i’ll encounter along the way…\r\ronce again, thanks so much, u’ve been a great help…

it’s me again… i’ve run into a new problem recently… it’s like this> \r\rwhen a key is pressed, an area of reach within the character limit will appear, consisting of a 3x3 box around, character in d middle… now, when, let’s say numpad 7 is pressed, an animation of the character attacking that direction (top left) will be played. then i want the character to return to it’s static state…\r\rbut i have probs transiting between the “attack standby” mode and the attack animation… when a key is pressed, it doesn’t play… why…?

there could be many reasons why this isn’t happening.\rcheck the key press code first - make sure that the input is working with a trace or something.\rthen check the conditional to be sure that the command is being read by the player.\rthen check the command that tells the clip to play.\rthen check the clip itself - label names, stops, plays, etc.\r:) \rjeremy\r\rp.s. make sure you post that the game is done, i’d like to play it!

thankx for the checklist…\r\rrite now, a new problem has popped up… remember that “attack area” thingy? and the action that will take place when button pressed…? i got around that and it works… BUT…\r\ri did that appearance of the “attack area” as an animation in my characters EDIT timeline… its on the same timeline as the animation of my character moving…\r\rsame too with the attack animation…\r\rnow the problem is that i’ve used collision detection to detect the collisions between my character and my Hotspots… (remember that?) \r\rnow, because the “attack area” animation is within my character itself, even when my character is clear of the hotspots, when the “attack area” (u noe how big it is) is brought up, it overlaps the hotspots, thus running the Game Over screen which is the variable if my character collides with a hotspot…\r\runderstand…?\r\ri hope u do coz i can’t seem to find any other way…