Blockland Forums > Modification Help

Changing vehicle state?

Pages: << < (2/2)

Placid:


--- Quote from: Destiny/Zack0Wack0 on April 01, 2011, 08:09:04 PM ---???
All he wants is to switch from flying to driving. Not hard to understand, mate.

@OP: Just change the datablock when they press a certain key. Unfortunately the space bar brake is in the engine code, if I recall. You'll need to choose another key.

--- End quote ---
you can't use that code that GSF used on his helicopter and modify it?
from what i remember it was like, trigger something.

Kilser:

He means a harrier. Like the jet that can hover.

TripleNickels:


--- Quote from: Destiny/Zack0Wack0 on April 01, 2011, 08:09:04 PM ---???
All he wants is to switch from flying to driving. Not hard to understand, mate.

@OP: Just change the datablock when they press a certain key. Unfortunately the space bar brake is in the engine code, if I recall. You'll need to choose another key.

--- End quote ---
It is brake, but you can still use it. I used it in an engine modifier script I made a while back.


--- Code: ---package PlaneCar {
function CarPlane::onTrigger(%this,%obj,%triggerNum,%val) {if(%val && %triggerNum == 2) { %this.setDatablock(PlaneCar); }}
function PlaneCar::onTrigger(%this,%obj,%triggerNum,%val) {if(%val && %triggerNum == 2) { %this.setDatablock(PlaneCar); }}
};
activatePackage(PlaneCar);

--- End code ---

I'm assuming that you can swap datablocks between WheeledVehicle and FlyingVehicle. If you can't, it's a lot more complicated and just about not worth it. You'd have to delete the car, create the plane exactly where the car was, mount the player into the plane, and give the plane the exact speed the car was going. This doesn't seem so bad on the ground, but in the air if you're in the middle of turning and you hit space your plane will spawn angled, but the turn will start over again and cause some wobbles and possible spin outs. Not to mention, space is still brake reguardless of the vehicle type. If you don't just tap space you'll come to a screeching stop if you're on the ground.


EDIT:

--- Quote from: Kilser on April 02, 2011, 05:16:31 AM ---He means a harrier. Like the jet that can hover.

--- End quote ---
That's not at all what he described, how did you even come to that conclusion?

Bobinatoran:

Just ask Bushido how he made his masterpiece helicopter. Its really well done and would work for a VTOL (Vertical Take Off and Landing) plane. You just need to make the model for it. Or ask him if you can even "use" his script. The only other thing is that you would have to animate the engine nozzles swiveling down into hover mode or vice versa.

Pages: << < (2/2)

Go to full version