Events

Unreal Engine 4: Intro to Game Design Blueprint Scripting Fundamentals - (FOR BEGINNERS!!!)
6 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€93.07
List Price:  €130.30
You save:  €37.23
£79.62
List Price:  £111.47
You save:  £31.85
CA$136.60
List Price:  CA$191.24
You save:  CA$54.64
A$151.87
List Price:  A$212.63
You save:  A$60.75
S$135.20
List Price:  S$189.29
You save:  S$54.08
HK$781.33
List Price:  HK$1,093.90
You save:  HK$312.56
CHF 90.72
List Price:  CHF 127.01
You save:  CHF 36.29
NOK kr1,092.46
List Price:  NOK kr1,529.50
You save:  NOK kr437.03
DKK kr694.20
List Price:  DKK kr971.90
You save:  DKK kr277.70
NZ$167.15
List Price:  NZ$234.02
You save:  NZ$66.86
د.إ367.25
List Price:  د.إ514.16
You save:  د.إ146.91
৳10,946.16
List Price:  ৳15,325.07
You save:  ৳4,378.90
₹8,342.71
List Price:  ₹11,680.13
You save:  ₹3,337.42
RM473.95
List Price:  RM663.55
You save:  RM189.60
₦123,487.65
List Price:  ₦172,887.65
You save:  ₦49,400
₨27,847.21
List Price:  ₨38,987.21
You save:  ₨11,140
฿3,679.53
List Price:  ฿5,151.49
You save:  ฿1,471.96
₺3,232.18
List Price:  ₺4,525.18
You save:  ₺1,293
B$511.10
List Price:  B$715.57
You save:  B$204.46
R1,851.52
List Price:  R2,592.21
You save:  R740.68
Лв181.98
List Price:  Лв254.78
You save:  Лв72.80
₩135,881.87
List Price:  ₩190,240.05
You save:  ₩54,358.18
₪371.60
List Price:  ₪520.25
You save:  ₪148.65
₱5,713.97
List Price:  ₱7,999.79
You save:  ₱2,285.82
¥15,308.41
List Price:  ¥21,432.39
You save:  ¥6,123.98
MX$1,693.57
List Price:  MX$2,371.07
You save:  MX$677.49
QR364.01
List Price:  QR509.63
You save:  QR145.62
P1,365.33
List Price:  P1,911.52
You save:  P546.18
KSh13,468.65
List Price:  KSh18,856.65
You save:  KSh5,388
E£4,794.02
List Price:  E£6,711.82
You save:  E£1,917.80
ብር5,699.43
List Price:  ብር7,979.43
You save:  ብር2,280
Kz83,741.62
List Price:  Kz117,241.62
You save:  Kz33,500
CLP$94,755.52
List Price:  CLP$132,661.52
You save:  CLP$37,906
CN¥723.62
List Price:  CN¥1,013.10
You save:  CN¥289.48
RD$5,785.38
List Price:  RD$8,099.76
You save:  RD$2,314.38
DA13,457.99
List Price:  DA18,841.73
You save:  DA5,383.73
FJ$225.30
List Price:  FJ$315.43
You save:  FJ$90.13
Q775.21
List Price:  Q1,085.33
You save:  Q310.11
GY$20,876.73
List Price:  GY$29,228.26
You save:  GY$8,351.52
ISK kr13,989.60
List Price:  ISK kr19,586
You save:  ISK kr5,596.40
DH1,008.69
List Price:  DH1,412.20
You save:  DH403.51
L1,771.31
List Price:  L2,479.90
You save:  L708.59
ден5,730.13
List Price:  ден8,022.42
You save:  ден2,292.28
MOP$803.11
List Price:  MOP$1,124.38
You save:  MOP$321.27
N$1,860.85
List Price:  N$2,605.27
You save:  N$744.41
C$3,673.63
List Price:  C$5,143.23
You save:  C$1,469.60
रु13,311.40
List Price:  रु18,636.50
You save:  रु5,325.09
S/375.46
List Price:  S/525.66
You save:  S/150.20
K383.63
List Price:  K537.10
You save:  K153.47
SAR375.03
List Price:  SAR525.05
You save:  SAR150.02
ZK2,685.42
List Price:  ZK3,759.69
You save:  ZK1,074.27
L463.14
List Price:  L648.42
You save:  L185.27
Kč2,328.17
List Price:  Kč3,259.54
You save:  Kč931.36
Ft36,248.95
List Price:  Ft50,749.98
You save:  Ft14,501.03
SEK kr1,083.98
List Price:  SEK kr1,517.62
You save:  SEK kr433.63
ARS$87,816.53
List Price:  ARS$122,946.66
You save:  ARS$35,130.12
Bs689.12
List Price:  Bs964.79
You save:  Bs275.67
COP$389,940.87
List Price:  COP$545,932.82
You save:  COP$155,991.94
₡50,893.45
List Price:  ₡71,252.86
You save:  ₡20,359.41
L2,475.75
List Price:  L3,466.15
You save:  L990.40
₲747,391.81
List Price:  ₲1,046,378.43
You save:  ₲298,986.62
$U3,833.15
List Price:  $U5,366.56
You save:  $U1,533.41
zł402.67
List Price:  zł563.75
You save:  zł161.08
Already have an account? Log In

Transcript

Hello again in this video tutorial, we're going to be talking a little bit more about events as it pertains to blueprints scripting. And to help me in this discussion, I am going to open up a third person Character Blueprint here. And prior to making this video, I went ahead and added some event nodes straightaway to this graph. We'll get to talking about ways to add these event nodes to your graph in just a moment. But first, a quick review and primer again about what events are. So again, events are things that happen in your game and they start a flow of execution in your graph and that flow is always from left to right.

Event nodes are only read they have this reddish header right here. And event nodes only have output pins along the right hand side of the node. They do not have input. Okay, some common ways to add events to your graph. Well, the most common way is probably to right click in the graph itself, and just do a search for the event know that you are looking for. So if you just type in event right here, here's a whole listing of events that you can add to your graph.

Among them are Begin Play and Event Tick which are quite common. This H key event you can simply search for but just by typing in the letter H. And you can find whichever button press you're looking for H key F key doesn't matter. Another way that you can add event nodes to your graph is over here in this my blueprints panel. If you if I come under this little header for functions, there's an override right here and if I click this button, here are some other events I can add to my graph. So if I click destroyed right here, I will add In event destroyed to my graph, there are also components that may have some events associated with them. For example, if I jump over to my viewport tab here for just a moment, you can see that my character this mannequin man right here is surrounded by this capsule component.

Now, this capital component can be used to detect if something hits the character or something overlaps it. When you are checking for that kind of stuff, we're not actually checking if something is hitting mannequin man here or overlapping mannequin man, we're actually checking if something is hitting or overlapping this capsule component. So with this capsule component selected here in the components tab, you can scroll all the way down to the right in the Details panel. And you will see that there are some events that can be associated with this particular component differently. ponents may have different events. But just to demonstrate how you can add an event to your Event Graph From here, you can see that with my capital components selected, I can select something like on component hit and click this plus button.

And that is going to jump me all the way over to the Event Graph and add this event. Now I can use this particular event to fire off anything I can have an explosion happen sound effect. In this particular case, I'm going to do a real quick demonstration I am going to hook my events here, up to something called the print string node. And what I want to know is what actor I am hitting so if I take a wire out of this other actor output and plug it into my in string for my print string function, I'll get the display name for whatever actor my capsule component is bumping into So I have nothing in my level right now. So to demonstrate this, I'm going to jump over to my props folder. And I'm going to place a s m underscore share actor out here, just going to rotate them around a little bit.

So now if I play and I run my character over into that share, you can see along the left hand side, it is printing a string, it is letting me know that I'm hitting SM underscore chair. So that is a really good thing to know. Not only can events fire off a flow of execution make things happen, they can also output some information. In this particular case, we're outputting, the name of the actor that is actually being bumped into something else to note about events. There are many events that you can only have one copy of the node out in the Event Graph. I know Begin Play is one of them.

So for example, if I was to try to add another event, beginning Play node events Begin Play, it's not going to add a second copy of the node, it is just going to jump me to where that is in the graph. Now how can you get around this, you can get around this by using something called a sequence node. Because there are times that you want multiple things to happen off of a given event. Maybe when you are playing the game, you want some music to start and maybe you also want some characters to spawn in, for example, maybe some enemies, right. So you would need to use something called a sequence node. So what I'm going to do right here is drag a wire off of Event Begin Play and type in the word sequence.

And what this node allows me to do, this is a flow control node, which we'll talk about a little bit later on. We can add some pins to this and this will allow me to fire off as many wires from this as possible. As many people I have so in this particular case, I'm saying that upon beginning play, I would like to print this string, which says hello, as well as this string that says there. Okay? So as soon as I click play here in the upper left hand corner of the viewport, it is going to say hello there. So watch really carefully.

It says, there Hello, because it printed it in that order. And so that is a way that you can get around the case where maybe you want multiple things to happen, but you only have access to one event node. All right, I think that is going to wrap it up for our discussion on events. We're going to be talking a little bit more about blueprint scripting here. So stay with us and we will see you guys in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.