Hey
@MushroomCake28 @Engr. Adiktuzmiko and others, Instead of creating another thread i'll make another question here instead.
I want to create a simple combat Plugin that basically lets you play attack animations and damage Events wich also attack/do damage.
So, i have some questions about scripting in MV:
Can i write a Script/Plugin with my own Classes, Functions and variables like you would do in most game engines and access its parameters from events/other scripts?
In Unity engine, to do damage on a enemy and animate it i would do the following:
Spoiler: Code
If(Input.GetMouseButtonDown(0))
{
var direction = transform.TransformDirection(Vector2.right);
var distance = 1;
RaycastHit2D hit = Physics2D.Raycast(transform.position, direction, distance, layerMask);
if(hit.collider.tag == "Enemy")
{
var damage = 10;
hit.collider.SendMessage("ApplyDamage", damage);
animation.Play("Swing");
}
}
Is there a simple way to implement a Plugin like this, maybe similar to the code above?
I still don't understand much how to make Plugins so i would appreciate some explanations.
Also, the lack of a Scripting API really bothers me...
Anyway, thanks in advance!