Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   I need some choosers' contents to delete themselves if the race changes (http://forums.wolflair.com/showthread.php?t=8200)

Mathias February 2nd, 2009 11:44 PM

I need some choosers' contents to delete themselves if the race changes
 
Still working on the same piece of the Dark heresy game - each career option offers 0-3 pairs of skills for the user to select between using choosers. The choosers get their list of available skills from fields on the hero. These fields are set by a script on the career component.

The problem I'm running into is when the user decides on a different career - how do I get the picks added by these choosers to delete themselves when the race changes?

An existence tag seems like the way to do it, but I can't figure out a tag expression that I could use to track whether the race changed.

Perhaps a change script on the chooser for the race? There's already a tag being assigned to the skills added by these choosers and nowhere else - do I search through the list of skills and delete the ones with that tag whenever the race changes?

rob February 20th, 2009 02:14 AM

There's no way to get the picks added via the choosers to delete themselves when the user changes the career. And I'm not certain that you should do so, even if you could.

If a user has a character concept in mind, he'll pick a career and select some skills. Unless the character concept completely changes, any career change will likely result in a similar set of skills being available, and the users will likely want to retain many of the skills already selected. Throwing them all away would require the user to pick them all over again.

If you instead used a validation rule (or prereq) on each skill, the switch would go smoothly. If a skill remained valid for a new career selection, there would be no problem. If a skill became invalid, it would show in red and a validation error would be reported. The user would want to change the skill to something legal, in which case deleting the old skill is the same action as picking a new skill. If you had deleted the old skill, then the user would still need to select a new one.

Overall, I think this approach would be significantly better for the user in some cases and no worse in others.

FYI, there is no way to use a trigger script to delete picks. In fact, it is never possible to delete user-added selections, except via use of an Existence tagexpr on a table or chooser.


All times are GMT -8. The time now is 02:52 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.