Jump to content

Slastraf

Members
  • Posts

    710
  • Joined

  • Last visited

Everything posted by Slastraf

  1. About the Menus. I found a minor bug that when you press new game , it will not load in the spell icons. I don't know how it is handled in the back end but if you try it out yourself you will see it . Also maybe make an option to hide the spell icons in levels where it is not needed. About the combat . I have made some basic combat already, I dont know if you tried it out because it doesnt work on the current branch. But it worked pretty stable and I will do my best to repair it so that it will be future proof and not easily changed. So please work on something else right now before adding the fps prefab. Accreditation of resources ::PLEASE:: Always directly add what you put in the project in the .txt file ".COPYRIGHT ATTRIBUTION NOTICE" in the main directory. It will not lie there like that in the end but to keep track of everything and maybe add a menu later.
  2. the icons dont fit our game, but for now its good
  3. If you are at it you could readd a new indicator that shows which spell is selected, It was in some time ago but now is missing. Maybe make it a bit fancier this time , not just for debug
  4. I downloaded the project earlier and there is an error if I try to start it , and I am confused Please fix the error when clicking on new game
  5. I am using gitkraken and having fun . Who reads this should try it out, too. Its for handling git stuff easier.
  6. very nice. Have you figured out my scripts ?
  7. Faces are made of verticles which are connected by edges , which are filled by the face. You can only see it from one side, thus the name. if you want to make a corridor which you can see from both sides you need to keep this in mind from start. The problem is that the mesh algorithm for create physics mesh thinks this is a solid normal model. if you go with the camera inside the model (in LE) you can see trough it. The face is "facing" outside := the normals are pointing outwards. If you want to have a proper collision mesh you need to somehow make faces that are on the inside and have normals looking inside. In blender, you can use the "Solidify" modifier to make this happen. It will make the mesh both inside and outside, with faces for each side.
  8. u need to uv unwrap the cube , go in edit mode select all faces and press u or search for "unwrap" then makle a new material and select texture to material
  9. use 2.7 then open blend file with 2.8
  10. The art style is taking shape
  11. Can I get a reply by everyone who will be able to do anything Project related sometime soon ? Aiaf and me made much progress in the last week. I would be happy if some of you got time soon. We are also rewriting the game design document, and have some solid plans. (Some of them like fps hands + animation and some atttacks already there). Also otherwise Design related improvements that make the game easier for us to make and more playable and fun.
  12. It was fixed. Please ignore / remove this thread
  13. Maybe make a new fps project and try out the default crawler and so on there ? Because I didn't experience so bad behaviour yet.
  14. Call needs to be a global function. So far you have Call in the Script as a local function. To make it global paste it in main.lua , maybe somewhere at the top : function Call(entity,extra) --not use function Script:... because it is a global function System:Print("See "..tostring(entity:GetKeyValue("name"))) end
  15. function Script:CastRay(other) local sprite = Sprite:Create() sprite:SetViewMode(6) local p0 = self.entity:GetPosition(true) local p1 = other:GetPosition(true) self.allignvector = p0 - p1 sprite:SetPosition((p0+p1)/2) sprite:AlignToVector(self.allignvector:Normalize(),2) -- Find distance between the two points. local total_distance = p0:DistanceToPoint(p1) -- Modify the size of the beam based on the 2 points. -- Argument #1 is beamwidth, default .25 sprite:SetSize(.25, total_distance) end Here the script again , inside a function where other (in the parameter) is an entity. Also used LE Math functions to make it run much faster.
  16. I found this which could possibly help, but did not test it yet: Update: I added a post there, with my edition of the script.
  17. Update : Player does not have turbo mode, but can charge electricity spheres by holding a button, and realeasing it sooner will do less damage. For anyone not using discord, prototype already implemented.
  18. What would be the best way to make a raycast between two points visible ? It is needed for a mechanic inside the game (no debug DrawLine) local selfpos = self.entity:GetPosition(true) sprite:SetPosition(selfpos+(other:GetPosition(true)-selfpos)*Vec3(0.5, 0.5, 0.5)) So far I came up with this. In this case other is an entity at the second point. It will place an object in the middle of the two Points. The question is how I rotate the model (plane) that it looks toward the Camera without many lines of code, and be reasonable efficient ? And then how do I scale it so that it will have its edges at each point ?
  19. I have not exactly tested this, but if you put this in a n update function it will crash, so after it gets called often times when the value should be very low, probably 0 but it should not at exactly 0. Perhaps with a number that has too many bits from too many decimal places
  20. if self.face:GetScale().x > 0.001 then local newscale = Math:Lerp(self.face:GetScale().x,0,.1) self.face:SetScale(Vec3(newscale,newscale,newscale)) end If you set the scale of a model to a value with many decimal places, LE will crash without warning. Code snippet above will crash without if case
  21. Okay so for everyone who has the same problem in the future, I fixed this by just transforming the origin point and then adding vectors to make each min and max, as josh said. -- activate currently selected spell --working code if window:KeyHit(Key.Q) then --local model1 = Model:Box() --local model2 = Model:Box() local p1 = Transform:Point(0,0,2.5, self.camera, nil) local pMin = p1 + Vec3(-2,-2,-2.4) local pMax = p1 + Vec3(2,2,2.5) --model1:SetPosition(spellPointMin) --model2:SetPosition(spellPointMax) local aabb = AABB(pMin, pMax) world:ForEachEntityInAABBDo(aabb,"Callback") end
  22. Do you mean take only the middle point from the Transform:Point() function and then add / substract to make the vectors ? Or do you mean some function I dont know of yet.
  23. No I have not, but I don't use cpp because I wouldn't know how to set it up. Although if its really necessary I could. There is no documentation on debugAABB also ?
  24. I think this counts as bad behaviour on leadwerks engine side, I posted this thread and so far haven't been able to solve it:
  25. If I make an aabb in front of the player's camera like this : if window:KeyHit(Key.Q) then --local model1 = Model:Box() --local model2 = Model:Box() local spellPointMin = Transform:Point(-2,-2,0.1, self.camera, nil) local spellPointMax= Transform:Point(2,2,5, self.camera, nil) --model1:SetPosition(spellPointMin) --model2:SetPosition(spellPointMax) local aabb = AABB(spellPointMin, spellPointMax) world:ForEachEntityInAABBDo(aabb,"Callback") end I believe it will work in the standard fpsplayer script, and it uses various functions like ForEachEntity which should call the global "Callback" function on an entity the callback function looks as follows (and works): function Callback(entity,extra) --this function needs to be global, for the aabb in the player script (Somewhere around ...Key.Q... line) if (entity:GetClass()==Object.ModelClass) then if(entity:GetKeyValue("type") == "movEntity") then entity:SetColor(1,0,0) end end end And to make a moveable Entity detect I set a key value as above to the entity. It works all fine, but only sometimes. When I walk toward an object with the KeyValue and constantly press q, nothing happens. However if I then move, and press q again, it works fine. If the angle is right (it sometimes will never work under certain angles no matter if its obfuscated or not) Here is a video : 2019-02-07 22-21-18.mp4 Thats it. I hope someone can help me solve this problem, and its not a bug.
×
×
  • Create New...