ID:163774
 
Okay, I'm trying to add a Byakuya type shikai and bankai to my game (I have the icons ect) But I have no idea how to firstly make about 6 sebons apear and how to control them by clicking on a place and it sends the senbons there and attacks the victim.. so yeah, I don't know how to do any of it. Haha.. i'd appriciate it if someone helped
I have no idea what a byakuya, shikai, bankai, or sebon is, but I'll try to help.

First, in your sebon AI you need to add a Target variable so they know what to chase:


var/atom/Target;

Then make a list of the user's sebons so it can access their vars:

var/list/SebonList = list();

You'll also need a flag to tell if the user wants to send sebons during a click (instead of say, defending the target). Also need to tell the sebons what action they need to perform.

Then, on the mob click or double click command, define the targets of all the player's sebons:

atom/DblClick()
{
..();
if (usr.ClickAction == "Attack")
{
for (var/mob/Sebon/S in usr.SebonList)
{
S.Target = src; //src would be the atom you clicked.
S.Action = "Attack";
}
}
}


Then take appropriate action within your sebons' AI:

mob/Sebon/proc/AI()
{
while (src)
{
if(src.Target != null)
{
switch(src.Action)
{
if ("Attack")
{
if (src.Target in oview(1,src) && istype(src.Target, /mob))
{
src.Attack(Target);
}
else
{
step_towards(src, Target);
}
}
}
}
sleep(10);
}
}



Hope that helps.