Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / How do i alternate the fire of a weapon?

Author
Message
Brunopark09
15
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 18th Oct 2010 07:32
if i have a rifle with a grenade launcher (as the model pack 10 m4),how do i alternate the grenade launcher? i suppose is possible in stock fpsc due the integration of airmod 0.6, and the alt ammo adition

Any idea?

SCI FI MEDIA IS NEVER ENOUGH!
Cyborg ART
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 18th Oct 2010 10:00
Take a look at the gunspecs of the updated stock weapons, most of them have an alternate firemode, use that as a template.

You also need to assign a alt-ammo.fpi to the ammopickup.

There should also be some information if you search the forum.

Brunopark09
15
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 19th Oct 2010 06:49
OK, i edited the gunspec but the altammo is not working and the gun is flipped when i switch to alt ammo

Screenshot attached

SCI FI MEDIA IS NEVER ENOUGH!
Cyborg ART
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 19th Oct 2010 14:55
Do you have an alt-ammo.fpi in your scriptbank?
And could you post your gunspec inside a codesnippet?

Brunopark09
15
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 20th Oct 2010 03:23
I have a script called altammo.fpi that came with the 1.18 beta 3

Here the script:





And here the gusnpec, is from the model pack 10 m4 m203



SCI FI MEDIA IS NEVER ENOUGH!
zeza
18
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 20th Oct 2010 03:46
I don't have model pack 10, so which do you want as your alternate fire, the rifle or the grenade launcher?

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
Brunopark09
15
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 21st Oct 2010 03:18 Edited at: 21st Oct 2010 03:37
I want the grenade launcher as my alternative fire

SCI FI MEDIA IS NEVER ENOUGH!
AbdulAhad
16
Years of Service
User Offline
Joined: 1st Feb 2010
Location: Karachi, Pakistan
Posted: 21st Oct 2010 17:34
I think you need to merge the animations of both models.

I'm planning of doing this later when I'm done with my tests.

Abdul Ahad
Astro Chickster
User Banned
Posted: 21st Oct 2010 17:40
FragMOTION hates EAI's grenade launchers, good luck with that.
zeza
18
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 22nd Oct 2010 01:25
This should solve your problem, but again, I can't test it


I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
Brunopark09
15
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 22nd Oct 2010 03:55
Ok, i used that gunspec and the altammo is not working, and the gun still flipped

Any idea?

SCI FI MEDIA IS NEVER ENOUGH!
Michael Thompson
17
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Behind you (if not, in australia)
Posted: 26th Oct 2010 13:26 Edited at: 26th Oct 2010 13:27
Well I played a game in which you played with an mp16/20 (i think it was that anyway) pretty much, it was 2 different weapons, which you changed to to toggle it. If you are prepared to do that, do so. otherwise, I would say use variables. eg

if player presses button 15 and variable1=1, set variable1 to 2
if player presses button 15 and variable1=1, set variable1 to 1

if player shoots
if variable1=1, shoot1
else variable1=2, shoot2

(i know this isnt fpi but it gives you an idea of 1 way to do it)

Windows 7 ultimate x64, Intel i7, 4 GB RAM, NVIDIA GEFORCE 330m 1GB
Flash Star Game Creations

Login to post a reply

Server time is: 2026-07-02 22:31:26
Your offset time is: 2026-07-02 22:31:26