Jump to content

WazMeister

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by WazMeister

  1. Agreed. 3rd Party content is easily accessible via online searches. Sorry if my post came across as that for a primary requirement. It was more of content for educational, literature etc for using and doing that would be beneficial.
  2. Just one more, I don't currently use LeadWerks for various reasons but I did feel the potential and love in it.. I actually miss it! I've jumped on ClickTeam Fusion 2.5 for awhile to play around with and have some fun. Reason I hang around here as I genuinely do have a passion for Ultra (and Leadwerks) that it will get the support and basics for new comers built to a T and I'll jump right back in and buy Ultra. There is definitely a fantastic community and vibe here, would love to see it grow with all different kind of creators. Oh and @AlienHead much love.. the content you shared and advice gave me massive inspiration and was really amazing. I'll never forget that.
  3. Personally, I think it has to be a bit of both this day and age, just my opinion. One particular way of editing 3D models, as an example with Blitz3D or Gameguru Max, would be editing the engine or pre-existing Hand and animations in 3D software (e.g fragMotion) and import any gun and link the bones easily….this can be done for multitude of weapons and melee as long as the arms are there with the natural animation. It’s a process within GGMax.. Took time but the default pallet was there and people just to edit without having to be 3D Modellers or Artists.. great little feature. Basic templates that are out the box ready, with scripts as required (preferably with lots of comments for beginners) to get individuals started by focusing on making games. They will then learn to use it as a Game Engine and expand their knowledge and skillset. While more experienced or advanced users could just jump straight in with customising, tweaking and using it as an engine off the bat and potentially show others how to further close the gap and do other things with it other than being a ‘game maker’. Templates as stated previously, FPS with default hand and gun.... Maybe have the system with a set of default hands and a gun that allows users to open in fragmotion, add custom gun or melee weapons and link bones... Then everyone has content for all sorts of weapons. Similar to Gameguru Max and what I did with Blitz3D finding a 3d animated model and without modelling skills, edit the weapon as the hands were always same for set type of weapons etc. Perhaps have a template for 3rd person, with a system that easily shows users how to implement fixing guns to the model or general items.. I learnt this in Leadwerks but took far too long than it should had and felt unintuitive with massive learning curve. I finally got a Mixamo Gun Aiming animation on to a model, imported said model and animations then scripted a gun model to be holstered and un-holstered.... But for a simple thing it was just crazy... Maybe implement easier methods for these basic things.. Or a specific ‘how to make a game’ guide or tutorials. Unfortunately an engine will get far more customer base and attention on the ease of use and the entry level. To see outcomes and results far quicker than spending months learning the engine to then see a model move across the screen and shoot or pick a item up….. Content alone can make or break a product, it’s an age of YouTube videos and instant gratification world….. wanting to be told exactly how to get from a to z and then take that and add their own twist or content to it to make their own game and much more. UE4 is massively poplar for many reasons, but I honestly believe the main one is because of the sheer amount of learning and how to content or tutorials available... People can literally make a best seller game from nothing by watching or reading the stuff..... with no programming experience at all!! Anyway I dribble on, Sorry. Templates to get individuals making a game....would be a positive move.. a lot of people get their thrills from learning, breaking and making the engine and pushing it to its max capabilities... But on the other hand there are large numbers that just want to jump in and start making a game.... With some hand holding... albeit at the same time have some form of progress path to gradually improve and take deeper steps on their path to creating their dream game. You would be amazed at the content people new or old would come up with, with a foundation of starting point and direction…… P. S.... Chuck in an FPS with body / feet showing, RTS and top-down view RPG and Shooter templates 😉 P. S sorry for all the spelling, on phone which my fat thumbs don't like/
  4. 100% This. I quit on leadWerks, i came in far too late with alot of content dead and gone... But learning from a newbie perspective was a challenge. No real templates, we dont want hand holding but certainly it needs something to kick start it a basic foundation layer that gets people started with first person, third or top down... and then allows new users to get on with level creating, adding bought custom models etc.. Have some pre-script entities for Ai etc. I don't know.... just Leadwerks and reading thus far Ultra so not new user friendly.... not sure how you tend to grow the fan base if its not a nice welcome mat at the entrance.
  5. Hello, I am new, perhaps I can try help with what I've learned so far (not much!). Perhaps we can learn togeather? Let me know what you need help with, and I'll try my best, my friend.
  6. Ha.. It might not be the definitive answer in LUA code but you know what... Sometimes a basic break down like this really tunes in to how I now need to look at it and should be able to achieve on my own. Thanks for that, sometimes a simple process is the answer. I have a habit of over thinking tings and making them far too complicated than what they seem!
  7. FPSGun.lua? That's what I've been reading and playing with, just not getting the parts I need to take and understand as it has a lot of other code too.... Examples are great, (wish there were more downloadable templates / game sources to play with.. not much seems to be released for leadwerks to play around with). but as a newbie it can be a struggling in first place knowing what is what, what bits are needed.. eve when changing and playing with the code, it is very difficult. Maybe a bit of insight to this script you ref and the areas of code that are key would help me on the right path....
  8. Hi All, I've been reading the forums / searching and the posts relating to this just confuse me more. I've also played around with the FPS Script and some other third person shooting examples but it's left me more confused. Can someone please help me with how (LUA) I would make my character shoot and have a projectile (3d bullet) shoot out at the direction his facing/pointing gun. I'm just stumped and don't know where to even begin. Many Thanks
  9. On second note, does anyone still or interested in offering Tuition for Leadwerks and Lua?
  10. 2015....Is tuition still something on offer? Would love to get some 1 on 1 for Leadwerks 4.6 and Lua please.
  11. 100% agree, but also noticed you reminisce a lot.
  12. Sorry Ron, I've had a look but even more confused. Not sure what Point() you reference to in my code? Am I to use/edit the code you detailed or just set self.angle of player to my camera rotation in setinput? Many Thanks again
  13. I'll have to finish work to look at this in detaill.. but wow! That is amazing, not just the response but the time and effort shown to help me. Really geninue and touching, you're amazing Ronnie - Reminds me all humans are not bad! It's not exactly what I am after, I want as you shown, but player does not follow where mouse is, just the angle and when shooting with mouse it shoots at location (hence the mouse cursor I will eventually turn to a 2D crosshair as if its looking down from above as well.. Top Down Shooter). I should be able to review the above and amend it so the W,A,S,D keys move player around and not follow the mouse pointer.. but mouse hopefully to be free as you've shown and player angle look at it.
  14. Thanks, that really insightful and helpful. Not sure the proposal is the solution I need. It must be something Leadwerks can acheive, its basically top down view, rotation/math curve for model towards mouse location and then mouse icon being a cross hair that use used to aim and shoot etc.... Just not sure how to piece it all together in Lua.
  15. Did them videos make it any clearer? Anyone able to assist me in the right direction? Just need a little helping hand to guide me through this dark tunnel.
  16. Hi Alien, I would like to get similair player control as these examples.
  17. Hi All, I'm still trying and still failing to get a nice Top Down Shooter PlayerCharacter with mouse aiming. So I've managed to get Top Down view, some nice animations and movements with help of @Alienhead. My current situation is mouse pointer is locked to center of screen and clamped, I've messed around with code for countless hours and can not seem to get the mouse unlocked without the angle of player spinning at 10000mph! What I would like to understand and achieve, is having mouse unlocked so it moves freely around the screen (possibly clamping it again at a later date but not so restrictive to center of screen), maintain character direction facing where mouse is and finally having mouse cursor be a cross hair. Please can someone help me, racking my brains and ripping out (the little I have left) of my hair, I've also hit my head with my fresh new Lua Programming by Roberto Ierusalimschy book!. I just need bit of guidance in a real beginner / understandable way. Thanks in advanced for any assistance you can provide. A video of what I'm currently left with... to help local runmultiplier = 0.8 --Set Script properties in Editor / define variables Script.lookSpeed = 0.2--float "Look Speed" Script.lookSmoothing = 5--float "Look Smoothing" Script.cameraDistance = 6--float "Camera Distance" Script.cameraRadius = 0 Script.jumpStrength = 8--float "Jump Strength" Script.walkSpeed = 2.5--float "Walk Speed" Script.runSpeed = 5--float "Run Speed" Script.cameraPitch = 35--float "Camera Pitch" Script.lockCameraAngle = false--bool "Lock Camera" Script.cameraCollision = true--bool "Camera Collision" --==================================================================================================== function Script:Start() --Set the type to player, keyvalue is string value associated with a key name self.entity:SetKeyValue("type", "player") --Create variable for player Mass self.mass = 10 --check and set the mass of player for physics. if self.entity:GetMass() == 0 then self.entity:SetMass(10) end --Set player physics mode - as a Character Controller Physics. self.entity:SetPhysicsMode(Entity.CharacterPhysics) -- Create a Camera to see the game! self.camera = Camera:Create() --Listener for spatial sound (location of sound) self.listener = Listener:Create(self.entity) --Get the player angle (rotation) of y axis and store in variable angle self.angle = self.entity:GetRotation().y --Set camereaAngle varible to players current y axis/angle + character controller angle. self.cameraAngle = self.angle + self.entity:GetCharacterControllerAngle() --Set Field Of View (FOV) for camera. Default is 90 self.camera:SetFOV(80) camera = self.camera --Create Table named 'player' and set it's fields / data player = {} player.ent = self.entity player.state = 1 player.animationMode = "" player.holdAngle = self.angle player.timer_afk = Time:Millisecs() + 30000 player.timer_jump = 0 player.afk = true player.doublejump = 0 player.stamina = 100 player.staminaTotal = 100 player.health = 100 player.healthTotal = 100 self.timer_rolled = 0 self.timer_duringRoll = 0 self.timer_rollLeft = 0 self.timer_rollRight = 0 self.timer_rollForward = 0 self.timer_rollBackward = 0 self.tick_firingRock = 0 self.timer_tick = 0 self.hKeyHit_firing = false self.timer_playerFired = 0 self.releasePower = 0 self.sndBreathPlaying = false --Player states (Setup in a lua table with fields) state = {} --Table called state --Add fields to table state.idle = 0 state.walk = 1 state.run = 2 state.carry = 3 state.dead = 4 -- Timer Variable for animations (see States further below) player.timer_dontChangeAnim = 0 -- Create pivot point for player player.infrontMarker = Pivot:Create() end --==================================================================================================== function Script:UpdateWorld() local playerPos = self.entity:GetPosition(true) local aabb = self.entity:GetAABB(Entity.GlobalAABB) playerPos.y = aabb.center.y self.camera:SetPosition(playerPos) context:DrawText("AABB: "..aabb:ToString(), 20, 20) context:DrawText("Camrea Pitch: "..self.cameraPitch, 40, 40) --Returns a value interpolated between a current and target angle for smooth movement. <Target (being moved towards in degrees, current value in degrees, the number to divide the diffrence by> self.cameraAngle = Math:CurveAngle(self.angle + self.entity:GetCharacterControllerAngle(), self.cameraAngle, self.lookSmoothing / Time:GetSpeed()) --Set Camera intitial position (rotation and turn) if self.lockCameraAngle == false then self.camera:SetRotation(0, self.cameraAngle+180, 0) self.camera:Turn(90, 0, 0) else --If camera locked, set it to just camerapitch. self.camera:SetRotation(self.cameraPitch, 0, 0) end --Transform geomtry from one space to another. (x, y, z, entity source, entity destination) local cameraPos = Transform:Point(0, 0, -self.cameraDistance, self.camera, nil) --Set pick mode for camera collide local pickMode = self.entity:GetPickMode() self.entity:SetPickMode(0) if self.camereaCollision then local pickInfo = PickInfo() --[[A world pick, perform pick on all entities in a world that intersect, the specified line. Pick(origin of ray, end of ray, pick info container, radius, closet, col type)]]-- if self.entity.world:Pick(playerPos, CameraPos, pickInfo, self.cameraRadius) then self.camera:SetPosition(pickInfo.position, true) else self.camera:SetPosition(cameraPos, true) end else self.camera:SetPosition(cameraPos, true) end self.camera:Move(0, 2, 0) -- Height adjust self.entity:SetPickMode(pickMode) end --==================================================================================================== function Script:UpdatePhysics() --use current window and context render surface local window = Window:GetCurrent() local context = Context:GetCurrent() -- Setup / start local time = Time:Millisecs() --Time class for keeping track of application time. Millisecs returns system time in milliseconds local animationState = "" --Move the player pivot (front marker) to current entity (player) position in local space (not global) player.infrontMarker:SetPosition(self.entity:GetPosition(true)) --Set position of pivot to player each frame/update local rot = self.camera:GetRotation(true) player.infrontMarker:SetRotation(0, rot.y, 0) -- set pivot angle/rotation to cameras current y angle (yaw). player.infrontMarker:Move(0, 0, 2) -- Move pivot on Z axis -- Define variables --Get the enter position of screen / surface (context) and hold it in varibles cx and cy local cx = context:GetWidth()/2 local cy = context:GetHeight()/2 -- Camera Angle --If camera is not locked then set mouse to center and clamp it if self.lockCameraAngle == false then local mousePos = window:GetMousePosition() window:SetMousePosition(cx, cy) local mx = Math:Clamp(mousePos.x - cx, -90, 90) local my = Math:Clamp(mousePos.y - cy, -45, 45) - .5 --Setup rotate (angle) to mouse movement for player. if self.smoothedMouseMovement ~= nil then self.angle = self.angle + mx * self.lookSpeed --angle of entity + mouse X & a speed. enty faces mouse movement on X else self.smoothedMouseMovement = Vec2(0) end --Returns a value interpolated between a current and target value. <Target (the value being moved towards, current (the current value), division (number to divide diffrent by) self.smoothedMouseMovement.x = Math:Curve(mx, self.smoothedMouseMovement.x, self.lookSmoothing) self.smoothedMouseMovement.y = Math:Curve(my, self.smoothedMouseMovement.y, self.lookSmoothing) --up and down adjust of mouse movement (turning X) and limit it if self.cameraPitch < -5 then self.cameraPitch = -5 end if self.cameraPitch > 65 then self.cameraPitch = 65 end --[[Apply mouse movement (up & down) via smooth movement.y, based on cameraPitch set to camrea turn]] self.cameraPitch = self.cameraPitch + (self.smoothedMouseMovement.y) * .1 --player.cameraPitch = self.cameraPitch --self.entity:SetInput(self.angle, 0, 0, 0) end window:ShowMouse() --Set key button varibles local move = 0 local strafe = 0 local keyHit_forward = false local keyHit_backward = false local keyHit_left = false local keyHit_right = false --Player Movement Variables keyHit_forward = window:KeyDown(Key.W) keyHit_backward = window:KeyDown(Key.S) keyHit_left = window:KeyDown(Key.A) keyHit_right = window:KeyDown(Key.D) --Reset player to IDLE STATE if move == 0 or strafe == 0 then player.state = 1 end --Key Actions --::rescanactions:: if keyHit_forward and keyHit_backward then player.state = 1 else if keyHit_forward then move = -self.walkSpeed player.state = 2 elseif keyHit_backward then move = self.walkSpeed player.state = 3 end end if keyHit_right and keyHit_left then player.state = 1 else if keyHit_left then strafe = self.walkSpeed player.state = 4 elseif keyHit_right then strafe = -self.walkSpeed player.state = 5 end end --============================================================================================================= --Player States --============================================================================================================= --IDLE STATE (1) if player.state == 1 then if player.timer_dontChangeAnim < time then --time_dontChangeAnim is intitalise to 0 so will always be less than time...? --Determine which idle animation to play --if player.stamina < 60 then --animationState = "Exhausted" --else animationState = "Idle" --end if player.animationState ~= animationState then --If the player.animationState does not hold or match a animation, then set the player.animationState field to current animation (held in variable) player.animationState = animationState player.ent:PlayAnimation(player.animationState, .03, 250, 0)--Play the animation. player.ent table/field basically replaces self.entity. end end self.entity:SetInput(player.holdAngle, 0, 0, 0) end --------------------------------------------------------------------- --WALK STATE (2) if player.state == 2 then if player.timer_dontChangeAnim < time then animationState = "Walk" if player.animationState ~= animationState then player.animationState = animationState player.ent:PlayAnimation(player.animationState, .06, 250, 0) --add sound end end self.entity:SetInput(self.angle, move, strafe, 0) player.holdAngle = self.angle end --------------------------------------------------------------------- --WALKBACKWARDS STATE (3) if player.state == 3 then if player.timer_dontChangeAnim < time then animationState = "Walkbackwards" if player.animationState ~= animationState then player.animationState = animationState player.ent:PlayAnimation(player.animationState, .05, 250, 0) end end self.entity:SetInput(self.angle, move, strafe, 0) player.holdAngle = self.angle end --------------------------------------------------------------------- --STRAFE LEFT STATE (4) if player.state == 4 then if player.timer_dontChangeAnim < time then animationState = "StrafeLeft" if player.animationState ~= animationState then player.animationState = animationState player.ent:PlayAnimation(player.animationState, .04, 250, 0) --add sound end end self.entity:SetInput(self.angle, move, strafe, 0) player.holdAngle = self.angle end --------------------------------------------------------------------- --STRAFE RIGHT STATE (5) if player.state == 5 then if player.timer_dontChangeAnim < time then animationState = "StrafeRight" if player.animationState ~= animationState then player.animationState = animationState player.ent:PlayAnimation(player.animationState, .04, 250, 0) --add sound end end self.entity:SetInput(self.angle, move, strafe, 0) player.holdAngle = self.angle end --------------------------------------------------------------------- --STRAFE RIGHT STATE (5) if player.state == 6 then if player.timer_dontChangeAnim < time then animationState = "StrafeRight" if player.animationState ~= animationState then player.animationState = animationState player.ent:PlayAnimation(player.animationState, .04, 150, 0) --add sound end end self.entity:SetInput(self.angle, move, strafe, 0) player.holdAngle = self.angle end --------------------------------------------------------------------- end
  18. Bloody amazing How are entities assigned interactions in LE? Sorry for hi-jacking again!
  19. I done a quick stream, as I struggle to put in words what I'm trying to do. Hopefully makes sense?
  20. How odd, the command win:GetKeyDown... I used that and get errors, it does not reference win or GetKeyDown in the documentation either.. Where does that come from?
  21. Hi, I'm struggling to get movement when both forward key and right or left key (strafe) is pressed at same time, one either overrides the forward and do not work together to move forwards while strafing. Be n ice to have model or a animation play as if its moving at the angle too. How do I get such results if my code for movement is the following system? Many Thanks --Set key button varibles local move = 0 local strafe = 0 local keyHit_forward = false local keyHit_backward = false local keyHit_left = false local keyHit_right = false --Player Movement if window:KeyDown(Key.W) then keyHit_forward = true end if window:KeyDown(Key.S) then keyHit_backward = true end if window:KeyDown(Key.A) then keyHit_left = true end if window:KeyDown(Key.D) then keyHit_right = true end --Reset player to IDLE STATE if move == 0 or strafe == 0 then player.state = 1 end --Key Actions ::rescanactions:: if keyHit_forward then move = -self.walkSpeed player.state = 2 end if keyHit_backward then move = self.walkSpeed - 0.5 player.state = 3 end if keyHit_left then strafe = self.walkSpeed + 2 player.state = 4 end if keyHit_right then strafe = - (self.walkSpeed + 2) player.state = 5 end
  22. Hi All, I've placed some models in my game and noticed once I applied a normal texture, it provides great detail but also affects certain areas to be a difrent shade / darkness than other sections? If I change render to Texture only, it does not show but lights it does.... in-game also shows the different shade. Perhaps that's the way it works with lighting, but just looks like a sore thumb and not right.. Should I be doing something to fix this or done something wrong? I moved model position to show in images that it's affected when I move it around.. My area only has Directional light atm and moving that does not change it either?!?!
  23. I did a Youtube Video, I think I got it down perfect.. For these particular meshes anyway. Do have a look if you get a moment, hopefully I'm doing it the correct way / method.
×
×
  • Create New...