Attach a script to the Unlock Advancements?
Is there a way to add a script that fires on a hero only when they unlock advancement (completing the building of the character)
|
You mean when they lock advancement?
|
Sure. When they're done with creating their character and have locked their profile to require utilizing the advancement system to improve their character. Is there a way to attach a script to run on that event?
|
I think there's a spot in the definition file for items that trigger upon locking the character.
|
What do you need to accomplish? Normally, rather than a script that fires once when they change, I'd set it up as a hero script that's always applied when stateiscreate = 0. That way, if the user changes their mind about a character creation decision and switches back to creation mode, whatever change you've made isn't applied until they return to advancement mode.
|
I'm setting a tracker starting value based off the values of a characters attributes at the time of creation. This tracker only needs to determine this starting value once (when the user is ready to lock their profile), as the minimum and maximum values are changed by experiences in game play.
Essentially, I'm making a tracker for Sanity for Shadowrun. The starting value is derived from a formula involving Willpower and Essence. Afterwords, the tracker can decrement in two fashions. One, by the user lowering the sanity value after a sanity loss event. Two, by the user increasing their Cthulhu Mythos tracker. The CM tracker always starts at 0. the stateiscreate = 0 will probably work for what I need, however, how do I keep it from resetting its value if the user goes back into character creation after having changed their sanity during gameplay. E.g. Jim loses some sanity and while exploring the program, he returns to creation mode, which causes the sanity value to reset to its starting value. He doesn't know how much sanity he lost, and is now stuck trying to figure it out. I guess I could create an additional tracker for 'sanity lost' Then I could just add the different values together. I was trying to avoid an 'extra' tracker if possible, but it seems as though that would be the easiest way to go about this. Can a tracker's minimum value be negative? (A player can heal their sanity over their starting sanity through therapy and medications. This would effectively push their sanity lost tracker to the negative) if(stateiscreate = 0) startingSanity = (willpower + essence) * 5 + 15 ~ store startingSanity in a field value minimum = startingSanity ~ push the tracker to the current sanity value else sanity = startingSanity - sanityLostTracker - CM minimum = sanity ~ push the tracker to the current sanity value |
The authoring kit is used to create new game systems from scratch. If you're adding something to an existing game system, you don't have complete access, and the answers to your questions will differ - should I move this thread over to Shadowrun?
|
For this, I'd just use the trtNatural fields from those attributes. The information you're asking for doesn't exist in a lot of cases.
|
If it would work better in the shadowrun forum, then yea. I wasn't sure where to put the thread.
Thanks for your help! I'm able to get the the attribute values just fine, it's more of an issue of the tracker becoming dynamic and determining when to do math one way and when to do it the other.. This is what I currently have: Quote:
|
trkUser is a user-controlled field - you cannot change it in a script unless you want to take control away from the user, which forces it to always be a calculated value that the user cannot change.
equals tests are "=" like I said, I recommend trtNatural, not trtFinal - #traitnatural[] not #trait[] - that way, if you take a drug that alters your Willpower, your sanity won't change. |
All times are GMT -8. The time now is 04:19 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.