dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [HELP] Tower Defence level help

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    11

    [PROBLEM] Tower Defence level help

    Hello,

    Im having some problems with my array. I'm creating a Tower Defence game and im trying to draw a level with actionscript.

    I have no idea how to fix this, could anyone help me?
    Attached some source.

    Attached Files Attached Files
    Last edited by AlmarM; 05-19-2010 at 10:56 AM. Reason: Changed title.

  2. #2
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    In your code file (I couldn't test since you just have two .as files not the fla with the export symbols), you have the array with all 0.

    If you did edit later on, I suggest using trace to trace out the array and see if it is going correctly.
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    I did a trace, do you want all source files to test?

  4. #4
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    that would be good.... if you want you can pm me too!
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    I prefer PM.

  6. #6
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    Fixed version has been sent. check your pm.
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  7. #7
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    Thank you so much. ^_^

  8. #8
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    Uhm, im having another problem with my tower. It's not removing the towers MovieClip and Shape, could anyone take a look?

    The error is caused by (I think):
    Tower.as, Line 87, 88

    Error:
    TypeError: Error #1010: A term is undefined and has no properties.
    at Level/Update()
    at Main/Update()

    Source attached.
    Attached Files Attached Files

  9. #9
    :
    Join Date
    Dec 2002
    Posts
    3,518
    In Level.as ...

    Code:
    public function Update():Boolean
    {
    	if (myTower.Update(Waves) == false)
    	{
    		myTower.Remove();
    	}
    			
    	if (myTower2.Update(Waves) == false)
    	{
    		myTower2.Remove();
    	}
    			
    	for (var i:int = 0; i >= 0; i--)
    	{
    		if (Waves[i].Update() == false)
    		{
    			/*myTower.Remove();
    			myTower2.Remove();*/
    			Waves.splice(i, 1);
    			return false;
    			break;
    		}
    	}
    	return true;
    }

  10. #10
    Junior Member
    Join Date
    Mar 2010
    Posts
    11
    Oh gawd, im stupid. D:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center