Page 1 of 1
Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 8:45 pm
by myers73
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.
Re: Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 8:48 pm
by Maveritchell
You can't really make any changes to weapons at all through .lua. Weapons aren't loaded as classes themselves.
Re: Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 8:53 pm
by Fiodis
What does SetProperty work on, then?
Re: Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 8:56 pm
by Maveritchell
Fiodis wrote:What does SetProperty work on, then?
From scripting_system.doc:
SetProperty (name or entity, property, value)
This function sets the value of an instance property for the specified Entity.
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.
Re: Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 8:59 pm
by myers73
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?
Re: Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 9:04 pm
by jedimoose32
myers73 wrote:How do you differentiate if the weapon is secondary or primary?
By reading the documentation. Specifically I think you should look at BF2_jedi_creation.doc.
Re: Can fire rate be changed via LUA
Posted: Mon Aug 31, 2009 9:07 pm
by myers73
that doesnt deal with adding weapons to a unit with LUA.
Re: Can fire rate be changed via LUA
Posted: Tue Sep 01, 2009 12:43 am
by DarthD.U.C.K.
maybe because its not possible as mav said before?
Re: Can fire rate be changed via LUA
Posted: Tue Sep 01, 2009 12:46 am
by Maveritchell
maybe because its not possible as mav said before?
It's possible to replace weapons, because that's modifying a
unit, not a weapon. You can't
edit weapons, though.
myers73 wrote:How do you differentiate if the weapon is secondary or primary?
The same way you do it when setting up sides: "WeaponChannel" as a property.
Re: Can fire rate be changed via LUA
Posted: Tue Sep 01, 2009 7:09 am
by xII DM IIx
So then what else are classified as "Entities"?
Re: Can fire rate be changed via LUA
Posted: Tue Sep 01, 2009 12:56 pm
by Maveritchell