当前位置:网站首页>[ue5] blueprint making simple mine tutorial
[ue5] blueprint making simple mine tutorial
2022-07-02 10:00:00 【Qiao'an fish】
This is a small effect that I researched myself , But it can't cope with complex situations .
The effect of Mines —— The player presses the key to place a mine ,AI Explosion after encountering .
Split the whole process :
1. The player presses the key to place the mine model .
2.AI After encountering mines ,AI disappear .
3. Mines play explosion effects , Disappearance of Mines .
One 、 Press the key to place mines
1. Make mine blueprints
Create a Actor The blueprint , Add any MESH Components as models .
Add trigger , You can choose any shape .
( When touching this trigger , Play the landmine incident )
The size of the trigger is larger than the model , Otherwise, when the model collides ,AI Unable to trigger .
2. Press the key to place mines
Open the player character blueprint , Right click input E, stay “ Keyboard events ” Add “E” event .
Press E Key will trigger this event .
Drag and drop E The event Pressed Pin , establish “ Generate Actor” function .


It's generating Actor Of class Choose the mine blueprint we created 
The name of the function will show the class we selected .
Next, we need to give the location of this function , It can be generated at the current player position .
Create get Actor The position function , And generate Actor Of Spawn Transform Pin to pin , A vector transformation will automatically appear in the middle .
After placement , You will find the camera bounced off , I can't see the players .
This is because mines collide , Play the character away .
Select from the mine blueprint mesh Components , In the details panel, change the collision preset to NoCollision, The collision of mines is closed .
Play again , This time the mine didn't bounce the player away .
Two 、AI Hit a mine explosion
1. establish AI Communicate with mines
We can use AI The trigger of the mine overlaps with the trigger of the mine to create an explosion event , however AI Will be deleted after triggering , In order to ensure that both disappear at the same time , Still need to be in AI Establish blueprint communication with mines , To inform the mine explosion .
Right click > The blueprint > Blueprint interface , Establish blueprint communication .
The name IF_ The explosion .
Open blueprint communication , Modify the function name as explosion.
such , Blueprint communication is established .
2.AI The explosion
open AI Character blueprint , Select capsule components , Add the event when components begin to overlap in the details panel .
Execute pins when dragging components to start overlapping , Create what we just set Explosion function ,other actor Connect with the goal .
In this way, the mine is notified to start the explosion .
Similar to the method of generating mines , stay AI The current position generates an explosion effect ,Class Choose your own explosion Blueprint is enough .
And then to delete AI Model , establish Delete Actor function .
AI The explosion effect of is finished :
3、 ... and 、 Mine explosion
Just make the mine model disappear .
Open mine blueprint , We are going to call the explosion . Input explosion, Note that we have to choose events Explosion.
Destroy directly Actor That's it .


The effect is achieved !
I said before. , This is just a simple effect , If there are multiple colliders , Will trigger an explosion .
So you also need to filter triggers .
边栏推荐
猜你喜欢

Alibaba cloud SMS service

2837xd 代碼生成——補充(1)

Attack and defense world web advanced area unserialize3

2837xd code generation - stateflow (3)

Junit5 支持suite的方法

Idempotent design of Internet API interface

2837xd code generation - Supplement (3)

Junit5 supports suite methods

个人经历&&博客现状

Error reporting on the first day of work (incomplete awvs unloading)
随机推荐
kinect dk 获取CV::Mat格式的彩色RGB图像(openpose中使用)
cmake的命令-官方文档
2837xd 代码生成——补充(1)
阿里云SLS日志服务
并网逆变器PI控制(并网模式)
【UE5】蓝图制作简单地雷教程
阿里云短信服务
C语言之做木桶
TD联合Modelsim进行功能仿真
Alibaba cloud SMS service
Bugkuctf-web24 (problem solving ideas and steps)
QT信号槽总结-connect函数错误用法
在SQL注入中,为什么union联合查询,id必须等于0
C语言之数据插入
This monitoring system makes workers tremble: turnover intention and fishing can be monitored. After the dispute, the product page has 404
Mysql索引
2837xd code generation - Supplement (2)
图像识别-数据标注
Introduction and prevention of penetration test
逆变器simulink模型——处理器在环测试(PIL)