Blog Post: The Miniboss Projectile
William DeMayo
3/22/24
The Mini-boss Projectile
Part 1: The Problem
The problem that I had at the beginning of this week that carried over from last week was the mini-boss projectiles code conversion. The conversion of the blueprint to code went quite swiftly, however, there arose three problems; The first was the health component had not been converted to code. The second was after creating the blueprint I realized that there was no hitbox on the projectile at all. Lastly the projectile would not move no matter what I did. The health component wasn’t a huge issue because the blueprint one existed already, as well as it was being worked on early in the week. The projectile not having a basic collision profile did confuse me a little as the component in the blueprint (Static Mesh Component) was the same as the one in the code, yet the hitbox did not exist. The projectile movement component similar to the static mesh component was seemingly identical, but the projectile would spawn into the level but it would not target any of the players.
The projectile in the blueprint works very simply, it lives for 20 seconds but if it is shot it can be destroyed instantly. The other way that it works is by flying at the closest player, it also checks the locations of all players consistently to move to the closest one to the projectile. This means that everyone can be targeted by the mini-boss not just the person aggravating the mini-boss. Unreal has something awesome for a homing projectile in the projectile movement details, you can check a Boolean to mark if the projectile is a homing projectile. This will give the fluidity that you are looking for and help with the linear interpolation(lerp) of values by just setting a target for it to attack.
Part 2: The Solution
The first problem was the health component, this was an easy band-aid fix as when I made the blueprint I could just give the blueprint the health component, this is precisely what I did. After Ben had finished up the health component I put the code in for the health component. This is where I was introduced to the second bug which stemmed from the first there was no hitbox for it to register. When I realized that I was confused as I had just incorporated the health code and it looked identical to the blueprint counterpart. At this point the projectile was not moving at all, the projectile movement was the same values I had set for the blueprint version. I mainly started by looking at the code where I set the homing target for the projectile (which is an actor reference so it knows who to attack concurrently). The values were being set correctly to the closest actor so I knew that the SetClosestPlayer function was working properly. However due to time constraints with the sprint my teammates and I realized that the blueprint version worked as intended and we made the pragmatic decision to keep the blueprint version and scrap the code one. It is never fun to scrap a thing that you have been working on but sometimes it is for the better good of the game.
Pictures of the Mini-boss Projectile BP:
Get Deadlands Duel: Time Rift Rumble
Deadlands Duel: Time Rift Rumble
A hot-blooded, feel good, zombie wave defense shooter.
Status | Prototype |
Authors | Willy Games, Ghost Of Reddus1, Mystic, LGUAPOJR, StevenCodes, Bjornoid, Johncarlos Lillo |
Genre | Shooter |
Tags | Arcade, Atmospheric, FPS, Horror, Multiplayer, rogue, Sci-fi, Unreal Engine, Zombies |
Languages | English |
More posts
- Perk System SetupMar 31, 2024
- Blog Entry Title: Morale and B featuresMar 29, 2024
- Class Ability ImplementationMar 29, 2024
- Blog Entry: RPG Explosive Projectile: Network Replication and Destruction bugMar 29, 2024
- Blog Entry: Powerup UIMar 29, 2024
- Spectating SystemMar 27, 2024
- Blog Entry Title: User Interface and Under hood with Unreal AudioMar 23, 2024
- Unique but modular class abilitiesMar 23, 2024
- Blog Entry: Instant Kill PowerupMar 23, 2024
Comments
Log in with itch.io to leave a comment.
Good job on getting the projectile working.
We love casting spells