Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Reply
 
Thread Tools Display Modes
Sniper Kill Animation
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default Sniper Kill Animation - 04-05-2011, 05:53 PM

This is also a program that I was working on last year but never posted because I never got to finish the animations for each individual shot. Right now, you press the spacebar to zoom in and you can only perform a headshot because I have only coded for the headshot animation. Once the person dies, you have to shoot his body again to make him stand back up and shoot him again. I got the recoil to work well on this and I also already set up for the animations of every other body part.

If you want to work on this and finish it for me, you can make your own custom animations for the different body shots. For example, just go to the guerrilla object in the list and choose the method "bulletCheck" and you can see the animation I did for the headshot, and make your own for other shots like the left arm, right arm, etc. I have already calculated the correct dimensions of each shot so it should be on target for each one, all you need to do is add the death animation.

I made this program primarily to show how to zoom in for a sniper rifle if anyone wanted to adapt it for any first person shooting games that they might have been working on. If that is the case, then look at the world method called "zoom" and you can see how I made the camera zoom in with all the animations of the rifle. The "xZoom" world variable is the magnification number that you want the rifle to zoom in. You can set it to any number, but right now it is set at 10x zoom. If you change the variable to 5, it will be 5x zoom, if you change it to 40, it will be 40x zoom (thats looking really far!).
Attached Files
File Type: a2w SniperZoom.a2w (1.70 MB, 78 views)


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-05-2011, 06:58 PM

Quote:
Originally Posted by Dameria View Post
This is also a program that I was working on last year but never posted because I never got to finish the animations for each individual shot. Right now, you press the spacebar to zoom in and you can only perform a headshot because I have only coded for the headshot animation. Once the person dies, you have to shoot his body again to make him stand back up and shoot him again. I got the recoil to work well on this and I also already set up for the animations of every other body part.

If you want to work on this and finish it for me, you can make your own custom animations for the different body shots. For example, just go to the guerrilla object in the list and choose the method "bulletCheck" and you can see the animation I did for the headshot, and make your own for other shots like the left arm, right arm, etc. I have already calculated the correct dimensions of each shot so it should be on target for each one, all you need to do is add the death animation.

I made this program primarily to show how to zoom in for a sniper rifle if anyone wanted to adapt it for any first person shooting games that they might have been working on. If that is the case, then look at the world method called "zoom" and you can see how I made the camera zoom in with all the animations of the rifle. The "xZoom" world variable is the magnification number that you want the rifle to zoom in. You can set it to any number, but right now it is set at 10x zoom. If you change the variable to 5, it will be 5x zoom, if you change it to 40, it will be 40x zoom (thats looking really far!).
thats pretty freakin beast, i just wish someone could exaplin to me how the aim code works, i dont get it at all

ps: the sound after you shoot makes it crash for me
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-05-2011, 07:06 PM

Quote:
Originally Posted by nickster654 View Post
thats pretty freakin beast, i just wish someone could exaplin to me how the aim code works, i dont get it at all

ps: the sound after you shoot makes it crash for me
I guess that you could delete the sound code if it makes it crash for you. I hope it doesn't make it crash for everyone or I'll have to take it out and repost it.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-05-2011, 07:14 PM

Quote:
Originally Posted by Dameria View Post
I guess that you could delete the sound code if it makes it crash for you. I hope it doesn't make it crash for everyone or I'll have to take it out and repost it.
kk, btw how did it take you to learn how to make it aim?
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-05-2011, 07:18 PM

What do you mean "how to make it aim"? Do you mean how to make it detect each individual subpart instead of the whole person? Or how to zoom in with the crosshair?


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-05-2011, 07:19 PM

Quote:
Originally Posted by Dameria View Post
What do you mean "how to make it aim"? Do you mean how to make it detect each individual subpart instead of the whole person? Or how to zoom in with the crosshair?
i mean for the camera to follow the mouse
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-05-2011, 07:29 PM

Quote:
Originally Posted by nickster654 View Post
i mean for the camera to follow the mouse
Thats actually an easier method to duplicate, just look at the first method that pops up when you open the program, its a world method called "mouseAim", just skip everything that has to do with "startingCircle" but do all the other stuff as it is written there and you should be able to do it. I had this method initialize when you click the red circle in the middle of the screen.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-05-2011, 07:29 PM

Quote:
Originally Posted by Dameria View Post
Thats actually an easier method to duplicate, just look at the first method that pops up when you open the program, its a world method called "mouseAim", just skip everything that has to do with "startingCircle" but do all the other stuff as it is written there and you should be able to do it. I had this method initialize when you click the red circle in the middle of the screen.
yea i know how to duplicate it, i just dont get how it works :/
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Thumbs up 04-06-2011, 02:27 AM

That's very good and realistic, although shoot to restart wasn't working.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-06-2011, 06:17 AM

Quote:
Originally Posted by arty-fishL View Post
That's very good and realistic, although shoot to restart wasn't working.
Yeah for some reason even though I coded it so that shooting the box would restart the body, it didn't work at all, no matter what I could do! But for some strange reason, shooting the dead body will bring it back to life, haha. Kind of ironic. Try shooting the body and tell me if it brings him back for you.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.