-
Posts
4,816 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by AggrorJorn
-
Last attempt before creating a bug report: - If you create a new project, do you get the same errors? If not, then there is something wrong inside your current map. I create a bug report and attach your map. Export your project and see if the map opens when there are no models in exported project.
-
just a longshot, but try deletin leadwerks and reinstalling it.
-
This used to be possible but is currently not supported by the character controller physics type. Making physics behave exactly like you want to can be really tricky. I know that Josh has spend a huge amount of time over the years trying to get the current character controller in its current state. If crouching is supported again, it will added to the third person script.
-
-
I guess the "use" function is common enough to implement it in the third person player as well. However placing a block would still involve using a raycast from the camera. The only thing that would be different in comparison to a First person script is the radius of the raycast. The C++ video Cassius mentioned is what I still use as a base for the third person script. This new script is just more advanced with a lof of extra options.
-
Those are some odd errors. Make sure you have the latest graphics drivers. Could you also post your specs.
-
Doing this per update cycle is rather expensive. This is where shaders come in to play.
-
I would not expect this to happen. Josh main attention lies on Leadwerks 5 en small updates for Leadwerks 4. spending time on achievements would be a waste of time for him.
-
Hi, New in Leadwerks and my first learn project.
AggrorJorn replied to Santiago3D's topic in General Discussion
Hi Santiago, First of welcome to the forum and to Leadwerks. As for your question As Thirsy Panther stated, there is a projectile script available that you can use. If you want to try it out on your own start with something like this: --pseudo if key.space then local bulletInstance = bulletPrefab:Instantiate() --You can use prefabs to load an entity that has a script. --if it is just an entity, set the script for this newly created bullet bulletInstance:SetScript("bullet.lua") end I would also recommend making a new topic in the programming section where you can clearly state your question and possibly give some more info like current scene setup, what you have in code so far etc. The more info you provide on what you want, the better we can help you. -
I mean the actual project files, so that we can try it out ourselves. Additionaly a screenshot of your player structure. To which object is your player attached. Your previous screenshots show the script tab, but not the actual entity it is attached to in your scene.
-
Hi community, I would like your opinion on a question. I have been working on an advanced third person controller. The original idea was to sell this script on the workshop for a few dollars. What happened next is that I got contacted by @Rick and @Roland about converting this script to the Leadwerks Component System (LCS). In case you are not familiar with it: it is this really cool component and event driven system that makes creating gameplay so much more fun and managable. You can read more on it here and here. LCS To kind of help promote this cool system, I converted the third person controller to their system (which I call the RickRoll system). That means it will be opensource, and thus free to use and alter by anyone who wants to use the LCS. My question to you is, should I still put the third person script on the workshop as a paid item? Note that this script works without using LCS. This one would really be drag and drop from a prefab and you are done.
-
There is a hole underneath your matress. So you have to drag the mattres away.
-
Can you post your map + scripts? Without a mass the player won't move, so input controls are discarded. For some reason the mass is not set or being removed before you take your first steps.
-
Can you also post a screenshot of your player's physics tab properties? Make sure the mass of the entity is adjusted that has the player script attached.
-
Please use a code tag for your code. Can you describe what exactly isn't working? Do you see an error? What behviour are you seeing? Omit parts of your script that are not relevant for now (make a backup though): for instance the sound and drawing ui. So you have this helicopter and by pressing a button, you want to fire a rocket? You want to separate that functionality. Try something more in this direction. A script for the helicopter and a script for a rocket. Helicopter --psuedo if keypressed then local spawnPosition = self.entty:GetPosition(true) local obuz = Prefab:Load("Prefabs/obuz.pfb") obuz:SetPosition(spawnPosition) obuz.script:Start() end Rocket function Script:UpdatePhysics() self.entity:AddForce(0,0,obuzforce) end function Script:Collision(entity, position, normal, speed) local collisiontype = entity:GetCollisionType() if collisiontype==Collision.Prop or collisiontype==Collision.Scene then --Create an explosion emitter here end end
-
Again, many ways to do this. Some possibilities: Let each enemy perform a distance check once a loop or after a timer is done. --in enemey UpdateWorld local playerPos = self.entity:GetPosition(true) local enemyPos = self.playerEntity:GetPosition(true) local distance = playerPos:DistanceToPoint(enemyPos) if distance < 1.5 then --1.5 is just an examepl. System:Print("within attack range or something") end Or you let the player do a ForEachEntityinAABB. This retrieves all entities within a give shape around the player. Then for every entity it finds,check if it is an enemy and you can do things. --player updateworld local playerSurrounding = self.entity:GetAABB(Entity.GlobalAABB) local world = World:GetCurrent() world:ForEachEntityInAABBDo(playerSurrounding, "MyCallback", self.entity) function MyCallback(entity, extra) if entity.script ~= nil and entity.script.isEnemy then System:Print("this is an enemy in the players region") end end
-
There are several ways to do this. Script property. If is it an occasional entity that needs a reference, just use a script propery for entities and drag in the player. Script.player = nil --entity "Player" If many objects require a reference, I would handle it automatically. At the start of each script, loop over the entities in the world and check if the player is among them. If the player name is unique, then you can do something like this: local n for n=0, world:CountEntities()-1 do local entity = world:GetEntity(n) if entity:GetKeyValue("name") == "MyPlayer" then playerEntity = entity break end end Note that you might want to store the player reference somewhere as it is used a lot. Saves iterations on start up.
-
If your remove your sound code, does the error still appear? Your main menu seems fine further. Any chance you modified the menu.lua?
-
Can you add the code via a code tag? It is really difficult to read this way. Not sure if it is the issue but you can make 'source' a local value. local source = Source:Create()
-
It is good that you are trying to make your own stuff work first. And if you are really stuck, don't hesitate to ask. That is what the community is there for.
-
Adjusted the script. Properties need to be declared with 'Script'.
-
There can be only 1 UpdateWorld function per script. Some feedback on how to use Vec3 instead of 3 separate variables for the coordinates. local CamRot = {} CamRot[1] = Vec3(0, 270 ,0) CamRot[2] = Vec3(0, 180 ,0) self.entity:SetRotation(CamRot[1].x, CamRot[1].y, CamRot[1].z ) All together I would do something like this instead. Once you hit a trigger, simply place the existing camera at the position and rotation of a linked camera pivot. Attach script below to a pivot. self.camera = nil --entity "Camera" self.cameraPivot = nil --entity "Camera pivot" function Script:Start() self.position = self.cameraPivot:GetPosition(true) self.rotation = self.cameraPivot:GetRotation(true) end function Script:SwitchToCameraPivot()--in self.camera:SetPosition(position) self.camera:SetRotation(rotation) end
-
Spline paths with physics. Using the 4.4 kinematic joints we get very stable physics movement. Ideal for platform or trains (think Halflife intro) Also a big thanks to @Phodex Games for the cool intro.
-
You might want to send a message to Josh. Perhaps he can send you a key. support at leadwerks.com
-
Can you define "limited"? Is this a Steam thing were you need to have at least a number of games or money in the Steam wallet?