Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by Braqoon

  1. So bullet only can travel forward in my game and cannot be fired from an angle so it travels only forward (on one vector) with constant speed until hit or end of life. I have tested so far on only one model and collision so far works as it should.
  2. OK issue resolved. As pointed out correctly travel var was here to blame, changing it to Vec3 sort's the problem out. if self.entity.world:Pick(bullet.position,bullet.position+Vec3(0,0,travel),pickinfo,0,true,Collision.Projectile) then Thanks for pointing it out.
  3. As you probably seen my posts in programming section of the forum, I'm try to create something as well. This is my first go at 3D engine but it's going OK minus my little frustrations self-inflicted or otherwise. I'm doing an simple Shm'up and I hope to provide one playable level. Will share some screenshots soon. Based on feedback it might grow to something bigger.
  4. Point taken, thanks. Will check this later.
  5. Well that's just copy & paste from FPSGun.lua script. I have not altered this.
  6. 1. This is set correctly. Bullet does hit and collision get's triggered, but like I have mentioned only when sprite hit's vertex on collision mesh of the target. 2. bullet.position = bullet.position+Vec3(0,0,travel) That works no problem. This is done after collision check and it's needed to move the bullet forward.
  7. So I have bullets which are sprites. Bullets are fired from a ship towards enemies and when bullet triggers a collision, enemy will get damaged or destroyed. That all works in principle but only when sprite will collide with vertex on collision mesh of the enemy. That results very often that bullet goes trough the object and don't trigger a collision. My bullet creation script: function Script:GetBullet(position) local bullet = Sprite:Create() bullet:SetPosition(Vec3(position.x,position.y,position.z+3)) --bullet:SetPosition(position) bullet:SetViewMode(2) bullet:SetMass(0) bullet:SetGr
  8. Will player will be always in the vehicle ? If so, you need to build control for vehicle as your vehicle will be your player. Applies as well if you want to use vehicle as transport for your FPS player. You just need to find out how to switch what you control.
  9. Hi, How one will go about passing variables between maps? For eg. let's take Marble Game. When player reaches trigger to load another map, game map loads from start and you play again, your score is zeroed. What if you want to pass a highscore or some other vars so I can access them in the new map? Should I store those vars globally so they are accessible regardless of what map is loaded ? How do I go about it ? Thanks.
  10. sure, Can provide project. Will create from scratch with same scripts so will do test myself as well. Bare with me.
  11. I will do a video, very easy to replicate.
  12. I have make it work with self.entity.world:Pick(), re-sued from bullet.lua function Script:UpdateWorld() local bullet,n,dist local pickinfo=PickInfo() local travel local bspeed=25 local window = Window:GetCurrent() for n,bullet in ipairs(self.bullets) do travel = bspeed/60.0*Time:GetSpeed() if self.entity.world:Pick(bullet.position,bullet.position+travel,pickinfo,0,true,Collision.Projectile) then local enemy = self:FindScriptedParent(pickinfo.entity,"Hurt") table.remove(self.bullets,n) bullet:Release() bullet=nil if enemy~=nil then if enemy.script.health>0 then enemy.script:Hurt(
  13. Yes, thought about it but this made no difference. Hide for me only hides object from rendering. Other test is that I can trigger a collision with bullet so my player does not touch it. Enemy is hidden but then it stays on the scene and player can hit it. Anyway Release works as it should so not a big problem for now.
  14. self.entity:Release() does the trick but docs should be updated on self.entity:Hide() if it does not do what it says. Thanks.
  15. Hi, I'm not sure do I miss something obvious but for me self.entity:Hide() does not work as intended. Below I got a very simple enemy LUA script, which should on collision be 'removed' from gameplay. Object on collision does get hidden and not being rendered but it's still there and all the physics apply. According to http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entityhide-r181 this should not be the case. function Script:Start() self.entity:SetMass(1) self.entity:SetGravityMode(false) self.entity:SetFriction(0,0) self.entity:SetCollisionType(Collision.Prop) s
  16. Hi, Running out of health is not a problem but lives is. At the moment if lives is <= 0 then it will not respawn. I have not done game over screen yet but that's only showing that live counter is to blame here as counter is being constantly altered as if one respawn cycle has not finished and another is already started. if self.health <= 0 then self.altitude = -1 -- Which then will contribure overall to: function Script:UpdatePhysics() [...] self.vel = Vec3(self.pos,self.altitude,self.speed) -- and by altering altitude (falling), object (player) will hit TriggerPain and inv
  17. Hi, so I got this problem that I'm not sure how to resolve. I'm trying to add lives counter in my little test but seems like respawn is not quick enough and instead of removing one life it goes crazy and removes a lot more. I have took a respawn function from marble game tutorial with some modifications: function Script:Respawn() self.lives = self.lives - 1 if self.lives > 0 then self.death = 0 self.health=100 self.altitude = 0 self.entity:SetPosition(self.startposition) self.entity:SetRotation(0,0,0) self.entity:SetVelocity(Vec3(0,0,0)) self.entity:SetOmega(Vec3(0,0,0)) s
  18. Cool, might publish something then
  19. It's possible but up to authors of the engine. I assume current Steam integration is only to provide DRM solution. Software published via Steam can be nor is enforced by Steam to be completely not integrated with Steam API. As in games this makes very little sense to do it due to lost of features like steam controller, achievements, etc. I hardly believe that LE users are after those 3 achievements. You can even have both of both worlds, if needed a config can be setup to bypass Steam initialization to make LE standalone, but again i think authors of LE like the DRM that Steam provides.
  20. Yes it can. You can pull input events via Steam API. But for this to work it needs to be build in on LE level , I guess you can do it yourself if you have C++ edition. In Indie edition there is no way without LE having it as it requires talking to Steam API. Assuming you have overcome this problem, there is a quite easy way of defining input for your game and creating default layout.
  21. Hi, so I had some time to tinker and I think I got decent but basic bullet. Script that Josh suggested was useful but one thing I'm missing. I cannot make my bullet hit an object/enemy. My function to create a bullet is : function Script:GetBullet(position) local bullet = Sprite:Create() bullet:SetPosition(position) bullet:SetViewMode(2) bullet:SetMass(1) bullet:SetGravityMode(false) bullet:SetCollisionType(Collision.Prop) bullet:SetCollisionType(Collision.Projectile) bullet.origin = Vec3(position.x,position.y,position.z) local mat = Material:Load("Materials/Ic
  22. Steam controller works of steam API integration so adding to LE it should be not a problem, but this must be done in LE code at least for Indie edition.
  • Create New...