Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kez

Pages: 1 2 3 [4]
46
Modification Help / Update a vehicles datablock values through script
« on: June 01, 2017, 02:49:19 AM »
Since you can change a vehicles thrust and pitchforce values through console, can you do the same through code? Like if I pressed space for instance, could I change the vehicles default pitchforce to something much higher? How can I do this?

I already tried doing %obj.F22AvehicleDB.pitchforce = 49700; and %obj.setDatablock(F22AVehicle).pitchforce = 49700; but neither work. I dont know what I'm doing and I need help.


47
Suggestions & Requests / Re: Points shop for vehicles
« on: April 27, 2017, 09:44:00 AM »
Use vce. Literally takes 2 minutes to make.

I can make a prototype for you if you don't know how to use it.
I'd much rather have a gui edit or script, but pls explain. also can you upload the vce events I can't find a download

48
Suggestions & Requests / Points shop for vehicles
« on: April 27, 2017, 07:16:54 AM »
There should be a simple script to buy vehicles with points earned from a minigame. Can anyone make this happen?

49
Modification Help / Re: Vehicle mount/emitter limit?
« on: January 07, 2017, 12:17:24 AM »
I'd hate to bump this, but I'm still having trouble. I got the code to work, but it does nothing ingame. I'm still missing both contrails on my jet.

here's my code:

Quote
datablock playerData(emptyPlayer : PlayerStandardArmor)

{

        shapeFile = "base/data/shapes/empty.dts";

        boundingBox = "0.01 0.01 0.01";

        deathSound = "";

        painSound = "";

        useCustomPainEffects = true;

        mountSound = "";

};

datablock ShapeBaseImageData(F22AContrailImage)
{
   shapeFile = "base/data/shapes/empty.dts";
   emap = false;

   mountPoint = 0;
   rotation = "1 0 0 -90";

   stateName[0]               = "Ready";
   stateTransitionOnTimeout[0]      = "FireA";
   stateTimeoutValue[0]         = 0.01;

   stateName[1]               = "FireA";
   stateTransitionOnTimeout[1]      = "Done";
   stateWaitForTimeout[1]         = True;
   stateTimeoutValue[1]         = 10000;
   stateEmitter[1]               = F22AContrailEmitter;
   stateEmitterTime[1]            = 10000;

   stateName[2]               = "Done";
   stateScript[2]               = "onDone";
};

package F22AContrail
{
   function F22AContrail(%set)
   {
           %veh = %set.veh;
           if(isObject(%veh) && vectorLen(%veh.getVelocity()) > 0.6)
                   %Contrail = 1;
           else
                   %Contrail = 0;
           if(!%Contrail)
           {
         %i = %set.getCount();
                   if(%i > 0)
                   {
                           while(%i-->=0)
                                   %set.getObject(%i).delete();                       
                           %set.contrail = 0;
                   }
           }
           else if(!%set.contrail)
           {
         %set.contrail = 1;
                   for(%i=0;%i<2;%i++)
                   {
                           %ai = new aiPlayer()
                           {
                                   datablock = emptyPlayer;
                                   position = %veh.getPosition();
                           };
                           %veh.mountObject(%ai,%i+1);
                           %set.add(%ai);
                           %ai.mountImage(F22AContrailImage,0);
                   }
           }
           if(!isObject(%veh))
                   return;
           schedule(2000,0,F22AContrail,%set);
   }
   function Armor::onMount(%db,%pl,%obj,%node)
        {
                if(%db.getName() $= emptyPlayer)
                        return;
                return parent::onMount(%db,%pl,%obj,%node);
        }
};
activatePackage(F22AContrail);

I followed the inscructions listed on the link you sent, and still nothing works.

50
Creativity / Re: The new and improved 3D model topic!
« on: December 25, 2016, 05:07:53 PM »

WIP roosterpit for an F-22

51
Modification Help / Problem with vertical surface force
« on: December 18, 2016, 08:49:35 PM »
I am trying to create a realistic flight model and I'm currently stuck on trying to edit the horizontal and vertical surface forces so that the plane has a somewhat realistic turn rate, but when the aircraft is banked even slightly, it tends to start "falling" towards the direction it is banked in ragardless of the amount of thrust the plane is given. The plane also seems to wobble really bad when rolling, which at first I thought was a problem with the center of mass being off, but the problem persisted after centering the model in both milkshape and by code. I also tried lowering the lift but that doesn't work either. This problem is very annoying and is kind of hard to explain so heres a video showing whats wrong.

