Author Topic: Wait...What?  (Read 1308 times)

I have been trying for ages to get my Railgun add-on series to work. i only have one script prepared, (the other two are in the works) but no matter what i do, i cannot get the railgun to show up ingame. when i go to check the add on in the server setup menu, its there (and yes ive made sure to check the box) but in game when i go to set it as an item, its just plain not there in the menu! WTF?

thx for your help


User was banned for this post
« Last Edit: September 13, 2008, 07:04:42 AM by Badspot »

Please tell me you were at least smart enough to change the uiName.

When you start a server, does it say that it failed to load in the console?

a uiName? wtf is that? i told you im not a strong scripter.
everythingworks, its just that when im standing in front of a brick and hit it with the wrench, then click Item, the addon's name doesnt appear! can i explain it any more?!

Did you change the variable uiName, in the script somewhere? I forget what datablock it's under.

If you have the same datablock names as another item, regardless of the .zip's name, it'll overwrite.

Is it throwing an error? post your console.log. and/or the script.

« Last Edit: September 09, 2008, 11:23:46 PM by Razre »

I changed the ui name, going to retry

now im getting an error box that says i got a buffer overrun. seriously, what now?!

o soz, it was just this fail parachute port i forgot to get rid of.

tried again, but its the same result

here's my script. tell me whats wrong. its the attachment



Code: [Select]
//////////
// item //
//////////
datablock ItemData(RailgunItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

// Basic Item Properties
shapeFile = "./RailgunMk1.dts";   //<--------------------Wait... what
rotate = false;
mass = 1;
density = 0.3;
elasticity = 0.1;
friction = 0.9;

...

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(RailgunImage)
{
   // Basic Item properties
   shapeFile = "./Railgun.dts";   //<--------------------------Wait... what
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = "0 0 0";
   rotation = eulerToMatrix( "0.0 0.3 359.9" );

...

Uh what's the name of your shape? Railgun or RailgunMK1?

Also if you named it RailgunMK1 at some places and then simply Railgun at others, you WILL get some errors. You can't simply change the name halfway through and get away with it without the engine going Wtf during the game.

Minor errors...

Code: [Select]
//shell
datablock DebrisData(RailgunShellDebris)
{
shapeFile = "./.dts";   //<------------------- This sounds like an excellent .dts file name
lifetime = 0;
minSpinSpeed = 0;
maxSpinSpeed = 0;
elasticity = 0;
friction = 0;
numBounces = 0;
staticOnMaxBounce = false;
snapOnMaxBounce = false;
fade =false;

gravModifier = ;
};

If you're not using debris, delete the whole Datablock and then go to the bottom of the script and delete this line:

Code: [Select]
...
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = RailgunFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = RailgunShot1Sound;
stateEjectShell[2]       = true;  //<------------------------------- Delete this line
...

That's another problem down, also a minor detail:

Code: [Select]
   muzzleVelocity      = 900000000000000;
In Datablock projectileData, you may want to change this to a sane value. Technically it's going faster then the loving speed of light here. Generally 1000 is as high as anyone should go for "instantaneous" projectiles.

Also, when you package the script, place a server.cs file and a description.txt file in the zip along with your script and other objects. YOu can get a good example of what to do by looking at existing add-ons like the Rocket Launcher and the Gun.

Edit: why is there extra Code boxes all over the place? Edit to fix
« Last Edit: September 12, 2008, 07:17:30 AM by Muffinmix »

Theres a velocity cap on projectiles in v9 too, so your railgun is going to be reasonably easy to dodge.

Theres a velocity cap on projectiles in v9 too, so your railgun is going to be reasonably easy to dodge.
That explains why the sniper seemed a bit slower then usual, a bit more fair really.

I made the velocity rediculously high on purpose. This is because the Railgun itself (in reality) has subsonic (for those of you that dont know, even though the prefix means below, the term means in excess of sonic speed) velocity, breaking the soundbarrier, making it capable of delivering very destructive power with low mass AND without a warhead or explosive device. I formatted my railgun with a long reload time so you can't instantaneously snipe people repeatdly like an starfish. its primarily supposed to be an infantry supported anti air/armor weapon, but is very destructive againt infantry, much like the rocketlauncher. dont criticize me, but yeah, i guess that was a bit too overpowered. bit it is still powerful without being ridiculously so, (unlike rykuta's lazorcannon that can instantly kill anyone on the server all at once nomatter your bunker or distance from the blast zone.) i was using both Railgun and RailgunMk1 because my Railgun's model is Mk1, but i have a projectile shape and sound files all named Railgun, meant to be used between my three prototypes. i have mk2 and mk3 on standby for once mk1 works. mk2 is going to be less powerful but more shotgun like, while the final version is a rapid fire death cannon meant to be used as an admin weapon ONLY.
(mk stands for Mark, as in mark 1, mark 2, mark 3.) im not explaining so much to be condecending, but you guys are somehow not grasping the concept of a new type of blockland weapon. my next add on will be a vehicle/turret type that will launch both artillery and rocket artillery. im trying to contribute big things to blockland, and am tired of being looked down upon as just some noob. OK?! ok.

(p.s.) but that doesn't mean im shunning your expert opinion, im just feeling a little like you guys are saying at the same time, "meh, he's some noob who won't get this."
« Last Edit: September 12, 2008, 09:07:36 PM by Razre »