USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 2/13/09 07:49 PM
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))
GO VISIT www.wootbergames.com
Posted at: 2/13/09 07:52 PM
Sign-Up: 12/07/07
Posts: 28
Do you need AS2 or AS3?
Posted at: 2/13/09 07:53 PM
o umm actionscript 2.....i really need help!!
Posted at: 2/13/09 08:03 PM
// 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;
Posted at: 2/13/09 08:04 PM
Oh and make sure to have a
var numEnemy = (to number that you want on the screen)
above the array
Posted at: 2/13/09 08:07 PM
ok but where do i put the code?
Posted at: 2/13/09 08:09 PM
Sign-Up: 01/17/09
Posts: 1,334
on the frame that holds the gameplay.
Got The World's Best Band Name?
Posted at: 2/13/09 10:19 PM
it says that the interface 'int' cant be loaded!!!:(
Posted at: 2/13/09 10:21 PM
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.
Posted at: 2/13/09 10:25 PM
Sign-Up: 05/03/06
Posts: 534
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++)
Posted at: 2/13/09 10:26 PM
Sign-Up: 04/26/07
Posts: 848
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.
~Nutty NG Event Calender
All times are Eastern Standard Time (GMT -5) | Current Time: 08:12 PM
<< Back