Weapon Ammo

Discussions about Coding and Scripting
Post Reply
SAFreeStyler
Novice
Posts: 19
Joined: Fri Aug 08, 2008 7:08 am
Personal rank: Awsome RX Player
Location: UK, Cumbria
Contact:

Weapon Ammo

Post by SAFreeStyler »

How do i go about, changing a weapons Start ammo.... So with a rifel say when you first pick it up, you get 30 Bulits you get 60 Or Something,

And how would i change its name? from say "Ultimate Weapon" to "Megga Weapon"

(im a 100% noob when it comes to scripting)

:) so please explain it as Easy as possibel thanks alot! :loool:
The one and only

[*SA*]FreeStyler


I am a : UT Mapper, Gamer, and a Admin


Image
User avatar
gades
Average
Posts: 44
Joined: Sat Mar 22, 2008 5:21 am
Personal rank: UT BotMast3r

Re: Weapon Ammo

Post by gades »

To change WeaponName, look in the DefaultProperties of the weaponclass. There should be a section like ItemName=SniperRifle or WeaponName=SniperRifle.

For ammo amounts, I'm not sure which classes to look in, but it should be in the DefaultProperties as well. Something like PickupAmount or something.
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Weapon Ammo

Post by Feralidragon »

But that's is not that linear, because the Inventory class (weapons, ammo, armor, etc), loads some of it's default properties like the default projectile class (in weapons case), and I guess start ammo amount too.
You should subclass the weapon that you want to modify, and make your changes directly in the default properties.
The start ammo amount is defined by: Weapon > PickupAmmoCount
and the name of the weapon by some properties: Inventory > PickupMessage; ItemName
Basically ItemName is the "raw" name of the weapon (only the name of the weapon), the PickupMessage is just to say like "You picked up the Mega Shooter!" for example.
SAFreeStyler
Novice
Posts: 19
Joined: Fri Aug 08, 2008 7:08 am
Personal rank: Awsome RX Player
Location: UK, Cumbria
Contact:

Re: Weapon Ammo

Post by SAFreeStyler »

Ok... i didnt understand at all..... is there any simple ( Basics Tuts out ther ) i found one... took me over 45 mins to get half way... then got bored of reading it :| so any basic Tuts ???


(to make a Weapon)

Thanks in advance
The one and only

[*SA*]FreeStyler


I am a : UT Mapper, Gamer, and a Admin


Image
Post Reply