Can fire rate be changed via LUA

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Can fire rate be changed via LUA

Post 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.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Can fire rate be changed via LUA

Post by Maveritchell »

You can't really make any changes to weapons at all through .lua. Weapons aren't loaded as classes themselves.
User avatar
Fiodis
Master of the Force
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

Post by Fiodis »

What does SetProperty work on, then?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Can fire rate be changed via LUA

Post 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.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Can fire rate be changed via LUA

Post 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?
jedimoose32
Field Commander
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

Post 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.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Can fire rate be changed via LUA

Post by myers73 »

that doesnt deal with adding weapons to a unit with LUA.
User avatar
DarthD.U.C.K.
Master of the Force
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

Post by DarthD.U.C.K. »

maybe because its not possible as mav said before?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Can fire rate be changed via LUA

Post 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.
User avatar
xII DM IIx
Private First Class
Posts: 77
Joined: Thu Jul 23, 2009 3:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Italy

Re: Can fire rate be changed via LUA

Post by xII DM IIx »

So then what else are classified as "Entities"?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Can fire rate be changed via LUA

Post by Maveritchell »

Post Reply