• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Live Pick Error

Alrighty,

I am getting a really strange error. I read this thread already, and unfortunately its slightly different then the problem that person had.

We added a few custom skills (Drive and Pilot) which are required for the datasets. To go along with those skills is a mechanic that when you select Drive or Pilot, it bootstraps several traits to go along with those skills for Vehicle Combat and Vehicle Defense. Until today, this was 100% working perfectly.

Here is the error I get:

Attempt to access non-live child pick 'skMSRDDriv' from script
Location: 'eval' script for Thing 'mMPSGGVCM' (Eval Script '#4') near line 2

That is followed by several other errors on line 5, and then again for the skMSRDPilt also on the same lines

Here is the code associated with those errors:

First | Priority: 450
Code:
      if (hero.tagis[source.MPMSRD] <> 0) then
      if (hero.child[skMSRDDriv].field[skUser].value >= 1) then
perform hero.assign[Custom.GRCMPVehic]
elseif (hero.child[skMSRDDriv].field[skUser].value >= 1) then
perform hero.assign[Custom.GRCMPVehic]
endif
endif


I have no idea why it broke today, but otherwise has been working perfectly for weeks. The Mechanic works fine aside from throwing those errors, and when you add a rank to the Drive skill, it pulls up the GRCMPVehic with no problem and both Vehicle Combat and Vehicle Defense traits appear.

After extensive testing I discovered that all the others work perfectly. (IE the Profession: Driver, Sailor, and Pilot skills that have to be manually added) We run these same traits using Ride and Fly as well, but with Drive and Pilot because they are added in the MPMSRD source it doesn't seem to work right.

Please assist! Thank you in advance for your help!

- Joe
 
If you're looking for picks that might not be live - like things that are added as part of the bulk skills, but have a source, it's safest to use childlives to make sure they're actually live before looking up information on them:

Code:
if (hero.childlives[skMSRDDriv] <> 0) then
   if (hero.child[skMSRDDriv].field[skUser].value >= 1) then
 
Thanks for sending me the files. It made it easier to find the issue. This is a pretty "advanced" issue in how HL deals with Sources, Bootstraps, and live states. So the "answer" is to add a dummy script to your skills that fires at First/449:

Code:
      ~ This is a dummy script to get use to be "live" very early.
      doneif (field[skUser].value >= 1)

The reason this is needed is because your Skills are marked with a "Source". This means they are bootstrapped with a condition on the hero to only become "live" when your Source is turned on. But the next advanced part is that HL does not actually make something "live" right away. It makes it "live" just before its first script fires. So maybe their use to be a background "Component" script on BaseSkill that use to fire early and is no longer present. Because your custom skills are not becoming "live" until after First/450 so HL is complaining when you do the command "if (hero.child[skMSRDDriv].field[skUser].value >= 1) then" so it tosses an error say "hey this Skill is NOT live or present on the Hero".

So by putting a dummy script on the skill to fire at First/449 we force the skill to be "LIVE" at First/450 when your mechanic script runs.

So another way to go is to remove your script from your mechanic for any "custom" skill and place it to run at First/450 directly on the skill. This would solve your issue and make it more efficient anyways.
Code:
        if (field[skUser].value >= 1) then
          perform hero.assign[Custom.GRCMPVehic]
        endif

The above script does the same as your mechanic and would exist only on the skill and would be less overhead to the system as it can directly access the fields of the skill. Plus it will ONLY fire when the source.MPMSRD is turned on because the skill Thing itself is tied to that source. Just a FYI is all.

Placing the dummy script on to the skills to force their LIVE state by First/450 or putting the logic directly onto the skill fixed the problem for me.
 
Thanks for the help Shadow!

This was a huge help in solving this problem once and for all, and I learned a lot about how the mechanics work! Much appreciated!

- Joe
 
Back
Top