Jump to content

awgsknite

Members
  • Posts

    214
  • Joined

  • Last visited

Everything posted by awgsknite

  1. Thanks aiaf ! I learnt some new things from there ! One of them: global variables are ordinary variables ! After taking those tutorials it says that I'm a Lua expert ! On the tutorials page found here: http://www.leadwerks.com/werkspace/page/tutorials/ but I still can't place decals in my game yet lol so I don't feel like an expert just yet
  2. Does anyone know of a js to lua converter ? I seen some sln projects on github that are too complex for me to use even though they have some instructions. I'm not an expert with lua yet so I'm trying to convert some js to lua scripts by myself with no success.
  3. Thanks Thirsty ! i just sent a PM sent to him
  4. Thanks all ! I ended up using simple triggers 'cos it's much easier for me and as I heard that raycasting is performance heavy anyways. but i guess i'll have to use raycasting for the footprint decals
  5. ok so how do I go about making the code that says if the player steps on terrain ? if TT ? if GetTexture ? or what is that code ?
  6. I'm getting tired of these concrete footsteps sounds when walking on terrain and snow,etc..They all sound the same on all surfaces. It doesn't make the game playable. How does one go about this idea of different footstep sounds ? I did a search here on the forums that didn't give a good answer. I read one post where it said maybe use triggered zones and another post saying use raycasting. What one is best ? Raycasting would just use the picking code in the player.lua and just make an if statement there to see what material it is ? or how ?
  7. i cant post my map cos its the game im working on
  8. i got the red color back thanks ! but this navmesh is not working still
  9. Hey all ! After a long time away from here I've just came back but after i got my update on steam my healthbars and lettering are all black now ! Also i just tried to get my navmesh to work and it dont. I erased the navmesh cos i was making my level bigger but now i cant get a navmesh in it. I followed the steps to go to the build navmesh settings and nothing appears no light blue material showing and no ai is moving. Guess i have to make a new level then and start over ? or is there a way to fix this ?
  10. yeah it seems to be the same bug
  11. I didn't have a choice. Every time I tried to load a prefab and parent it to the player it would load the prefab in different places and not in the center of the screen. It does not seem to have any performance issues yet anyways
  12. Thanks ! nope.. I tried that and it failed. So i did it the easiest way. Maybe you can figure it out ? Oh yeah maybe you can't 'cos you never tried so I'll tell you : I just parent each inventory item infront of the player and show / hide at the precise moments using FlowGUI
  13. +99999 This sounds like a good idea and would speed things up for me anyways instead of making timers for things to happen,etc..
  14. Idunno but you could use nav points to make the chars go up and down with code ?
  15. Here's a 3D inventory test video of it:
  16. I just made this guide on how to take screenshots while testing your game in the Leadwerks editor. Here is the link : http://www.leadwerks.com/werkspace/page/tutorials/_/editor/take-screenshots-while-testing-r122 I could not find this info anywhere so that is why I am posting this so that we can all inspire each other as we create games. Thanks to NightQuest and Genebris who pointed me in the right direction here is how to do it: To take screenshots while your in the Leadwerks editor and testing your game just edit the FPSPlayer.lua script and add this line under your function Script:UpdateWorld() : if window:KeyHit(Key.M) then context:Screenshot() end I used if key M is pressed because in my game I am not using it for anything else. So just put in a key that you will only use for making screenshots. After that just play your test game in the Leadwerks editor and hit the key M or whatever key you put in your script. The screenshot will be saved in your steam screenshots folder so that you can share it on steam ! Here is the screenshot of the code to use: So let's see all your creations ! Inspire everyone !
  17. idunno what to call it yet 'cos I'm still making it. But I do have weapons, it is FPS ,RPG, driving and inventory that is 3D ! 3D spinning inventory objects for inventory ! I'm sick of seeing tiny icons for inventory !! The screeny below is a test cheese inventory item spinning as you hover over the cheese icon in the inventory ! I'm stil prototyping and just getting the main mechanics gameplay setup. I don't even know if it's going to be a sci-fi or medieval game or both or .......we'll have to see as things are coming together nicely so far and all dreams are being recreated as planned !
  18. I just got the C++ standard LE edition and could not install any new subbed items so I unsubbed to 49 and it failed again. So then I unsubbed down to 47 items and now the new subbed item installed finally ! So for me I have to be down to 47 subbed items to download and install a new subbed item.
  19. I got this fixed finally ! I could not do this by programming so now I do it this way. All the codes I tried never worked. I had to manually drag & drop the scene object making it a child of the player. Now it is in the center of the screen where I placed it right in front of my player. I would have wanted to do it by programming but I could not. @shadmar : Thanks ! That there idea you have works but I wanted to have the scene object not actually be a child to begin with on my player. I actually wanted to make the object prefab appear infront of the screen (fps player) and not have it already as a child of the player.
  20. I think they are on the workshop. Just download them from there. Have fun ! And Welcome !
  21. Yeah ! You said it ! Just right click on your scene object and save as prefab and thats it ! Be it a bunch of children (objects that are connected to a main or parent object ) or just one object.
  22. I'm curently making an FPS / RPG game so yes you can make a good looking RPG with this ! I myself do not know if I can make an MMO with LE but i think it is possible because anything is possible to make with LE. I'm usiing FlowGUI that is a cheap 10 dollar addon that makes my menus and inventory system. The inventory system is incuded with FlowGUI and i recommend it if you are making an RPG or any game with inventories or menus. FlowGUI you can get here: http://www.leadwerks.com/werkspace/topic/11262-flowgui-for-leadwerks/ I'm just starting with LE myself and I have already accomplished creating my awesome inventory system with the help of this forum ! As for your other questions I myself do not have enough knowledge to answer them.
  23. if it get's implemented then insert tap dance here
  24. Nice! Thanks ! I'm trying to make one of these 3D dungeon generators as well. I have one in C# but idunno how to convert it to lua. Any ideas on how to convert it ? Maybe someone can convert it and post it in this thread so that everyone can use it ? Here it is: using System; using System.Collections; using System.Collections.Generic; public class MazeGenerator : MonoBehaviour { public int width, height; public Material brick; private int[,] Maze; private List<Vector3> pathMazes = new List<Vector3>(); private Stack<Vector2> _tiletoTry = new Stack<Vector2>(); private List<Vector2> offsets = new List<Vector2> { new Vector2(0, 1), new Vector2(0, -1), new Vector2(1, 0), new Vector2(-1, 0) }; private System.Random rnd = new System.Random(); private int _width, _height; private Vector2 _currentTile; public String MazeString; public Vector2 CurrentTile { get { return _currentTile; } private set { if (value.x < 1 || value.x >= this.width - 1 || value.y < 1 || value.y >= this.height - 1){ throw new ArgumentException("Width and Height must be greater than 2 to make a maze"); } _currentTile = value; } } private static MazeGenerator instance; public static MazeGenerator Instance { get {return instance;} } void Awake() { instance = this;} void Start() { MakeBlocks(); } // end of main program // ============= subroutines ============ void MakeBlocks() { Maze = new int[width, height]; for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { Maze[x, y] = 1; } } CurrentTile = Vector2.one; _tiletoTry.Push(CurrentTile); Maze = CreateMaze(); // generate the maze in Maze Array. GameObject ptype = null; for (int i = 0; i <= Maze.GetUpperBound(0); i++) { for (int j = 0; j <= Maze.GetUpperBound(1); j++) { if (Maze[i, j] == 1) { MazeString=MazeString+"X"; // added to create String ptype = GameObject.CreatePrimitive(PrimitiveType.Cube); ptype.transform.position = new Vector3(i * ptype.transform.localScale.x, 0, j * ptype.transform.localScale.z); if (brick != null) { ptype.renderer.material = brick; } ptype.transform.parent = transform; } else if (Maze[i, j] == 0) { MazeString=MazeString+"0"; // added to create String pathMazes.Add(new Vector3(i, 0, j)); } } MazeString=MazeString+"\n"; // added to create String } print (MazeString); // added to create String } // ======================================= public int[,] CreateMaze() { //local variable to store neighbors to the current square as we work our way through the maze List<Vector2> neighbors; //as long as there are still tiles to try while (_tiletoTry.Count > 0) { //excavate the square we are on Maze[(int)CurrentTile.x, (int)CurrentTile.y] = 0; //get all valid neighbors for the new tile neighbors = GetValidNeighbors(CurrentTile); //if there are any interesting looking neighbors if (neighbors.Count > 0) { //remember this tile, by putting it on the stack _tiletoTry.Push(CurrentTile); //move on to a random of the neighboring tiles CurrentTile = neighbors[rnd.Next(neighbors.Count)]; } else { //if there were no neighbors to try, we are at a dead-end toss this tile out //(thereby returning to a previous tile in the list to check). CurrentTile = _tiletoTry.Pop(); } } print("Maze Generated ..."); return Maze; } // ================================================ // Get all the prospective neighboring tiles "centerTile" The tile to test // All and any valid neighbors</returns> private List<Vector2> GetValidNeighbors(Vector2 centerTile) { List<Vector2> validNeighbors = new List<Vector2>(); //Check all four directions around the tile foreach (var offset in offsets) { //find the neighbor's position Vector2 toCheck = new Vector2(centerTile.x + offset.x, centerTile.y + offset.y); //make sure the tile is not on both an even X-axis and an even Y-axis //to ensure we can get walls around all tunnels if (toCheck.x % 2 == 1 || toCheck.y % 2 == 1) { //if the potential neighbor is unexcavated (==1) //and still has three walls intact (new territory) if (Maze[(int)toCheck.x, (int)toCheck.y] == 1 && HasThreeWallsIntact(toCheck)) { //add the neighbor validNeighbors.Add(toCheck); } } } return validNeighbors; } // ================================================ // Counts the number of intact walls around a tile //"Vector2ToCheck">The coordinates of the tile to check //Whether there are three intact walls (the tile has not been dug into earlier. private bool HasThreeWallsIntact(Vector2 Vector2ToCheck) { int intactWallCounter = 0; //Check all four directions around the tile foreach (var offset in offsets) { //find the neighbor's position Vector2 neighborToCheck = new Vector2(Vector2ToCheck.x + offset.x, Vector2ToCheck.y + offset.y); //make sure it is inside the maze, and it hasn't been dug out yet if (IsInside(neighborToCheck) && Maze[(int)neighborToCheck.x, (int)neighborToCheck.y] == 1) { intactWallCounter++; } } //tell whether three walls are intact return intactWallCounter == 3; } // ================================================ private bool IsInside(Vector2 p) { //return p.x >= 0 p.y >= 0 p.x < width p.y < height; return p.x >= 0 && p.y >= 0 && p.x < width && p.y < height; } }
×
×
  • Create New...