I'm having a really hard time trying to build a portion of a game in unreal. I want a light in the main game to be activated based on where the elevator is. Furthermore, I can't figure out how to turn on and off a light outside the elevator event graph and blueprint from the script that makes it go up and down
The flow is basically this:
When q is pushed on the keyboard then the elevator comes down, BUT before the elevator comes down, I want the light to activate on the floor the person is on, showing that the elevator is coming down.
Then, when the elevator arrives, the light turns off and the elevator doors open.
Cannot control the light to turn on and off because it is not in the elevator blueprint, but theoretically should be able to because a light switch blueprint can control light that is in game but not in blueprint.
Really confused right now why it is not working!
Message #đź“Śgeneral
Add exposed variables of your FloorLight blueprint type to your elevator blueprint for each floor the Elevator could be on.
Add each FloorLight to each level and select it in the proper slot of the elevator BP.
Activate and deactivate the light BP from the elevator BP at the correct times.
Related
I am using Unreal Engine and I created an AI player to follow third person character. This worked fine in the default Third Person Example Map, but when i created a new level, the AI failed to move.
I made 2 pawn sensing components, 1 for Chase and 1 for attack. The attack pawn sensing is working fine in the new level but it is not chasing the player.
The AI was supposed to follow the player but just punched when i came in the punch pawn sensing region.
AI BluePrint :
When you create a new level make sure that you have a NavMesh inside.
To quickly verify that press P.
If there is a NavMesh in that level it will turn green.
The default Third Person Example Map has already a NavMesh by default.
Make sure to add “nav mesh bounce volume” to your new level.
For my game, the player character requires to climb up and down ladders those are placed in the gameplay area.
At present, I can able to climb up for my player character to climb down at present I don't have anyway. Because platform box collider applied with platform effector, so for the climb up, effector does not create any problem but now after reaching the top, it becomes solid platform so now I can't able to move downside.
For climbing up, I have followed this tutorial: How To Make 2D Ladders In Unity - Easy Tutorial
I am looking to implement some physics so I can reach downside to the ladder after reaching top.
You need 2 boolean variables isClimbingUp and isClimbingDown which depend on pressed key and a second ray, which will check -Vector2.up direction. Then just add one more 'else if' statement for down direction.
Yes, I have managed to solve this, and the game is published in the stores.
You can check using the below link:
Humpty Trumpty's Border Wall
This is my overall physics setup for the stair:
I have applied a trigger collider to my stair object and disable player gravity scale when the player within the stair.
Then after within the trigger enter and exist, I have done this:
Physics2D.IgnoreCollision(m_CapsuleCollider, myStair.platformCollider, false);
Disable collision between player and platform colliders when the player is within the stair.
I don't think, Platform Effect 2D becomes useful to me in this process but I didn't remove this to remain in the safer side.
So you have to keep a reference of the platform object which is attached to Stair.
I hope you will get a general idea to solve this problem.
my game is a click to move game.In an area, I've got a navmesh walkable and under it there is another walkable part of navmesh.
My problem is that usually after I attack an enemy, sometime but not always, when I click to move my player falls on the navmesh below. I ve got the same problem on the enemies, who simply are programmed to follow the player and attack while in range, who sometime fall.
Nobody has rigidbodies attached.
Any idea of the problem? Feel free to ask ask more details.
Thanks.
Check if your navmesh is set to automatically create off mesh links: open Navigation window, click Object tab, select your terrain/ground object, make sure Generate OffMeshLinks is unchecked. If that fixes the problem, and you want auto generated off mesh links, you can try adjusting the Drop Height and Jump Distance under the Navigation->Bake tab. You can also try toggling Auto Traverse Off Mesh Links on the NavMeshAgent component.
When I start the simulation, I want to be able walk on my scene like in the real game, but the player is flying. He is not walking through the walls, but he is flying and not walking. How can I solve it?
When you use "Simulate In Editor" (by pressing Alt+S or pressing the play symbol with a cog next to it) the engine generates a default Pawn and PlayerController which move about in the way you described (i.e. flying with collision).
If you want to use the normal player controller and pawn (i.e. how the player would move about in the level), you just need to use "Play in Editor" (by pressing the Play symbol without the cog).
You can read about different ways of testing your game in the editor here.
Ok, so I'm trying to implement networking for a school project. (Part of my team's final project)
It's supposed to operate on a turn-based system. IE, when a player is done, they hit "next turn" and they lose control, while the other player gains control.
So, to test my networking and get the basics going, I've made a little program that spawns a cube whenever a server is joined or created (so one cube for each player), and each player is able to move only their own cube.
So far, I can have the cubes moving around and their transforms are perfectly synced up on both instances of the game simultaneously, and each player can only control their own cube.
However, when I click "Next turn", the turn only changes on ONE of the instances.
According to this, it SHOULD be watching the turn change:
And this is my turncontrol code (It's a little sloppy for now until I find a hardcore way to set the code's player number depending on whether they're the host or client)
How the heck do I make sure that when I click "Next Turn", the turn changes in both instances, and how do I make sure that the cube's player number is dependent on whether they're the host or client?
That and I have the very strong suspicion that the assignment of a player's "player number" (IE, whether they're player 1 or 2) is being assigned locally (Not reflected across instances) as well, since each player can only move when the turn is set to 1 (Meaning that when both players spawn, they're both set to be player 1. :s)
Any assistance would be appreciated. Networking is completely new to me and I'm wigging out trying to wrap my head around it.