edited February 2014 in ORK Scripting
Hi! I decided to be smart, and instead of manually creating more then 100 books and scrolls, create them from pre-existing abilities. But as Okashi core functions are closed, I can't find a way to hook into this;
for(int i =0; i < ORK.Abilities.Count;i++)
{
Ability _ability = ORK.Abilities.Get(i);
if (_ability.abilityType == SPELLS)
{

Item _item = ORK.Items.GetCopy(0);
_item.useAbilityID = i;
_item.languageInfo[0].name = "Scroll of " + _ability.GetName();
ORK.Items.Add();

Debug.Log(_ability.UseCosts(); ???
}
}
For every spell, inside "Use Costs" I have MP stat which is used along with the spell.
I wanted to copy this for scroll as well. For some reason, item has no "Use Costs", but I can use "User Changes" for this purpose too (?);

In any case, I can see that "UseCosts" asks me for combatant. Is there really no way right now to get those values I have in editor inspector inside "Use Costs", without specifying combatants and e.t.c?


Also, Item is not adding.
ORK.Items.Add(); - has no arguments 0_0

P.S Closing editor sources was a really bad idea. I feel waaay more limited then when I was with ORK1, I could resolve problems like this in a 10 minutes, and would never need to go and request a feature.
Post edited by ryumaster on
Sign In or Register to comment.