# Need Help

**URL:** https://forum.kirupa.com/t/need-help/2767
**Category:** Uncategorized
**Created:** [April 15, 2002, 12:44pm UTC](https://forum.kirupa.com/t/need-help/2767 "2002-04-15T12:44:23Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2002, 12:44pm UTC](https://forum.kirupa.com/t/need-help/2767/1 "2002-04-15T12:44:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2002, 2:44pm UTC](https://forum.kirupa.com/t/need-help/2767/2 "2002-04-15T14:44:11Z")

</div>

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[jeremydecker.s5.com/walls\_that\_block.swf\r[url=“http://jeremydecker.s5.com/walls\_that\_block.fla”]jeremydecker.s5.com/walls\_that\_block.fla](http://jeremydecker.s5.com/walls_that_block.swf)\r:) \rjeremy

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2002, 3:21pm UTC](https://forum.kirupa.com/t/need-help/2767/3 "2002-04-15T15:21:30Z")

</div>

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…?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2002, 6:10pm UTC](https://forum.kirupa.com/t/need-help/2767/4 "2002-04-15T18:10:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 12:11am UTC](https://forum.kirupa.com/t/need-help/2767/5 "2002-04-16T00:11:49Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 12:58am UTC](https://forum.kirupa.com/t/need-help/2767/6 "2002-04-16T00:58:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 2:47am UTC](https://forum.kirupa.com/t/need-help/2767/7 "2002-04-16T02:47:13Z")

</div>

Cld u give me a simple example… thanks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 4:20am UTC](https://forum.kirupa.com/t/need-help/2767/8 "2002-04-16T04:20:30Z")

</div>

you owe me big…\r;) \r[jeremydecker.s5.com/walls\_that\_block.swf\r[url=“http://jeremydecker.s5.com/walls\_that\_block.fla”]jeremydecker.s5.com/walls\_that\_block.fla](http://jeremydecker.s5.com/walls_that_block.swf)\r\rhave a nice day,\r:) \rjeremy

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 5:15am UTC](https://forum.kirupa.com/t/need-help/2767/9 "2002-04-16T05:15:46Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 5:32am UTC](https://forum.kirupa.com/t/need-help/2767/10 "2002-04-16T05:32:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 6:47am UTC](https://forum.kirupa.com/t/need-help/2767/11 "2002-04-16T06:47:30Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 16, 2002, 1:39pm UTC](https://forum.kirupa.com/t/need-help/2767/12 "2002-04-16T13:39:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 17, 2002, 1:18am UTC](https://forum.kirupa.com/t/need-help/2767/13 "2002-04-17T01:18:24Z")

</div>

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…?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 17, 2002, 3:22am UTC](https://forum.kirupa.com/t/need-help/2767/14 "2002-04-17T03:22:11Z")

</div>

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…\r[pub40.ezboard.com/fkirupa…=629.topic](http://pub40.ezboard.com/fkirupafrm19.showMessage?topicID=629.topic)\r:) \rjeremy

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 17, 2002, 1:33pm UTC](https://forum.kirupa.com/t/need-help/2767/15 "2002-04-17T13:33:19Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 18, 2002, 1:37am UTC](https://forum.kirupa.com/t/need-help/2767/16 "2002-04-18T01:37:23Z")

</div>

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…?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 18, 2002, 1:59am UTC](https://forum.kirupa.com/t/need-help/2767/17 "2002-04-18T01:59:11Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 18, 2002, 6:50am UTC](https://forum.kirupa.com/t/need-help/2767/18 "2002-04-18T06:50:55Z")

</div>

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…
