Author Topic: Jetpack system - needs scripter  (Read 6984 times)


It'd be a much nicer alternative to making bricks that turn players into limited fuel-jet players on click. :D

Someone needs to do the script, I'm not a scripter. Does anyone know if you can duplicate the jetting system? Otherwise we need to change the playertype when you have the jetpack on and that would suck if you are using some custom player with different health or something. That could work too if we can copy the values from the client's current playertype with some wizardry and then only modify the jet and particles.

Item done, mounting on/off done. Mounting to back done. Particles won't be a problem. I only need the script now.
« Last Edit: February 20, 2013, 03:37:18 PM by Demian »

It'd be a much nicer alternative to making bricks that turn players into limited fuel-jet players on click. :D

Oh yeah and then they get to keep fuel-jet infinitely. No thanks. That's not what I want.

Someone needs to do the script, I'm not a scripter. Does anyone know if you can duplicate the jetting system? Otherwise we need to change the playertype when you have the jetpack on and that would suck if you are using some custom player with different health or something. That could work too if we can copy the values from the client's current playertype with some wizardry and then only modify the jet and particles.

Item done, mounting on/off done. Mounting to back done. Particles won't be a problem. I only need the script now.

What I'm probably going to have to do is that first you have to activate it in the inventory system. Then the activation changes your playertype and then your playertype resets back to normal as soon as the jetpack fuel runs out. Also removing the jetpack from your inventory.

There is plenty of items already that do this that I can take a look at.
« Last Edit: February 20, 2013, 03:51:10 PM by Thé Lord Tony »

Then the activation changes your playertype and then your playertype resets back to normal as soon as the jetpack fuel runs out.
You're in a TDM server where the players have 200 health for some reason. You equip the jetpack and boom, 100 health. No thanks.

This is the script used in Old School Rifle that changes the datablock. It doesn't change health at all. All health and damage taken do not change values.

Code: [Select]
ActivatePackage(OldSchoolRifle);

function altRifleImageScoped::onMount(%this,%obj,%slot)
{
Parent::onMount(%this,%obj,%slot);
serverPlay3D(altRifleScopeSound,%obj.getTransform());

%client = %obj.client;
%client.player.setDataBlock("oldschoolrifleArmor");

}

function altRifleImageScoped::onUnMount(%this,%obj,%slot)
{
Parent::onMount(%this,%obj,%slot);
serverPlay3D(altRifleScopeBackSound,%obj.getTransform());


%client = %obj.client;
if(!isObject(%client.minigame))
{
%client.player.setDataBlock("PlayerStandardArmor");
}else{
%client.player.setdatablock(%client.minigame.playerDatablock);
}
}

Code: [Select]
datablock PlayerData(oldschoolrifleArmor : PlayerStandardArmor)
{
firstPersonOnly=1;

   runForce = 10 * 180;
   runEnergyDrain = 0;
   minRunEnergy = 0;
   maxForwardSpeed = 3;
   maxBackwardSpeed = 3;
   maxSideSpeed = 3;

   maxForwardCrouchSpeed = 0;
   maxBackwardCrouchSpeed = 0;
   maxSideCrouchSpeed = 0;

   jumpForce = 8 * 90; //8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 0;

minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;


uiName = "";
showEnergyBar = false;

   runSurfaceAngle  = 45;
   jumpSurfaceAngle = 45;
};
« Last Edit: February 20, 2013, 04:00:07 PM by Thé Lord Tony »

This is the script used in Old School Rifle that changes the datablock. It doesn't change health at all. All health and damage taken do not change values.

Code: [Select]
...
%client.player.setDataBlock("oldschoolrifleArmor");
...

Code: [Select]
datablock PlayerData(oldschoolrifleArmor : PlayerStandardArmor)
...
That script changes the playertype this this oldschoolrifleArmor which appends non-defined values from PlayerStandardArmor. It does change the health. It chages the health to whatever the health is in PlayerStandardArmor which is 100.

Well I never seen a 200 health DM but for whatever reason there is one they can either change the preference or not use it due to compatibility issues. There's really nothing I can do unless you rather have the jetpack fly like a helicopter using height controls.

Then again it would be considered as a vehicle and won't have fuel.



I'll ask around anyways I know a few scripters.
« Last Edit: February 20, 2013, 04:08:52 PM by Thé Lord Tony »

Can't we just do this? When a player picks up a jetpack item, it immediately appears on their back, replacing any player nodes on the player's back, and it enables jets, with the jet particles emitting from the jetpack instead of the player's feet. When the jetpack runs out of fuel, it will disappear and disable jets.

Well I never seen a 200 health DM but for whatever reason there is one they can either change the preference or not use it due to compatibility issues. There's really nothing I can do unless you rather have the jetpack fly like a helicopter using height controls.
That's why I mentioned wizardry in my earlier post. I think there is a way to get the current player object > the playertype datablock that object is using > the various values in that playertype and then use those as variables in the jetpack playertype but that is way beyond my skills.

So yeah the item and mounting is done. Now I need a script that mounts an image the the jetpack when you press right click regardless of the item you are currently holding as well the wizardry above. Using a custom fuel jet player with no jet emitter would work great. I also need a script for recharging the fuel/energy when you pick up another jetpack (while you already have a jetpack in your inventory).

Can't we just do this? When a player picks up a jetpack item, it immediately appears on their back, replacing any player nodes on the player's back, and it enables jets, with the jet particles emitting from the jetpack instead of the player's feet. When the jetpack runs out of fuel, it will disappear and disable jets.
I would prefer if it was an item and reusable. A one time use jetpack could be a separate item.

I would prefer if it was an item and reusable. A one time use jetpack could be a separate item.

What makes my idea of the jetpack seem non-reusable? Just pick another one up when you run out of fuel.

Also, you can't always make something in a way you prefer, it's sometimes better to listen to the community for the kind they prefer the most. Maybe we should put up a poll?

So yeah the item and mounting is done. Now I need a script that mounts an image the the jetpack when you press right click regardless of the item you are currently holding as well the wizardry above. Using a custom fuel jet player with no jet emitter would work great.

Okay well I know a few scripts to look into. Bushido's hanglider script and the old jetpack script which was more like a portable flying wheeled jeep that was too glitchy.

I'm still asking around with people who actually know how to script instead of cutting and pasting like me.

I also need a script for recharging the fuel/energy when you pick up another jetpack (while you already have a jetpack in your inventory).

Madel a fuel canister for me instead and I can make it refuel the jetpack just like how Bushido's ammo stash replenishes ammo for his guns. It would actually make things a tad less complicated to script.

A fuel canister just seems more sensible now.
« Last Edit: February 20, 2013, 04:26:51 PM by Thé Lord Tony »


anyone up for something more original?
What game or thing was that from?

What game or thing was that from?

Lego Universe.

Don't bother looking for it, though. The game shut down a year ago.

Lego Universe.

Don't bother looking for it, though. The game shut down a year ago.
I know. Lego Universe sucked.