Page 1 of 1
Removing Ammo
Posted: Sun May 02, 2004 1:38 pm
by Ramah Palmer
Hi,
through looking in this forum I managed to bolt together a way to get my MP players to drop all their weapons at the start of a specific level of my map and each receieve a silenced pistol. But is there a way to script the removal of all the ammo from those pistols? (I want the level to be a bash only).
I saw one way which seemes to involve editing the TIKI, but on this score I am very unsure of myself. Is their a way to do it through scripting only?
Here is my script so far...
for(local.i=1;local.i <= $player.size ;local.i++)
{
$player[local.i] holster
$player[local.i] takeall
$player[local.i] item weapons/silencedpistol.tik
$player[local.i] useweaponclass pistol
$player[local.i] ammo silencedpistol 0 //this doesn't work
}
Thanks in advance for any help offered.

Posted: Sun May 02, 2004 1:45 pm
by jv_map
Use a negative ammo count

Posted: Sun May 02, 2004 5:36 pm
by Ramah Palmer
Ok, I tried changing the:
$player[local.i] ammo silencedpistol 0
line to read:
$player[local.i] ammo silencedpistol -1
And there was no change. I tried a different minus figure as well but had exactly the same amount of bullets.
Is this what you meant JV?
Posted: Mon May 03, 2004 2:13 am
by rodney
Ramah Palmer wrote:Ok, I tried changing the:
$player[local.i] ammo silencedpistol 0
line to read:
$player[local.i] ammo silencedpistol -1
And there was no change. I tried a different minus figure as well but had exactly the same amount of bullets.
Is this what you meant JV?
Please... help-me!!!
If...
$player[local.i] ammo silencedpistol +500...
or...
$player[local.i] ammo silencedpistol 500...
The bullets incraze???
Or no???
Thanks!!!
I need much this help!!!
Sorry with my bad english!!!
Posted: Mon May 03, 2004 6:36 am
by jv_map
'silencedpistol' should say 'pistol'

Posted: Mon May 03, 2004 9:01 am
by Ramah Palmer
Ok, so I'm getting closer now, thanks JV. But now what happens is depending on how big a minus figure I put in it takes away from my 'remaining bullets' pile.
Testing it myself I normally receive 8 bullets in the clip and another 8 ready to be loaded. If i put an ammo figure of -10 in then I still have 8 in the clip but -2 in reserve.
Is there a way to remove the ammo that is already loaded?
EDIT: Oh, and by the looks of it Rodney, if you put 'ammo pistol 500' and not silencedpistol as I orignally had it, then you will probably get an extra 500 bullets in your backpack, yeah.
Posted: Mon May 03, 2004 9:26 am
by jv_map
Ramah Palmer wrote:Is there a way to remove the ammo that is already loaded?

Not that I know of

Posted: Mon May 03, 2004 9:59 am
by Ramah Palmer
Ah, ok.
Well maybe I need to look at this differently then. Now that I have the pistols reduced to one clip, is there any way to make those bullets useless?
I don't want to make players invulnerable as in the question a few posts down, just not damaged by bullets. So that rules out covering the level with a trigger_nodamage.
Ermm... is it possible to bind a weapon clip to a player? Like a mini shield? Or is that just silly?
Or is there a way to turn down the damage done by projectiles in script?
Any better options?

Posted: Mon May 03, 2004 10:19 am
by jv_map
maybe
$player[#] immune bullet
Posted: Mon May 03, 2004 10:57 am
by Ramah Palmer
K, I'll try that, thanks.
What is the hash symbol for? Am I supposed to replace that with some other code, or does that mean all parts of the array?
Posted: Mon May 03, 2004 12:17 pm
by jv_map
Na you should replace it with some value

Posted: Mon May 03, 2004 9:56 pm
by blue60007
Ramah Palmer wrote:Ah, ok.
Well maybe I need to look at this differently then. Now that I have the pistols reduced to one clip, is there any way to make those bullets useless?
I don't want to make players invulnerable as in the question a few posts down, just not damaged by bullets. So that rules out covering the level with a trigger_nodamage.
Ermm... is it possible to bind a weapon clip to a player? Like a mini shield? Or is that just silly?
Or is there a way to turn down the damage done by projectiles in script?
Any better options?

try what jv said, but if you put a weapon clip around the player, you'd see the bullets (or not

) hitting thin air...