Search the Community
Showing results for tags 'Player'.
-
Hello everyone. I need help with a problem that has arisen when I started using the game engine. When I try to put on the map to see the player as the game is running, it does not appear that the prefab anywhere. I searched all folders and does not appear I even uninstalled and reinstalled the software and nothing. I not find him and I can not use the engine. Please someone who knows how to solve the problem? Thanks.
-
Hi. I want to load the player entity position from an object in the editor. It works very well but; I want to spawn in the center of the scene when there is no object named "info_player_start". When I remove the comment lines, it always spawns at the center of the scene. I don't understand why. Here is my code... #include "Game.h" Game::Game() { loadMap(); loadEntities(); player = new Player(playerStartPosition); } Game::~Game() { delete player; } void Game::loadMap() { std::string mapname = System::GetProperty("map", "Maps/start.map"); if (!Map::Load(mapname)) Debug::Error("Failed to load map \"" + mapname + "\"."); } void Game::loadEntities() { for (const auto e : World::GetCurrent()->entities) { if (e->GetKeyValue("name") == "info_player_start") { playerStartPosition = e->GetPosition(); } /*else { playerStartPosition = Vec3(0.0f, 0.0f, 0.0f); }*/ } } void Game::Update() { player->Update(); }
-
Hi, any idea haw can i change mode Chase player (Monster ai) to run away from player. thank y
-
Would like to begin by thanking Josh for all the support I've seen from him on other topics. I've been looking for a way to walk through the game world I've created but I can't seem to be able to find an FPS player prefab. I would think that something simple would be available in the original content. I've tried using a crawler but adding the FPS player script and setting the mass to 10, physics mode to character controller and collision type to character isn't working. The controls bring up nill errors implying that I'm missing controller commands in my script. However I cant imagine that being the case when I've not edited any script for my game yet. I'm guessing the information attached to the crawler is not compatible with the FPS player script ...how might I go about solving this issue?
-
Hi, I'm new to Leadwerks and I've been looking at some tutorial videos. All of them say to go to prefabs to select and place an FPS player, but the only thing in my prefabs is a folder labeled "Projectiles." Is there any other way to get a player or create a new one?
-
I have a third person character controller, the character has pickmode(0). I can walk around and have obstacles between the player and the cam , but nothing happens? the self.pivot is a pivot which is at the center of the character (the camera focus). updateworld: if self.entity.world:Pick(self.pivot:GetPosition(),self.camera:GetPosition(),pickinfo,0,true) then local model2 = Model:Box() model2:SetPickMode(0) model2:SetPosition(pickinfo.position) model2:SetColor(0,1,0) System:Print(">> PICKED") --self.camera:SetPosition(pickinfo.position) end
- 3 replies
-
- Third Person
- Pick
-
(and 2 more)
Tagged with:
-
https://youtu.be/mcJiROYmByk I made a Video for this, because it is hard to explain. The player is not rotated right with the pivot that is at the same position, the green box ( camera ) is a child of the pivot. function Script:UpdatePhysics() local move = ((window:KeyDown(Key.D) and 1 or 0) - (window:KeyDown(Key.A) and 1 or 0))*4 local strafe = ((window:KeyDown(Key.W)and 1 or 0) - (window:KeyDown(Key.S) and 1 or 0))*4 if window:KeyDown(Key.W)then self.entity:SetInput(self.pivot:GetRotation().y ,0,0) end end
- 2 replies
-
- Player
- ThirdPerson
-
(and 1 more)
Tagged with:
-
I want to make a Game like shown in the screenshot. The Ship that needs to fly around obstacles, part of them rotating, Is controlled by the mouse. How do I start making one like those ? what functions of the ducomentation are useful ?
-
I have been sitting here for hours looking for how people spawn the player, but apparently nobody wants to show that part in the you tube video...
-
Hello I want to make an elevator-like capsule which has the movingplatform script attached. the problem is that it has some physics objects attached that are colliding with the capsule So how do you make a script or adjust things like that in the editor? The Objects that are attached to the moving platform should only collide with the player (or just not with the platform)
-
I'm slowly getting to grips with the game engine and seeing how far I can go with just LUA, so plenty of learning opportunities! I'm looking at how to implement all the functionality I need for an RPG and decided the latest bit was worth sharing. This allows you to control where on the map the player is positioned when the map is loaded. I created TriggerChangeMapPos.lua which accepts a second optional parameter, a target object. If this is not specified then the saved player position is used as previously so this could be used as a drop in replacement for the original TriggerChangeMap.lua I then updated App.lua so that it created an entity list on map load and then searched for the specified entity and copied its location to the players. Pivots are of course excellent for this kind of purpose. The files are TriggerChangeMapPos.lua App.lua