| Blockland Forums > Modification Help |
| Node coloring |
| << < (2/4) > >> |
| mp7964:
Lol renderman. I was making an AI for this, but its fubar. |
| Greek2me:
--- Quote from: pecon98 on September 14, 2011, 06:03:57 PM ---Didn't seem to work. --- End quote --- That means that the person hadn't spawned yet. ApplyBodyColors shouldn't be called until the player has spawned. Can you post the rest of your code? |
| pecon98:
--- Code: ---datablock AudioProfile(kingDieSound) { fileName = "./death.wav"; description = AudioClose3d; preload = true; }; datablock PlayerData(KingZombie : PlayerStandardArmor) { //category = "Vehicles"; minJetEnergy = 1; jetEnergyDrain = 1; canJet = 1; maxItems = 0; //total number of bricks you can carry maxWeapons = 0; //this will be controlled by mini-game code maxTools = 0; runforce = 100 * 30; maxForwardSpeed = 35; maxBackwardSpeed = 30; maxSideSpeed = 6; attackpower = 800; //jumpsound = "ZombieJumpSound"; cameradefaultFOV = 90; cameraMaxFov = 120; cameraMinFov = 10; //minlookangle = -1; //maxlookangle = -1; minlookangle = -1.5708; maxlookangle = 1.5708; BrickDestroyMaxVolume = 250; BrickMaxJumpHeight = 5;// 10 uiName = "Renderman"; rideable = true; canRide = false; BrickKillRadius = 2; skinColor = "1 0.79 0.57 1"; FollowAnim = "Flailarms"; randomwalk = 1; aimatplayer = 1; SpecialAttack = 1; NoBloodyHands = 1; DoNotZombify = 1; chance = 90; ZombieTeam = "King"; }; function KingZombie::SpecialAttack(%this,%onshot) { if(getsimtime() >= %this.lastspecial+3000 && %this.getstate() !$= "Dead") { %ran = getrandom(-1,1); %ran2 = getrandom(-1,1); %this.setmovex(%ran); %this.setmovey(%ran2); schedule(0,0,BotShootMode,%this); schedule(500,0,BotShootMode,%this);// (500... schedule(1000,0,BotShootMode,%this);// (1000... schedule(1500,0,BotShootMode,%this);// (1500... %this.schedule(2800,clearmovex); %this.schedule(2800,clearmovey); %this.lastspecial = getsimtime(); } } function KingZombie::ondisabled(%this,%obj) { parent::ondisabled(%this,%obj); ZombieDefault::ondisabled(%this,%obj); } function KingZombie::onCollision(%this, %obj, %col, %fade, %pos, %norm) { parent::oncollision(%this, %obj, %col, %fade, %pos, %norm); ZombieDefault::onCollision(%this, %obj, %col, %fade, %pos, %norm); } function KingZombie::onMount(%a,%player,%vehicle,%d,%e,%f) { ZombieDefault::onMount(%a,%player,%vehicle,%d,%e,%f); parent::onMount(%a,%player,%vehicle,%d,%e,%f); } function KingZombie::onUnMount(%a,%player,%vehicle,%d,%e,%f) { ZombieDefault::onUnMount(%a,%player,%vehicle,%d,%e,%f); parent::onUnMount(%a,%player,%vehicle,%d,%e,%f); } function KingZombie::onAdd(%this,%obj) { parent::onAdd(%this,%obj); ZombieDefault::onAdd(%this,%obj); schedule(15,0,Kingfy,%obj); %obj.mountimage(LauncherImage,0); //%obj.mountimage(spearImage,0); %obj.setscale("0.75 0.75 1.5"); } function Kingfy(%obj) { %obj.name = "Renderman"; %obj.chestcolor = "0 0 0 1"; %obj.hatcolor = "0 0 0 1"; %obj.rarmcolor = "0 0 0 1"; %obj.larmcolor = "0 0 0 1"; %obj.hipcolor = "0 0 0 1"; %obj.llegcolor = "0 0 0 1"; %obj.rlegcolor = "0 0 0 1"; %obj.chest = "0"; %obj.lhand = "0"; %obj.rhand = "0"; %obj.larm = "0"; %obj.rarm = "0"; %obj.hat = "0"; %obj.accent = "0"; %obj.pack = "0"; %obj.secondpack = "0"; %obj.lleg = "0"; %obj.rleg = "0"; %obj.hip = "0"; GameConnection::ApplyBodyParts(%obj); GameConnection::ApplyBodyColors(%obj); %obj.setfacename("asciiTerror"); %obj.setdecalname("Mod-Suitblack"); %color = %obj.getdatablock().skincolor; %obj.setNodecolor($rhand[0], %color); %obj.setNodecolor($lhand[0], %color); %obj.setNodecolor("headskin", %color); //servercmdupdatebodyparts(%obj,6); } function servercmdsigheil(%client) { %client.player.playthread(1,armreadyright); %client.player.setarmthread(armattack); } function servercmdunsigheil(%client) { %client.player.setarmthread(look); } function KingZombie::onDamage(%this,%obj) { parent::onDamage(%this,%obj); %client.play2d(kingDiesound); } package blah { function GameConnection::applyBodyColors(%this) { parent::applyBodyColors(%this); %this.player.setNodeColor("ALL","0 0 0 1"); } }; activatePackage(blah); --- End code --- Yes, I made it work with the zombiemod. I also admit I am not very good at this. |
| Greek2me:
Change your Kingfy() function to this: --- Code: ---function Kingfy(%obj) { %obj.name = "Renderman"; %obj.chest = "0"; %obj.lhand = "0"; %obj.rhand = "0"; %obj.larm = "0"; %obj.rarm = "0"; %obj.hat = "0"; %obj.accent = "0"; %obj.pack = "0"; %obj.secondpack = "0"; %obj.lleg = "0"; %obj.rleg = "0"; %obj.hip = "0"; %obj.ApplyBodyParts(); %obj.ApplyBodyColors(); } --- End code --- --- Quote from: pecon98 on September 14, 2011, 07:23:02 PM ---I also admit I am not very good at this. --- End quote --- You'll get better with practice. |
| pecon98:
Well, I used that but there are no places to add the decals/face and he still appears all white. |
| Navigation |
| Message Index |
| Next page |
| Previous page |