449 Forum Posts by "Halosheep"
OH WOW
I know I said I was done with this, but I fixed it.
hitArray[i] += moveArray
I FORGOT THE [I]
*punches self*
It works perfectly now.
As i said, I don't remember how to delete MC's, so just use one of the other two. However, for the other things, I would do something along these lines. Sorry if my AS2 is rusty, i mainly use AS3.
onClipEvent(enterFrame){
if(player.hitTest(powerUp)){
speedboost = true;
bigjump = true;
powerUp.x += 1000;
powerUp.y += 1000;
}
if(speedboost == true){
maxspeed = //whatever;
} else if(speedboost == false){
maxspeed = //normal;
}
if(bigjump == true){
maxjump = //whatever;
} else if(bigjump == false){
jumpheight = //normal;
}
Hopes this helps
Fucks sake, you can only do this in 4chan. We can't roll on NG
If you can't justify it in every way, it's not really justified.
At 4/11/10 06:40 PM, turtleco wrote:At 4/11/10 04:43 PM, Farza wrote: Even Nick is losing itself with shows like Icarly.when has there ever been a good show on there, excluding ren and stimpy
*cough cough* Spongebob?
Nothing much we can do lol.
buy a new comp!
Alright, first of all, you need to close the handler with another "}", so just add one at the end.
To make it disappear, you have 3 options.
The first one is to simply make it invisible
thing.visible = false;
The second is to just move it out of the screen
thing.x += 1000;
thing.y += 1000;
The third (and probably best) option is to delete it, but I don't remember how to do that. It's along the lines of deleteMovieClip() or something.
Is grav your var inside of object2?
If possible, try to keep the vars on the main stage, there's no real reason, unless you're doing something really weird, to put a var inside an MC.
If there's multiples ones (I've had something like this before), you can store them all in another array
objects[i].y += gravityArray[i];
No guarantees the double array system will work though.
At 4/11/10 06:01 PM, SmartNoob wrote:At 4/11/10 05:58 PM, Halosheep wrote: Honestly, if your library has a lot of books on the subject, then once your done with the bible, just look through a couple there and see if there's anything relevant/interesting to what you want to learn.Actually yes there is, because any books that they don't have in stock I can have them order from one of the many libraries in the couple of counties participating in the program. Some New York thing I guess.
No point in us pointing out books they don't have if theres probably something similar already there.
Fair enough, I don't know any off the top of my head, but some quick searching gave me some.
Google (Heh)
Game Development
Damn, comp's outta battery, brb
Post the full code you're having problems with, but I think you misplaced a "}" somewhere.
For loops are probably the best answer. Just use one to cycle through your array.
PSUDO CODE:
for(i = 0; i < yourArrayName.length; i++){
if(yourArrayName[i] is hitting something){
//stuff
}
}
Basically, just change your hitTest code slightly. Switch any instance names and replace it with your arrays name followed by [i], then put the rest of your collision code.
Honestly, if your library has a lot of books on the subject, then once your done with the bible, just look through a couple there and see if there's anything relevant/interesting to what you want to learn.
No point in us pointing out books they don't have if theres probably something similar already there.
Simples, just do exactly what it tells you!
Whenever you code on an MC in AS2, you need to put things into things called event handlers.
There are two main ones, load and enterFrame
The syntax for both is more or less the same:
onClipEvent(EITHER LOAD OR ENTERFRAME){
//stuff
}
If you put load, then the code only runs once, at the start of the animation. This is useful for declaring variables.
onClipEvent(load){
yourmom = fat;
}
If you put enterFrame, then it runs once per frame, which is what you use for mostly everything else.
onClipEvent(enterFrame){
if(yourmom == fat){
trace ("Ohhhhhh, burn!");
}
There ya go, hope this helps!
At 4/8/10 08:04 PM, 56325 wrote: Title: Everything I Know Is A Lie
WHAT THE FUCK.
At 4/10/10 08:52 AM, citricsquid wrote: The source code: http://github.com/banthar/Hell-Tetris
Updated version: http://www.kongregate.com/games/banthar/
hell-tetris
The creator: http://www.kongregate.com/accounts/banth ar
That the xkcd guy? Or did he copy that comic from this game?, cus they look identical.
Yeah, I'm rewriting this entire thing, maybe I can get it to work. I still got most of my easter break to fool around with this, and I think this is some kind of impossible problem.
Thanks for all the help though. =P
Both of those use load, which means they run only once when the code is run.
Replace them with enterFrame
Nope, right now the only other thing the engine handles is the player, who has his own set of variables outside the enemy arrays.
This sounds like fun, I just wish I could program at this level xD
Wow, this is like the impossible question, eh?
Think I should replace all the values in my arrays to 42?
At 4/8/10 06:12 PM, Johnny wrote: Remove the quotes on every element of moveArray and gravArray.
array = new Array(10,10,10);
No such luck, did that and un-commented the trace tests, no change.
At 4/8/10 06:17 PM, Sensationalism wrote: You don't hit a two year old, dipshit. Learn child development.
You learn it, dipshit. If you allow a child to reign free whenever you're in a public place, they'll grow up thinking this is acceptable, and will make it a habit. However, if you show them early on that what they're doing is wrong by doing it back to them, they'll learn that it's wrong. This DOES NOT mean punching your 2 year old in the face. It means if they start hitting you, lightly tap/hit their shoulder until they stop.
If that's NG, then what's 4chan?
And if that's 4chan, then what is /b/....oh god....
Bump since I live 4 hours ahead of you guys.
At 4/8/10 09:35 AM, LeechmasterB wrote: Some critical parts could be these:
moveArray[i] *= eDecay;
moveArray[i] += atkPower * multi;
Check out what the values are, any NaN or similar values occuring? Other then that there isn't much else that would indicate such errors.
I went through and traced everything, all 3 arrays, and the two things you posted. ALL values were exactly what they were meant to be. moveArray stayed 0 without any outside influence, gravArray capped off, so did moveArray when I tested atkPower * multi.
Nothing out of the ordinary happened. In fact, the values were exactly what I wanted them to be.
At 4/7/10 11:28 PM, AmorSanguinis wrote: It's been awhile since I've been on Newgrounds.com and wanting to make some flash again.
So, I have a few questions real quick.
What programming languages can I use with flash?
Actionscript 1, 2 and 3
What software can I use that's FREE to use for flash?
Uh, I think Flex is free, but it only works for actionscript. Or something like that.
What the hell is Actionscript and is it easy to learn?
It's flash's programming language, and it's not as complicated as some other languages (Any C/ Java)

