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 Scripts / Shared ammo?

Author
Message
Ikey
14
Years of Service
User Offline
Joined: 17th Apr 2010
Location: Look in the back seat of your car
Posted: 27th Jan 2011 22:18
I have made a range of one type of gun, with different variations on it.

They are all the same gun, however, and well, should be able to use the same ammo.

What can I do to make it so it all works on one ammo pack?


Design Runner
14
Years of Service
User Offline
Joined: 16th Oct 2010
Location: In my own little world.
Posted: 27th Jan 2011 22:20
This is a part of PB, called ammo pooling. I'm not sure if it has been added to the stock engine, but it may have. Ply is who you want to ask on that one.

"If you can't handle me at my worst, you sure as hell don't deserve me at my best"
Ikey
14
Years of Service
User Offline
Joined: 17th Apr 2010
Location: Look in the back seat of your car
Posted: 27th Jan 2011 22:26
I have PB, so I'm all good.

Flicks open PB Manual like a pro.


Ikey
14
Years of Service
User Offline
Joined: 17th Apr 2010
Location: Look in the back seat of your car
Posted: 27th Jan 2011 23:51
Okay, after searching the manuals for PB, I can not find anything on ammo pooling. Can someone help?


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st Feb 2011 19:00
Ammo pooling is done by setting up weapons (through the gunspec.txt file) to have their ammo bound to variables.

I think you should find the feature in the gunspec section of the manual. It's called something along the lines of "bindammotovar". Anyway, doing that will bind that weapon's ammo to a variable. With this comes a few nicities.

First off, you can now alter that variable at any time to change that weapon's ammo on the fly! The player doesn't even need to have the weapon equipped for this to work! You can also use the variable to check against with variable conditions.

Secondly, if you bind multiple weapons to the same variable, they are, in effect, sharing the same ammunition! This is called ammo pooling, but is not labeled as such. The ammo pooling is just an added benefit of binding multiple weapons to the same ammo variable.


I hope that cleared things up for you.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.

Login to post a reply

Server time is: 2024-11-24 12:58:09
Your offset time is: 2024-11-24 12:58:09