Page 1 of 1

Script question

Posted: Tue Mar 30, 2010 11:05 am
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"?

Re: Script question

Posted: Tue Mar 30, 2010 11:19 am
by Master_Ben
On ObjectiveComplete() -> AddUnitClass()

Units can be added at any point through this method, but note they cannot be removed.

Re: Script question

Posted: Tue Mar 30, 2010 12:26 pm
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?

Re: Script question

Posted: Wed Mar 31, 2010 6:41 am
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.

Re: Script question

Posted: Wed Mar 31, 2010 2:00 pm
by StarkillerMarek
I will try it out, thanks.

Re: Script question

Posted: Thu Apr 01, 2010 10:58 am
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.

Re: Script question

Posted: Sun Apr 04, 2010 5:25 am
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?

Re: Script question

Posted: Sun Apr 04, 2010 9:40 am
by Fiodis
That function can only kill objects. It cannot remove units from the selection screen.

Re: Script question

Posted: Sun Apr 04, 2010 6:49 pm
by [RDH]Zerted
The only way to 'remove' a unit would be to set its PointsToUnlock ODF property super high.

Re: Script question

Posted: Mon Apr 05, 2010 12:58 am
by SW_elite
Thanks Fodis, ill remember that.