LarryG on 19/10/2014 at 22:02
I would like to trigger (TurnOn) the sending of a stim which steadily increases in intensity every 300 ms until a TurnOff is received. I thought I could do it with an NVRelayTrap, but the stim control doesn't seem to allow this. Random intensity, yes. but increasing intensity, no.
Quote:
You can use trigger on and off parameters to specify a stim to send instead. To do this, first enter the intensity surrounded by square brackets, followed by the stim name. For example: <kbd>[ScriptName]TOn="[5.00]WaterStim"</kbd>.
You can also specify a range of stims by specifying the minimum and maximum intensities, separated by a pipe. For example: <kbd>[ScriptName]TOn="[5.00|10.00]WaterStim"</kbd> will send a WaterStim with a random intensity between 5.00 and 10.00. Note that the result is a floating point number anywhere inside the range, it is
not limited to whole numbers.
So, any suggestions on how to have a TurnOn initiate a stim source which steadily increases (in a controlled manner) over time and stops the stim on TurnOff?
ZylonBane on 19/10/2014 at 23:24
As always, it would be helpful to know what exactly you're doing. If the object being stimmed is relatively stationary, you could simply have a stim source move toward it.
It seems odd that you've specified no upper bound to the stim intensity. If there were some reasonable upper limit, you could also achieve this by emitting a succession of stim-broadcasting objects, each one having a cumulative effect.
Or, getting back to NVScript, remember that (theoretically) any value can be replaced with a qvar. So you could successively increment a qvar and feed its value to the stim, like so "[$MyQvar]WaterStim".
LarryG on 19/10/2014 at 23:46
"[$MyQvar]WaterStim"
I didn't know that worked. That was my first thought as a solution. But when I read the NVScript doc looking for just that, I didn't find it except on a few specific scripts. I missed the banner at the top of the doc!
Quote:
When a script looks for an integer or flag parameter, you can have it read a quest variable. After the equals sign, type a dollar sign (<kbd>$</kbd>) and the name of the quest variable. There may not be space between the dollar sign and the variable name.
Thanks.
LarryG on 23/10/2014 at 03:18
Well, just to report back, qvars do not seem to be supported for NVRelayTrap as an intensity for a stim. I can't speak to other situations, but the following does not send the stim to the Player object.
[INDENT]NVRelayTrapTDest="Player"; NVRelayTrapTOn="[$QIntensity]ToxicStim"
[/INDENT]
I have an odometer set to read the stim value, so I have verified that the qvar is set properly to a non-zero value (10).
On the other hand,
[INDENT]NVRelayTrapTDest="Player"; NVRelayTrapTOn="[10]ToxicStim"
[/INDENT]
works just fine.
So I must conclude that the idea of using a qvar to determine a stim intensity is not implemented / working, or the way to do it is something other than to substitute $qvar_name for the constant intensity parameter. I suspect that qvars are only allowed for cases where the parameter directly equals the qvar and not for general substitution into more complex expressions.
R Soul on 28/10/2014 at 01:24
If you are targeting a specific object you might be able to use (
http://dromed.whoopdedo.org/public_scripts/timedstimulator) TimedStimulator (Public Scripts).
edit: The stim values won't go up in a linear way because the
current stim value is multiplied, not added to. If you say what you're trying to do, someone might be able to think of another way of achieving the same effect.
LarryG on 28/10/2014 at 05:45
Thanks. Unfortunately that won't work for my situation. I've since redesigned the trick to use other scripts and moved on.
Nameless Voice on 28/10/2014 at 18:12
I'd just use an old-fashioned radius stim - they have built-in support for steadily increasing intensities.
LarryG on 28/10/2014 at 19:56
How? If the distance to the stim remains the same, the stim intensity remains the same. I don't see any way to increase intensity over time and not distance. The only way I could conceive of using a regular stim radius propagation would be by having a marker carry the stim, bringing it closer and farther way as needed. Also, I need the stim to turn on and off, and while you can use property sets for that (adding and removing the source property), now you are really getting into Mickety Mousey(tm) stuff, and I would rather not. As I said, I've decided to do otherwise, which is good enough. But fully implementing the use of qvars for all numeric values in NVScripts would be of great service regardless.
Yandros on 28/10/2014 at 23:37
I assume he's talking about Intensity Slope under Life Cycle Data. I believe that modifies the intensity from one firing to the next, although I'm not sure if it's additive or multiplicative. The fact it defaults to 0 implies the former.
LarryG on 29/10/2014 at 01:23
It think intensity slope is a linear function of distance where the slope of the line is determined by that parameter and the y-intercept is the intensity parameter. Distance is the x axis and intensity is the y. You can also get an exponential function of distance (like gravity) if you want using the inverse quadratic option instead of linear (larger intensity the closer you get). But there is nothing there that I have seen for specifying any time based functions.