Jump to content

guido892

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by guido892

  1. Thank you for your answer Josh, i'll try your solution.
  2. 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.
  3. Thank you Josh,this answer has solved the problem.Thanks to you and macklebee for the time you have dedicated to me.
  4. Now I tried to install version 18.2.1 and with this driver it works all regularly. Perhaps the 18.6.1 that are "optional", have some kind of problem.
  5. 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.
  6. 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 2a PHOTO 1
  7. The collison type and mass are set by script in start function,as in the first script i've post
  8. 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
  9. 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
  10. 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
  11. 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.
×
×
  • Create New...