Give a unit different weapons via LUA? [Solved]

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

User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Give a unit different weapons via LUA? [Solved]

Post by General_Nate »

How do you give a unit a different weapon via lua? Thanks!
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

Thats by the side files not the lua.
User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Question

Post by General_Nate »

But I know that you can, people have been talking about it.
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

Do you have any link for the topics you say ?
User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Question

Post by General_Nate »

I can't seem to find it. But I know I herd it somwhere... Oh well. Let's see if any one else knows about it.
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 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: Owning people in SWBF2
Contact:

Re: LUA Question

Post by Par3210 »

yes I wanted to know about it. Still no answer now..
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

If you want to do something like in the Big "L" that gives you a weapon, its still by sides.
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 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: Owning people in SWBF2
Contact:

Re: LUA Question

Post by Par3210 »

dude, he said he wanted to add a weapon via lua.
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

So its is before starting ?
User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Question

Post by General_Nate »

Par3210 wrote:yes I wanted to know about it. Still no answer now..
Ah! That's where! So I'm not crazy after all! Sorry for the new topic.....

Yes before starting!
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

So why ? isnt easier by the side ?
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 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: Owning people in SWBF2
Contact:

Re: LUA Question

Post by Par3210 »

no. It is easier by lua but you can still make mistakes with the lua...
I am asking how to do the lua one. But yes it is possible to do it by the sides's ODF too.
This may help - my topic - http://www.gametoast.com/forums/viewtop ... 27&t=19521
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

I never heard about such a thing, maybe like a AddWeapon code ? does that excists?
User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Question

Post by General_Nate »

That's what we are trying to find out! Why are you asking these questions?
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 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: Owning people in SWBF2
Contact:

Re: LUA Question

Post by Par3210 »

Labj wrote:I never heard about such a thing, maybe like a AddWeapon code ? does that excists?
I know what it is - it's not that - but I cannot remember the name! Arrgh! It's on the tip of my tongue.. :oops: :x
General_Nate wrote:That's what we are trying to find out! Why are you asking these questions?
He wants to help I guess.
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

I justs asked if that excists, in any case an user that knows a lot about codding may know if that really is valid in-game
I will search about it.

EDIT: Hey let`s check the LUA functions topic !
RogueKnight
Space Ranger
Posts: 2512
Joined: Sat Nov 22, 2008 1:50 pm
Projects :: Life. Work.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: Washington, US

Re: LUA Question

Post by RogueKnight »

Yes, you can do it.

I'm not a LUA coder, but if you want to know about it, look for shoot me dead's topic on it, using the search function or going back a few pages.
-_-
Gametoast Staff
Gametoast Staff
Posts: 2678
Joined: Sat May 07, 2005 1:22 pm

Re: LUA Question

Post by -_- »

Post Scripting ... the 15 minute mod

It's like we have a user-friendly search function for a reason or something.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 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: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: LUA Question

Post by Fierfek »

It's done by using a SetClassPropert line in the lua. I don't know much about it - go read this article:
http://www.gametoast.com/forums/viewtop ... 27&t=13946
I think it's fairly easy to do.

Edit: Ah, forget this article - read -_-'s one.
Last edited by Fierfek on Wed Jul 22, 2009 5:08 pm, edited 1 time in total.
Labj
Sith
Sith
Posts: 1400
Joined: Tue Jun 16, 2009 3:20 pm
Games I'm Playing :: Halo 4
xbox live or psn: SiulS2409
Location: Costa Rica
Contact:

Re: LUA Question

Post by Labj »

Hmm, that saves a lot of time.
Post Reply