Script question

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
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Script question

Post by StarkillerMarek »

I had a question about the stock Genosian campaign script. How was it achieved that the player could only select some classes at the beginning, and later the rest were "unlocked"?
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 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: Watching your PC over your shoulder. No, the other sholder....

Re: Script question

Post by Master_Ben »

On ObjectiveComplete() -> AddUnitClass()

Units can be added at any point through this method, but note they cannot be removed.
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Script question

Post by StarkillerMarek »

Thanks. One last thing: how were they able to animate the gunships(and land them) in the Mygeeto mission, as well as the Utapau mission, and still have them fire. Are they destructable objects with turrets attached to them?
User avatar
hunting shadow
Private First Class
Posts: 79
Joined: Sun Jan 18, 2009 11:37 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: Somewhere in the wilderness of Mandalore
Contact:

Re: Script question

Post by hunting shadow »

Perhaps you look at the uta_fly_ride_gunshipmyg.odf in the rep side.I'm not completly sure of it(it's quite a time ago that i last did something with swbf2 modding), but for me it seems, that they set it up like a normal flyer, but without a pilot if i'm interpreting "PilotType = none" right. So I believe that its a normal flyer, but in the "pilot seat" you can only fire the weapons, not fly the ship. I guess the flying is accomplished through ZE animations. So the turrets can also fire when the ship is "landed". This is all hypotetic, since i only took a short look at it. so anybody who can correct me please do.
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Script question

Post by StarkillerMarek »

I will try it out, thanks.
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 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: Watching your PC over your shoulder. No, the other sholder....

Re: Script question

Post by Master_Ben »

hunting shadow wrote:Perhaps you look at the uta_fly_ride_gunshipmyg.odf in the rep side.I'm not completly sure of it(it's quite a time ago that i last did something with swbf2 modding), but for me it seems, that they set it up like a normal flyer, but without a pilot if i'm interpreting "PilotType = none" right. So I believe that its a normal flyer, but in the "pilot seat" you can only fire the weapons, not fly the ship. I guess the flying is accomplished through ZE animations. So the turrets can also fire when the ship is "landed". This is all hypotetic, since i only took a short look at it. so anybody who can correct me please do.
You are correct, no corrections neeed.
User avatar
SW_elite
Filthy Thief
Filthy Thief
Posts: 507
Joined: Sat Jan 02, 2010 6:43 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: Australia!!!

Re: Script question

Post by SW_elite »

Master_Ben wrote:Units can be added at any point through this method, but note they cannot be removed.
Are you sure you couldnt just use KillObject() to disable them?
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: Script question

Post by Fiodis »

That function can only kill objects. It cannot remove units from the selection screen.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Script question

Post by [RDH]Zerted »

The only way to 'remove' a unit would be to set its PointsToUnlock ODF property super high.
User avatar
SW_elite
Filthy Thief
Filthy Thief
Posts: 507
Joined: Sat Jan 02, 2010 6:43 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: Australia!!!

Re: Script question

Post by SW_elite »

Thanks Fodis, ill remember that.
Post Reply