Ah, I have that mod already and didnt see that.
Well, is it possible to create a mod that works like this mod's mechs?
viewtopic.php?f=61&t=19665I was going to have a within range on use icon if condition that will teleport the actor
So I see how you got the actor
self.parent = ToActor(self.actor);
self.parentname = self.parent.PresetName;
self.repairedactor = CreateAHuman(self.parentname);
self.repairedactor:AddInventoryItem(CreateHDFirearm("Repair Kit Mk2"));
self.itemblocker = CreateTDExplosive("Stone","Ronin.rte");
self.itemblocker.PresetName = "Repair Kit Blocker Rock";
self.parent:AddInventoryItem(self.itemblocker);
Thanks alot.
But how would I apply this to say, another actor or craft, and not just the device?
Also, what is this lua for?
self.parent:GetController():SetState(Controller.WEAPON_CHANGE_PREV,true);
-- self.inventorychecker = self.parent:Inventory();
-- if self.inventorychecker ~= nil then
-- self.parent:SwapNextInventory(self.inventorychecker,true);
-- end
for i = 1, self.maxcopyitems do
self.potentialwep = self.parent:Inventory();
if self.potentialwep ~= nil and self.potentialwep.PresetName ~= "Repair Kit Blocker Rock" then
if self.potentialwep.ClassName == "HDFirearm" then
self.repairedactor:AddInventoryItem(CreateHDFirearm(self.potentialwep.PresetName));
elseif self.potentialwep.ClassName == "TDExplosive" then
self.repairedactor:AddInventoryItem(CreateTDExplosive(self.potentialwep.PresetName));
elseif self.potentialwep.ClassName == "HeldDevice" then
self.repairedactor:AddInventoryItem(CreateHeldDevice(self.potentialwep.PresetName));
end
self.parent:SwapNextInventory(self.potentialwep,true);
else
break;
end
end
if self.parent:IsPlayerControlled() == true then
self.parentplayer = self.parent:GetController().Player;
end
self.repairedactor.HFlipped = self.parent.HFlipped;
self.repairedactor:SetAimAngle(self.parent:GetAimAngle(false));
self.repairedactor.Pos = self.parent.Pos;
self.repairedactor.Team = self.parent.Team;
self.repairedactor.AIMode = Actor.AIMODE_SENTRY;
self.parent.ToDelete = true;
MovableMan:AddActor(self.repairedactor);
if self.parentplayer ~= nil then
ActivityMan:GetActivity():SwitchToActor(self.repairedactor,self.parentplayer,self.repairedactor.Team);
end
local sparticle = CreateAEmitter("Repair Kit Mk2 Sound Repair");
sparticle.Pos = self.repairedactor.Pos;
MovableMan:AddParticle(sparticle);
self.repairedactor:FlashWhite(610);
ActivityMan:GetActivity():ReportDeath(self.repairedactor.Team,-1);
end
end
end
self.ToDelete = true;
end
is that to control the amount of repair kits in any given inventory so more dont accidentally spawn when the actor is recreated?
I want to make a actor, or a craft, without legs called a "Cybernetics Lab". If I "borrowed" the type of lua from the apocalypse mod, where when an actor selects a pie function actor is added to the inventory and killed and then respawned, how would I do that?