Forum Topic: in NEED of actionscript help!!

(98 views • 10 replies)

This topic is 1 page long.

<< < > >>
None

baboop

Reply To Post Reply & Quote

Posted at: 2/13/09 07:49 PM

baboop LIGHT LEVEL 06

Sign-Up: 02/04/09

Posts: 46

can someone please give me a code to respawn enemies in random places please?(if you can give it an instance name of "enemy"(without quotes))


None

hotroddd1

Reply To Post Reply & Quote

Posted at: 2/13/09 07:52 PM

hotroddd1 NEUTRAL LEVEL 03

Sign-Up: 12/07/07

Posts: 28

Do you need AS2 or AS3?


None

baboop

Reply To Post Reply & Quote

Posted at: 2/13/09 07:53 PM

baboop LIGHT LEVEL 06

Sign-Up: 02/04/09

Posts: 46

o umm actionscript 2.....i really need help!!


None

hotroddd1

Reply To Post Reply & Quote

Posted at: 2/13/09 08:03 PM

hotroddd1 NEUTRAL LEVEL 03

Sign-Up: 12/07/07

Posts: 28

// first set up an array of random points
var enemy:Array = new Array();
for (var i:int = 0; i < numEnemy; i++)
{
enemy[i] = new Object();
enemy[i].x = Math.random() * stage.stageHeight;
enemy[i].y = Math.random() * stage.stageHeight;


None

hotroddd1

Reply To Post Reply & Quote

Posted at: 2/13/09 08:04 PM

hotroddd1 NEUTRAL LEVEL 03

Sign-Up: 12/07/07

Posts: 28

Oh and make sure to have a

var numEnemy = (to number that you want on the screen)

above the array


None

baboop

Reply To Post Reply & Quote

Posted at: 2/13/09 08:07 PM

baboop LIGHT LEVEL 06

Sign-Up: 02/04/09

Posts: 46

ok but where do i put the code?


None

TheSongSalad

Reply To Post Reply & Quote

Posted at: 2/13/09 08:09 PM

TheSongSalad NEUTRAL LEVEL 10

Sign-Up: 01/17/09

Posts: 1,335

on the frame that holds the gameplay.


None

baboop

Reply To Post Reply & Quote

Posted at: 2/13/09 10:19 PM

baboop LIGHT LEVEL 06

Sign-Up: 02/04/09

Posts: 46

it says that the interface 'int' cant be loaded!!!:(


None

TheSongSalad

Reply To Post Reply & Quote

Posted at: 2/13/09 10:21 PM

TheSongSalad NEUTRAL LEVEL 10

Sign-Up: 01/17/09

Posts: 1,335

i don't know about flash, but in c++ you need to tell it #include<iostream>before coding, or input/output and strings don't work. maybe there is something similar in flash? it says the integer cannot be loaded so that's what i am lead to believe.


None

CrustySheet

Reply To Post Reply & Quote

Posted at: 2/13/09 10:25 PM

CrustySheet LIGHT LEVEL 03

Sign-Up: 05/03/06

Posts: 532

At 2/13/09 10:19 PM, baboop wrote: it says that the interface 'int' cant be loaded!!!:(

in is for as3

for (var i:Number = 0; i < numEnemy; i++)


None

Nuttro

Reply To Post Reply & Quote

Posted at: 2/13/09 10:26 PM

Nuttro LIGHT LEVEL 22

Sign-Up: 04/26/07

Posts: 850

You need to learn what different as codes mean and how they can be used. I think your moving to fast, you sound like you have no idea what your doing.


All times are Eastern Standard Time (GMT -5) | Current Time: 04:07 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!