Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1,692 Excellent


About AggrorJorn

  • Rank

Profile Information

  • Gender

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Here is a playlist to learn Lua and some lua specific functionality with Leadwerks.
  2. Have you searched in the workshop? First result for explosion: https://steamcommunity.com/sharedfiles/filedetails/?id=932421043&searchtext=explosion
  3. screenshot of scene and the settings perhaps? Restarting the editor? new test scene to try it out?
  4. IMaybe the enemy is close enough to the player, it stops moving and goes to the fighting animation. Perhaps there is no fight animation and moving is not enabled again.
  5. What do you mean with pack? Do you mean 'placed it in the level' or did you make a prefab? Can you post a working project (excluding assets that are not needed to reduce file size)? I will have a look this evening.
  6. I can get the editor/game crashing, but BSOD's? Can you check the windows event log and post any possible related errors here?
  7. Often starting in debug mode, can give you at least an error instead of just a crash. Starting adding nil checks and print out a console warning when something is nill when it shouldn't be
  8. Works fine for me. 1000 is a very high range value. I tested it with 50 1 character controller with default fps script 1 pivot with your soundsource script
  9. This video is unavailable.
  10. The source is now fixed at position vec3(0,0,1) which might not be the actual position of your helicopter. Can you upload the sound? I will try out on my pc and send you the results. source:SetPosition(sel.entity:GetPosition(true)) --Retrieve the position of the helicopter Note that if your helicopter is moving, you need to update the position of the source.
  11. I am assuming this means 'I use the default FPS player script that comes with Leadwerks'. This script creates a listenere. So if you have antther script in your scene that also creates a listener (either by attaching the script to an object or by using main.lua) than these 2 listeners are conflicting. Try creating your sound, without creating an additional listener and move your character close to the position of the source.
  12. Are you using the default character controller like @Thirsty Panther mentioned? If you do, the character controller script already creates a listener for you. Which is then probably conflicting with the listener you made. Can you share the entire script you are using right now?
  13. If you try out the example from the documentation and swap the audio with your helicopter sound, does it work? https://www.leadwerks.com/learn?page=API-Reference_Object_Source_SetRange range = 1.5 --Create a window window = Window:Create() context = Context:Create(window) --Load a sound local sound = Sound:Load("Sound/heli2.wav") --Create a source source = Source:Create() source:SetSound(sound) sound:Release() source:SetLoopMode(true) source:Play() source:SetPosition(Vec3(0,0,1)) --Create a listener local listener = Listener:Create() listener:SetPosition(0,0,0) while true do --Press up/down keys to adjust the source range if (window:KeyDown(Key.Up))then range = range + Time:GetSpeed()*0.1 end if (window:KeyDown(Key.Down))then range =range - Time:GetSpeed()*0.1 end if (range < 0)then range=0 end source:SetRange(range) if window:Closed() or window:KeyHit(Key.Escape) then return false end Time:Update() context:SetColor(0,0,0) context:Clear() context:SetColor(1,1,1) context:SetBlendMode(Blend.Alpha) context:DrawText("Range: "..range,2,2) context:Sync() end
  14. @Thirsty Panther Is right, leadwerks can do this for you. Sound file needs to be mono formatted though.
  15. fyi: recording (a part) of your screen can be done with the free OBS project: https://obsproject.com/.
  • Create New...