First Post

Hello reader

The artefact that i will write about this week is the shockwave shooting. It’s a part of our power-up that we are implementing for our game. It’s made with one script that allows the player to shoot a shockwave once he has collected enough power-up drops that drop from the enemies to fill the power-up bar, but i will not go into that more at this time.

I made the shockwave shooting by making a script that takes a public Gameobject that functions as a prefabricated object, and a public Transform. The prefabricated object functions as a projectile that the script spawns at the position and rotation given by the transform. But before it gets spawned an if statement checks if the correct key has been pressed and if the power-up bar is filled. when the projectile has been spawned the script adds a velocity to it so it starts moving towards the right side of the screen. the speed is also a public variable so it can be modified from outside the script and that makes it easier to test what speed we should have to get the right feel from the shockwave.

The reason i made this today is because there is not a lot to do for the alpha presentation and it’s something we needed for the alpha. The reason i did it the way i did was because this artifact is similar to another artifact i have done so i knew how i should do it. The public transform makes it so it’s easier to change where it shoots from and the public gameobject makes it so you can easily change what the shockwave actually is. the speed i have already explained why it’s public so i won’t do that again. The key i put as trigger for the shockwave right now is left shift because i think it would fit the key layout we have for the rest of the game right now. now i think all you need to know about this artifact is written out on this page.

Thanks for reading.

Isac (08-02-18)

Lämna en kommentar