https://youtu.be/V6qoHiq7ATo


I've experimented with surface forces above 2.0 and while they solve the problem, they're not really the desired results I'm looking for (aircraft has too much friction and turns too tightly) I currently have vertical surface force to 0.60 (editing horizontal surface force apparently has NO EFFECT at all. I've tried ridiculously high and low values with no luck) Has anyone else stumbled across this issue or knows whats really happening here?

heres the code
Code: [Select]
 //Handling Properties
                    
  // Engine              
  engineTorque = 189; //0; // Engine power
  engineBrake = 0.054;         // Braking when throttle is 050
  brakeTorque = 5200;         // When brakes are applied
  maxWheelSpeed = 60; //200         // Engine scale by current speed / max speed

  forwardThrust = 4550; //5600
  reverseThrust = 45; //45

  // Maneuvering
  rollForce = 93000; //190000    
  yawForce = 30500; //27000  
  pitchForce = 48500; //32500
      
  horizontalSurfaceForce = 0.60; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
  verticalSurfaceForce = 0.60; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)

  rotationalDrag = 2.2; //5.8 // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
  maxSteeringAngle = 12.75; //1.23 //0.9785 // Maximum yaw (horizontal) and pitch (vertical) steering angle in radians. should match animation)
  
  // Misc
  maxForwardVel = 130; //200
  maxReverseVel = 130; //200
  stallSpeed = 60; //0
  drag = 1.25; //0.25
  lift = 18; //10              
  mass = 100; //100
  density = 5.0; //5.0

  // Energy
  maxEnergy = 100;
  jetForce = 4000;
  minJetEnergy = 5;
  jetEnergyDrain = 0.6;

52
Add-Ons / Re: Bushido's Sentry, Fixed!
« on: December 16, 2016, 04:54:45 AM »
Could you possibly fix pandans old sentry?

53
General Discussion / Re: Blockland Repository
« on: November 25, 2016, 07:29:39 PM »
Wow the website looks really nice, love the layout and how organized every category is. keep up the good work!

54
Modification Help / Re: Vehicle mount/emitter limit?
« on: November 18, 2016, 12:43:29 PM »

55
Suggestions & Requests / Set Brick Outline
« on: November 13, 2016, 07:10:49 PM »
You know when you equip a tool and invisible bricks are usually outlined? Can someone make a modification to the brick wrench menu to have a custom option for the brick to be outlined, and also maybe an event too?(onbricktouch>self>setbrickoutline, or something similiar)

56
Modification Help / Re: Vehicle mount/emitter limit?
« on: November 07, 2016, 01:41:21 PM »
you can mount modeless bots that have images mounted to them to get around the limit
How would I go about doing this?

57
Modification Help / Re: Vehicle mount/emitter limit?
« on: November 04, 2016, 04:12:26 PM »
Heres the code for the contrails. I have 4 mountpoints; 2 for afterburners and 2 for the contrails, and only one of the contrails appears.

Code: [Select]
datablock ShapeBaseImageData(F22AContrailImage1)
{
   shapeFile = "base/data/shapes/empty.dts";
emap = false;

mountPoint = 3;
   rotation = "1 0 0 -90";

stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;

stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 10000;
stateEmitter[1] = F22AContrailEmitter;
stateEmitterTime[1] = 10000;

stateName[2] = "Done";
stateScript[2] = "onDone";
};
function F22AContrailImage1::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
datablock ShapeBaseImageData(F22AContrailImage2)
{
   shapeFile = "base/data/shapes/empty.dts";
emap = false;

mountPoint = 4;
   rotation = "1 0 0 -90";

stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;

stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 10000;
stateEmitter[1] = F22AContrailEmitter;
stateEmitterTime[1] = 10000;

stateName[2] = "Done";
stateScript[2] = "onDone";
};
function F22AContrailImage2::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}

