Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. Agree, this can make Leadwerks better for beginners who want to create a beam from their start I think, even beginners dont have any gamedev experience but when finding their first game engine, they will look for what that engine can offer, the easiest ways to solve their needs "I want to build a gun with laser beam" / "I want to make a starwar game with a jedi running around swinging his light-beam saber" ..googling.. 5 minutes later "Wow Leadwerks can solve this in 1 line of code, amazing, lets buy it!"
  2. I thought about GetDistance() before. yes, that is only one solution for this, and using entity:Point() for pulling coins to player is brilliant. But if there are multiple objects like player (may be a random enemy which wants to collect coins too then you must collect more coins than them to win) how can those coins use GetDistance() to all player like objects and only move toward the closest one?
  3. Hi, I want to make a small game in which playerObject can move and collect coins around it among stones (demonstrated in below images) when player moves to a point, press a key to make every coins within its aura radius be collected (sucked to) by player except stones and is there any way to get only the closest coin ? Those stones and coins are randomly generated and not moving any idea for this ? how to make it in lua? Thanks for helping
  4. As my opinion, I will use decals for something which has non flat surfaces. Example, blood on a piles of stones, mud on curved edges of a car, something like that, and 2D model with transparent textures for walls, ground. When I used my old computer, decal ate alot of FPS. For your paper, I suggest you to use a plane with text texture.
  5. That's the point. It seems to be no fix for that now. How can Josh ignore this?
  6. Yes it is, the reason I use "pos.y - 1" is that will make the box become higher than Joint position so when the box falls down, it will have enough velocity to traverl at least 1 round. the bad thing is its velocity was NOT decreased by gravity, and it become bigger and biger, thus it spin like hell. if you only use pos.z + 1, you can see the box will move forever, and if you use box:AddForce(--with a big force vector--) that box will go crazy again. It feels like mass and friction is nothing in leadwerks
  7. SetMass(10) even (100) is no use, my box still spin around the joint like crazy this video I made a simple joint:ball with a light which has the same code and it worked properly (LE4.1 with old Newton) You can see the diffirence. I did not move the joint, i let it stay still, and I dont want to addTorque, just leave it there, then I can simulate a hanging target to shoot. I wonder why Josh does not pay any attention
  8. What is wrong, anyone has any idea ? This is not physic anymore when your object spins around like this
  9. function Script:Start() local box = Model:Box(0.5,0.5,0.5) box:SetPosition(0,4,0) box:SetMass(1) box:SetCollisionType(Collision.Prop) local pos = box:GetPosition(true) local joint = Joint:Ball(pos.x, pos.y - 1, pos.z + 1,box) --This makes sure that box has high velocity after dropping joint:SetFriction(200) end And I got this, I think there is a problem with Joint:Ball (and Joint:Hinge - I tried too) of velocity and gravity interaction
  10. It is sad... it does not work Note: self.hinge was created in Start() and worked fine
  11. function Script:Start() self.hinge = Joint:Hinge(--parameters--) self.hinge:EnableLimits() self.hinge:EnableMotor() self.hinge:SetFriction(30) end function Script:UpdateWorld() self.hinge:Release() --This make my game crash end I used Release() on joint:hinge in the past and remember it worked, not in 4.5
  12. Sometime I need something like this if self.condition then if window:KeyHit(Key.A) then --Do a bunch of code-- end if window:KeyHit(Key.B) then --Do a bunch of code-- end if window:KeyHit(Key.C) then --Do a bunch of code-- end end It is much clear and structurable than this I think if window:KeyHit(Key.A) then if self.condition then --Do a bunch of code-- end end if window:KeyHit(Key.B) then if self.condition then --Do a bunch of code-- end end if window:KeyHit(Key.C) then if self.condition then --Do a bunch of code-- end end
  13. Hi, There is something not right with window:KeyHit() function, I did mention this problem in the past but wasn't solved This is the code Script.condition = false function Script:UpdateWorld() if self.condition then if window:KeyHit(Key.F) then System:Print("F key pressed!!") end end if window:KeyHit(Key.L) then self.condition = true end end Process: self.condition = false will make sure that when I press the F key, there is nothing happen then If I press the L key to make self.condition = true, the console displays string "F key pressed!". I suppose the window:KeyHit(Key.F) is somehow "saved" and waits until the condition is met to execute code inside it. This is annoying in some situations indeed. Here is an example: A door can only be opened by pressing F when a electric switch is ON. Player may try to press the F key to open door before he is instructed that the switch must be ON to open the door (at this point the window:KeyHit(Key.F) is "saved" as I said above) After turn on the electric switch, the door will be Opened by that "saved" command from Key.F hit. I don't want that. It should be kept closing until I press F with the turned ON electric switch. The temporary fix is using window:KeyDown() with a boolean variable like this Script.keyPressed = false function Script:UpdateWorld() if window:KeyDown(Key.F) then if self.keyPressed == false then self.condition = true --ANOTHER CODE self.keyPressed = true end else self.keyPressed = false end end But this causes another problem, that is: If I replace a function to the "--ANOTHER CODE", will be executed many times because it is in UpdateWorld() function. Therefore I don't want to use this fix So how can I execute my code only one time when I press my desired key without getting the first problem with window:KeyHit()
  14. I published my game as standalone version and sent to my friend to test, he gave me some ideas to fix and improve Is there anyway to update my game without repack a whole game ? I just modify some .lua files. How can I update my game like that ? Maybe a patch to do Copy/Paste task. If I create folders like structure inside data.zip, will it override game content ? In case it is possible, I think user can "mod" my game too hehe. Good Idea ?
  15. Thanks for your feedback! I want to warn player that all red options can affect game performance. It is kind of confused
  16. Script:Collision(entity, position, normal, speed) What exact are those parameters usage ? (Entity, position, normal, speed) I try to search in Learn section but no luck
  17. OHHHHHHHHH MY BAD !! Wow, how clumsy I am. Thank you!
  18. I willllll !! Thank you <3 My game needs multiplayer too, hehe, and I dont know how to start, love your game Border Recon Yes, that was a hard year for my job, but I will never give up on Leadwerks, thank you
  19. I don't think so. I have a small test with map 07-AI and Events I put irisadjusment.lua into Map Root Post Effects list, then Editor Viewport camera was applied irisadjusment.lua, it is ok for sure. Delete original FPSPlayer prefab and replace with a single camera, check "Use Post effect" in Camera Tab, start the game, it worked too Remove irisadjustment.lua from Map Root Post Effects list and create a new .lua file to attach to the camera function Script:Start() self.entity:AddPostEffect("Shaders/PostEffects/irisadjusment.lua") end and it does not work anymore. It seems only work if shader file is put into Post Effect list. This is weird.
  20. How can I make it work for my custom player control, I love this effect
  21. (UPDATED: 07/04/2020) After 3+ year learning and using Leadwerks, I introduce my very first game (or an early part of it) which has many features. This is a tactical FPS game about my country's police force, named CSCĐ. Download installer here Important: Run GameUpdater.exe after installing to update to latest version! Sorry for some parts of game are not in English Game features Video demo Weapon Introduce some weapons of each types Assault rifle: M4A1, AK47 SMG: mp5sd (with intergrated silencer) Sniper rifle: SVD Pistol: fiveseven Bullet projectile's affected by gravity Weapon aiming through iron sight (without optical attachments) Optical attachments (PSO1, ACOG, Eotech). Some of them have adjustable zoom level (WIP) Tactical attachment (flashlight/laser/silencer) Multiple fire modes (semiauto, full automatic, burst) Picking up/Dropping weapon Switchable Primary/Secondary weapon Movement, being damaged, and breathing affect aiming status Weapon length affects aiming (blocked when moving close to obstacles) Detachable magazine: Each magazine is usable object which can be dropped/pickedup Character Control Movement (walking, running), Crouching, Leaning Ragdoll physic when being killed Various animations for many action Player can take control of each member of a team and issue command to others Unique magazine management system (player must choose magazine to reload current weapon) AI System Dynamic reaction depends on situation Reaction to sound source (weapon shot, footsteps, bullet interaction to wall, fallen body of ally) Using weapon with high level of aiming skill Reloading weapon at safe moment Switching to other weapon if current weapon's magazine is out of round (WIP) Command System for Friendly AI How to play Movement W/A/S/D: moving around Q/E: Leaning left/Right Hold Shift + W: Run Left Ctrl: Toggle Crouching Hold Shift while crouching: temporary standing Weapon LMB: Fire weapon RMB: Aim down sight, aim through scope V: Cycle weapon's fire mode G: Drop current weapon MMB: Inspect weapon V/X: Toggle Flashlight/Laser ? Toggle safety switch F: Fist Strike (Hand Combat) How to reload: Press R to open inventory Q/E to select magazine which will be used to replace current one of weapon Hold Spacebar until reloading complete MMB: Drop selected magazine Command Mode Tilde (~): Toggle Command Mode F: "Follow me" command T: "Move to" command G: "Covering fire" command V: "Observe area" command In command mode: 1/2/3/4: Issue command to corresponding member Tilde (~): Issue command to whole team AutoUpdater Run CSCDVMPUpdater.exe to check and update game Feedback and Bug report Please post any bug on my Discord Server: https://discord.gg/XuU4QA There are many more features in the future please give me your ideas and comments. Thank you !
  22. camera = Camera:Create() camera:AddPostEffect("Shaders/PostEffects/irisadjusment.lua") I used code above for my custom FPSControl (built it from scratch), there is no difference but it works with Default FPSPlayer.pfb
  23. I added "irisadjustment.lua" into the postprocess list, but I found no difference when play game. What did i miss ?
×
×
  • Create New...