Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

8 Neutral

About TemplarAsh

  • Rank
  1. TemplarAsh


    Denver is where it's at, just don't tell anyone...
  2. Hi there, back after a few months break, could someone give me lua advice of how to detect double tap in a character controller script. I am using ActionMap if that's relevant. Thank you in advance ~Ash
  3. Hi Guys, Is there a search scene tab ability for an object name? This would be a nice feature. ~Ash
  4. Yeah I was afraid of that lol, thanks for the quick reply Josh! ~Ash
  5. Hi Guys, I have the auto-save setting disabled, however is there a way to prevent LE from autosaving your scripts inside the script editor when you run the game? This really sucks when you are trying to add things and you have code issues and creates all kinds of headaches when you are a newb. It would be nice to be able test run inside the script editor without the ninja auto-save. Perhaps this is not possible as the scrips must be saved before the engine can run them, but I thought I'd ask. ~Ash
  6. Hi Guys, I finally got it working, using +/- degrees off of the camerarotation.y. System:Print() was very helpful here finding the correct variable then added the appropriate degrees based on direction. --Movement --Code for detecting key hits for movement and attacks local targetRotation = self.currentyrotation if ActionMap:IsDown(ActionMap.block) then self.currentState = self.state.block end if ActionMap:IsDown(ActionMap.right) then movement.x=movement.x+1 targetRotation = camerarotation.y-90 changed=true end if ActionMap:IsDown(ActionMap.left) then movement.x=movement.x-1 targetRotation = camerarotation.y+90 changed=true end if ActionMap:IsDown(ActionMap.forward) then movement.z=movement.z+1 --if ActionMap:IsDown(ActionMap.freelook) then return end targetRotation = camerarotation.y+180 changed=true end if ActionMap:IsDown(ActionMap.back) then movement.z=movement.z-1 targetRotation = camerarotation.y changed=true end if ActionMap:IsDown(ActionMap.right) and ActionMap:IsDown(ActionMap.back) then targetRotation = camerarotation.y-45 changed=true end if ActionMap:IsDown(ActionMap.left) and ActionMap:IsDown(ActionMap.back) then targetRotation = camerarotation.y+45 changed=true end if ActionMap:IsDown(ActionMap.forward) and ActionMap:IsDown(ActionMap.right) then targetRotation = camerarotation.y-135 changed=true end if ActionMap:IsDown(ActionMap.forward) and ActionMap:IsDown(ActionMap.left) then targetRotation = camerarotation.y+135 changed=true end This is what changes the character direction... --Rotate model to face correct direction if (changed) then movement = movement:Normalize() self.currentyrotation = Math:IncAngle(targetRotation,self.currentyrotation,self.turnSpeed)--first two parameters were swapped end movement and targetRotation are local variables on the Character controller, camerarotation.y is a global variable at this point, since I moved the camera script off of the controller and attached it to the camera. I am sure there is a better way, even moving this back to the Character controller, but at least this gives you an idea on what to think about and work through. Took me a few days to understand this.
  7. Right on, I am off to work but will check this out tonight when I get home. Thank you for the assistance! ~Ash
  8. Hi guys, I need some suggestions on how to get a 3rd person controller's movement that is based on camera direction so the WASD moves the player according to the direction the camera is looking. I have spent hours with every 3rd person script I can find, local and global space settings and I cannot get this to work correctly. The other thing to mention is I do not want to strafe left and right, but rotate and move the character in that direction. I am using a modified version of the barbarian player controller from Darkness Awaits, but it runs like its always in global space, or just hard coded w&s z+- with a&d x+- which then it does not work correctly when the camera changes rotation. I have moved the camera rotation off of the 3rd party controller and attached it to a script on the camera then parented back to the controller while leaving the movement controls on the character controller. Not sure if that matters, but it seems to make more sense having them separated with this goal in mind. Do I need to get the Y rotation of the camera then base the wasd movement off of this, +- 90 degrees and -180, or do I just not understand how to set local space movement either on the controller or the camera, and which would it apply to? Any guidance is appreciated. ~Ash
  9. Hi Beo, I checked and I had the listener on my character controller, but not the camera, so I moved it over to the camera and it does the exact same thing. Should the listener be on the camera instead of the character controller, does it matter, as both seem to work? We only need 1 listener right? I am currently working on a new 3rd person character controller and actually moved the camera code off the character controller and instead attached it to the camera which parents back to the controller, which works but is having its own set of challenges of local vs. global space movement with camera rotation, fun times. I also noticed in testing my autopistol disappears when published but works inside the editor. This is really weird. Still digging... So the autopistol issue was resolved by using the Leadwerks beta version, not the regular 3.3. It appears the sound emitter issue maybe caused by not moving with my character controller. Still working on this but that is what it appears to be doing. More to come OK so I did fix this. The beta update seemed to help with my simple test map, however I also changed the listener code to this... --Create listener self.listener = Listener:Create(self.camera) Thank you for the help. ~Ash
  10. Hi guys, I need some help with sound emitters. I am using this script attached to a pivot next to a wall, with volume tested at 1 and 100. The sound will play inside the editor but when published it will not play. Tried all kinds of things, new map, generic app.lua, stereo vs mono .wav, stock ambient .wavs, I even took the IF statement out of start and I still cannot figure it out. Thank you for the help. ~Ash --require "Scripts/Functions/ReleaseTableObjects.lua" Script.soundfile=""--path "Ambient Sound" Script.range=20.0--float "Range" Script.volume=1--float "Volume" Script.pitch=1--float "Pitch" Script.loop=true--bool "Loop" function Script:Start() if self.sound~="" then self.sound = Sound:Load(self.soundfile) self.entity:EmitSound(self.sound, self.range, self.volume, self.pitch, self.loop); end end function Script:Stop() end function Script:Cleanup() end
  11. Sound is very important! I added some vertical sound triggers and it works ok, for now. When the player collides into it it changes a flooring variable to a type: stone, grass, etc. Then used some if statements inside my character controller to check that variable and then play the appropriate material footstep sound, all using the same code (for n=1,4 do) for footstep looping. So not really attached to the ground but the player won't know. ~Ash
  12. So much to learn but from what I have been looking into would be co-op integration, and probably good animation lol ~Ash
  13. Hi Guys, I have the Steam Indie version of Leadwerks, I was reading this tutorial: http://www.leadwerks.com/werkspace/blog/52/entry-890-lets-make-a-game-procedual-content-creation-part-03/ but right away I noticed Flexman requires some default scripts that I cannot find. "Scripts/constants/collision_const" "Scripts/constants/engine_const" "Scripts/constants/keycodes" The only folders I have inside scripts are... Functions, Math and Objects, which do not contain them. I think he said he was using the SDK 2.5, is this the normal version with C+ and are these lua scripts not supposed to be included with the steam indie version? Can they be downloaded from the werkspace? Or would we have to make these from scratch? Kind of confusing... Any help is appreciated ~Ash
  14. Hi Josh, I found out what was causing this issue, let me add some additional info. I tried to install the latest paint.net, i kept getting an error...NSIS error writing temporary file. Make sure temp folder is valid. I tried all of the recommendations regarding the temp folder, permissions, path, etc., but none of that was an issue. Some installers have this issue and others do not. This was happening because UAC was turned all the way to the bottom setting in control panel>user accounts>change user account control settings. I tried the default on setting and the one just underneath that, both worked. I changed it back to the bottom setting and both programs stopped working again with the same write errors. So it appears to be related to security permissions for certain installers and UAC being set to the bottom option. I will test this on a 2nd pc and see what happens, unless someone beats me to it ~Ash
  15. Hi Josh, I checked file permissions, ran the .exe as administrator, compatibility mode, never prompt UAC, did several malware scans, a chkdsk on my primary drive, uninstalled my antivirus which was just microsoft security essentials, none of that helped. I did find something interesting however... If i move the game folder to my 1Tb data drive which is a SATA drive, it will run. My primary drive is SSD, a Samsung 840 Evo 43.7/250Gb free. I will keep looking...hope this drive is not having issues. ***everyone back up your stuff!!!*** ~Ash One other thing to mention... My original project's .exe from a few months ago runs just fine still, but anything new coming out of the publisher is having an issue. ~Ash
  • Create New...