Aller au contenu

Photo

Setting Plot Flags For Debugging


1 réponse à ce sujet

#1
WhatDuck

WhatDuck
  • Members
  • 5 messages
I'm trying to find a way to set plot flags from the console for debugging. My project has a lot of flags in a bunch of different plots, and I want to write a couple of scripts to let me get, set and clear them for debugging and testing purposes.

Essentially, what I want to do is type into the console:

runscript SetAFlag flag_name parent_plot_name new_value

and have my SetAFlag script set or clear the flag as appropriate.

The problem is that WR_SetPlotFlag takes constants for the plot and flag names, and I can't find an easy way to get those constants from console parameters. 

There has to be a better way than writing a separate script for each flag, but I'm just not seeing it. Can anyone help?

#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
You don't need a new script for each plot. You would type in something like this:



runscript SetAFlag rrhr_no_good_deed 2



WR_SetPlotFlag can take either the GUID or the plot name. Using the GUID, which is what the constant evaluates to, is faster, but for a debugging script that's not really important.



Of course, your script would have to be set up to parse the input text and isolate the two arguments, but I'm guessing you know how to do that alredy.