Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. I have a bunch of small props, their size is about a bucket or toilet. I want to decrease Character climb step height so that I will not step on them.
  2. I put them in scene by dragging from asset window And the same thing happens if I use: Local model = Model:Load() Local mat = Material:Load() Model:SetMaterial(mat)
  3. Hello, I have a militarybag.mdl and want to apply 2 different camoflage materials on it I put 2 instances of that bag into my scene then attach a lua file to one of them, here is my script: function Script:Start() local mat = Material:Load("testmaterial.mat") self.entity:SetMaterial(mat) end The result is both of bags change material. Does it mean I can not change material for each of bag instance ? Is there anyway to do my need ?
  4. that model is bush.mdl in LGE, it is a model with fixed geometry
  5. After 7 months learning Leadwerks Game Engine, I wanna show you guys my very first techdemo of my game Features: 1. Fully functional GUI created by myself: Menu are global for all maps Adjust ingame graphic and show the result directly, (include night time and night vision goggle test - thanks to shadmar's shader) Graphic settings can be saved to a config file for next time game starts Let you choose game language, language can be saved too (if I want) Scenarios selection (At this time, I only have one map) Camera following mouse movement effect Background music and sound effect for menu elements when not ingame Faded in/out map loading screen 2. Custom FPS player controller Switch between FPS / TPS Mode Switch member to member in a squad (Squad managerment system) You can see your own shadow and some body parts in FPS Mode Can Walk / Sprint / Lean left / Lean right / Crouch Player Breath control (this can affect weapon shooting) 3. Weapon system Simulate movement when player walking/running Can use attachments: flashlight, scope, suppressor (WIP), laser (WIP) Simulate gun fire modes: single shot, double shot (AN94), burst shot (MP5), Full Automatic Weapon safety ON/OFF Weapon block when close to wall, NPC Scope zoom level can be adjusted Gun managzine manager system (reload has no animation yet) Gun recoil control system Good gun shells ejection physic. 4. AI System NPC look at player with limited angle of his neck :"D And many small features
  6. Hello, Today I find out something weird about leaves shader. the bush material which was applied this shader only receives light on one side
  7. Thanks for your reply but it is no use Hi Josh, Look at the shadow of that cocacola can, it makes the can look like it is flying even it was placed right on top of the cartonbox I expected something like attachment 2 (drawn with gimp)
  8. I had a point light with Shadow mode set to Static + Dynamic +Buffer Then I realized that the shadow had a weird looking.. the position of shadow seems to be wrong how can I solve this ?
  9. Thank you, I realized that the combination of Camera:Project() and DrawImage() is good for display a health bar above character or something like that But it does not really solve my need, as the image below, there are 4 cases (1): Camera is outside of Spotlight's cone, Spotlight is inside Camera View. ~~> Player can see the lens effect but it is weak, player is not blinded (2): Camera is inside of Spotlight's cone, Spotlight is inside Camera View too. ~~> Player can see the lend effect and be blinded (3): Camera is outside Spotlight's cone and behind of Camera Angle Limit (I am not sure is it right to call it like this) ~~> No effect, player even does not see the lens (4): Camera is inside of Spotlight's cone but Spotlight is not inside Camera View ~~> No effect, of course How can I solve all of these ?
  10. How can I make the lensflare effect for spotlight when my camera direction opposites the light source, this can blind player like image below from battlefield
  11. I want to make an one-time Animation for my model when pressing a Key, I refered MonsterAI.lua to learn how AnimationManager works then try applying to my script, but it does not work. Here were my steps, did I miss something ? --Step1 import("Scripts/AnimationManager.lua") --Step2 function Script:Start() self.model = Model:Load("mymodel.mdl") self.animMan = AnimationManager:Create(self.model) end --Step3 function Script:UpdateWorld() if window:KeyHit(Key.A) then self.animMan:SetAnimationSequence("attack",0.5,0.5) end end Maybe I did not really understand the process show me please
  12. As the title, I wanna pass a variable value to an entity right after apply SetScript() to it This is my code in CreateBox.lua box = Model:Box() box:SetScript("myscript.lua") box.script.height = 10 And this is code in myscript.lua function Script:Start() System:Print(self.height) end When I run the game, it shows me that self.height has nil value Then I found a solution in myscript.lua Script.codeActivated = false function Script:UpdateWorld() if self.codeActivated == false then self.codeActivated = true System:Print(self.height) end end This solution can bring me the value passed from createbox.lua but it is not really effective for my project How can I pass variable value in the proper way ? Please show me
  13. Thanks for your replies, I dont have much knowledge about shader programing.. so that can anyone write this shader ? It should be useful !
  14. My character has a helmet with an plastic glass (it is transparent) I don't find any shader which can be applied for animated model with transparent material. There is transparent.shader in Shaders/Models folder but can't use for animated mesh please show me how to animate a transparent element of character
  15. I have a character with hand bone (name "right hand") and a gun npc.model = Model:Load("character.mdl") npc.hand = npc.model:FindChild("right hand") npc.weapon = Model:Load("weapon.mdl") npc.model:SetShadowMode(2) npc.weapon:SetShadowMode(2) There is a direction light can cast shadow on entities. If I use: npc.weapon:SetParent(npc.hand) then the shadow of the weapon disappears on the ground but shadow of character. If I don't use SetParent(npc.hand) for npc.weapon, both of shadow appear I tried npc.hand:SetShadowMode(2) combine with npc.weapon:SetParent(npc,hand) but weapon's shadow still disappear. How can I make weapon's shadow appear when it has parent entity ?
  16. Thanks for the info Macklebee, I will try to figure out how to make a fake EAX
  17. Is there any way to simulate 3D sound in 3D environment in Leadwerks? example: gunshot in a cave or a really big room has much more echo than on the street or small room
×
×
  • Create New...