LarryG on 25/5/2014 at 10:12
I want to have a QuestItem placed at one of several possible locations, to be determined at mission start. There are several ways I can think of to accomplish this. None of them particularly clean or elegant.
One is by placing duplicate copies of the QuestItem at various locations, and at mission start initializing a QVAR to a random value between 1 and the number of the QuestItems. Each of the Questitems is assigned a number and all but the one with a matching value to the QVAR are destroyed. This is a little messy requiring a number of scripts to implement.
Another is to use (pervert) either CameraKiller, AIKillerWork (both from miss7.osm), or RandPatrolPt (miss15.osm), any of which might do the job, but really are intended for other purposes and do other things as well which are unnecessary in my case.
I was hoping to find a generalized script that at mission start simply deletes all but a specified number of objects from the set of objects linked to it. But I have not found such. Does anyone know of such a script?
Another idea to meet my need would be to have a single QuestItem which at mission start teleports to one of the possible locations (markers) randomly selected from ScriptParms links from the object. Does anyone know of such a script?
Does anyone know of any other way to accomplish the intended objective: placing a QuestItem at a randomly selected location at mission start?
FireMage on 25/5/2014 at 12:14
I have done it in one of my in-progress mission.
I placed a phantom with does patrol and randomsequence ticked. I have done that he start in the center of a blue room and around him, many boundstriggers that will activate some teleporttrap to place the wrong items, and the good item where they should be, and that a destroytrap will kill the phantom just after this task. I have done even more complex, I have put a second phantom but linked to a trap converse triggered by the boundtriggers, that will place some items in containers.
To make it the most efficient as possible, I found the thing to do: Place the blue close to the starting point to throw the dice at the beginning of the mission ;)
R Soul on 25/5/2014 at 13:45
NVTriggers can send stims with random intensities:
Quote:
"
[ScriptName]TOn="[5.00|10.00]WaterStim" 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.
You can give the quest object receptrons with the Teleport Object effect. Intensity 5-6: location 1, 6-7: location 2 etc. If the stim is exactly 6 (highly unlikely) the order of the receptrons will probably determine the location (the furthest down the list is the last one to respond).
That's the one with the fewest objects, because as you know, with NV scripts you can easily have objects send messages to themselves.
If you also want a clue for the player to read, the object's receptrons could also set a quest variable, since books can use those to choose which .str file to use.
((
http://www.thiefmissions.com/telliamed/scripts.html#legible))
Yandros on 25/5/2014 at 16:09
I was going to suggest something along the lines of what Robin did. S/R with stim intensities would be an easy way to do it I think. However I was going to suggest a custom fnord archetype put at each location with a receptron to create the quest item, set to different intensities, and have an NVRelay set to stim all concrete instances of that fnord with a random intensity stim over the appropriate range on startup.
LarryG on 25/5/2014 at 23:32
Thanks all!
What I did was what RSoul suggested, except I created a custom stim for it. You never know what some player might do, and I don't want the quest items teleporting all over the place if someone gets it wet before picking it up. :o
nicked on 26/5/2014 at 05:46
Out of interest, how did they do it with the key in Eavesdropping?
Nameless Voice on 26/5/2014 at 23:18
Another possibility would be to have a TeleportTrap at each location, each linked to the quest item, and then use NVRelayTrap to activate a random one of those (NVRelayTrapTDest="&?ControlDevice")