Wednesday 6 April 2016

CGA Gameplay and Interactivity - (Group Project) More things, Mana System and actual Wall Climbing!

As I mentioned before one of my group member has done the dialogue system after doing that he then implemented other things to help make the story of the game go more smoothly .

Such as when fighting the mushroom guardian... when you beat him a new scene will load and a village will come and interact with you taking you to the next stage,


He's done some more like when rescuing the little mushroom kid.



Now onto the mana system, I got an other group member to try and do the mana system almost like how when I did the Health system although this didn't work in the end .




So in the end i got some help with Ewan and he told me that we can use a Slider in the canvas to be used as a mana bar.


So I made the mana static so it's gllobal, now all i had to do was use a script to reference the mana from the player onto the slider which is used as a mana bar.

I was being stupid and a idiot and I tried to do it in a way which wasn't even logical or was thinking long way's round it... in the end I asked Ewan for help again and he did a ManaGUI script for me.


 After that it was't too hard... all I did then was add something into the Weapon script where if the player had more than 0 mana it would be able to shoot and as a consequence would take away 10 mana... so effectivly it would cost you 10 mana to shoot out of 100 mana. I then do a else return where if it then only had 0 mana remaining it would not shoot.

I then quickly made a sprite of a "mana wisp" and added it into game.

I then made a piece of code and attached it to the gameobject which has the mana wisp sprite.
What the code does it basically Give you back 30 mana when collected if your current mana is less or equal to 70. I also did else state to set your mana vale to 100 if you had 70/80/90 mana left otherwise without the else statement it would give you more than 100 mana which isn't what we want. 

Now onto the proper wall jumping. I removed the Physics2D material from the boxcollider on the player which made the player iceskate and move up walls..

So instead added a few things into the player movement script.


(This part was in the Void Update function)

 I added a wall check onto the player which Is placed slightly in front of the player.
 Then attached it to he movement script.
I basically copied the the ground and stone platform sprites and turned off the sprite renderer and tagged as well put it on a Layer called Wall.



Some gameplay:

When the wall check is touching the Layer called Wall the wall sliding and wall check box's will tick indicating I can wall jump and that it works.



It may look like your stuck but you are not. You can press space several times to jump up the wall (may still look stuck but you can see yourself move up slightly and depending on where you are to the wall.)



No comments:

Post a Comment