Blockland Forums > Suggestions & Requests

Jetpack system - needs scripter

Pages: << < (11/16) > >>

Demian:


--- Quote from: Thé Lord Tony on February 21, 2013, 04:55:02 PM ---I didn't realize how fast you can model.

--- End quote ---
Two cylinders with some ridges and a box isn't too difficult.


--- Quote from: Thé Lord Tony on February 21, 2013, 04:55:02 PM ---For a model that looks like a brick it's off center. You know?

--- End quote ---
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

MARBLE MAN:

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

Demian:


--- Quote from: MARBLE MAN on February 21, 2013, 11:31:33 PM ---meh, i could script a base for it if you wanted :P

--- End quote ---
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

Thé Lord Tony:

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

MARBLE MAN:

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


--- Code: ---package fuelitemPickup
{
   function Player::pickup(%this,%item)
   {
      Parent::pickup(%this,%item);
      if(%this.getClassName() $= "Player" && %item.getDataBlock().getName() $= "JetPackFuelItem")
      {
         %this.setEnergyLevel(100);
      }
};activatePackage(fuelitemPickup);
--- End code ---


Pages: << < (11/16) > >>

Go to full version