TrapThreshold how to ..... - by Stringgod
Stringgod on 29/8/2017 at 02:32
Hi !
I'm stuck and maybe too stupid to understand.
I want an objective like "Get at least 6 Rope Arrows". In game are 8.
How can I do that ?
I read about a TrapThreshold . I loaded the tnhScript.osm. In my naive mind I thought that there were new Traps in the
object hierarchy thingi, but ther aren't. :)
How do I set this up ? ... Maybe create a marker and add Script:TrapThreshold ... ? And then ?
How do I let the TrapThreshold know, that there are 6 ?
If there is a tutorial for stupid people, pleasy let me know.
String
LarryG on 29/8/2017 at 03:13
I don't know anything about TrapThreshold, but if I wanted to count the number of a thing that the player collected, I would increment a qvar every time an instance of the thing was picked up (contained). I would suggest looking at the NVScripts for scripts to increment a qvar and test a qvar against a desired value.
Unna Oertdottir on 29/8/2017 at 05:31
CD from ropes to trap
script trap: TrapThreshold
Design Note of the Trap:
threshold=6;global=1
Stringgod on 29/8/2017 at 10:34
Quote Posted by Unna Oertdottir
CD from ropes to trap
script trap: TrapThreshold
Design Note of the Trap:
threshold=6;global=1 <----------------------------
I think, this is exactly what I need. Thx.
I read about the design note, but how do I know what to put in there ?
Why do you know this ? :D
Yandros on 29/8/2017 at 10:39
As Unna said, you put "threshold=6;global=1" in the Design note (without quotes). Then create a QuestVarTrap and give it the Trap > QuestVar property of "=1:goal_state_x" (without quotes) where x is the number of your goal. Then, add a ControlDevice link from the trap to the QVTrap.
Stringgod on 29/8/2017 at 11:45
I found that, but didn't get what to do . Now I start to get it. Thx.
Zontik on 29/8/2017 at 12:43
I'm not the only one who can't guess how to convert threshold (integer) from documentation into threshold=6; for Design note. Great that somebody somehow knows that.
Stringgod on 29/8/2017 at 12:59
I had an idea how to do that without a custom script, but don't know if it could work.
Say you make an NPC with somehow 60 lifepoints, or 6 ... .
Now you make shure that every time you pickup a rope arrow, the npc will be damaged. Teleport markers (cd from rope arrow to the markers) with a source fire stim with intensity 10 to the npc.
The npc dies after 6 sources. TrigSlain from the NPC triggers the Objective ....
Maybe that could work . :D
Yandros on 29/8/2017 at 13:40
It would probably work but is way overly complicated and also prone to errors. Simply incrementing a qvar on each arrow pickup and then a QVtrigger when it is >= 6 would be much simpler, although the TrapThreshold setup you have now is also simple.
Zontik: That's the way arguments in Telliamed's scripts all work, and I think it's mentioned in the docs somewhere. He lists parameters and you have to assign them values in the design note.