00:00
00:00
View Profile Ransom09
I rule.

Jake Dooley @Ransom09

Age 34, Male

GameStop

Buffalo (Minnesota) High

My computer chair.

Joined on 8/5/03

Level:
18
Exp Points:
3,260 / 3,600
Exp Rank:
17,573
Vote Power:
5.96 votes
Rank:
Scout
Global Rank:
40,472
Blams:
128
Saves:
98
B/P Bonus:
4%
Whistle:
Normal
Medals:
57

Complications

Posted by Ransom09 - August 13th, 2008


Have you ever used duplicateMovieClip();? It can cause some weird complications.

So I wanted to make a more efficient system for creating enemies than manually placing them. I thought it would be easiest to duplicate one enemy. What this means is that there is actually an enemy beneath the floor that you can't see and can't hit (nor be hit by). Every time it is prompted to do so, Flash duplicates this enemy on top of the floor.

However, there is an odd complication that you can see in the screenshot below: If Travis is to the left of the spawn point when an enemy is spawned, the enemy below the floor must be facing the opposite way the new enemy should be facing, or the new enemy will face away from Travis. He will still run up and attack, just facing the wrong way. If Travis is to the right of the spawn point, the under-floor-enemy must be facing the SAME way the new enemy should be. It's really weird, but I'm working on a solution.

UPDATE (8-23-08): After observing the below-floor-enemy's direction and it's relation to the direction of the spawned enemies some more, I realized it's much more simple than described above. Really, what my description above means is if the original enemy (beneath the floor) is facing right, the enemy spawns properly. If it's facing left, the enemy spawns backwards. This will be an easy fix, as I really don't have to fix anything; I just have to stick the original enemy on the way left and place an outside script that keeps him there, so he's always facing right (trying fruitlessly to reach Travis). Horrah!

Complications


Comments

Comments ain't a thing here.