Can fire rate be changed via LUA
Moderator: Moderators
-
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
Can fire rate be changed via LUA
Just wondering if fire rate can be changed via LUA. I dont believe it can, and this is the major drawback of not actually creating a side.
Admins, you can merge this with my previous post if you feel compelled.
Admins, you can merge this with my previous post if you feel compelled.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Can fire rate be changed via LUA
You can't really make any changes to weapons at all through .lua. Weapons aren't loaded as classes themselves.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Can fire rate be changed via LUA
What does SetProperty work on, then?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Can fire rate be changed via LUA
From scripting_system.doc:Fiodis wrote:What does SetProperty work on, then?
For starters, weapons are not entities and do not have instances. Even if you were thinking of SetClassProperty (which is more flexible), weapons aren't classes.SetProperty (name or entity, property, value)
This function sets the value of an instance property for the specified Entity.
-
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: Can fire rate be changed via LUA
you can give units other preloaded weapons, like give an engineer a rocket launcher if you feel so compelled.
How do you differentiate if the weapon is secondary or primary?
How do you differentiate if the weapon is secondary or primary?
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Can fire rate be changed via LUA
By reading the documentation. Specifically I think you should look at BF2_jedi_creation.doc.myers73 wrote:How do you differentiate if the weapon is secondary or primary?
-
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: Can fire rate be changed via LUA
that doesnt deal with adding weapons to a unit with LUA.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Can fire rate be changed via LUA
maybe because its not possible as mav said before?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Can fire rate be changed via LUA
It's possible to replace weapons, because that's modifying a unit, not a weapon. You can't edit weapons, though.maybe because its not possible as mav said before?
The same way you do it when setting up sides: "WeaponChannel" as a property.myers73 wrote:How do you differentiate if the weapon is secondary or primary?
- xII DM IIx
- Private First Class
- Posts: 77
- Joined: Thu Jul 23, 2009 3:10 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Italy
Re: Can fire rate be changed via LUA
So then what else are classified as "Entities"?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
