rraoyxz Posted February 3, 2019 Share Posted February 3, 2019 I want to advance my quest stage when a specific character is killed, but I can't get it to work for some reason. Here's what I used: scn QuestScript begin GameMode if(thisCharacterID.GetDead == 1)SetStage ThisQuest 30endif end (I triple checked that the quest stage is correct. I start out on quest stage 20, but the quest stage doesn't advance when I kill the character.) Thanks again! I can't believe how active and helpful this forum is! Link to comment Share on other sites More sharing options...
rraoyxz Posted February 4, 2019 Author Share Posted February 4, 2019 Ah ha. I figured out what my issue has been with referencing actors! Eureka! Hopefully this helps someone else: If you double click on an actor in the scene, a "Reference" window pops up which shows the "Reference Editor ID." Since I've been making my own NPCs and such, I didn't have anything listed in the Reference Editor ID field. More info on References here. Link to comment Share on other sites More sharing options...
Mktavish Posted February 4, 2019 Share Posted February 4, 2019 Yes sorry I did not make that clear ... you have to click the item in the render window (scene) to bring up it's reference window. This is true for any object placed in the render window , not just actors. And then that is where you give it a reference ID ... which is really just for humans to better understand it. Otherwise the engine gives it what is known as a form ID , which you can see in the parentheses next to the field where you would type it. And that can be used in scripts also. Link to comment Share on other sites More sharing options...
dubiousintent Posted February 4, 2019 Share Posted February 4, 2019 An "Editor-ID" is necessary but not sufficient. They also need the "persistent" flag. However, while this probably doesn't apply to your situation, others need to remember that you can't "click on" a dynamically spawned actor (typically from a "list" and will have a "mod index" of "FF" and not have a "persistent" flag), to get it's "Ref-ID" while in a script. The following about "tokens" is copied from 'TIP Standard Dialog' under the "Dialog and Lip-Sync" section of the wiki "Getting started creating mods using GECK" article. You can adapt the information to any similar situation where tracking a specific but not "persistent" Actor is required. Consider the use of a "token" (a piece of equipment flagged "unplayable" (and thus "invisible") placed in the Actor's inventory) along with the GetIsID function to indicate which Actor is currently speaking or to be referenced. (Otherwise, you would need to convert the "Ref-ID" of the Actor into their "Base-ID" using GetBaseObject first in order for GetIsID to work correctly. But remember: a "Base-ID" is a template for all "Ref-ID" instances of that form. If more than one Actor in the conversation is based upon the same form, the "Base-ID" is not unique. GetIsReference only works for "persistent" references such as unique Actors; not those dynamically spawned from "lists". Which is why a "token"shifted between the speakers works better.) You can use a "ResultScript (End)" block for each response to transfer the "token" to another Actor with the MoveToContainer function. (An example of the use of a "token" is in the GECKWiki tutorial Adding an Options Menu. "Tokens" can also be used to store information on an Actor. See ActorValue.) -Dubious- Link to comment Share on other sites More sharing options...
Mktavish Posted February 4, 2019 Share Posted February 4, 2019 An "Editor-ID" is necessary but not sufficient. They also need the "persistent" flag. Thank you for mentioning that . Being flagged as persistent is most definitely mandatory in order to use that ID in a script. And would definitely cause a script not to compile. You bring up some nice intricacies dubious , but I would err on the side of not over loading the student so far. Just my oppinion.Cuz rroaxyz seems on the verge of a bunch of appiffanies with the geck.And it's nice to see ... but nevermind ... I babble to much. Link to comment Share on other sites More sharing options...
Recommended Posts