HitScript in package

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Gnafu
Grandmaster Poster
Posts: 136
Joined: Thu Feb 02, 2006 7:29 am

HitScript in package

Post 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)
Post Reply