Piloted Laat Drop AT-TE: An (Almost) Solution [Problem-Found
Posted: Thu Dec 31, 2009 3:46 pm
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?
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.
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. 
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.