I have a small problem with this script, attached to some NPC
Scriptname a2rTownGuardsScript extends ActorEvent OnPackageStart(Package akNewPackage) Debug.Messagebox("StartingPackage") Debug.Messagebox("Name of akNewPackage is"+ AkNewPackage + "And the name of ours " + PatrolPackage ) if(akNewPackage ==PatrolPackage) Debug.Messagebox("Hello, World!") ;SomeStuff endifendEventPackage Property PatrolPackage Auto
Script should start if Actor is starting a new package, and then determine if this started package is the same as PatrolPackage, and then do some stuff.
I've set the PatrolPackage property to a specific Package in the Edit Properties window.
Unfortunately, script wasn't working, so i added messageboxes and this is what i get.
Event works, i get "StartingPackage", and then "Name of akNewPackage is[Package <(0202EA42)>] And the name of ours None"
Of course, the None is problem. Why script can't see PatrolPackage property properly?