A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Random Position Within Specific Area

Threaded View

  1. #3
    Junior Member
    Join Date
    Sep 2012
    Posts
    9
    I have no idea what I'm doing... I have it like this:
    Code:
    tEnem.x= Math.random()*(2250+310)-310;
        tEnem.y= Math.random()*(1581+30)-30;
    The enemies spawn in the exact x y position each time.

    Edit: *facepalm* I forgot the underscore in the x, y position. To anyone else who needs help with this:
    Code:
    tEnem._x= Math.random()*(2250+310)-310;
        tEnem._y= Math.random()*(1581+30)-30;
    Attached Images Attached Images
    Last edited by Beocro; 09-21-2012 at 06:46 AM.

Tags for this Thread

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