[questions separated out because of my longwindedness]
Hi again, I hope my constant questions about my climbing script aren't bothering anyone. And if this should all be in one thread let me know. But each thread covers a different concept, so here goes:
Now let's say for my climbing script, which I know a lot of the excellent scripters on this forum know about because I have been pestering you a lot, which uses two placeables that can be clicked to go from one to another (using waypoints next to the placeables actually), and also has multiple checks and falling,
let's say I want to call a script in the middle of this climbing.
I handle the natural climbing with a while loop that checks a distance variable on the placeable. In the future I plan to implement a far more robust system to handle calling extra scripts, say I find a secret door or run into another ledge and get the option to land on it instead. Not wanting to rewrite it all right now, I'm just going to run an extra script at some point in the climbing action. I can do that with optional variables on the placeable - one for the "coordinate" along the checks and one for the name of the script, then put a small aside in the loop (if nCheck = nScriptcoord, run sScript). Easy.
--QUESTIONS ARE HERE--
What is difficult for me to grasp right now is how it would interact with the script. If it calls a conversation (say you run into a secret door and are immediately given the option to enter it without continuing) does it interrupt the script? CAN I interrupt the script - and further, can I "pause" the script, return to it later? If I'm in the middle of a loop will I risk breaking it when I come back to it? This script has some thirty declared variables so far, maybe more. Can I preserve them during this whole process if I need to?
--QUESTIONS ARE ^HERE--
Other possible outcomes of finding a secret door or extra ledge to land on: you reach the secret door (which I can just run a check within for instance the script climb_secretdoor1) and find it, but fall before you enter it. Player gets a message pertaining to finding the door, and then the door is flagged for the PC and his allies. I can probably figure that out if I figure out the above questions - I just wanted to describe my possible uses for this script to better help you envision what I want.
[2: you could theoretically, with a persistent enough system for checking these placeable variables, fudge up an interrupt system for each check of the climb to ask if you want to continue or go back. This would not be the most ideal way to do this, however, but the option exists - or maybe you can change directions and climb somewhere else. I might be wrong on that second one though, just because my system might not be flexible enough yet. But the option is, again, something I'll be considering]
[[for my first session I'm just going to run a script on one specific climb that automatically finds a secret door, a "cinematic event" sort of with no challenge, but in the future I plan on detecting the state of a player's search mode and implementing an actual check along with an additional delay, the purpose of which is discussed in my climbing combat thread, to account for searching.]]
Modifié par Sarcose, 28 février 2012 - 03:00 .