Jump to content

Search the Community

Showing results for tags 'lua'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Models
    • Animals
    • Barriers
    • Characters
    • Containers
    • Environments
    • Furniture
    • Props
    • Rocks
    • Vegetation
    • Vehicles
    • Weapons
  • Materials
    • Brick
    • Cartoon
    • Decals
    • Dirt
    • Grass
    • Industrial
    • Medieval
    • Metal
    • Plastic
    • Plaster
    • Rock
    • SciFi
    • Sky
    • Signs
    • Tile
    • Stone
    • Walls
    • Wood
  • Plugins
  • Scripts
    • GUI
    • Object
    • Utilities
  • Shaders
    • Post-Processing Effects
    • Surface
  • Sounds
    • Ambience
    • Effects
    • Music
  • Tools
  • BATTLE LEAGUE's Assets
  • BATTLE LEAGUE's Mods

Blogs

There are no results to display.

There are no results to display.

Forums

  • Leadwerks
    • Technical Assistance
    • General Discussion
    • Programming
    • Game Art
    • Suggestion Box
    • Bug Reports
  • Platforms
    • Windows
    • Mac
    • Linux
  • Community
    • Showcase
    • Promotion
    • Off-topic
  • BATTLE LEAGUE's Topics
  • Vec-Tec's Releases
  • Vec-Tec's Topics
  • Forth's Development
  • Forth's Game design
  • Forth's Graphics
  • Forth's Documentation
  • Forth's TODO
  • Forth's IMPORTANT
  • Forth's Screenshots
  • The uncertain world's Game Design
  • The uncertain world's Programming
  • The uncertain world's TODO
  • The uncertain world's Graphics
  • The uncertain world's Screenshots
  • Muerte's Discussion

Categories

  • Records
  • Entity
  • Command Reference
  • Vec3
  • Vec4
  • Script Reference
  • Shader
  • Index
  • Material
  • Object
  • Buffer
  • Asset
  • Font
  • Shape
  • Sound
  • Texture
  • App
  • Context
  • Model
  • Light
  • DirectionalLight
  • PointLight
  • SpotLight
  • Attractor
  • Camera
  • Emitter
  • Listener
  • Pivot
  • Bone
  • Sprite
  • FileSystem
  • Key
  • Source
  • Surface
  • Math
  • AABB
  • dVec3
  • Mat3
  • Mat4
  • Plane
  • Transform
  • Vec2
  • Vec3
  • Vec4
  • Mutex
  • Prefab
  • PickInfo
  • Map
  • Stream
  • System
  • Thread
  • Time
  • Window
  • World
  • Driver
  • SoundDriver
  • GraphicsDriver
  • PhysicsDriver
  • OpenGL2GraphicsDriver
  • OpenGLES2GraphicsDriver
  • OpenALSoundDriver
  • NewtonDynamicsPhysicsDriver
  • Draw
  • Color
  • Blend
  • Joint
  • Debug
  • Component
  • Steamworks
  • LensFlare
  • Vehicle
  • Decal
  • Quat
  • Leaderboard
  • Probe
  • Analytics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


Interests

