Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
FPS Rapid fire Q
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default FPS Rapid fire Q - 09-12-2010, 09:46 AM

How do i create a rapid fire effect when i press the left mouse button until i release the mouse button without having loop until its done the animation a set # of times?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 09-12-2010, 10:18 AM

Pretty much the same thing as here, but with the mouse button instead of a key.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 09-12-2010, 10:22 AM

Quote:
Originally Posted by x2495iiii View Post
Pretty much the same thing as here, but with the mouse button instead of a key.
Well thats what i did but once i let go of the mouse it stops mid way through the animation and the gun starts drifting forward if i do that multiple times.
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 09-12-2010, 10:56 AM

I think it's good that you're making an FPS, because it, more than anything else (well, that's debatable), gives you an understanding of practically everything in Alice.

Anyway, to do what you're doing, I'm once again going to need an attachment, so I can more directly show you.

In my FPS as well, I have to do the same thing. Basically, what you want is the gun/person to reset their point of view in the end portion, and even in the end of the firing method (this also helps if you want to experiment around with varying amounts of recoil without having to re-plug EVERYTHING in).

Basically, upload the world and I'll see what I can do.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Question 09-12-2010, 11:16 AM

OK this is what i started but i haven't done much. I'm trying to get the player's view to work good before i start getting really into it.
When i would hold the fire button and let go before the animation play's 50 times (just what i had it set for) it would ether stop mid way and drift off if i did it multiple times or crash the simulation.
Solider 2.a2w
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 09-12-2010, 11:20 AM

Downloading...

Fixing...


The error, I think, is caused by the sound, not the shooting method.

Still working...


Okay, finished it. Ask your questions.


EDIT: Oh, you posted while I was editing. Oh well.
Yes, you can still have sound. Just take a look at the recursive sound method I added.
Attached Files
File Type: a2w Solider 2.a2w (1.65 MB, 9 views)


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.

Last edited by debussybunny563; 09-12-2010 at 11:38 AM.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 09-12-2010, 11:34 AM

OK well how would i still be able to have the sound when it shoots with out the glitch and allow it to rapid fire without stopping the animation mid way when you let go?
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 09-12-2010, 11:40 AM

OK thanks a lot! ill check it out. thanks.
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 09-12-2010, 11:46 AM

OK it works great but what ever you did (IDK how you did it) now when i aim down the sight the gun shoots to the side and when i aim off the sight the gun drifts off screen and the fire gets really big sometimes. . now this may be my amateurish methods but i don't know.

Last edited by SirThorfinn; 09-12-2010 at 11:49 AM.
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Default 09-12-2010, 11:48 AM

Actually, I think it'd be best if I explain a few things.

Instead of v_90 move forward 0.25 meters, I created a dummy and set its point of view to the p90 and its vehicle to the camera, and then p90 set point of view to dummy (which I named p90pivot). Does basically the same thing.

However, what I did to solve the displacement was in the 'end' portion of the while mouse is pressed event, I once again put the set point of view to p90pivot. Setting point of view is useful because instead of something like 'moving,' where it moves in a direction, it moves TO an object, which in this case is always in the same position relative the the camera. So, it'll never fault.

Also notice that in the beginning of the fire method, I have a variable 'firing' set value to true, and at the end set value to false. The set value to false is also in the end portion of the while mouse is pressed event too. This is for the sound method, which might take some effort to explain, and therefore I will refrain from doing so. (call me a quitter if you like, x2495iiii )


EDIT: AHHHH!!! Once again you post while I'm still posting! LOL no harm meant

I'll take a look at your aim method.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Reply


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.