Jump to content

guido892

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by guido892

  1. Hi to all,

    I would like to understand if the measurements of the navmesh is exactly what you see in Pic 1 and if is possible to know if a point generated randomly is inside or outside the navmesh.

    Sorry for my bad english.

    Thanks in advance for any answers.

    PIC 1

  2. Thank you for your answer.

    The material and texture of the bulletmark are the default ones, which you can find in Materals / Decals. I also noticed that with the new drivers some resolution, like the 1360x768, have disappeared.
    This is the first time that this happens to me after almost a thousand hours of using leadwerks.
    I do not know if it can be useful for you but I use the Luawerks script.
    Excuse me for my english but I'm using the google translator.

    30381342_photo1.thumb.jpg.30ac3dd69dac532fab31ea692fa0cd91.jpg

  3. Hello to everyone,

    I updated the graphics card driver (Radeon Rx 560) to the latest version 18.6.1 and I noticed that if I activate the antialias filter and shoot with a weapon, when it creates the bulletmark or the wooden decals it also shows me a white line diagonal on the screen (Photo 2) and white line on the wall(Photo 2a). If the antialias filter is disabled, it does not happen. If I go back to the old version of the graphics card drivers (17.12), this does not happen( Photo 1). Anybody encountered this problem?

    PHOTO 2

    photo 2.jpg

    Photo 2a

    1171216460_photo2a.thumb.jpg.34a712781eafd92ed28cac4cec3e2a84.jpg

    PHOTO 1

    photo1.jpg

  4. I tried now with model but the result is the same.This is the script changed

    function Script:SpawnEnergy(type1)
    	for f=1,self.Energy do	
    		if type1 == 1 then
    			local enemy=Model:Load("healtkit.mdl")
    			local x1,z1
    			x1,z1=self:GetPosObj(self.rommcr[self.energycr[f]])
    			enemy:SetPosition(self.rommcr[self.energycr[f]]:GetPosition()+Vec3(x1,-0.7,z1))
    			enemy:SetScript("Scripts/Objects/Items/Med.lua")
    		end
    	end
    end

     

  5. And this is the function that spawn the medikit.

    function Script:SpawnEnergy(type1)
    	for f=1,self.Energy do
    		if type1 == 1 then
    			local enemy=Prefab:Load("Prefabs/medi.pfb")
    			local x1,z1
    			x1,z1=self:GetPosObj(self.rommcr[self.energycr[f]])
    			enemy:SetPosition(self.rommcr[self.energycr[f]]:GetPosition()+Vec3(x1,-0.7,z1))
    		end
    	end
    
    end

     

  6. Thanks AggrorJorn for your answer.
    I tried both , the prefab and with the model via script, but the result is the same.

    This is the script that is attached to the medikit model,it's basically like the push button trigger with added instructions to give energy.

    I added the collision function () to test if it works and the result is that it works. Only use () function does not work.

    Script.enabled=true--bool "Enabled"
    Script.soundfile=""--path "Sound" "Wav Files (*.wav):wav"
    Script.Energy=20 --int "proiettili da dare"
    
    function Script:Start()
    	if self.soundfile then
    		self.sound = Sound:Load(self.soundfile)
    	end
    self.entity:SetCollisionType(Collision.Prop)
    self.entity:SetMass(10)
    end
    
    function Script:Use(Player)
    	if self.enabled then
    		if self.sound then self.entity:EmitSound(self.sound) end
    		self.component:CallOutputs("Use")
    			if Player.health < Player.maxHealth then
    				Player:GiveHealth(self.Energy)
    				self.entity:Release()
    				else
    				Player.timeStartandDuration = Time:GetCurrent() + 2000
    				Player.hemax=true
    			end
    	end
    end
    
    function Script:Collision(entity, position, normal, speed)
    	if self.enabled then
    		if entity:GetKeyValue("name")=="giocatore" then
    			if entity.script~=nil then self:Use(entity.script) end
    		end
    	end
    end
    
    function Script:Enable()--in
    	if self.enabled==false then
    		self.enabled=true
    		self.component:CallOutputs("Enable")
    		self.health=1
    	end
    end
    
    function Script:Disable()--in
    	if self.enabled then
    		self.enabled=false
    		self.component:CallOutputs("Disable")
    		self.health=0
    	end
    end
    
    function Script:Release()
    	if self.sound then self.sound:Release() end
    end
  7.  
     
     
     
     
    494/5000
     
    Hello everyone ,
    I have a problem with a template downloaded from workshop.it is a medikit.
    When I create a prefab with this model, setting it as Prop and mass 10, setting it for a script with function use() and then save it, if I insert it in the map through the editor it works correctly (Photo 1), but if I insert it via script,the 
    function use() does not work anymore (Photo 2). It also happens to me with the ammo model of the workshop. What can I do ?
    Thank you and excuse me for my bad english.

    Photo1.jpg

    Photo 2.jpg

×
×
  • Create New...