- Initiateur de la discussion
G-F-CD TheFrench
namespace Arthur;
- Messages
- 451
- Score réaction
- 38
- Points
- 140
Bonjour .
J'ai besoin d'aide au niveaux d'une entité .
Code :
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel( "models/props_c17/furniturestove001a.mdl" )
selfhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self.isRunning = false
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self.isBaking = false
self.finishBakeTime = 0
end
function ENT:StartTouch(ent)
if ent:GetClass() == "pa2" and self.isBaking == false then
ent:Remove()
self.isBaking = true
self.finishBakeTime = CurTime() + 5
end
end
function ENT:Think()
if self.isBaking == true then
self:SetColor(Color(255,0,0))
else
self:SetColor(Color(0,255,0))
end
if self.isBaking == true then
if self.finishBakeTime <= CurTime() then
self.isBaking = false
local pa2 = ents.Create("pa2")
pa2:SetPos(self:GetPos() + Vector(0,25,0))
pa2:Spawn()
end
end
end
Et j'aimerais que au lieu de faire spawn pa2 sa fasse spawn une autres choses
Merci .
J'ai besoin d'aide au niveaux d'une entité .
Code :
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel( "models/props_c17/furniturestove001a.mdl" )
selfhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self.isRunning = false
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self.isBaking = false
self.finishBakeTime = 0
end
function ENT:StartTouch(ent)
if ent:GetClass() == "pa2" and self.isBaking == false then
ent:Remove()
self.isBaking = true
self.finishBakeTime = CurTime() + 5
end
end
function ENT:Think()
if self.isBaking == true then
self:SetColor(Color(255,0,0))
else
self:SetColor(Color(0,255,0))
end
if self.isBaking == true then
if self.finishBakeTime <= CurTime() then
self.isBaking = false
local pa2 = ents.Create("pa2")
pa2:SetPos(self:GetPos() + Vector(0,25,0))
pa2:Spawn()
end
end
end
Et j'aimerais que au lieu de faire spawn pa2 sa fasse spawn une autres choses
Merci .
Dernière édition: