2/24
From PM Angel
Thanks to all the artists who have helped me so far, I have made an official discord, and the link to it, my spreadsheet, and my figma are on the doc. You can submit art there but email is also still fine (just slower). Also here are some of the highlight cards thanks to you all.
Also here are clearer rules that are posted on the discord.
-The images need to be 250px Width and 100px High (or in a scale of that but larger).
-It must be a PNG or JPG
-Can not have any transparent parts
-Must go with the name of the card (the attack/ability is ok if not shown on the card)
-It can be any art style, pixel, digital, or hand-drawn (scanned or something similar) as long as it meets the requirements above
-Don't forget to enter the name/username you want on the credits in the artist column on the doc.
https://docs.google.com/document/d/1ax9Hm8B7iMeTifwDxqvTC0FLcC6EdfLRW3N7PPJ1Q5o/edit?usp=sharing
Start your day with a warm-up
Summarize and share your thoughts on leakers. Why do you think they do it? If you had the chance, would you? Have you ever gotten media before it was released?
Back in the day, I knew a guy who worked for Toys R Us (RIP) and he sold me a Playstation 2 and Tekken week before it came out. It was a glorious week.
Have your games open and ready to work please
What are you learning?
Weapon System, changing animations, importing meshes.
Why is it important?
This is the start of everything. We are building a game so it is important that you follow along. If you start going on your own and fall behind, it is unfair to stop the class because you chose to do your own thing. If you are confident that you know what you are doing, I have no issues with you moving on your own but you will be held accountable for the project.
How do you show that you understand? What is the assignment?
Follow along and build the game.
Add another instance of your cube and platform in the game
Another heavy day... let's stop here and continue next session
Go back to the platform BP
In your variables, click the + to add a new variable
Name the variable destination
Make it a vector
Vector variables contain X,Y & Z Positions
In the details panel for the variable
Check Expose and Spawn
Instance Editable
Show 3D Widget
Compile, save and go to your game
You now have a Widget we will be using to control the platforms
YOU MUST MOVE YOU WIDGET BEFORE YOU SCALE THE PLATFORM!
In the platforms BP under components, select InterpToMovement
Delete the control points we created in the details panel
Select Construction Script
This is different from the Event Graph
The event graph codes the functionality while the game in running
The construction script runs components so it can spawn a mesh for example
Drag your InterpToMovement on the construction script
From the output of the InterpToMovement, pull out Add Control Point Position
Connect the output of the Construct Script tp the input of the InterpToMovement
We still want the position to be 0,0,0 where we set it
Copy and paste the InterpToMovement node and the Add Control Point Position Node
Connect the output of the original Add Control Point Position to the input of the new one
Drag in the Destination Vector (Get Destination)
Connect the vector to the position input
Now the Platform starts at 0,0,0 and ends wherever you place the widget (hopefully)
Move the Gizmo and test
Time for some bad guys
Go to blueprints > right click > blueprint class
This time we will select a character
Name it BP_Enemy
Open up the blueprint
In the character BP, there is automatically come components included
There is a Collision parented, two child components, a directional arrow and a character mesh along with character movement
With the mesh selected in components, add the SKM_Manny_Simple
The animation class will be ABP_Manny_C
Move it -90 on the Z axis so the collision surrounds the mesh and rotate -90 degrees on the Z axis so that it is facing the arrow
Compile and save
Go to your game
drag an instance of the enemy in your game
Time to create movement
Open the event graph on the enemy bp
Delete the nodes that come automatically in the blueprint except Event Begin Play
Add a custom event by right clicking in your event graph and searching custom event
Name the custom event Chase Player
From the Chase Player Output Node, pull out (call), and create an AI Move To node
From the Pawn Input, pull out and find Get reference to self node
The Self node is the enemy
From the target actor input node, pull out get player character
Set the acceptance radius to 120
The acceptance radius sets how close an AI will move to the actor or destination vector before stopping
From the On Success Output on the AI Move To Node, pull out and add Chase Player Node
From the Event Begin Play output, pull out a Chase Player Node
So what is happening here is that when the game starts, the enemy is chasing the player
Once the enemy gets within 120 units from the player, it stops and checks again to see if the player is more than 120, if it is, the enemy chases again, if it isn't, it checks again and again in a loop
Compile, save and test
Nothing happened... how disappointing
The reason the AI Movement isn't working is because the game has not mapped out the routes or paths for the AI
To calculate these paths, click on the add or + > volumes > Nav Mesh Bounds Volume
A new NavMeshBoundsVolume will be created in your outlines and a wire frame cube will be in your game
This is the area that will be calculated
Reset all the values on this new volume
change the scale to 50,50,50
You can see with have the entire game covered
Press P and you can preview what area the AI will be covering
Save and test
Notice the enemy will now move, just not well
Go back to the Enemy BP
With the BP_Enemy Component Selected, search for Yaw in the details panel
UNCHECK Pawn > Use Controller Rotation Yaw
Yaw is the Z position and rotation in UE
Select the Character Movement in the components
Find Character Movement (Rotation Settings)
Check Use Controller Desired Rotation
Now the enemy should rotate smoother
compile, save, test
Applying Animations to the enemy
Open up Enemy BP
Select the mesh in the components
Open up the content browser
Open Content folder
Create new folder called Enemy_Animations
Open the enemy animations folder
Right Click
Animation > blend space
Select the SK_Mannequin
Name it EnemyBlendSpace
Open it up
In the Assets Details
Change
The name of Horizontal Axis from None to Speed
Maximum Axis Value from 100 to 600 (in the Enemy Blueprint, you have the speed set to 600)
In the Asset Browser find the MM_Idle animation
Drag it to the left side of the timeline
In the Asset Browser find the MM_Run_FWD animation
Drag it to the left side of the timeline
If you pause the player and hold CTRL, you can scrub through and see the change from idle to run
Open your Enemy_Animations Folder in the content drawer
Right Click > Animation > Animation Blueprint > SK_Mannequin
Name it APB_Enemy
Open the Animated Enemy Blueprint
In the Asset Browser, search for the EnemyBlendSpace
Drag it in your AnimGraph
From the EnemyBlendSpace Node, pull out and add Slot"defaultslot" node and connect between the two nodes
Promote the speed input to a variable by right clicking on the input
We are going to use almost the exact same nodes we used in the shotgun event graph
Open your Shotgun Animation Blueprint
Copy all the nodes and paste in the enemy ABP Event Graph
In the ABP_Enemy nodes, we are casting to the character
We don't want to be casting to the character, we want to be sending the information to the Enemy
So grab the output from Try Get Pawn Owner and add Cast to BP_Enemy
Delete the Set Character and change to Set AS BP Enemy
Right click on the AS BP Enemy and promote to variable
Drag the AS BP Enemy on the Character Variable to replace it with Get as BP Enemy
Go to your Enemy BP Viewport and select the mesh
Change the animation class to ABP_Enemy_C
Compile, Save, Test
Enemy should be animated now
We are going to add a second collision to the enemy for the attack
In the enemy BP, add a sphere collision
Change the size of the sphere radius to 250
We are going to set the collision so that when the player overlaps this collision, the enemy attacks
Go to the event graph and add On Component Begin Overlap (sphere)
We are in the ENEMY BP right now so we want to cast to the Character
Pull out the output node from other actor and add Cast To BP_ThirdPersonCharacter
Move the Chase Player Node down by the Cast Third Person BP and disconnect from event begin play
Connect the output of cast to BP third person to the input of chase player
When the enemy moves from idle to run, it looks sketchy so let's modify the enemy blendspace by increasing the weight
Change the smoothing time to .01
It's time to eliminate our enemy
Open the bullet BP
Break the link from Event Hit to Destroy Actor
Pull out and add Apply Damage Node
Connect output of other to Damaged Actor
Connect Apply Damage output to destroy actor
THE ACTOR IS THE BULLET NOT THE ENEMY
Make the base damage 10
Now we will create a health system for the enemy
Open the enemy BP
Right click and create an Event AnyDamage
We will create a new variable that will hold the health (we did this in Gdevelop)
In the My Blueprint tab
Create a new Variable
Name it Health
Make it a Float
Drag it in your blueprint
Set Health
Connect your Event AnyDamage to the Set Health input
Drag another instance of the Health variable but use Get Health
From our GET Health variable, pull out a subtract or -
Connect the damage output from event anydamage to value of the minus
Connect the output from the minus to the input of the set health
What is happening here?
When damage is taken, it gets the health number from the health variable then it subtracts one and sets the new health variable number
From the set, pull out a branch node
We want to make sure there is still a number in the health variable or if it has reached zero from the minuses
Drag out the health variable and select Get
We want the condition of the branch to be that health is less or equal
Pull out from the health variable and add Less Equal node
Connect the less equal output to the condition of the branch
If the condition of the health being 0 or less is true, we want it to be curtains for the enemy
Drag the Character mesh out and pull out a new node Set Simulate Physics
Connect the true output of your branch to the set simulated physics
Check the SIMULATE box
Select your Mesh on components and find collision in the detail panel
In Collision presets choose PhysicsActor
Compile save test
Right now we have our health variable set to zero so when we shoot the enemy and it subtracts one then runs the check on < or = to zero, it is true and sets off the death physics
Select the Health Variable in MyBlueprint and change the Health value in the Details panel to 100
Compile, save, blast the bad guy
Time to add some particle effect
Open up the content drawer and add a new folder name it Niagara System
Open the folder
Right Click
Select Niagara System
Select New system from Selected Emitter(s)
Select Omnidirectional Burst
Click +
Click Finish
Name the new Niagara system NS_Damage and open it up
We want to spawn this particle effect when it hits the enemy
Open up your enemy blueprint
Disconnect the connection from Set to Branch
From the set output, add Spawn System at Location
Connect the Spawn System at location output to the input of the branch
The System Template in the Spawn System is the NS_ Damage that we created
Pull out from the location input and add Get Actor Location
In the Pooling method, select auto release
Compile, save, test
Go back to the Damage Niagara System
Select Sprite Renderer in your OmniDirectional Burst
In the material search for a red
As it, the particle emitter is making squares so it looks kind of old school mortal combat blood
Delete the sprite renderer
Click the + in renderer and add a Mesh Renderer
In the selection panel under meshes, select the sphere
When you press play, you can see the particles are now spheres
Select enable material overrides
Click the + in override materials
Open up the override materials arrow
Click the + to add an array element
Open the Index materials arrow
Find a red
Select Initialize Particle
In Sprite Attributes, change sprite size mode to unset
In mesh attributes, under mesh scale mode, select random uniform
Min .02
max .05
Compile, Save, test