Author Topic: Daft Punk Helmets [SimpleWell Version Released]  (Read 34952 times)

Daft Punk Helmets
This pack includes both helmets, with and without glow effects, and a bonus helmet that I wore at the party. (Basically as a joke.)

Description
After many requests for these at TomTheGeek's New Years party, I've decided to release them.

The commands for each hat (in order from the picture):
/mxhelm
/tomhelm
/tomhelmglow
/guyhelm
/guyhelmglow

Pictures


Installation
Put Hat_DaftPunk.zip into the Add-Ons folder in your Blockland folder.

Download
Hat_DaftPunk.zip
SimpleWell Version


Thanks to MegaScientifical for simplifying the script for me. His version can be found here:

Download for reduced code version.

Commands:
/mxh mx
/mxh tom
/mxh tom glow
/mxh guy
/mxh guy glow

Thanks to lordician for making one that works with events.
Events Version

« Last Edit: January 02, 2011, 10:05:14 AM by Xinakam »





Would love to have this as an extension to the simplewell add-on.


Lol. The MX is a toaster. Nice models.

So the mau5 ones will be kept private?

I knew you were going to be a great add-on maker.

Keep it up.

The commands for each hat (in order from the picture):
/mxhelm
/tomhelm
/tomhelmglow
/guyhelm
/guyhelmglow

Uh, couldn't this be simplified, or at least less functions?

Code: [Select]
function serverCmdXinaHelms(%c, %h, %t) {
switch$(%h) {
case "mx":
%helmN = "MxHelmImage";
case "tom":
%helmN = "TomHelmImage";
case "guy":
%helmN = "GuyHelmImage";
default:
messageClient(%c, '', "<color:FFFF00>Available Helmets<color:FFFFFF>: MX, Tom, Guy. Add glow for glowing version.");
return;
}
if(%t $= "glow")
%helmN = strReplace(%helmN, "lmIm", "lmGlowIm");
if(isObject(%p = %c.player)) {
%p.unMountImage(2);
if(%p.getMountedImage(2) $= nametoID(%helmN)) {
%c.applyBodyParts();
%c.applyBodyColors();
}
else {
%p.mountImage(%helmN, 2);
for(%i = 0; $hat[%i] !$= ""; %i++) {
%p.hideNode($hat[%i]);
%p.hideNode($accent[%i]);
}
}
}
}

Now you just do these for the same things with highly reduced coding:

/XinaHelms mx
/XinaHelms tom
/XinaHelms tom glow
/XinaHelms guy
/XinaHelms guy glow


You can shorten the name and such, but you repeated the same exact code 5 times needlessly. This reduces the function spam.

Warning - while you were typing 3 new replies have been posted. You may wish to review your post.

I knew you were going to be a great add-on maker.

Keep it up.

Although overcomplicated. :(

Edit: Wow, reduced the code a lot there.
Edit2: Damn dude, so much code reduction.
« Last Edit: December 31, 2010, 08:44:40 PM by MegaScientifical »

-snip-
Good modeler, not so good scripter...
I'll fix that soon, thanks! But I'm taking a break right now.

Also, the /commands for the one i have now are shorter than your suggestion, instead of XinaHelms, ill just make it Mx.

BTW, Call me Mak.

Edit: Hey Mega. you think you could fix that for me? It would help out a lot.
« Last Edit: December 31, 2010, 08:46:24 PM by Xinakam »