Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found

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
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....

Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found

Post by Master_Ben »

Okay guys, I got a bit (*cough*probablytoomuch*cough*) of spare time on my hands, and talk in 'Spiderpig's WIP topic got me thinking about the whole Laat dropping an ATTE thing back in episode 2, I got dragonum's setup to work a while ago, and it's always been an interesting topic to me. Thinking about it, I have I have a solution I hope will work. To my knowledge it would, but not for one small issue I will get into later. I't's a bit of an overkill situation, but if it's worth doing, it's worth overdoing, right? :wink:

The Scenario and What's Going on Behind the Scenes:

1. You approach an Laat with an ATTE underneath it. It is landed and stationary.
1. Simple enough: you've got a flyer with an Laat-ATTE mesh. No problems here, although for later reference, bear in mind that there's only one of these units, if you want more of 'em copy-paste the system as a new unit.

2. You get in it.
2. If you don't know how that works, well, stop reading. Please.

3. You fly around. Your only weapon is a laser.
3. Again, nothing special here.

4. You land. Your primary weapon changes into a "Deploy ATTE" weapon.
4. It gets a bit tricky here: we use an "OnEnterRegion" function on a region so close to the ground, you have to land to enter it without hitting the ground. This changes the odf parameter... So far so good.

5.You can do two things here: Fly away (in this case the weapon changes back to normal, I'll explain how that works later, it's relatively simple.), or deploy. You deploy.
5.This is observed by the PC through LUA. (Again, I'll explain how this works later, It's too lengthy a thing to be described in the middle of the scenario.)

6. Finally, you become an ATTE, and watch the Laat fly away.
6. This last issue is the problem: you can change the thing into an ATTE and make the Laat fly away by changing the mesh through LUA-ODF manipulation into an ATTE (or a disguise kit(?)), and turning the Laat into an effect with a mesh, or an ordinance, and sending it off. No, this is not the problem, the problem arises in the further ODF changes, that of making the ATTE walk, etc. This is all possible, but I'm not positive if you can change object-class with an LUA, or change it ingame at all for that matter, and without an object-class change you can't pull it off. This is the only major problem I could find with the whole thing.

Problems and Solutions: (will hopefully be updated with input from the community)

First arises the problem of the LUA sensing the weapon being fired. How do we do it? If there isn't some code I'm not aware of, you could pull it off by making the thing fire a shot downward (or upward) with a moved hp_fire. This would require another mesh that would be changed when the floor region is exited/entered, but is still doable. This shot kills an invisible wall, which is picked up by the LUA and respawned.

Next comes the issue of exiting the region, there being no "OnExitRegion" function. This could be done with a giant region encompassing the entire map, aside from the floor region(s), upon which being entered would reverse the floor region's effects.

Finally, there's a small matter of the player entering the regions while not being in a vehicle. This could be done with a conditional statement bypassing everything in the scripting if the vehicle is not occupied by the player. This might be affected by online, but oh well.

NOTE: If this is written badly, or confusingly, don't hesitate to tell me. :wink:

:runaway: Man, that was a lot of writing. I doubt some problem will not be found with the thing, but still, there's always a chance... Anyways, thanks for reading, guys, and hopefully I'll get some feedback. :D
Last edited by Master_Ben on Thu Dec 31, 2009 4:10 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Piloted Laat Drop AT-TE: An (Almost) Solution

Post by Maveritchell »

Not to be a buzzkill, but this isn't completely thought through.
1) You can't fire weapons while landed
2) You can't change a vehicle from a flyer to a walker
3) You can't change a vehicle while a person's in it
4) You can't have a region so low that it can't be reached by only landing

The biggest problem with your thought process is the huge set of assumptions you make for step 6 - they basically amount to "Lua MAGIC" one vehicle into another. A good rule of thumb is that if you can't cite an example and/or you don't know exactly how to do it personally, then you shouldn't assume it can be done.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Piloted Laat Drop AT-TE: An (Almost) Solution

Post by genaral_mitch »

It can just be carring a vehicle spawn that activates when you enter a region the size of the map, but close to the ground. But yes, it would need something like a disguise kit to changhe it's mesh.
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: Piloted Laat Drop AT-TE: An (Almost) Solution

Post by Master_Ben »

@general_mitch: no can do, you can't carry a spawn point.
Maveritchell wrote:Not to be a buzzkill, but this isn't completely thought through.
1) You can't fire weapons while landed
2) You can't change a vehicle from a flyer to a walker
3) You can't change a vehicle while a person's in it
4) You can't have a region so low that it can't be reached by only landing

The biggest problem with your thought process is the huge set of assumptions you make for step 6 - they basically amount to "Lua MAGIC" one vehicle into another. A good rule of thumb is that if you can't cite an example and/or you don't know exactly how to do it personally, then you shouldn't assume it can be done.
It's not being a buzzkill at all, frankly, I expected exactly that kind of feedback, that's how you learn things. Plus, you're right, I didn't think it through for a long period of time by any stretch of the imagination. I'm happy enough to know I saw that one of the four problems you found with it, and had no way to know about the changing while a person's in it, and forgot about the landing-weapons issue, although I did know it. Anyways, the topic's at your mercy, lock it if you want, I don't mind, obviously it's point is gone... :P

Just out of curiosity though, why can't you make a region like that?
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found

Post by genaral_mitch »

Because you can crash.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Piloted Laat Drop AT-TE: An (Almost) Solution

Post by Maveritchell »

Master_Ben wrote:Just out of curiosity though, why can't you make a region like that?
Because you can always fly into it. No region is so low that it can't be reached by flying as well as landing.

It's not a huge issue because it plays a large second fiddle to the bigger problems that involve changing a vehicle on-the-fly. Anything has to be respawned before any major changes take effect, and even changing a unit is a complicated process (change, grab location, kill, respawn at). Changing a vehicle may be either difficult or impossible, depending on whether you are changing an empty or piloted or landed or flying vehicle.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Piloted Laat Drop AT-TE: An (Almost) Solution

Post by genaral_mitch »

Master_Ben wrote:@general_mitch: no can do, you can't carry a spawn point.
You can have one built into it.
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: Piloted Laat Drop AT-TE: An (Almost) Solution

Post by RogueKnight »

genaral_mitch wrote:
Master_Ben wrote:@general_mitch: no can do, you can't carry a spawn point.
You can have one built into it.
Not a vehicle spawn point.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found

Post by genaral_mitch »

Oh, now I get why.
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found

Post by bobfinkl »

There are easier ways to do this, but it will still be sloppy either way.

One way I meant is by making an actual vehicle drop weapon (I have seen a video of this done for the IFT-X tank from a Republic Gunship), and put regions above the area you can drop that kill OnEnterRegion and restore the vehicle drop weapon ammo. Obviously there are issues with this, if the player decide to drop it too high the regions block them from doing that but you get a giant explosion in the air, and restoring the weapon ammo (for those who do drop too high), if you go up higher again it restores, which actually could be useful if you want that for some reason, and lastly you cannot remove/add the AT-TE.

Overall, it's definitely possible to do this but since Mav proved your solution not possible, and my example would end up very sloppy, it would end up not worth the effort.
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: Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found

Post by Fiodis »

For the record, I'll toss in that there is a CharacterLandedFlyer(character, flyer) function. It still wouldn't work right, IMO, though.
Post Reply