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 - Advanced Bot

Pages: 1 ... 265 266 267 268 269 [270] 271 272 273 274 275
4036
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 09, 2012, 05:23:48 PM »
I have tried it, it has a console error with "unable to call function: 'mountImage'" Here is the code to it:
Code: [Select]
function MakeEmitter(%client)
{
%client.mountImage(PlayerColorFireImage, 3);
     schedule(100, 0, MakeEmitter);
}

4037
Modification Help / Re: WaterDamage Modification
« on: December 09, 2012, 01:36:15 PM »
There is also %obj.getClassName() $= "vehicle"

4038
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 09, 2012, 12:14:47 PM »
Would this work?

Code: [Select]
datablock ParticleData(PlayerRainbowFireParticle)
{
textureName          = "base/data/particles/cloud";
dragCoefficient      = 0.0;
gravityCoefficient   = -3.0;
inheritedVelFactor   = 0.0;
windCoefficient      = 0;
constantAcceleration = 5.0;
lifetimeMS           = 400;
lifetimeVarianceMS   = 100;
spinSpeed     = 0;
spinRandomMin = -90.0;
spinRandomMax =  90.0;
useInvAlpha   = false;

colors[0] = "1 0 0 1";
colors[1] = "0 1 0 1";
colors[2] = "0 0 1 1";
colors[3] = "1 0 1 0";

sizes[0] = 0.0;
sizes[1] = 1.0;
sizes[2] = 0.8;
sizes[3] = 0.6;

times[0] = 0.0;
times[1] = 0.4;
times[2] = 0.7;
times[3] = 1.0;
};

datablock ParticleEmitterData(PlayerRainbowFireEmitter)
{
   ejectionPeriodMS = 12;
   periodVarianceMS = 0;
   ejectionVelocity = 0.1;
   ejectionOffset   = 0.00;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 35;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   orientParticles = False;

   particles = PlayerRainbowFireParticle;   

uiName = "Player Rainbow Fire";
};

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

mountPoint = $HeadSlot;

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

stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 0.350;
stateEmitter[1] = PlayerRainbowFireEmitter;
stateEmitterTime[1] = 0.350;

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

function serverCmdMakeMeFire(%client)
{
if(%client.IsAdmin)
  {
announce("<color:FFFFFF>" SPC %client.getPlayerName() SPC "<color:FFFF00>is now on fire.");
MakeEmitter();
  }
  else
  {
  %client.chatmessage("<color:FFFFFF>You must be admin to use this command.");
  }
}

function MakeEmitter(%client)
{
%client.mountImage(PlayerColorFireImage);
schedule(50, 0, mountImage(PlayerColorFireImage), %client.player, 0.1);
$loel::Schedule = schedule(100, 0, MakeEmitter);
}

//The functions are already in a package, it is just taken off.

4039
Modification Help / Re: Mounting a image to a player with serverCmd
« on: December 08, 2012, 08:42:29 PM »
I know, but I don't know why I put it there, it's a particle. But I want that Image to repeat and I am not sure how..

4040
Modification Help / Mounting a image to a player with serverCmd
« on: December 08, 2012, 07:54:29 PM »
I have made a function, and there is a package and other functions to my commands, but, this one will say that they are on fire, but the image is not mounted. I also want to make it keep mounting the image... Here is the code:
Code: [Select]
function serverCmdMakeMeFire(%client)
{
announce("<color:FFFFFF>" SPC %client.getPlayerName() SPC "<color:FFFF00>is now on fire.");
%client.player.mountImage(BurnEmitterB);
}

What is wrong?

4041
Modification Help / Re: Tumble Wand Not Working [Fixed]
« on: December 05, 2012, 06:07:30 PM »
Yes. He added brackets in the function, and also added a "return;" thingy..

4042
Modification Help / Re: Tumble Wand Not Working
« on: December 04, 2012, 09:55:06 PM »
Thanks Xalos. I need to learn more about coding. Lol.

4043
Modification Help / Re: Tumble Wand Not Working
« on: December 04, 2012, 08:59:36 PM »
I did that and it still says in the console: Unknown Command: AddVelocity

4044
Modification Help / Tumble Wand Not Working [Fixed]
« on: December 04, 2012, 08:13:29 PM »
Somehow, the addon works, but it in the console it says Unknown Command: AddVelocity. Here is the Function code:

Code: [Select]
function TumbleWandImage::onFire(%this, %obj, %slot)
{
if(!isObject(%obj.client))
return;
%start = %obj.getEyePoint();
%end = vectorScale(%obj.getEyeVector(), %this.projectile.range);
%rayCast = containerRayCast(%start, vectorAdd(%start, %end), %this.projectile.mask, %obj);
%target = firstWord(%rayCast);
if(!isObject(%target))
{
return;
}
%client = %obj.client;
%pos = posFromRaycast(%raycast);
%projectile = new projectile()
{
dataBlock = %this.projectile;
initialVelocity = %obj.getEyeVector();
initialPosition = %pos;
sourceObject = %obj;
sourceSlot = %slot;
client = %client;
};
missionCleanup.add(%projectile);
%class = %target.getClassName();
if(%class $= "AiPlayer" ||%class $= "Player" && (%obj.client.isAdmin))
%target.client.addvelocity("0 0 400");
schedule(100, 0, tumble, %target.client, 0.1);
}

Fixed. And is working.

4045
Help / Re: BOUNDS AND COLLISION
« on: November 29, 2012, 08:28:25 PM »
What?

4046
Help / Re: Blockland crashes after music list is executed
« on: November 27, 2012, 08:37:18 PM »
Nevermind. All I had to do is delete the server's config file.

4047
Help / Re: Blockland crashes while starting a game
« on: November 27, 2012, 08:36:34 PM »
Try to delete your config file.

4048
Help / Re: Blockland crashes after music list is executed
« on: November 24, 2012, 05:22:15 PM »

4049
Help / Re: Blockland crashes after music list is executed
« on: November 24, 2012, 12:17:26 PM »
Not really. I had a lot more than that and the game still executed. But I guess I have to make a gamemode since custom is the only gamemode that doesn't work.

4050
Help / Re: Blockland crashes after music list is executed
« on: November 24, 2012, 12:28:58 AM »
191 songs.

Pages: 1 ... 265 266 267 268 269 [270] 271 272 273 274 275