Jump to content

funnygamemaker

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by funnygamemaker

  1. Will this work with the indie edition or only if you have the full standard edition?
  2. So I think i found the problem, the character model that im using was really big, so I resized it in the leadwerks model Editor, so it would be about 6 feet tall. which made the scale factor 0.48, I noticed when I have any child's, in that model, such as emiters, instances...etc... they like to spawn in and become the same size as the original size of the model, before I scaled the main model down this picture is when the model is at its orignal size this picture is when I resized the model and the emitter is just a child of the model
  3. The csg sphere was scaled 20 in editor for some reason, So I scaled it to 1, but when I create the Instance it still turns really big for some-reason. I just tried making a custom model, and it is still having the same problem, I cant figure out how to solve this.
  4. So Im trying to make a projectile object, that is based on a timer for my game. Im making an instance of the object but when I do and when I set the position it makes the entity really big for some reason. function Script:UpdateWorld() --self.entity:Turn(self.player:GetPosition(true).x * (Time:GetSpeed() * 0.01), 0, 0) self.fireratetimer = self.fireratetimer + (Time:GetSpeed()/100)-- timer example 1sec 2sec self.entity:Point(self.player, 1, 1, 90) if self.fireratetimer >= self.firerate then local playerpos = self.player:GetPosition() local bullet1 = self.bullet:Instance() bullet1:Show() bullet1:SetPosition(self.bullet:GetPosition(true)) bullet1:SetRotation(self.entity:GetRotation()) self.fireratetimer = 0 end this is how big it is suppose to be here is what it turns out to be in game(sorry for the bad quality of the second pictures, doing print-screen was the only option in testing the game due to the mouse position always staying in the middle, and also its the result I have with print screen on duel monitors.)
  5. I've been trying for a bit but still getting errors, how would I do a check N,E,S,W. here is some of my attempts, neither one works, but I'm trying, I know I'm missing some variable information but I've been re-writing everything in differnt ways like 10 times already. curgridy = 5 -- starting position curgridx = 5 -- starting position for i = 0, 6, 1 do if direcction == 1 then if grid[curgridx+1][curgridy] == 0 then pos = pos + Vec3(2,0,0) room:Instance() room:SetPosition(pos) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(pos.x,pos.y,pos.z,0,0,0,2,1,2) room:SetShape(roomcolision) grid[curgridx+1][curgridy] = 1 curgridx = curgridx + 1 end end if direcction == 2 then if grid[curgridx][curgridy+1] == 0 then pos = pos + Vec3(0,0,2) room:Instance() room:SetPosition(pos) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(pos.x,pos.y,pos.z,0,0,0,2,1,2) room:SetShape(roomcolision) grid[curgridx][curgridy+1] = 1 curgridy = curgridy + 1 end end end end attempt 2. if window:KeyHit(Key.Z) then room:Instance() room:SetPosition(pos) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(pos.x,pos.y,pos.z,0,0,0,2,1,2) room:SetShape(roomcolision) pos = roompos math.randomseed(Time:Millisecs()) directionOfRoom =math.random(1,3) if directionOfRoom == 1 then if gridz == 0 then pos = pos + Vec3(0,0,2) else directionOfRoom = math.random(2,3) end gridz = gridz + gridz elseif directionOfRoom == 2 then if gridx == 0 then pos = pos + Vec3(2,0,0) else directionOfRoom = math.random(2,3) end gridx = gridx + gridx elseif directionOfRoom == 3 then pos = pos + Vec3(-2,0,0) end end ---------------------another failed attempt function Script:Start() math.randomseed(Time:Millisecs()) grid= {} for x=0, 5,1 do grid[x] = {} for y = 0, 5,1 do grid[x][y] = 0 end end room = Model:Box(2,1,2) room:SetPosition(0,0,0) room:SetColor(255/255,20/255,20/255) local roomcol = Shape:Box(0,0,0,0,0,0,2,1,2) room:SetShape(roomcol) roomcol:Release() window = Window:GetCurrent() math.randomseed(Time:Millisecs()) numberofrooms = math.random(1,4) selectedroom = math.random(1,4) posx = Vec3(0,0,0) posy = Vec3(0,0,0) grid[5][5] = 1 maxnumberofroom = math.random(5,10) --getroomside = {grid[x+1][z], grid[x-1][z], grid[x][z+1], grid[x][z+1]} grid[5][5] = 1 numDir = 4 curgridx = 5 curgridy = 5 math.randomseed(Time:Millisecs()) direcction = math.random(1,4) end function Script:UpdateWorld() math.randomseed(Time:Millisecs()) local red = math.random(0,255) local blue = math.random(0,255) local green = math.random(0,255) for i=0, 7, 1 do if grid[curgridx][curgridy] == 1 then if direcction == 1 then posx = posx + Vec3(2,0,0) room:Instance() room:SetPosition(posx) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(posx.x,posx.y,posx.z,0,0,0,2,1,2) room:SetShape(roomcolision) curgridx = curgridx + 1 else if direcction == 2 then posy = posy + Vec3(0,0,2) room:Instance() room:SetPosition(posy) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(posy.x,posy.y,posy.z,0,0,0,2,1,2) room:SetShape(roomcolision) curgridy = curgridy +1 if direcction == 3 then posx = posx + Vec3(-2,0,0) room:Instance() room:SetPosition(posx) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(posx.x,posx.y,posx.z,0,0,0,2,1,2) room:SetShape(roomcolision) curgridx = curgridx - 1 else if direcction == 4 then posy = posy + Vec3(0,0,-2) room:Instance() room:SetPosition(posx) room:SetColor(red/255,blue/255,green/255) roompos = room:GetPosition() roomcolision = Shape:Box(posy.x,posy.y,posy.z,0,0,0,2,1,2) room:SetShape(roomcolision) curgridy = curgridy- 1 end end end end end math.randomseed(Time:Millisecs()) direcction = math.random(1,4) end end
  6. I'm still having trouble with the fact of, how can I place the array to certain cords in the map; because what I'm trying to do is to stop the generation from backtracking and from creating another block(room) over one that is already made. I have a pretty crappy diagram , but all the purple squares are just for other possibilities of rooms, and if you see it generates the first room(green) then the second room, but you look at the arrows, the generation still can allow it to regenerate a block backwards and over the current previous rooms, which I don't want it to do, here's the chart http://imgur.com/Uc35PsU Here's and example video on what I'm trying to do Im sorry that I dont have the script atm, I will edit this later today when I get home.
  7. I wouldn't mind trying to help out, I'm currently working on procedural generated maps. I only have the indie version of leadwerks so everything that I do would be in lua, if that's okay. I currently have nothing in my portfolio since I didn't Finnish all the stuff that I'm working on. The reason on why I would like to do this is, ever since I started coding, (which was making addons for Garry's Mod) I always worked on my own. I always wanted to work on a team, but none of my friends ever got into coding, so I was always just a lone wolf, everything that I worked on was always by my self. If I don't make it in, I completely understand since I haven't got any backup evidence in my portfolio.
  8. I hope there is a part 4, because these tutorials are helping me learn procedural generation.
  9. Im using a 2D array for starters. grid = {} for i=0, 8,2 do grid[i] = {} for j = 0, 8,2 do grid[i][j] = 0 end I was thinking if I use the array, were "grid[j]= 0" should I have it based on a 0 or 1 based system or true and false, so that if its true or 1 its filled, and if its false or 0 its empty. But How would I do a Check to see if a certain grid is filled or empty. I made it 2d because Y value is just 0, that only values that will change would be x and z.
  10. So If im trying to create a procedural map generation like paranautical activity, or the binding of Isaac, but what I cant seem to understand is, if I create csg's with a for loop, or if I just create them with Entity:Instance, how would I check for collision with other csg's that are already made? So that when the csg's generate they dont back track and overlap.
  11. This is my first attempt for any procedural generation, and I'm very surprised that it worked with no errors.
  12. Okay, so say if I went with a room prefab, how would I detect where a door way is, would I have to create a pivot for each entrances, so that for each differnt prefab, check and make sure that the pivots are right and move the prefab to that pivot?
  13. I've been looking into procedural generation to, and I was wondering with this game engine how would I create and size a GSG with lua. I dont know what api I should look for, And if I switch and use rooms that are prefabs, how would I detect where a door way would be?
  14. my config file autorefreshassets=1 ShowWelcomeScreen=1 autobackenabled=1 TextureLock=0 FileSortMode=1 ShowToolbar=1 autosavepath="Autosave/" mappath="Maps/" assetpath="" autobkstate=0 autobackup=5 projectauthor="Morgan Dudka" projectcopyright="Invoid Games" defaultprojecttype="Lua" openfilename="C:\Users\Morgan\Documents\Leadwerks\Projects\Carrot\Maps\testing.map" openlastfile=1 playanimation=1 lastactionid=0 mainsplitterposition=309 subsplitterposition=0 projects="" projects31="C:/Users/Morgan/Documents/Leadwerks/Projects/MyGame\MyGame.werk|C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ\ProjectZ.werk|C:/Users/Morgan/Documents/Leadwerks/Projects/Carrot\Carrot.werk" workshopquerytype=1 currentproject="MyGame.werk" onlypublishusedfiles=1 currentproject31="Carrot" showmodelhierarchy=0 showviewportsliders=1 showmodelvertices=0 warninggiven_entityocclusionculling=0 ViewportPerspectivePanSpeed=1.00000000 ViewportPerspectiveMoveSpeed=0.200000003 ViewportPanSpeed=0.500000000 multisamplemode=2 camerasmoothing=0.500000000 lightquality=1 sandboxmode=1 showinvisiblematerials=1 showcm=1 rendermultisamplemode=4 showconsole=1 tessellationquality=2 modeleditorshowphysics=1 autocollect=0 resetviewportspeed=0 steamusername="" steambuildpath="" SuppressUppercaseConversion=0 screenshotfile="C:\Users\Morgan\Documents\Leadwerks\Screenshots\screenshot1.jpg" screenshotresolution=3 screenshotwidth=1024 screenshotheight=768 showbrushwidgets=1 UnlockBetaFeatures=0 anisotropicfilter=2.00000000 trilinearfiltermode=1 screenshottitle="My Game" screenshotdescription="I made this with Leadwerks Game Engine!" videotitle="My Game" importimagepath="C:\Users\Morgan\Documents\" videodescription="I made this with Leadwerks Game Engine!" viewportliveupdate=1 fov=70.0000000 IDEFontName="Consolas" IDEFontSize=10 undolevels=100 gutterbackgroundcolor="0.930000007","0.930000007","0.930000007" gutterforegroundcolor="0.500000000","0.500000000","0.500000000" ShowLineNumbers=1 CodeFolding=1 selectioncolor="1.00000000","0.000000000","0.000000000" selectiontabcolor="1.00000000","1.00000000","1.00000000" drawobjectcolor="1.00000000","1.00000000","0.000000000" boundingboxcolor="1.00000000","1.00000000","1.00000000" entityguidecolor="0.000000000","1.00000000","1.00000000" debugmodewarninggiven=1 codeforegroundcolor="0.000000000","0.000000000","0.000000000" codebackgroundcolor="1.00000000","1.00000000","1.00000000" stringcolor="0.500000000","0.000000000","0.000000000" commentcolor="0.000000000","0.500000000","0.000000000" keywordcolor="0.000000000","0.000000000","1.00000000" macrocolor="0.000000000","0.000000000","1.00000000" majorgridlinescolor="0.400000006","0.400000006","0.400000006" minorgridlinescolor="0.300000012","0.300000012","0.300000012" origincolor="1.00000000","1.00000000","1.00000000" codefoldingcolor="0.500000000","0.500000000","0.500000000" MinModelColor="0.500000000","0.250000000","0.000000000" MaxModelColor="1.00000000","0.750000000","0.000000000" MinBrushColor="0.000000000","0.250000000","0.250000000","0.000000000" splashscreenduration=4 MaxBrushColor="0.000000000","0.750000000","0.750000000","0.000000000" projectspath="C:\Users\Morgan\Documents/Leadwerks/Projects" LastAppliedMaterialPath="materials/developer/greengrid.mat" lastappliedmaterialfileid=0 SelectionIgnoreHierarchy=0 BackgroundColor="0.250000000","0.250000000","0.250000000","1.00000000" SceneBrowserSplitterOrientation=0 SceneBrowserSplitterPosition=400 vsync=1 vpanely=0 CameraLookSpeed=1.00000000 assetbrowserrecursiveview=0 MaterialEditorModel=0 ViewportGridMajorLines=8 CodeCompletion=1 ShowObjectBar=1 InstantCreate=1 GridSnap=1 View0=0 View1=1 View2=3 View3=2 scriptpath="Scripts/" prefabpath="Prefabs/" DrawPhysics=0 DrawNavigation=0 useglobalcoords=0 RecentFiles="C:/Users/Morgan/Documents/Leadwerks/Projects/Carrot/Maps/testing.map","C:/Users/Morgan/Documents/Leadwerks/Projects/carrotsimulator/Maps/lol.map","C:/Users/Morgan/Documents/Leadwerks/Projects/carrotsimulator/Maps/temp.map","C:/Users/Morgan/Desktop/flowgui1.05/FlowGUI/Maps/Inventory.map","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Maps/start.map","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Maps/temp.map","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Maps/begin game.map","C:/Users/Morgan/Documents/Leadwerks/Projects/Carrot/Maps/temp.map","","" RecentScriptFiles="C:/Users/Morgan/Documents/Leadwerks/Projects/Carrot/Scripts/Objects/tdply/3dperson.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/Carrot/Scripts/Objects/Player/FPSPlayer.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/Carrot/scripts/objects/tdply/3dperson.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Scripts/Spawner/SpawnerManger.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/carrotsimulator/Scripts/Functions/ReleaseTableObjects.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/carrotsimulator/Scripts/Objects/Player/FPSPlayer.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/carrotsimulator/Scripts/Objects/Player/3rdperson.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Scripts/Objects/Player/FPSPlayer.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Scripts/Objects/Items/PickupWeapon.lua","C:/Users/Morgan/Documents/Leadwerks/Projects/ProjectZ/Scripts/Objects/Weapons/FPSMeleeWeapon.lua" DrawEntityColor="0.000000000","1.00000000","1.00000000","1.00000000" AutoUpdateProperties=1 invertmousezoom=0 leftpanelstate=0 rightpanelstate=1 centerpanelstate=0 leftpanelposition=280 rightpanelposition=327 centerpanelposition=180 rightpaneldockableelements="" centerpaneldockableelements="" leftpaneldockableelements="" undockeddockableelements="" undockeddockableelementsshape="" RealtimeRender=0 ShowStats=1 MinBlockSize=0.00999999978 DisplayBlockSize=1 EditLockAngle=5.00000000 EditTabSize=8 BrushGuideColor="1.00000000","1.00000000","0.000000000","1.00000000" MainWindowShape="82","1","964","734","1" MainWindowSplitterPosition=330 MainWindowSplitterOrientation=1 ViewportLayout="0","0" MainWindowMode=0 AssetBrowserSplitterPosition=300 AssetBrowserSplitterOrientation=2 AssetBrowserThumbnailSize=6 MaterialEditorSplitterPosition=280 MaterialEditorSplitterOrientation=1 MaterialEditorShape="-1308","97","600","350" ModelEditorSplitterPosition=237 ModelEditorSplitterOrientation=3 ModelEditorShape="-1275","173","742","450" TextureEditorSplitterPosition=280 TextureEditorSplitterOrientation=1 TextureEditorShape="-1366","0","750","450" ShaderEditorSplitterPosition=280 ShaderEditorSplitterOrientation=1 ShaderEditorShape="0","0","0","0" ScriptEditorSplitterPosition=162 ScriptEditorSplitterOrientation=1 ScriptEditorShape="52","-16","1024","768" FontEditorShape="-1366","0","750","450"
  15. I've tried both, and its the same thing, I maximized my screen double clicked and right click/edit and nothing works, and i tried the same when its un-maximized. Still nothing
  16. Dose anyone know how to fix this? It still will not let me edit any model or texture
  17. When Im in the leadwerks gameengine and I want to edit a model and or material, I try and right click on the subject(material/ or model) and click edit, but nothing happens.
  18. Thanks, and sorry for my mistake, I must of overlooked the files and didnt see the MonsterAI.lua
  19. Okay I don't really like asking for help, because I like to solve things on my own to understand it more, to my self I think this is a simple question but I cant seem to wrap my head around it. The question that I need help with is how do I make the AI chase after the player, I've been trying to figure this out by my self but I cant seem to under stand it, and how would I get the position x, y, and z, value of the player. I tried using the entity as player.x ...etc. I also tried self.Player:GetPositon() Script.aipos = "" Script.airot = "" Script.player = "" --entity "Player" Script.playerpos = "" -- vec3 "player cords" function Script:Start() end function Script:UpdateWorld(x, y, z) local playerpos = self.player:GetPosition(x, y, z) ply = self.player:GetPosition() plyv3 = ply:ToString() self.entity:Point(self.player, 2, Time:GetSpeed() * 0.1) self.entity:Move(ply.x, ply.y, ply.z) end function Script:UpdatePhysics() end
  20. Yeah I personaly don't like it, but it stretched the metal texture like that which I'm working on fixing it after school.
  21. I was just getting more experience with blender and decided to make a axe. So I decided to share it, all the textures that I used are free. I had to upload it to drop-box. There is a blender file just in-case you want to edit it, but its already all exported. Your aloud to edit it and use it in any of your projects or games. If you got any questions just ask. The textures I got from here: http://texturemate.com/ Dropbox: https://www.dropbox.com/sh/nvk0u40yft1874v/AADGhfo2LEV61wsc7-V-rg4ua?dl=0
  22. with the tips that macklebee said, I have fixed the problem which was that I didnt export the model as a FBX and the material didnt have any shader on it so I had to assign it to it.
  23. Heres my blender model it wouldn't let me attach a blender file to this forum so I had to upload it to dropbox. https://www.dropbox.com/s/pcbuv2yy7iin8u4/player%20with%20animationwalking.blend?dl=0
  24. so i've been working with blender and trying to make a model with a walking animation. This is what it looks like in blender. Which to me it looks okay, but when I export it with the leadwerks blender add-on it gets all messed up. These are the files types that the export addon create, and I know that I have all the files in the right spot, and installed everything correctly. This is what happens: Also if anyone could help how can i add multiple animations for the character in leadwerks, for example, and sprint animation a attack and standing still animation...etc... The attachment dosnt allow me to upload a blender file so i had to upload it to dropbox https://www.dropbox.com/s/pcbuv2yy7iin8u4/player%20with%20animationwalking.blend?dl=0
  25. What would I do if i want to make the image, and or rectangle interactive with the mouse, like a button?
×
×
  • Create New...