SevenSeasToGlory - Programmer Sprint 6
SevenSeasToGlory - Programmer Sprint 6
Ship Swaying Away From Islands
I got tasked with a card to have the Enemy Ships not collide and or run into the Islands. Being that the Islands are a super huge priority in this game we wanted the player feel immersive while playing so giving this task it's just right.
Recruit Enemies
This has been a highly requested element from our lead. She has always been asking for ally pirates. Given when you defeat a pirate a text prompt will pop up either sparing the pirate or defeating the pirate and if you spare the pirate, the pirate will be on your side fighting off other pirates.
Ally Pirates Fight Enemy Pirates
I was also given a card when you recruit a pirate, that pirate would have to defend and protect you.
Friendly Pirate Class
My producer also gave me a task to create a friendly pirate class. This was super easy because I just inverted a pirate class and ran with it. It has all the basic fundamentals of a pirate and even has the same animator controller which did not bug out.
Waves / Ocean Generator
With the waves we have been struggling with this for a while. We first used a free Unity asset water that our professor let us use by asking. Unfortunately that did not seem to render on our build so the sea would just be blank. Then I manually made a water but the tiling was off when I put them in an Ocean Generator script. After I just bought a water asset, it was half off and I put that in my ocean generator script that I made and it turned out pretty nice.
Cannon Bug Fix
For the Cannon Bug Fix I completely made a whole new cannon script and revised the code. Fixed the code from being local space to world space.
Problem I Encountered On the Way
I didn't encounter too many problems. Fixing the CannonBall was kind of a bit of a struggle for a day and half because I wasn't too sure why the cannons z rotation was being affected by the ships rotation I looked up on Unity's forum about different transforms and their directions and the OceanGenerator because I was interating through a nested for loop. Also, The FindClosestEnemy() function and having it update as the pirate encounters new pirates. Either than that I didn't have too many trouble.
Logic
-----------------------------------------------------------------------------------------------------------------------------
When you gather recruits you can also TP them back to your location. When you are done and want to go back to your ship, island or other pirate ship you TP them to your location to help fight you in battle!
For the actual Recruitment of the friendly Pirate lays inside the ImperialPirate script. As it takes damage it calls the Die() function which has the recruitmentText which a specific message is typed. If you press J it spawns a friendly pirate which I explained above and all it's elements, if no, it destroys the gameobject.
Comments
Post a Comment