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

Looks cool, might have to center the model though.


Wow I actually like that jetpack better. I didn't realize how fast you can model.

What do you mean?
Except that model is really high poly so I just remade it.


For a model that looks like a brick it's off center. You know?
« Last Edit: February 21, 2013, 05:02:06 PM by Thé Lord Tony »

What do you mean?
There's no problem in having both styles.


awesome, way better than the first, prehaps have 2 glowing 1x1 round bricks at the bottom? see how it looks atleast

I could probably try to help with the script. I am kinda a beginner but I have scripting some cool and funny addons, and maybe I should take it to the next step.

I didn't realize how fast you can model.
Two cylinders with some ridges and a box isn't too difficult.

For a model that looks like a brick it's off center. You know?
That's just how Blockland handles item spawning. It takes the average value of all vertex coordinates, assumes that as the center of the model, takes the lowest vertex Z coordinate and assumes that as the bottom of the model. Then it spawns the item so the bottom of the model is touching the brick top and the center of the model is aligned with the brick center. I can't do anything about that.

By the way I need help with the script over here: http://forum.blockland.us/index.php?topic=225364.0

meh, i could script a base for it if you wanted :P

meh, i could script a base for it if you wanted :P
Please do. I tried but failed. This is what the script needs to do:

When the client presses the jet button: check if the jetpack image is mounted to $BackSlot.
If above is true: Check the energy (Defined as maxEnergy in the playertype) value of the player, if above 0 mount an image to the jetpack image (if below 0 do nothing)
When the client releases the jet button unmount the image from the jetpack

And a script for the fuel tank to completely replenish the jetpack.

http://forum.blockland.us/index.php?topic=225420.0
demian, add the jetpack image, and make the fuel item (onPickup), %player.setEnergyLevel(100);

Code: [Select]
package fuelitemPickup
{
   function Player::pickup(%this,%item)
   {
      Parent::pickup(%this,%item);
      if(%this.getClassName() $= "Player" && %item.getDataBlock().getName() $= "JetPackFuelItem")
      {
         %this.setEnergyLevel(100);
      }
};activatePackage(fuelitemPickup);
« Last Edit: February 22, 2013, 11:01:36 PM by MARBLE MAN »

http://meshiest.com/M/src/Player_JetPack.zip

http://forum.blockland.us/index.php?topic=225420.msg6373485#msg6373485

to add energy do :
%player.setEnergyLevel(%player.getEnergyLevel() + 50) //replace 50 with amount

right click to use jets
if you have energy event/vce you can chnge fuel that way

It's nice that MARBLE MAN showed interested but what he did was nothing like what I asked. What he did is completely useless that can be done better by changing three variables in a playertype.

His add-on is a playertype that gains vertical velocity very fast when you hold down right click. It uses the default energy system for jetting and once you run out you stop jetting. Sounds a lot like the fuel jet player. That's exactly what it is with two crucial differences: the fuel jet player recharges the energy over time, and the fuel jet jetting is much smoother and better than this. In fact his playertype feels a lot like the old v0002 playertype and it would not be surprised if parts of it were copied from there.

Here, let me recreate his add-on except with much better feeling jetting in 5 lines.
Code: [Select]
datablock PlayerData(PlayerFuelJetLimited : PlayerFuelJet){
uiName = "Limited Fuel-Jet Player";
rechargeRate = 0;
jetEmitter = "";
jetGroundEmitter = "";};

I did not ask for a playertype. I did not ask anyone to recreate the jetting system. All I wanted was to mount image A into slot 1 of image B when you press the jet button.

Okay, so I think I can script this up really fast for you but let me get everything straight.
You want it so when you press the jet key, the jetpack appears on your back. When you let go, the jetpack disappears. The jetpack is also on a nonregenerating energy bar separate from the player's normal jet fuel bar, which can be refueled through gas canisters?

And I assume you have all the emitters set-up so that isn't needed?

Okay, so I think I can script this up really fast for you but let me get everything straight.
You want it so when you press the jet key, the jetpack appears on your back. When you let go, the jetpack disappears. The jetpack is also on a nonregenerating energy bar separate from the player's normal jet fuel bar, which can be refueled through gas canisters?

And I assume you have all the emitters set-up so that isn't needed?
No.

The jetpack image is already mounted to the player's back. Now when you press the jet key the emitter image is mounted (only if the jetpack image is indeed mounted to $BackSlot) to slot 1 of the jetpack image. When you run out of energy the emitter image should be unmounted from slot 1 of the jetpack image.

I already have the jet player done as well as the refueling gas item. Emitters too.

No.

The jetpack image is already mounted to the player's back. Now when you press the jet key the emitter image is mounted (only if the jetpack image is indeed mounted to $BackSlot) to slot 1 of the jetpack image. When you run out of energy the emitter image should be unmounted from slot 1 of the jetpack image.

I already have the jet player done as well as the refueling gas item. Emitters too.
shouldn't the jet be an item instead?