Mod Projects
2D Scripting using Graal Online
Zal Cannon
The first weapon is called the Zal Cannon. The gif image itself was already included in the game's folder, I took the initiative to make it fire and function like an actual cannon. I broke the image up into its 4 different parts (an "up" direction image, a "left" direction image, a "down" direction image, and a "right" direction image).
From there, I scripted the item to be added to the player's items and enabled it to be fired at will. I set up the firing animation in the same way. I programmed the animation for each direction the player was
facing. To make it look prettier, I set up little magic effects that fall from behind the fired orb, to give the effect of speed. I set the animations up in a looping structure and have the sparkles change randomly.
Plasma Rifle
After creating the Zal Cannon, I decided to see if I coule mimic the general idea of firing projectiles, but in the form of smaller, faster firing bullets. I set up the weapon the same way I did for the Zal Cannon, but instead included little "jumps" in the script to make the animation look as though it is rapid firing the weapon. I made it so that everytime the gun "jumps" back, so does the player, just to increase the coherence between the two.
Whisper Magic
This item is solely for the purpose of regenerating the player's mana. It sacrifices some of the player's arrows and bombs to restore their mana. I scripted it so that it restores the mana overtime relative to the "tick" of the loop script.
Frozen Life
This spell uses up the player's mana in order to restor their health. The loop works the same as the Whisper Magic in regards to sacrificing mana for health dynamically. However, I added the magic animation. This is done by nesting the animation within the loop and calling it everytime the loop "ticks". The magic effects act as rain drops that gradually slow down as they reach the bottome of the player's feet. I used a few different mathematical equations to manage the animation.
Bind Spell
This spell saves the player's cuttent level and allows them to warp back to this level at anytime. The animations are set up similar to the Whisper Magic's magic effect. It takes the player's mana and saves their location, almost like a dynamic save point.