function F22AContrailCheck(%obj)
{
// return;
if(!isObject(%obj))
return;

%speed = vectorLen(%obj.getVelocity());
if(%speed < %obj.dataBlock.minF22AContrailSpeed)
{
if(%obj.getMountedImage(3) !$= "")
{
%obj.unMountImage(3);
%obj.unMountImage(4);
}
}
else
{
if(%obj.getMountedImage(3) $= 0)
{
%obj.mountImage(F22AContrailImage1,3);
%obj.mountImage(F22AContrailImage2,4);
}
}
schedule(2000,0,"F22AContrailCheck",%obj);
}



Code: [Select]
function F22ASpeedCheck(%obj)
{
if(!isObject(%obj))
{
return;
}
%pos = %obj.getposition();
%typeMask = $TypeMasks::ProjectileObjectType;
InitContainerRadiusSearch(%pos, 10000, %typeMask);
//%threatdetection = containerFindFirst(%typeMask, %pos, 100000, 100000, 100000);
%obj.ECM="";
%threatDetection = ContainerSearchNext();
while(isobject(%threatDetection) && (%threatDetection.target $= %obj))
{
serverPlay3d(F22AtargetSound,%pos);
%obj.ECM="<color:f00000>[ WARNING : INCOMING MISSILE ]";
break;
}
      %speed = vectorLen(%obj.getVelocity());
%obj.speed = mFloor(%speed+0.5);
%transform= %obj.gettransform();
      %obj.health = mFloor(-1*((%obj.getDamageLevel()/%obj.getDatablock().maxdamage)*100)+100 + 0.5);

switch (%obj.F22Agear)
{
case 1:
   %geart = "Up";
   %stat = "<color:00FF00>";
   %statnum = 1;
case 2:
   %geart = "Down";
   %stat = "<color:FF0000>";
   %statnum = 0;
default:
   %geart = "Down";
   %stat = "<color:FF0000>";
   %statnum = 0;
}

//F22A HUD
commandToClient(%obj.getMountedObject(0).client,'bottomprint',
"<just:left><font:Impact:24pt>\c3Speed <font:Impact:24pt>\c6: " @ %obj.speed @
"<just:center><font:Impact:24pt>\c3Altitude <font:Impact:24pt>\c6: " @ getcontrolobjectaltitude()

@
"<just:right><font:Impact:24pt>\c3[ L ] Gears <font:Impact:24pt>\c6: " @ %geart @
"<just:center><font:Impact:24pt>\c3[ > ] Armament <font:Impact:24pt>\c6: " @ %stat @ " " @

%obj.weapon , 1, 2, 3, 4);

commandToclient(%obj.getMountedObject(0).client,'centerprint',"<just:left><font:Impact:24pt>" @

%obj.lockstat @
"<just:center><font:Impact:24pt>" @ %obj.ECM @
"<just:right><font:Impact:24pt>\c3Health\c6: " @ %obj.health @ "%\n" @
"<just:right><font:Impact:24pt>" @ %obj.fColor @ "[FLARE]" @
"\n\n\n<just:center>[          ]" ,1,2,3,4);




if (mFloor(%speed+1.15) > %obj.getDatablock().minContrailSpeed)
{
%obj.mountImage(F22AContrailImage1,3);
%obj.mountImage(F22AContrailImage2,4);
}
else
{
%obj.unMountImage(3);
%obj.unMountImage(4);
}
     // if(%obj.speed < 145)
         // %obj.setVelocity(vectorScale(%obj.getVelocity(),1.03));
if(%obj.boost == true)
{

      %obj.applyimpulse(%obj.gettransform(),vectorScale(%obj.getVelocity(),3.65)); //1.45
%obj.mountImage(F22AAfterBurnerImage1,1);
%obj.mountImage(F22AAfterBurnerImage2,2);
}
else
{
%obj.unMountImage(1);
%obj.unMountImage(2);
if((%obj.speed >= 165))
    %obj.applyimpulse(%obj.gettransform(),vectorScale(%obj.getVelocity(),-4.0)); //-0.066
}
schedule(100,0,"F22ASpeedCheck",%obj);


}

58
Modification Help / Vehicle mount/emitter limit?
« on: November 04, 2016, 02:42:53 PM »
I created a vehicle with 4 different mounts that play emitters and only 3 of the four work. I've tried everything I can but the last emitter will not show up.
someone joined my server suggesting i use someones hacky script that adds bots to the mountpoints to play emitters but I have yet to find such script or said person.

can anyone help me with this? Please tell me if I should upload any code.

Pages: 1 2 3 [4]