Questions I Have

  1. How do I make my enemy walk in pattern like go down and then turn right. How do I do this?
  2. How I make my enemy make chase when they see the character but only when they are facing you which means you can go behind but not front of him or side.

um pretty much thats it i think

2 Likes

Yo there are some details you ought to specify

1 Like

?What do you mean by that @John_Shrekinson

2 Likes

You’re missing some details

1 Like

I see ok Heres a bit more imformation

2 Likes

Capture
So the guard is the guy next to the opening to a room, those arrows that go left and right where the guard is suppose to walk only. if you go in front of him he would see you and start a chase after you or shoot you. So techinally have I have to use raycast for a eye-sight but the problem is how do I make him walk back and forth. @John_Shrekinson

2 Likes

For the first question use a timer going into a router/toggle switch, then have the different outputs move the enemy into different directions.

For the second question use Ray Casts in the direction your enemy is facing. If it hits the player then follow the player

2 Likes

I did this and um he didnt move

2 Likes

Number and velocity + what he said

2 Likes

Then it was done incorrectly (no offense). Show a screenshot of the code

2 Likes

Ok I will show you the code

3 Likes

Here you go my first code in flowlab! YAY…


@CodeAlpaca

2 Likes

You need an input into the “In” input on the Toggle Switch. You can have the timer go into that input

3 Likes

i see thank you @CodeAlpaca

3 Likes

@CodeAlpaca
I need something else too. So how do i make the enemy turn smoothly and can i also use the router? And there is another problem the enemy keeps going left only and only left! help?

3 Likes

Rotate Towards Example

4 Likes

for your second question, most stealth games guards have 3 distinct phases:

  • Patrol Phase

  • Alert Stage

  • Search Stage

the guard is normally in Patrol phase, where they walk along a set path, but if the player is spotted, they enter Alert phase and chase the player, which could be accomplished with a raycast that is always aimed in front of the guard to make a viewcone, if nothing is obstructing the path of the ray between the guard and player, they have been spotted.

if the player manages to escape and hide from the Alert phase guard, they will enter the Search phase, where they look around the area they last saw the player. If spotted, they will enter Alert phase again, otherwise they will return to Patrol phase after a while. this could be achieved by using the raycasts mentioned above, and a timer for the guard to re-enter Patrol phase

5 Likes

Metal Gear Solid

Tactical Espionage Action
3 Likes

YES This is what I am talking about sorry for my explaining I really dont know how to explain things

2 Likes