Page 1 of 1

HitScript in package

Posted: Mon Jul 13, 2009 5:12 am
by Gnafu
Me again, now with an itemdesc problem...

It seems like the "HitScript" prop will not be set correctly when creating the object.

If in a package I define a Weapon with "HitScript :thispackagename:myHitscript", when I create the weapon the this_weapon.hitscript is set to "myHitscript", so, when the Attack hook tryes to start that script will start a start_script("myHitscript", bla, bla..); ad it will return an error saying "pol\pkg\packageOfTheAttackHook\myHitscript.ecl does not exist".

The only work-around I know is to not set the HitScript in the itemdesc ad to set a ControlScript that will only do a weapon.hitscript:=":TheRightPackageName:myHitscript";

It's strange, because for all the other props I can set the :package:script path with no trouble...

(PS: I know that pol parses the package name on hitscript prop because I tried to set ":*:myScript" in the itemdesc.cfg , and the pol stopped saying ":*:" is not a package)