Spawning with less than the maximum ammunition.
Moderator: Moderators
-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Spawning with less than the maximum ammunition.
Is it possible to have a unit spawn with say, 100 out of a max of, 200 shots for his rifle? Can he start out with less than the max amount of ammo and can get more?
-
mswf
- Master Bounty Hunter

- Posts: 1674
- Joined: Tue Mar 31, 2009 3:40 pm
- Location: Twello, The Netherlands
- Contact:
Re: Spawning with less than the maximum ammunition.
I don't remember that that's possible.
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: Spawning with less than the maximum ammunition.
never seen it done
-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Re: Spawning with less than the maximum ammunition.
Yeah, I don't think its possible
. I've been fooling around with my units odf. Tried adding stuff like, WeaponAmmo = 5/10 and such, but no success
.
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Re: Spawning with less than the maximum ammunition.
Expirement and find out.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Spawning with less than the maximum ammunition.
editing the units odf wont work since the ammorelated lines only control the absolute ammo you can have
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Spawning with less than the maximum ammunition.
When you change class you have less than full ammo and abilities such as sabotage can reduce things, so it's probably possible but also probably complicated.
-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Re: Spawning with less than the maximum ammunition.
Yeah, I thought about using the sabotage bonus :cantina: . I still would rather figure out how it works, though.
It wouldn't work for what I want also.
It wouldn't work for what I want also.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Spawning with less than the maximum ammunition.
The sabotage bonus, I think, deals a certain amount of damage to a side's vehicles immediately upon them spawning - it has nothing at all to do with ammo, and cannot be applied here. Changing classes preserves the amount of ammo you have at the moment - if you change classes while you have full ammo, you will respawn as your new class with full ammo. That effect, also, can't be applied here.
In fact, I don't think there is any way to do this.
In fact, I don't think there is any way to do this.
-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Re: Spawning with less than the maximum ammunition.
Wouldn't surprise me if it isn't possible. Just a little idea I had for my map
. I'm still experimenting of course. If anyone has any suggestions of what I could try, just throw them at me.
Last edited by fasty on Thu Jul 29, 2010 6:07 am, edited 2 times in total.
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: Spawning with less than the maximum ammunition.
Maybe there is a way to make the units 'use' 50% of their ammo as they spawn?
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Spawning with less than the maximum ammunition.
Thats a good idea, but i can't really see how you would implement it in the lua...
-
CressAlbane
- Master Bounty Hunter

- Posts: 1519
- Joined: Fri Dec 18, 2009 8:02 am
- Projects :: CTF Arenas
- Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Re: Spawning with less than the maximum ammunition.
Or when after he spawns use a setproperty to make his ammo higher?
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Spawning with less than the maximum ammunition.
That might work. Give it a try and tell us if it works 
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Spawning with less than the maximum ammunition.
You cannot force a unit to fire a weapon via lua, so no.Lagomorphia wrote:Maybe there is a way to make the units 'use' 50% of their ammo as they spawn?
Example Finder gives no instance of "CurAmmo" or "CurAmmunition" anywhere. You can use SetProperty with CurHealth to play with health, but you can't use it to affect ammunition.CressAlbane wrote:Or when after he spawns use a setproperty to make his ammo higher?
In short, I don't think there's any way to do this. Feel free, of course, to say "but maybe if we did this", but fully expect someone to post a reason why you can't.
-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Re: Spawning with less than the maximum ammunition.
Maybe something along these lines, or am I totally off?
Hidden/Spoiler:
Hidden/Spoiler:
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Spawning with less than the maximum ammunition.
fasty wrote:Maybe something along these lines, or am I totally off?![]()
By the way, it doesn't work. What a surprise.Hidden/Spoiler:
Indeed, what an unexpected surprise.Fiodis wrote:Example Finder gives no instance of "CurAmmo" or "CurAmmunition" anywhere. You can use SetProperty with CurHealth to play with health, but you can't use it to affect ammunition.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Spawning with less than the maximum ammunition.
Spawning and attempting to increase the max ammo count would mostly likely (if it is possible) crash the game in MP. I know messing with weapons almost always causes crashes.
I don't know if an ammo pick-up could have a negative ammo count, which in theory would cause anyone picking it up to lose ammo. If so, you could try creating one directly on the locations of any spawning units.
I don't know if an ammo pick-up could have a negative ammo count, which in theory would cause anyone picking it up to lose ammo. If so, you could try creating one directly on the locations of any spawning units.
- SW_elite
- Filthy Thief

- Posts: 507
- Joined: Sat Jan 02, 2010 6:43 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia!!!
Re: Spawning with less than the maximum ammunition.
I was thinking of something along those lines but I didn't bother posting because I have no clue how to get it working.
-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Re: Spawning with less than the maximum ammunition.
It's a great idea but I don't know how to get it working either. Whenever I mess with the com_item_powerup_ammo, nothing happens in game although, I noticed it does munge it in VisualMunge. I can't get it to subtract ammo, or add any.
