-
Posts
60 -
Joined
-
Last visited
Profile Information
-
Location
Canada & China
Recent Profile Visitors
4,346 profile views
Defranco's Achievements
Newbie (1/14)
20
Reputation
-
Are you using: entity:Release() to clear the entity after death?
-
We're still having issues with version 4.6 and 4.7 beta in regards to Navmesh generating. On a fresh install, with a fresh map.... using all default settings... creating a simple room has the Navmesh about 64 decimals from a wall. Or two tiles of 32ea (grid view default). Which works out great for doorway spacing with the default scale size. However, when changing the map size to 4096x4096 to create a bigger game (creating terrain), generating Navmesh puts the spacing at 544 instead of 64 away from a wall, or 17 tiles of 32ea (grid view default). Now most rooms don't get any Navmesh generated. Deleting the terrain and re-doing Navmesh doesn't revert the space changes. So the only way to get the Navmesh to work is to scale everything 500% so that the Navmesh can go thru doorways, which defeats the purpose of the larger map. Am I missing something? My understanding is that the Navmesh distance from walls is based on character controller radius, which remains the same (or should).
-
After finishing up our coding marathon and doing over 4500 lines of code last night, we finally finished the Stats & Skills allocation. 2 standalone scripts. One controls the stats. One controls the visual screen. Our stats script is 24,967 lines. Our screen script (that shows everything) is 16,643 lines. Total time was about 350 hours of work to complete just these 2 scripts. It's ready to be inserted into our pre-alpha release. A fully functioning stats and skills system. Players get to level skills by using ability (exactly like skyrim with 'skill exp') and by also allocating bonus skill points on top of it. The stats/skills allocations for what you wear (equipment) is also implemented. As well as potions, scrolls, spells (positive) and debuffs (negatives) are fully integrated as well. There is also a perk system and fully customized character creation with races/hometown and starting class that all determines stats and skills. Video uploaded is in 1080p capabilities. 100% lua scripted, just to give people an idea of what is possible with 350 hours of work.
- 1 reply
-
- 7
-
Hey Gamecreator, Did you ever resolve this? We're going through the same issue after updating our project file from 4.4 to 4.6 beta. Our map size is 4096 and has the exact issue you describe with Navmesh generation
-
Recovering data from another entity does not work
Defranco replied to Yue's topic in General Discussion
It would be self.Pivote:GetPosition() for position and (self.Pivote:GetRotation().x.0) (example) for rotations there is also GetAngle() in the documentation but I've never used this one -
Been working on a couple projects lately, This is from one of our older RPG's. Credits to Rick on coaching us for inventory (over a year ago), and Jorn for always answering our questions as well and his tutorials, especially on youtube, and Josh as well, and many others around the forums and private chat. -- Inventory System, 90% functioning. Diablo2-style (items can be moved, created--pickedup--, released--dropped--) - just need to work on stacking, and overlap issues. -- Fully Functioning HUD including working scripts for, just took off some image overlay temporary for redesign: Health Bars Mana Bars Thirst, Hunger, Sleep, Temperature, and even Mood/Karma system EXP Bars, level display -- Fully Functioning Level System, including stats, primary/secondary skills, that control everything from skills for items, stats, and every value possible. All stat allocations for leveling up works perfectly, just need to duplicate the text and button scripts for overlay. (codes all finished finally, but many weeks of work left for graphics and proper text - overlay work - ), but it fully works. Also about 20% done the character tab, one of the next things we'll be working on is putting this together along side the inventory system. We're also dabbing into scripted quests with NPC's, so far so good, had to abandon the Flowgraph editor after it couldn't hold more than 1/10th of a quest.
- 4 replies
-
- 5
-
- leadwerks
- roleplaying
-
(and 3 more)
Tagged with:
-
Yes, using the FPS character controller included in Leadwerks, then took codes out of the third person player controller in the workshop, combined them then coded a bunch of new lines and changed a few things so they could work together (using a toggle), then coded the rest of what you see in the video
-
Crouching can be done, Crouching + jumping into pipes/windows/vents can be done. Crouching under things like trucks can be done. Crouching up stairs with bypassing the 8cm height step limit can be done. You have to code around the hardcode and overwrite it by being creative, this is a test we made in about 6 hours of coding. We used glass/mirrors and made it appear to have altered the hardcode with lua coding. In reality, its just a work around.
-
We did a project 'update' in the Project Manager to update the game files to 4.6 updated, Now Navmesh doesn't seem to work, we're using the same settings to generate Navmesh, (left side is 4.4) (right side is 4.6) No matter what we try the navmesh won't go closer to the walls like before. Looking back at previous posts on the forums, it's indicated that navmesh is based on character controller radius, which isn't editable. Was the values changed in one of the updates?
-
I 3rd the invisible ramp idea. It's also good for navmesh (AI movement). Stairs, bridges, narrow walk areas, bumps. Invisible ramps are your friend to make everything smooth, especial AI who get stuck on stuff easily without invisible ramps. You can use something like this for jump, and I'm sure you can lower the values to make a 'sway motion' while walking. -- Goes at top Script.jumpoffset=Vec3(0) -- Put in your jumpscript after keyhit space o self.jumpoffset = Vec3(math.random(-1,1),math.random(-1,1),0):Normalize()*30
-
I'd thought I would share a basic level system for anyone new (or checking forums search function) could use as a base point to get started. At the top --------- Level System --------- --below is the player level Script.playerLevel = nil --below is the players maximum level, I use 99 for this game Script.playerMaximumLevel = 99 --below is the players starting level Script.playerStartingLevel = 1 --------- Experience System --------- --below is the players current experience points Script.playerExperiencePoints = nil --below is the players current maximum experience points Script.playerMaximumExperiencePoints = nil --below is the players starting experience points Script.playerStartingExperiencePoints = 0 --below is the players starting maximum experience points Script.playerStartingMaximumExperiencePoints = 500 --below is the amount of maximum experience points increase multiplier per level up Script.playerRateExperiencePoints = 2 --below is the calculator for extra experience points after leveling up to make sure it carries over to the next level Script.playerExtraPoints = 0 Inside the Function Start --------- SETUP LEVEL & EXP--------- --below we setup our level, experience and maximum experience to match starting values self.playerLevel = self.playerStartingLevel self.playerExperiencePoints = self.playerStartingExperiencePoints self.playerMaximumExperiencePoints = self.playerStartingMaximumExperiencePoints Scripts -- We received EXP (EXP = Experience Points) -- And if the EXP bar reaches full, then we level up and check the EXP function Script:PlayerReceiveEXP(expPoints) --lets check that we aren't going to die, dead people don't receive exp, lets also check that we are not maximum level if self.health > 0 and self.playerLevel < self.playerMaximumLevel then --lets check if our experience is less than our maximum experience if self.playerExperiencePoints < self.playerMaximumExperiencePoints then --if it is, we can add the experience points to our player self.playerExperiencePoints = self.playerExperiencePoints + expPoints end --now lets check if our experience is equal or greater to our maximum experience if self.playerExperiencePoints >= self.playerMaximumExperiencePoints then --if it is, we need to run a check to calculate the extra experience points self:PlayerCheckEXP() --also, we need to level up self:PlayerReceiveLevel(1) end end end -- We need to check how much EXP is left -- After that, we will give the EXTRA EXP back after leveling up function Script:PlayerCheckEXP() --below we calculate our extra experience points after leveling up and set them aside self.playerExtraPoints = self.playerExperiencePoints - self.playerMaximumExperiencePoints --now we reset our current experience back to 0 self.playerExperiencePoints = 0 --now we give the player back just the extra experience points self:PlayerReceiveEXP(self.playerExtraPoints) --now we reset the extra points set aside back to 0 self.playerExtraPoints = 0 end -- We received a level -- After that, we increase the maximum EXP allowed function Script:PlayerReceiveLevel(levelPoints) --we need to check that we are not maximum level first if self.playerLevel < self.playerMaximumLevel then --below we add the level to our player self.playerLevel = self.playerLevel + levelPoints --now that we have leveled up, below we increase our maximum experience points to get to the next level self.playerMaximumExperiencePoints = self.playerMaximumExperiencePoints * self.playerRateExperiencePoints end end All you have to do to receive Experience points is point to the Script:PlayerReceiveEXP(expPoints) So if you kill a monster, or finish a quest, or anything you can say something like self:PlayerReceiveEXP(250) to get 250 experience points, or run the script like self.player.script:PlayerReceiveEXP(250) or however you have it setup. The reason I personally used the words Player and player in all the names above is because this allows me to know all these functions are specifically for the player so I can have other NPCS/monsters in the game also have their own style of level system and not get it mixed up with the players scripts.
-
I think its working. I moved just the sound file for the torch and put it under self.sound={} (which is in function start) And it works under it, odd. I didn't think it had to be part of the table Edit: I had originally had tried it both in the Function UpdatePhysics as well as at the top of the Function Start (above self.sound={}) moving it a few lines down seems to be working. I'm not sure I understand the logic..... Is it because the table starts with self.sound and the line calling the sound file was called self.sound.FLsound?
-
Seems like it cant get past the "if self.FLsource:GetState()== Source.Playing then" that shows up after the Else When I pres F the 2nd time -- it hides the torch It prints: System:Print("Hide Light Works") and System:Print("Check 1 This works too") Thats as far as it goes. When I do System:Print(self.FLsource:GetState()) It returns 1 before the else statement and returns 0 after the else statement
-
if window:KeyHit(Key.F) then self.FLsource = Source:Create() self.FLsource:SetSound(self.sound.FLsound) self.FLsource:SetVolume(0.2) self.FLsource:SetLoopMode(true) if self.torch1:Hidden() then self.torch1:Show() --check if source exists if self.FLsource ~= nil then --if it's not playing, play it if self.FLsource:GetState() == Source.Stopped then self.FLsource:Play() if self.FLsource:GetState() == Source.Playing then System:Print("Sound Is On") end System:Print("Sound Is Still On") end end else self.torch1:Hide() System:Print("Hide Light Works") --check if source exists if self.FLsource ~= nil then System:Print("Check 1 This works too") if self.FLsource:GetState() == Source.Playing then System:Print("Check 2 Doesn't work") self.FLsource:Stop() System:Print("Sound Off Doesn't work") end end end end
-
The first sound line (not using source) is a on-button sound effect self.sound.torch1:Play() its about a 1 second sound effect Whereas the one i'm trying to use in the source is a loop effect that keeps playing until the action is turned off I was playing around with if self.FLsource:GetState() == Source.Playing then self.FLsource:Stop() But it has no effect and won't stop. I've even put in system:prints right in there to test, and the first prints go off, but the sound keeps on playing and the second system print doesn't register. Basically I have, if window:KeyHit(Key.F) then self.FLsource = Source:Create() self.FLsource:SetSound(self.sound.FLsound) self.FLsource:SetVolume(0.2) self.FLsource:SetLoopMode(true) if self.torch1:Hidden() then self.torch1:Show() --check if source exists if self.FLsource ~= nil then --if it's not playing, play it if self.FLsource:GetState() == Source.Stopped then self.FLsource:Play() System:Print("Sound On") end end else self.torch1:Hide() --check if source exists if self.FLsource ~= nil then --if it's playing, stop it if self.FLsource:GetState() == Source.Playing then self.FLsource:Stop() System:Print("Sound Off") end end end end