The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 Viewsso one day i played this cool game calld VectorTD if im not mistaken. The complexity struck me and i immediately wanted to have a go. so i have been messing around for a few hours, but now i need to create a tile based system. So the player can only place the towers on separate squares.
I don't really know much about AS, but its a learning process. I thoght attachMovie was the way to go, because i need to have interactivity to a measure. But soon i encountered a problem while just prodding around. I got this bit from AS:Main and modified it.
:for(i=1;i<999;i++){
_root.duplicateMovie(_root.grid1,"grida"
+i, 1000+i);
_root["grida"+i]._x = i=1;i<999;i+9;
_root["grida"+i]._y = i=1;i<999;i+9;
}
When i hit Test Movie, it says a part of a script is making the player run slowly, and may cause a freeze.
I suppose there is a much better way of doing a grid sort of thing, so i'm hoping someone will point me in the right direction.
Help would be really helpful ....
OMENOMENOMENOMENOMENOMENOMENOMENOME NOMENOMENOMENOMENOMENOMENOMENOMENOM EN
The script is running slowly because you're making 998 MC's at once....
OMENOMENOMENOMENOMENOMENOMENOMENOME NOMENOMENOMENOMENOMENOMENOMENOMENOM EN
At 3/1/08 11:34 AM, TheEvilOmen wrote: I got this bit from AS:Main and modified it.for(i=1;i<999;i++){_root.duplicateMovie(_root.grid1,"grida"
+i, 1000+i);
_root["grida"+i]._x = i=1;i<999;i+9;
_root["grida"+i]._y = i=1;i<999;i+9;
}
You modified it pretty badly. I mean infinate loop badly. It's setting i to 1 every iteration.
Let me explain. You've set up the for loop correctly, but these lines of code are doing retarded things.
: _root["grida"+i]._x = i=1;i<999;i+9;
: _root["grida"+i]._y = i=1;i<999;i+9;
What you've done here is
- set the new object's X coordinate to i... (_root["grida"+i]._x = i)
- which was FORCED to become 1 (i = 1)
- for some reason, just told Flash to say TRUE (i<999)
- and for some reason, done it again (i+9)
And then you did it again...
Why are you changing i?
...
At 3/1/08 12:21 PM, KaynSlamdyke wrote:
Why are you changing i?
See, I wanted it to make 998 duplicates in a grid, where every 9 pixels it would draw the MC. So the for() loop was there, so it would make 998 copies, whereas the other two were supposed to make the MCs form an intervalled grid.
Of course its a really confusing way, which probably doesn't work, but thats exactly the problem.
OMENOMENOMENOMENOMENOMENOMENOMENOME NOMENOMENOMENOMENOMENOMENOMENOMENOM EN