The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 Viewsawesome! thanks!
Hi, I am working on an animation and I wanted to get advice on how my lip syncing looks and what I can do to improve it.
I know now to upload it on newgrounds so I uploaded it on imageshack and i'm just wondering which forum to post on for help? I figured the flash forum, but I've also read people hate it when you ask for critiques there.
How do I limit where my gun goes on screen so that it only goes up to a certain distance, here is what it looks like now:
What can I enter into my code to make it stop coming all the way off screen to where you see that the MC is no longer drawn. I tried just using an
if (x_mouse<100)//this isn't what I actually coded...just a quick example/idea of what i did
And it works technically, but it stops abruptly and looks like it froze in spot.
Here is the code I am using to make the gun follow the mouse, got it from a tutorial, I'm still learning.
gun.onEnterFrame = function() {
var xMouse = _root._xmouse;
var yMouse = _root._ymouse;
if(Math.abs(xMouse - this._x) < 1) {
this._x = xMouse;
this._y = yMouse;
} else {
this._x -= (this._x-xMouse) / 6;
this._y -= (this._y-yMouse) / 6;
}
}
lol, that is a truly inspiring story
At 9/29/09 06:44 PM, evan210 wrote: I've had problems with using the v-cam to follow the mouse, too. The mouse x and y coordinates get screwed up because it still applies to the actual movie size, not the vcam.
did you ever find out how to fix it?
I used a standard custom cursor code and set its instance name too pointer...
Then I used the standard V-cam set up and set it to follow pointer...
Now when I test my player, it follows the mouse, but the mouse pointer seems jittery and jumpy, rather than a smooth camera follow...
What am I doing wrong?
At 9/16/09 02:33 AM, Dawnslayer wrote: Too organized, especially in the beginning. Choreography should be less obvious - look more improvised than planned, but still be planned. Less one-two punching and more variety. Do you understand what I'm saying?
Technical: recording quality was good, but the lighting needed serious work. Invest in a reflector or a large piece of white posterboard, so you can bounce light below the face where the sun doesn't hit. Also, the white balance was too far in the blue end of the spectrum; natural sunlight should cast much warmer shadows, even in a place that dark.
Other than that, not too bad for an amateur flick.
Thanks for the input! However, i'll fix the lighting(too and extent) in some more advanced color grading later on, i did it all by myself, i didn't have anybody to handle lighting, i'm barely in college for film, just starting.
And the camera is only a prosumer camera, under 1000$
So I made a kung fu fight, anything you need to know is in the description by the video.
[url]http://www.youtube.com/watch?v=0MVG i3jwIqc[/url]
Let me know what you think!
So i'm making a website for my videos in flash. All of my videos are hosted on youtube and thus I want to use the youtube embedding code, I know how to make it work in dreamweaver webpages but not flash.
Is there a simple way to do this or do I need to completely rewrite the code?
If you can't point me towards a tutorial or anything that might help that would be great!
On my main frame I have:
_root.hp=100;
_root.hpp=100;
_root.damage=1;
Every time it hitests with the bullet it loses 1 hp. Thats all working correctly.
How do I make it so that when the hp reaches zero it goes to the gameover screen?
I thought I could just put:
if (_root.hp = 0) {
gotoAndStop("gameover")
}
But it doesn't work?
I've already tried ==, <=, etc.
Is it possible to dynamically change tint with AS2 in flash?
I know on AS:Main it teaches you color and resizing, but I can't seem to find anything on tint.
I have a character with an attack frame, and when the enemy is hittest with the attack I want to tint him red 50%.
Can you please link me to a tutorial that might help or try and explain it?
So I have been doing loads of action script tutorials(AS:Main is a lifesaver) and small engines and what not. I do not know what I would classify my action script skill as? We'll say i'm an experienced noob.
Now I'm ready to make my first flash game (that will be uploaded online, as I mentioned I've already played around with engines and what not) I didn't put any of the small basic things I made because I wanted my first one online to be one some people might have fun playing.
What is a good game type to make for someone semi-new to flash? I know some types are harder than others and I was wondering if I could get input from people who had more experience as to what type of game they think would be good for someone of my experience
Where can I find more info on calling everything from one frame?
I've been reading AS:Main(all of beginner and most of intermediate) and other tutorials trying to learn how to code so that I don't sound like an annoying noob, however i've determined that all noobs as myself are annoying no matter how hard we try lol.
My problem is almost all tutorials I read are not all programmed on one frame, so it makes it really hard to learn how to call on object from the main frame. If anybody can point me toward some tutorials that would help let me know.
Some Examples of what I've tried already based on what i've learned so far.
So you got your basic movement code:
onClipEvent(enterFrame){
if (Key.isDown(Key.UP)){
_y-=8
}
}
So I instance my mc player and try it from the main frame like this:
if (Key.isDown(Key.UP)){
_root.player._y-=8
}
i tried it without the root too, but I can't seem to get him to move?
Also how do I call to release buttons from the main frame?
What is the best way to go about a simple Character Selection Screen for a game?
Would it be best to have a generic movieclip already on stage and then when you choose your character it attaches that movieclip to the generic one on stage?
Is that even possible?
OR
Is it possible to...
Load the player clip on the stage by the click of a button? If so how do I get all the code to work for him since I can't have it on the movieclip? Can I just code from the main frame?
Sorry if this is noobish but I have been doing AS:Main and actually trying to learn the stuff, I just can't seem to figure this one out?
Can I install flash on more than one computer llegally? I bought my copy legit, and its for private home use. Just want to add a copy onto my labtop for convenience.
I'm new to code and I've been using AS:Main and various other sights (actionscript, flashkit, etc.) So I am actually trying to learn the code. But I can't seem to find out a simple way to shoot in the direction I face.
I'm using 8-way movement and I want to be able to shoot in each direction, but not towards the mouse shooting. Because i'm having multiplayer.
I know that trig is a option, but i'm not that advanced yet to write out my own trig code. The way my 8-way movement works is the movieclip is rotated with the if key.is down{ _rotation 180} method.
Are there any simple ways to do this? Or is this just out of my league for now?
well i looked it up and it looks perfect, but is it legal? safe? free?
I know that it requires a ton of code to get a gamepad working in flash. So I figured my best bet would be to use a gamepade that could have keys mapped to it. However when I mapped keys (arrow keys) to my logitech dual action pad. It didn't work in the flash game? Do I have to enable something in flash to allow it to accept it?
I am using an API (WII Remote API) and I have made a game, unfortunately I cannot upload a file to imageshack and I have no server space to create a index file and place the api folder with it. Does flash automatically incorporate the api in the swf? or is there a way I can make it do that?
Currently I am making a game where when J is pressed the main character punches with his right arm. But I want it to alternate between the left and right punch.
EX.
User hits J=right punch
User hits J again=left punch
This is similar to mortal kombat when you smash the punch button.
Here is the method I tried:
I declared a combo variable and set it to false at the beginning of the frame.
Then on my MC it says.
if (Key.isDown(74)) {
this.gotoAndStop("punch");
var attack = true;
var combo = true;
} else {
this.gotoAndStop("stand");
var attack = false;
}
if ((Key.isDown(74)) && (combo=true)) {
this.gotoAndStop("punch2");
var attack = true;
}
Now I know that after punch 2 I need to set combo to false but i'm not worried about that right now. As of now if I hit the J button it cuts straight to punch 2.
I am a noob and i'm using AS:Main to learn, I tried AS: Basic Combos but I must've been doing something wrong because I couldn't get it to work.
Is the method i'm using now an OK method for this?
I'm new to flash and have been going through AS:Main, Kongregate, and various other places trying to learn actionscripting.
Right now I have a variable defined on my main timeline:
var combo:number = 0
Then on my movieclip it is set at the top:
combo = 0;
Now everytime I hit the J Key I want it to add 1 to the variable so I put this code:
If (Key.isDown(74)){
this.gotoAndStop("punch");
combo +=1;
}
I then traced my combo variable to see if it was working correctly and instead of just adding 1, it continued to keep adding until I let go of the J key ( I hit 100 in a matter of seconds).
How can I make it so that it only adds 1 to the combo variable each time I hit the J key?
I reread the variable section on AS:Main but I couldn't seem to find any info to help for this kind of problem.
Right Now I have a character who runs around and has two attack buttons and if you hold those two together he does a special move. It is one Mc with 4 frames inside it, 1:stand, 2:punch, 3:kick, and 4:headbutt. Now when moving, if an attack button is moved the player is supposed to pause moving until the attack is finished. So far my code works all around except when pushing in certain directions on certain attacks the character keeps moving instead of stopping.
Example: Punching won't stop you from moving if your moving right, and Kicking won't stop if you are moving backwards diagonally.
I provided all the code so you can replicate it.
So I have my variable set up on the first frame of my time line.
var attack=false;
Then I have this code on my player MC:
Right Now I have a character who runs around and has two attack buttons and if you hold those two together he does a special move. It is one Mc with 4 frames inside it, 1:stand, 2:punch, 3:kick, and 4:headbutt. Now when moving, if an attack button is moved the player is supposed to pause moving until the attack is finished. So far my code works all around except when pushing in certain directions on certain attacks the character keeps moving instead of stopping.
Example: Punching won't stop you from moving if your moving right, and Kicking won't stop if you are moving backwards diagonally.
I provided all the code so you can replicate it.
So I have my variable set up on the first frame of my time line.
var attack=false;
Then I have this code on my player MC:
onClipEvent (load) {
speed = 8;
stop();//set the speed and load it
}
onClipEvent (enterFrame) {
//movement
if (!attack) {
if (Key.isDown(87)) {
_y -= speed;
gotoAndStop("stand");
}
//W makes you walk up
if (Key.isDown(68)) {
_x += speed;
gotoAndStop("stand");
}
//D makes you walk right
if (Key.isDown(65)) {
_x -= speed;
gotoAndStop("stand");
}
//A makes you walk left
if (Key.isDown(83)) {
_y += speed;
gotoAndStop("stand");
}
//S makes you walk down
}
//attack
if (Key.isDown(70) && !Key.isDown(68)) {//if user hits f the character will attack and go to animation frame
this.gotoAndStop("punch");
var attack = true;
} else {
this.gotoAndStop("stand");
var attack = false;//if the user is not attacking it will go back to standing frame
}
if (Key.isDown(71)) {//if user hits g the character will attack and go to the animation frame
this.gotoAndStop("kick");
var attack = true;
}
if (Key.isDown(71) && Key.isDown(70)) {//if the user holds f and g then the chacter will do a different attack
this.gotoAndStop("headbutt");
var attack = true;
}
}
Also the only reason I got this far is because of AS:Main, so thanks for all of those who have helped there and who have helped me with previous questions on this code.
Well I did that and it all works except, when I move right in any direction it just won't allow me to attack at all while moving, where any other direction interrupts movement for the attack(which is what I want)
Thanks for all of your help by the way! I think this is my last question.
On my main timeline I put
var attack=false
Then(on the code on my hero MC) I added this to my attack:
//attack
if (Key.isDown(70) && !Key.isDown(68)) {//if user hits f the character will attack and go to animation frame
this.gotoAndStop("punch");
var attack=true;
} else {
this.gotoAndStop("stand");//if the user is not attacking it will go back to standing frame
var attack=false;
And Then I just add the !attack to my movements so that if attacking is true i can't move, correct?
Wow that seems so simple I feel dumb for not thinking of it. So would this work?
//movement
if(Key.isDown(68) && !(//so and so attack key is pressed){_x+=speed;gotoAndStop("stand");}
Or is it better to set up a boolean? Could I use it to cover all attacks insted of listing out the buttons individually on each movement command?
Sorry to double post but I did add in the comments in the code to make it easier to tell what does what.
So I've been reading AS:Main and I've gotten through a good portion of it (you'll notice some of my code is taken from AS:Main).
Now I'm making my first full game, so as of now I have my character who moves around on the screen and can do various attacks(I haven't set the Attack = True/False yet).
But I want him to kind of pause momentarily in between walking and attacking. Right now he just runs straight forward into a barrage of mad attacks.
Basically I do not want him to be moving and punching at the same time.
Examples of games that pause before there character attacks:
Golden Axe
Streets of Rage
Dad N Me
Here is my code:
onClipEvent(load){
speed=8;stop();//set the speed and load it
}
onClipEvent (enterFrame) {
//movement
if(Key.isDown(68)){_x+=speed;gotoAndStop("stand");}//D makes you walk right
if(Key.isDown(87)){_y-=speed;gotoAndStop("stand");}//W makes you walk up
if(Key.isDown(65)){_x-=speed;gotoAndStop("stand");}//A makes you walk left
if(Key.isDown(83)){_y+=speed;gotoAndStop("stand");}//S makes you walk down
//attack
if (Key.isDown(70) && !Key.isDown(68)) {//if user hits f the character will attack and go to animation frame
this.gotoAndStop("punch");
} else {
this.gotoAndStop("stand");//if the user is not attacking it will go back to standing frame
}
if (Key.isDown(71)) {//if user hits g the character will attack and go to the animation frame
this.gotoAndStop("kick");
}
if (Key.isDown(71) && Key.isDown(70)) {//if the user holds f and g then the chacter will do a different attack
this.gotoAndStop("headbutt");
}
}
This code is sitting on my hero movie clip who has various animations on different frames inside him.
P.S. I'm also having an issue that if I hold S and A or S and W at the same time the G button will not attack.
At 4/18/09 08:17 PM, KevnSevn wrote: If you actually wrote that code than SURELY you would know how to do that.
I only wrote a tiny bit of the code, its mostly from AS:Main, i'm just trying to learn how to apply things write now, i'm not good enough to write it all out myself.
I originally accidently put this in the programming forum thinking I was in flash...
So I have my enemy movie clip and I have it set up to recognize a hit test for my bullet mc. What do I put for the function of the hit test to make the enemy movieclip destroy itself?
I know of the Destroyobject? But I don't know how I would implement it to destroy self.
onClipEvent (load) {
spd = 1;//Set enemy speed
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent._bullet)) {
enemyMovieClip.removeMovieClip();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.wall)) {
spd = 0;
} else {
spd = 1;
}
}
onClipEvent (enterFrame) {
//Rotate enemy to face player
Xdiff = _parent.gun._x-_x;
Ydiff = _parent.gun._y-_y;
radAngle = Math.atan2(Ydiff, Xdiff);
_rotation = int((radAngle*360/(2*Math.PI))+90);
updateAfterEvent();
if (this.hitTest(_parent.gun)) {
//Do attack
} else {
//Move
if (_rotation>180) {
_y += (spd*Math.cos(Math.PI/180*_rotation));
_x -= (spd*Math.sin(Math.PI/180*_rotation));
} else {
_y -= (spd*Math.cos(Math.PI/180*_rotation));
_x += (spd*Math.sin(Math.PI/180*_rotation));
}
}
}
Here is the code on my enemy movieclip.
Sorry! I meant to put this in flash, if a mod could delete it, that would be great! Sorry for the inconvenience.