Found 362 results

  1. Well here we are again. It's always such a pleasure. So, I have these turrets that shoot out missiles. They do as they're supposed to and sail in the direction they are shot. HOWEVER, it doesn't seem to collide with anything and only collides with the player if the player is moving. I have the collision type for the missile set to 'Prop'. I have tried the 'Projectile' collision type, and it just makes it not collide at all. I have tried detecting collisions from both the player's script and the missile's script. The missile also has Swept collision enabled, a mass of 0, and gravity turned off. I am using Move(x, y, z) to move the missile within the UpdateWorld() function.
  2. Sup guys. I hope you all having a nice day and all that stuff. My english is not so good, so i must ask you to forgive me about that, but i hope that you will understand me. (But some build-in grammar check on this forum would be nice...). Well, i've recently bought leadwerks steam edition. It's pretty cool and simple IDE, but i have some questions about it. First, i can't find any info 'bout .lua file that starts the game. Well, the thing i wanna do is to create a map file from starting .lua script and load it. But i cant figure out where that starting script is. I'm pretty new to all that object coding stuff, since in the time of my education i've used such languaches as asm/C and Haskell/Lisp. All this OOP is just very confusing to me Second, there are many tutorials about compiling the game, but they all seems to be outdated. I don't have any "source" folder in my projects. Well, i can run the game allright with the leadwerks editor, but i want to share it with friends of mine, for example. So what did i do? I've packed whole project folder and sent it. Surprice, it works. With steam integration, no less. All that shift + tab stuff. Works like some black magic. I've tried searching throught the tutorials, no effect. So, any help/tutorial links would be much appreciated. Thanks for your time
  3. Hi, I was checking (again) the Leadwerks page from the Steam store, and remarked this details: "... File paths cannot contain Cyrilic characters" So the engine, cannot parse theses type of characters ex: french is using theses "éèçë" in a file paths. So does it also mean that the managing of strings is on a byte basis? It might not handle theses characters in strings inside the engine? Would be nice to have a UTF-8 string class that could handle more types of character to create multi languages games. For now, since the GUI features are at minimum I could perhaps get the display context and use Irrlicht to draw the strings in that context (was using this before pre-ordering Leadwerks) or use a GUI lib. For english only games, this would not matter at all since all the english characters are represented in the basic "ascii" table. But the LUA features that Leadwerk have seem so good, that I would have to do some kind of hack to store my strings in a LUA script (I was thinking to create dialogs/subtitles in multiple language simply by using LUA.) That's not really a problem right now, since I need to give you the time to let you complete 3.1, learn Leadwerks and produce some prototypes to know how to get around. Perhaps, after 3.1 if you would like to have Multilingual support for improved GUI... Being able to store in widestring format would also help if we use a external GUI.
  4. Began to deal with lua looked lessons (http://www.leadwerks.com/werkspace/page/tutorials/_/getting-started-with-leadwerks-r8) and encountered this error message as pictured tested concentration with what seems to me a lesson all right local pos -- обьявление локальной переменной function App:Start() --название в правом углу self.title="1_начало" --создаем акно self.window=Window:Create(self.title) self.window:HideMouse() --графическая часть self.context=Context:Create(self.window,0) if self.context==nil then return false end --Создает мир self.word=World:Create() pos=Vec3(2, 2) return true end function App:Loop() --If window has been closed, end the program if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end pos.x=pos.x+(1*Time:GetSpeed())-- обновление х координаты ---обновление приложения современем Time:Update() ---обновление мира self.world:Update() ---рендер мира self.world:Render() self.context:Clear(); ---ресуем жолтый квадрат self.context:SetColor(120,255,0) self.context:DrawRect(0,0,256,256) ------text self.context:SetColor(0,255,0) self.context:SetBlendMode(Blend.Alpfa) self.context:DrawText("Hello world",pos.s,500) self.context:SetBlendMode(Blend.Solid) ---цвет фона self.context:SetColor(0,0,0) --обновление экрана self.context:Sync() --- return true end
  5. Any help is appreciated. I am not against spending money, I am against throwing money in the toilet and hitting the " flush collision trigger " by accident.
  6. Good afternoon. I want to know when documentation on the use of Lua in the engine? I read what I suggested Josh in steam (http://steamcommunity.com/sharedfiles/filedetails/?id=221869951#-1) but I still did not understand, looked lessons Aggror ( https://www.youtube.com/channel/UCv4v6y2NZCUazHrXnama37w ) but still did not understand. I read lessons Lua but I do not know how to use them with the engine. Please help, I'm very bad speak English and it is very difficult to understand is that there are now in the documentation and video of me than that it is clear. Even zhdya order that would write this, I used a Goole translator. P.s. Sorry if again made ​​a stupid topic.
  7. Hello everyone. Since i get further and further quite nicely with my small RTS Project i have another question which is depending on performance. I have units in a realtime strategy game. these can drive/walk around a terrain and buildings can be build by the player. The first calculation of the navmes of the terrain with no entity on it took a couple of minutes in the editor. First i tried to recalculate the navmesh when an entity reached its destination ingame. However that freezed the game for a very long time completely. using the method SetNavigationMode(true) does nothing for entities that didn't got baked into the navmesh in the first place. The character controllers just bump into each another. Is there anything i do wrong? Or is there a better way for pathfinding? Maybe i should overwrite the destination when the controller encounters an obstacle and try to move around it manually? Thanks for any idea, suggestion etc.
  8. So I have a script attached to my entity. I'm trying to access the same script attached to another entity, but it keeps on saying what i have a null value when trying to access it. I am using LE 3.0 Attached is the script: require "Scripts/Animation/AnimationManager.lua" require "Scripts/Functions/GetEntityNeighbors.lua" Script.teamID=0 --choice Team "Good, Bad, Neutral" Script.enabled=true --bool Script.takeDamage=true --bool Script.attackRng=1.5 --float Script.sightDist=10 --int Script.target="" --entity Script.maxHealth=30 --int Script.health=30 --int function Script:Start() --create the animation manager to handle all animations self.animationManager=AnimationManager:Create(self.entity) end --[[ function Script:UpdateMatrix() end ]]-- --[[ function Script:UpdateWorld() end ]]-- --function Script:UpdateAnimations(int newState)--used to update the animations to the new state --end function Script:CanTakeDamage() return self.takeDamage end function Script:UpdatePhysics() if self.target ~= nil then System:Print(self.entity:ToString() .." has a target") self:Attack() else System:Print(self.entity:ToString() .." has no target") end end function Script:Attack()--used to handle the attack routinue --this check should be done when acquiring targets//JCT if self.target.takeDamage==true then --if our target can take damage --[[this always results to false if i try self.target:CanTakeDamage() or self.target.entity:CanTakeDamage() or self.target.entity.script:CanTakeDamage() it always says that this is trying to evaluate a nil value.--]] local targetPos=self.target.entity:GetPosition(true) --get the position of our target local position=Transform:Point(targetPos.x, targetPos.y, targetPos.z, nil, self.entity)--transform the point from global space to local space to our perspective --rotate to face the target local p0=self.entity:GetPosition(true) local p1=self.target.entity:GetPosition(true) local yaw=Math:ATan2(p1.x-p0.x, p1.z-po.z)-180 yaw=Math:CurveAngle(self.entity:GetRotation().y, yaw, 2) self.entity:SetInput(yaw,0,0,0,false,0) --disable all movement and turn ourselves to face the target --[[ not sure what this does so leaving out for testing//JCT pos=pos * self.entity:GetScale() pos.z=pos.z*-1 ]] if pos.z>0 and pos.z<self.attackRng then --[[ not sure why the bellow test case is revelant//JCT if pos.z>math.abs(pos.x) and pos.z>math.abs(pos.y) then --]] self.target:TakeDamage(10) System:Print(self.target .. " Took Damage") end end end function Script:TakeDamage()--used as a way for this entity to take damage from outside sources end --[[ function Script:Collision(entity, position, normal, speed) end ]]-- function Script:Draw() --update animations self.animationManager:Update() end --[[ function Script:DrawEach(camera) end ]]-- --[[ function Script:Release() end ]]-- --[[ function Script:Cleanup() end ]]--
  9. I'm new to Leadwerks. I don't see any options for getting an audio files spectrum or waveform value in the script reference, but I'm hoping someone might know a way to do this or point me in a direction where I can research. Basically, I need the current waveform value as it plays. Any insight is appreciated.
  10. I'm looking at the Entity::SetPosition documentation and it mentions the following: "Local coordinates are relative to the entity parent's space". But it doesn't mention how you define this. Is this defined with SetParent? I realise this is probably stupidly obvious, but the clarification would be appreciated! What I am hoping to do is get an entity's local position relative to the object it is colliding with. Could someone also explain matrix in the context of GetMatrix/SetMatrix? What would it be used for? Does it significantly differ to position and rotation or does it contain the same type of information? Thanks!
  11. I'm struggling even with a buddy already, on learning LUA. He's busy I dont like bothering him, so the next best thing would be to learn with some one strictly on learning coding or to be taught. Any body up for the task or want to learn together?
  12. Good evening, help find lessons for Lua for Leadwerks 3. I looked at https://www.youtube.com I found only this channel https://www.youtube.com/playlist?list=PLC272E30DD2883EC3 but there are lessonsа for Leadwerks 2.3-2.4. Very necessary, I myself can not understand
  13. hi guys me and my buddy are working on a game which will be a survival horror and we have been trying to figure out how to attach a model of a flashlight to our fps controller so the arms/hands and flashlight are always shown and follow the camera
  14. Hello fellow Leadwerkers, I'm messing arround as usually. This time i'm trying to get a random function up n running. I did it the easy way for now, to know how it works, but it doesn't work as intended. I might want to say, that i do understand, that math.random is only pseudorandom, i have to shuffle the numbers before i really can use them with "math.randomseed ( os.time())" every time I need a new random seed. Thus no problem. I did use that in another script too and there it did work quite well, but now the following happens. I have a table, in this table several skillrelated items are stored (the table contains the skills "woodcutting" and quarrying, both values again contain several items (logs, bark, twigs....) with an initial value of 0. I now want to iterate this table, check if the "used skill" is within this table and, if it is, i want to increase each value of those items individually. So basically, i have 5 items stored, i want to add a random number to the first one and another random number to the 2nd one. But i always end up that all 5 items do get the exact same number. For a better understanding i gonna add the table and the loop in here. Hopefully, you do understand what i mean. It's sometimes hard to explain myself using english. Table: Script.xInventory = { woodcutting = { logs = 0, bark = 0, twigs = 0, leafs = 0, insects = 0 }, quarrying = { clay = 0, limestone = 0, granite = 0, basalt = 0, obsidian = 0, marble = 0, quartz = 0 } } Script: for a, b in pairs(self.target.script.inventory.script.xInventory) do -- check if the used skill does exists in our table if a == self.usedSkill then for x, y in pairs(B) do math.randomseed(os.time() + i) ammount = y + math.floor(math.random(0, 1 + (statvalue * (100 + skillvalue) / 1000))) i = i + 10 end end end As you can see, i added the math.randomseed(os.time() + i) into the loop. I did add +i (i is plus 10 every loop cycle) to avoid the script using the same time twice, since i already know that os.time() only counts within a second or so. I had the same problem using the "GetSpeed()" function though. Still the "random seed" seems to be always the same.
  15. MajorAF

    Jump Glitch

    If you create a terrain, for some reason I can't get it to repeat when I just use the BSP brushes, and you double jump you can basically fly around and soften a fall. http://www.youtube.com/watch?v=yE-nEp2n1vs&feature=youtu.be
  16. To buy or not to buy? I want to be able to create absolutely STUNNING landscapes, and be able to explore it in my project. The in game editor aint bad but, have you seen W.M? Is it worth it? Is it possible to export EVERYTHING youve created in W.M and then import it into Leadwerks? Trees, water and everything orrr, what? Before I purchase it I want to make a good decision. lol I dont want to spill the idea of my project but I will say this, its obviously going to be a huge open world. Hopefully the size of Chernarus in DayZ.
  17. Hi, i'm a beginning game designer and i'm looking for a person who would like to start a game. I personally don't know Lua, that being said I would like to find someone who does know Lua fairly well that is looking for a partner to start a game with. Thanks for reading this, if your interested please reply to this thread.
  18. My buddy who I am working with is making models via cinema, and he bakes the texture and all that but when we import the model its completely white and untextured and just BASIC! How do we get textures to ....export and everyithg with the texture applied to it? Any help would GREATLY be appreciated.
  19. How is everybody? Any body have a project they want to share?
  20. Hey guys, me again. I was curious how one would go about moving a bunch of objects all at once. Basically I decided to go with a car game as my first one. Just to get the hang of things. Now, in my editor you see this [its an image] http://gyazo.com/5094ed8b0529ac914a2675f5a3e879a1 [<<Click]. Then I go into the scripting area and the objects wont turn with --Script is bound to the 'truck' self.entity:Move(speed, 0,0) I have tried entity turn, and others but they dont wanna turn. How can I make them all turn at once (act like one object)? Thank you for your time, Cody Mihelich
  21. Hey. Just a bug, but not sure if its for everyone so didn't feel the need to post in the bug reports section. My texture for dirt (when texture painting) has dots in the corner. I am not sure how to fix it but it is annoying. I've checked the actual texture file and there aren't dots. Thanks for your time, Cody Mihelich
  22. Hello everyone. I really feel like 3.1 is lacking materials / tutorials out there for lua scripting. I do not personally know lua but am starting to learn. Below I show you guys how to display a Custom font and how to display text to the screen. I hope you enjoy! It is in 1080p Youtube just has to render it http://www.youtube.com/watch?v=b4fZx9wQ0jM P.S. I linked the custom code colors to this thread. Feel free to use them if you like them
  23. (Running Leadwerks Indie for Steam) I'm currently working on a settings module, and I'm running into a little bit of a problem. I'm keeping all user-definable settings in a single Lua table. I've got serialization code to quickly save out that single table to disk functioning just fine. The problem comes on load. I want to load the Settings object in a separate environment, and then iterate through and only pull over values that I recognize as safe, so no executable code, etc. in the settings file. However, there are some problems, specifically that setfenv() and getfenv() are causing the process to end. To demonstrate, I've got the following code: function Settings:ShowFailure() System:Print("Got here just fine...") System:Print("getfenv is: " .. type(getfenv)) local myEnvironment = getfenv() System:Print("Will never get here.") end If you call this code on launch, you'll get the following output: Got here just fine... getfenv is: function Process Complete. So you can see the code is executing and that getfenv is a recognized function, but as soon as getfenv() is called, the process ends. Any thoughts? If Leadwerks was using Lua 5.2, I'd just use load with a target environment as a parameter, but I'm having to do things the 5.1 way.
  24. Hey guys it's me again. I was wondering how one might implement a custom weapon. I know how to create models but my problem is I am not sure how to assign it to the char. Do I assign a bone where I want to have the char hold it? And can someone link me to a detailed Leadwerks 3 Custom Character tutorial? I have the character but I have no clue what to name the bones or how to have Leadwerks recognize the bones. Thank you for your time, Cody Mihelich
  25. Hello guys! My friend and I just bought Leadwerks. I decided to stream so that you can learn with me / give me tips. And that way the staff on here can see how a total newbie to the engine feels. I hope you enjoy! Link: www.twitch.tv/papa_beans Update:: Lots of learning happening, thank you pillar!!! 10 Hours into the stream!
×
×
  • Create New...