Тёмный

BP Time Attack Racer: Lap Display & Respawn Handling | 07 | v4.8 Tutorial Series | Unreal Engine 

Unreal Engine
Подписаться 1,2 млн
Просмотров 20 тыс.
50% 1

Here we set up the functionality for keeping track of laps and test that through debug code. We also take a look at how to determine if the player has flipped their vehicle over and how to respawn the player from the previously completed checkpoint.
(00:05) - Intro
(02:10) - Update Lap Script
(07:21) - Lap Text Display Setup
(10:52) - Respawn Check Setup
(16:32) - Player Controller Script
(18:42) - Respawn Vehicle Setup
(24:05) - Testing

Игры

Опубликовано:

 

30 июл 2015

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 61   
@Grenbork
@Grenbork 8 лет назад
"this video is maybe a little bit shorter" - proceed for 25min
@gregjenkins7979
@gregjenkins7979 6 лет назад
So I see a lot of comments where they are having trouble with the warning message, the solution is a quick fix. 1. Go to the "VehicleBlueprint" and go to the area @21:10 2. Cut the connection to "DestroyActor" 3. Right-click and look up a node called "SetActor Transform" 4. Connect this node to the True indicator from the Branch node. 5. Make sure the TELEPORT is CHECKED 6. GET 'ControllerReference' (the variable we have been using in this area) 7. GET 'RespawnLocation' from the 'ControllerReference' and then connect this to the "New Transform" part of the new node. So the "Event Destroyed" is no longer used, for the tutorial it's probably not a bad idea to keep it there, but know that it is never called because in point 2 we cut the connection. Unfortunately this means the "RespawnVehicle" Event is also going to need to be changed, so when the game restarts. To do this, just switch out "SpawnActor Vehicle Blueprint" with "SetActor Transform", reference the Vehicle and it should be clear from there. Hope this helps and clears some things up for everyone.
@MANISHSINGH-mb5nv
@MANISHSINGH-mb5nv 6 лет назад
no response after applying this... vehicle remains still on crashed site. help me over this
@jasaacadillac
@jasaacadillac 5 лет назад
Omg thank you so much for this! This is going to make my life so much easier down the road!
@lokeshch8104
@lokeshch8104 4 года назад
That does makes sense ,instead of respawning the actor we could just set the world rotation to (0,0,0) for the object.
@MBAalrightgames
@MBAalrightgames Год назад
Works great, I also suggest setting physics velocity to zero if you are using impulse for movement, otherwise you slide as soon as you teleport.
@thalessabino166
@thalessabino166 8 лет назад
At 20min (more or less), you make some modifications in the VehicleBlueprint to check if the car is flipped. I was wondering, if, for the sake of modularity, it wouldn't be better to check this in the player controller itself by getting a reference to the vehicle. In this way the vehicle doesn't need to care about who is controlling it.
@emmicd11
@emmicd11 7 лет назад
no because you would be accessing the vehicle's transform and doing branches from outside the vehicle for something that is related directly to the vehicle. For example, say I created a truck blueprint that inherits from vehicle blueprint and I change the respawn code to do something else, if my code is inside of the truck's blueprint I don't need to change the player controller blueprint, I can leave it as is. If my code was inside of the player controller blueprint, I would have to check which vehicle class I am using and divide the respawn code into separate parts right in the event graph of the player controller which would make a big mess that could become hard to manage since every vehicle blueprint's respawn code is in the same place.
@iridas2126
@iridas2126 3 года назад
Yes! This is just what I need!)) Thanks)
@emmicd11
@emmicd11 7 лет назад
For the respawn check I create a integer
@Jona69
@Jona69 7 лет назад
If you flip your car before you hit the first checkpoint and you end up under the ground, just move you car blueprint a bit above the ground and it should work.
@thalessabino166
@thalessabino166 8 лет назад
Just as a complement, at 3.14 the Actual Lap variable needs to be incremented. There's a special node for increment purposes that I found call IncrementInt. When the increment is always one I'd rather use this node. Its kinda a programmer thing I guess.
@emmicd11
@emmicd11 7 лет назад
yeah you are right :D
@geponen
@geponen 6 лет назад
when my car respawns, camera goes under the ground. Whats wrong? Still getting that "Please use teleport flag" error with 4.16
@Galaxia_K8
@Galaxia_K8 5 лет назад
The car is invisible and won't moving after respawning. What I did instead was SetActorTransform to teleport my vehicle back to the recent checkpoint…
@master_shake
@master_shake 6 лет назад
Can't get it to work, it just respawns underground and won't move or anything
@giorgiomapelli8515
@giorgiomapelli8515 6 лет назад
I was getting some errors with a different Vehicle and VehicleBlueprint saying "Warning Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag" with the SpawnActor VehicleBlueprint function, so I used SetActorTransform to Teleport the Vehicle, worked like a charm. Hope it helps somebody.
@Linael
@Linael 6 лет назад
thank! you helped.
@salikrehman3468
@salikrehman3468 6 лет назад
where i have to put SetActorTransform function??
@Evigmae
@Evigmae 8 лет назад
I was having trouble with the respawn thing. Apparently my car was being spawned too close to the ground or something. I added 50 units to the Z of the transform location and bam, not it works as intended.
@kellynb.477
@kellynb.477 8 лет назад
+Francisco Sciaraffia thanks dude I had the same error come up. When the car drops in onto the ground it reads the respawn better. Your hack saved the day.
@hanson251985
@hanson251985 4 года назад
So after respawn my car has different color and it's squished :( help how to prvent this after destroy :(
@xMcWeenx
@xMcWeenx 3 года назад
Please help. I am not getting my checkpoints to respawn for a second lap. I have tried inserting a Hello string check into the LapCheck function and it does not show.
@FB-eq9vl
@FB-eq9vl 2 года назад
Same here mate. Any luck?
@xMcWeenx
@xMcWeenx 2 года назад
@@FB-eq9vl Sorry, it has been so long I don't remember the exact answer but I believe for me it was an engine version difference that caused the issue.
@FB-eq9vl
@FB-eq9vl 2 года назад
@@xMcWeenx no dramas at all... I got it working just fine. And to be fair with the tutorial, it works fine even in the latest version of UE! It's a great tutorial even today. Cheers!
@SoloWing88
@SoloWing88 2 года назад
@@FB-eq9vl and it being?
@FB-eq9vl
@FB-eq9vl 2 года назад
@@SoloWing88 Uh Mate, now it's me on xMcWeenx position: "Long time ago!". All I've done was recheck previous steps and I've found something that I hadn't done right (a little node in the wrong place). Sorry.
@HandiApp
@HandiApp 4 года назад
im having a problem where sometimes ill spawn in and sometimes i wont and if i do spawn in, sometimes the vehicle will scale itself very large. any ideas?
@SVADesign
@SVADesign 2 года назад
hey, i dont know if you still have this issue but i had the same problem. I fixed it by setting the scale to my checkpoints in the level to 1.1.1. and changing only the scale of the box collision in the checkpoint blueprint. the car appears to take on the scale of the level checkpoint.
@TheStoicRecovery
@TheStoicRecovery 6 лет назад
i completed tis video and my game worked fine, however when i completed video 8 it appears my player is respawning upside down after it flips... not sure what wouldve gone wrong in the process? sos
@DigitalLoom
@DigitalLoom 4 года назад
isd there any way you could share a project with this set up preoperly i cant figure it out!
@punpompur
@punpompur 8 лет назад
issues i faced while doing this: 1. the lap number doesn't show up at the top left corner 2. when i flip my vehicle, it still moves a little bit(yes, even when it is flipped). maybe that's why my vehicle doesn't respawn. i m currently using unreal engine 4.10.4
@punpompur
@punpompur 8 лет назад
ALvl7Magikarp i will check. thanks
@emmicd11
@emmicd11 7 лет назад
i recommend for the respawn check to get the vehicle's rotator and check if the roll is
@justboy5182
@justboy5182 5 лет назад
I also get respawned when I dont drive (when I dont press a key) Version 4.15
@justboy5182
@justboy5182 5 лет назад
I fixed it, I dont saw the . infront of the 5 :)
@user-oh5jj1iz5e
@user-oh5jj1iz5e 3 года назад
12:38 Check box - Stuck? / Stuck 체크박스에 체크를 하세요. 쉽게 지나칠 수 있음
@binarybench8653
@binarybench8653 8 лет назад
I'm having an odd bug where in the sometimes when it tries to respawn the car disappears but then nothing happens and it freezes. And it throws this error: Accessed None trying to read property Controller Reference from function 'ExecutUbergraph_VehicleBlueprint' from node: Respawn Vehicle in graph: EventGraph in object: VehicleBlueprint with description: Accessed None trying to read property Controller Reference
@ngyanjie6644
@ngyanjie6644 8 лет назад
Hi! Did you manage to solve this problem?
@binarybench8653
@binarybench8653 8 лет назад
Unfortunately no, but I believe it to be a bug with the engine: forums.unrealengine.com/showthread.php?48843-Horrible-Car-Physics
@emmicd11
@emmicd11 7 лет назад
Ok I believe when your vehicle actor is destroyed and you create a new one it is getting an error trying to retrieve the respawn transform because the reference to player controller is by default none.
@ngyanjie6644
@ngyanjie6644 7 лет назад
I already solve the problem. I remove everything and retry again then it work. I believe something must have changed when I was playing around with it.
@tikanon5497
@tikanon5497 7 лет назад
mine isn't working,,, when it fliped it wasn't coming back the startup position,,help me anyone,,, i'm using 4.12
@emmicd11
@emmicd11 7 лет назад
make sure your respawn check function is being called in the vehicle blueprint, also make sure that it returns true by printing a string to log to check if the conditions for being stuck are actually outputting true or not. Also make sure that your respawn location is set to something and also set the teleport boolean flag in the set transform node to true.
@Stealth3k
@Stealth3k 8 лет назад
Im having a small issue - the car respawns, how ever somehow.. when it respawns its scale has been increased.. any ideas?
@emmicd11
@emmicd11 7 лет назад
did you use actor transform? if not try using vector wordllocation it might work better for you
@lFataI1ty
@lFataI1ty 7 лет назад
I have the same problem followed the tutorial it works only / spawns my car with normal size if I flip without collecting any checkpoints but as I collect checkpoint it spawns my car resized. It always shows PIE:Warning: Warning Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag ...even at the beginning without collecting checkpoint. I have no idea why is that x_X
@noordatoo1305
@noordatoo1305 2 года назад
@@lFataI1ty bit late but, just add a "set actor scale 3d" right at the end of the code, to set your vehicle scale to what you want (or its original scale) when it respawns
@Grandpa_James
@Grandpa_James 2 года назад
does this still work i need help please
@emmanuelwoo6355
@emmanuelwoo6355 8 лет назад
i have a problem with the respawn one when i attach the line of codes to the Event Tick my car is being destroyed after 4 seconds even if the car is not flipped.... but if i de attach it everything is fine it seems the game is detecting that my car is flipped even if it is not, i checked the stuck? and PlayerIsStuck booleans and both are default to false... so i am wondering what is doing that....
@emmanuelwoo6355
@emmanuelwoo6355 8 лет назад
got it, it seems i attached the AND in the RespawnCheck function into the wrong condition... duh....
@saicharan1850
@saicharan1850 3 года назад
Lol thank you this helped me
@clivejimenez7596
@clivejimenez7596 7 лет назад
It all seems to be working, but I get a warning "Warning Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag"
@giorgiomapelli8515
@giorgiomapelli8515 6 лет назад
I used SetActorTransform to Teleport the Vehicle, I just posted a comment above here
@DigitalLoom
@DigitalLoom 4 года назад
is there anyway you guys could email me a copy of this set up properly im pulling my hair out with things not matching up
@elijahjohnson8522
@elijahjohnson8522 6 лет назад
lap text not showing up ? i need help please
@Josue-px1in
@Josue-px1in 6 лет назад
same
@master_shake
@master_shake 6 лет назад
check if you set the checkpoints on the tracker details
@jackdiller9087
@jackdiller9087 7 лет назад
This tutorial is super old I know, and I'm only messing around with Unreal for fun and for more of a "artsy fartsy" reason than technical skill development, but, I followed what you did exactly (so I think) and when the car respawns it is flat, and doesn't move. I get the error in the Message Log: "Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag" I am using Version 4.13 If anyone can help I'd greatly appreciate it. Gonna try figuring it out myself now, though. :)
@emmicd11
@emmicd11 7 лет назад
you cant set the transform or location of a mesh directly that is already spawned in a map, you have to set the teleport boolean flag to true then it will work, because essentially what the respawn code does is to "teleport" your vehicle to a completely different location.
Далее
I Built a SECRET Soccer Field in My Room!
24:15
Просмотров 7 млн
Фэйворит жвачка А? (2024)
01:00
Просмотров 206 тыс.
ШАР СКВОЗЬ БУТЫЛКУ (СКЕРЕТ)
00:46
Making another pickproof lock (but better)
15:14
Просмотров 2,8 млн
What is the Smallest Possible .EXE?
17:57
Просмотров 119 тыс.
The REAL Reason Unreal Engine VFX Looks FAKE
6:58
Просмотров 309 тыс.
2B2T - РЕДЧАЙШИЙ ПРЕДМЕТ?
10:54
Просмотров 153 тыс.
skibidi toilet multiverse 039 (part 1)
5:29
Просмотров 6 млн
2B2T - РЕДЧАЙШИЙ ПРЕДМЕТ?
10:54
Просмотров 153 тыс.