DYOM » Text Tutorials » How to hide an OBJECTIVE - CAR (not normally possible)

How to hide an OBJECTIVE - CAR (not normally possible)

By tom_606

Hello,
Today I'll show you something I found out while creating my newest dyom series called Natalie's love story (click on my name and then missions to find out more about it once it's out).
So, basically, let's just say you are creating a taxi mission. So you, obviously, start with defining the player and adding an objective - a taxi car.
Now, you add a checkpoint to a certain place with an actor calling for a taxi.
Once you arrive to the objective, you might want to use a cutscene, where an actor enters the taxi. But if you give him a Enter Nearest Car animation, he just stands there doing nothing even if the behavior is set to normal. Why is that? Because the car he is supposed to enter is too far! The player can enter an objective in any way, direction or even distance, if the player touches the checkpoint while driving full speed, it will take a while until the player finally stops.

How to fix that?

Well, in what I wrote above, you can just very simply make the actor a friend with a follow player behavior. But what if you want to make the same cutscene, where the actor LEAVES the vehicle? Well that's a different story!

First of all, decide if you really want to use the car as an objective or as just a normal car. You can make it much easier for yourself if you just make a cutscene - teleport the player near a normal car you added - player animation - sit in nearest car - make sure the normal car you added is LOCKED (so the player cannot leave, the sit in nearest car teleports you inside - but - you can get ejected by an enemy and you won't be able to go back in!) and has MUST SURVIVE. Optionally to make it undestroyable, because it would magically ,,repair" itself, since you must hide the car and add another to make sure the player is exactly at the checkpoint.

NOTE: MAKE SURE THAT THE CAR YOU ARE HIDING IS EMPTY, INCLUDING THE PLAYER! Whoever is in the car that is hidden sooner than them, will die. If they have must survive on - mission failed. So make sure you hide actors before you hide the vehicle (can be at the same time), and, most importantly, TELEPORT THE PLAYER AWAY from the vehicle if he can be inside of it BEFORE it gets hidden.

Now I told you the easy way, but what if you already made a mission with the car as an objective and you for whatever reason don't want to change it for a normal car? Well, that's when things get weirdly complicated, BUT, IT DOES WORK!

Let's imagine the taxi scenario again. Taxi(player) already picked up a passenger and is reaching the checkpoint, where the passenger should be dropped off. The player might be at a very fast speed or facing a different direction etc, and would pass the checkpoint, but stops far from the position you want the player to be.

You can add an object barrier, making a solid parking slot with no way of passing the checkpoint other than going exactly through – but that would look ugly af.

Another easier way of fixing this problem is to just use a player animation - sit in nearest car - and set a route point to the exact spot you want the player to be (if just one routepoint - you can apply it as a loop - that makes sure that even if the player gets moved by another vehicle, player always goes back to the position you set up)

If you for whatever reason NEED to HIDE the vehicle - (it also makes sure that the new vehicle is repaired), that is where things get weirdly complicated.

How do you hide an objective - car?

Well, we won't exactly ,,hide" it, but we will destroy it, leaving no trace behind.

(bUt T0m, u C4n't d3sTroY An oBj3cTiv3 c4r)

Normally, you can't. The objective car stays an objective, so you must pass following checkpoints just with that car and you must not destroy it.... UNTILL... there is a cutscene or another special objective such as a teleport (Didn't try timeout, countdown etc, I believe a timeout could work too).
So, before you want to ,,hide" the objective car, make sure to TELEPORT the player AWAY from the car that you want to hide, because, it would simply not be hidden, but moved - I'll explain shortly.

Now, the taxi reaches the final checkpoint, wanting to drop the last passenger off. To make sure the objective car is in the exact spot it's supposed to be without using a player animation - we must teleport the player away. (Now when I'm thinking about it, it's MUCH easier to just not teleport the player and use a player animation - sit in nearest car - drive the car away. If a cutscene happened before this, you won't have to worry about it getting destroyed on the way - apart from possibly killing the player)
Now when the player is not in the objective car, teleported away, we add a big object (recommend to use an object from 6 - 18 - matters on how big the space where the player can end up is - usually the bigger the better, but make sure it's not seen by the player in the cutscenes - and make the object move along PATH - MOVE FAST - set a routepoint the way so it touches the EMPTY objective car NOT from bellow/above like an elevator, but like an upcoming vehicle on the road - STRAIGHT. Whenever the object touches the EMPTY objective car, the car gets destroyed, leaving no trace behind - it gets hidden. If a cutscene/teleport did not happen before this object touching the car, it would just get moved. If the player choosed to skip the cutscene, it might not reach the car in time and won't hide the car.
So, the best way would be to make a player animation - sit in nearest car - drive just a little away so that cutscenes don't see it happen, but it's not too far to not be loaded - and there do the thing with the moving object. (Make sure to time it properly - the car must be empty before it gets destroyed, or it just gets moved - teleport the player away after arrival)

This way you make 100% sure that whatever car the player used (the player can switch vehicles and even destroy the objective car if there was a cutscene/teleport/other special objective after the objective car) will definitely never see the light of the world again.

IF the car just got moved, not destroyed - SOMEONE is INSIDE of the car! Make sure they go away before you do the object thing :))))

IF the car did not get moved, neither destroyed - make sure the moving object touches the car in a straight line, try a different and bigger object, add better routepoints which go through all possible objective car locations and make it move fast in a loop - give it enough time by cutscenes which are close to this situation happening, but not visible (you can make it visible for testing purposes).

Q:H3lp, mY Mi$$l0n G3t$ f4il3D 4ii 0F tH3 SudD3n!
A: Make sure you teleported the player away from the car before you choosed to destroy it, optionally added a cutscene at the time the car is being destroyed to make sure that the player does not interfere, and most importantly - make sure the car is empty while it's being destroyed.

NOTE: Cars that are spawned (non-objectives, empty) can be in the middle of the destroying process, as it does not matter if they get touched by the deadly force of a moving object - the non-objective car simply does not give a f$ßk and carries on with existence until it was at least once driven, but the car might be able to touch the objective car, perhaps blocking it's way to the destroying process.

Another way of doing this would be elevating the objective car in the air by a big normal moving object, but that would not hide the car, but only making it out of the player's eyes reach - it could fail and fall onto the ground shortly after, possibly failing the mission if no cutscene/teleport was made before this elevation process - either way, a falling car would be pretty weird, wouldn't it? Also, the object would have to stay there for the rest of the mission, so if you are planning to make a bigger mission - this could cause crashes, because the object must not be hidden for the rest of the mission - which is NOT the case of the non-elevating method described above.

Alright, I'm pretty sure I wrote all the important stuff about the topic. Please be sure to rate and write a comment to let me know this has helped you! :)

Good luck on your missions.
Your fellow mission creator,
tom_606

Statistics

Startdate
Dec 08 '20
Last Update
Dec 08 '20
Views
61

Rating(0):

Not rated yet.
Log in add your rate