TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 19 of 19

Thread: Frob inv object on world object

  1. #1
    Member
    Registered: Sep 2012

    Frob inv object on world object

    Hi taffers

    Basically I'm trying to do a simple trigger script where the player has to find 3 items and use it on a certain object in the world, which will trigger a script.

    It sounds fairly simple but I have never done it and I can't figure out how to do it either. Any help is appreciated!

  2. #2
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    You need TrigWorldFrob script on the objects
    Frobinfo: World Action--Script
    CD the objects to a RequireAllTrap.

  3. #3
    Member
    Registered: Sep 2012
    Quote Originally Posted by Unna Oertdottir View Post
    You need TrigWorldFrob script on the objects
    Do you mean on all objects? So the 3 items and the world object?

    Right now I got as far as making the world object frobbable but it only functions when I click on it without an item. I'm confused about how to make sure the world object 'knows' which items it needs, like how to connect them.

    Thank you for the quick reply btw

  4. #4
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    I misunderstood, sorry.
    First, you need a trigger. You might use S&R, a contact stim on the objects to trigger the "certain object" 3 times. The "certain object" is also acting like a trigger, so the receptron might frob a button each time.

    Load tnhScripts
    Put trapthreshold script on a marker (this is the counter)
    design note: threshold=4;global=1

    link the "certain object" or the button to the counter
    link the marker (counter) to the qvartrap or whatever you need
    Last edited by Unna Oertdottir; 26th Nov 2018 at 08:59.

  5. #5
    Member
    Registered: Sep 2012
    No worries

    I got the script loaded and added the design note. I'm not sure which S&R to use in this case. There is 'Touch', but which effect should I give to that?

    I linked the object (it's an alchemy table) to the counter, using CD, and linked that to the objective (that last one does work on its own because I've tested it with a simple button)

  6. #6
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    You better create and use a custom stim.
    Just add a source on the table (contact)
    Receptron on the other objects (contact) Contact Types: Collision
    Effect: Frob object (a button)
    Create the button first. This the trigger for the counter.

  7. #7
    Member
    Registered: May 2002
    Location: Texas
    One thing I would like to add: on the objects you carry, add Engine Features -> Frobinfo and under Tool Action select Script. On the table do the same thing except add Script to World Action.

  8. #8
    Member
    Registered: Sep 2012
    As of now my 3 objects have a custom Receptron AlchemyStim (I don't know if I needed to do anything with the Stim itself?)

    Stimulus: AlchemyStim
    Min & Max Intensity (I don't know what it does, I've set it to 7)
    Effect: Frob Object > Button (it's physically in the world)
    I can't seem to add "contact" to this one, it doesn't have a Propagator setting.

    The Alchemy table has a Source AlchemyStim.
    Propagator: Contact
    Intensity 7

    The items are linked to the table with a CD link (is this still necessary?)
    The button is CD linked to the counter, which is CD linked to a door (for testing purposes)

    But it's not doing anything. The 3 items and the table have the script "TrigWorldFrob
    The Frobinfo's were already set exactly as john later added.

  9. #9
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Here's a ugly demo
    http://www.mediafire.com/file/awss81...y/Nib.zip/file
    3 keys on the floor, drop them on the table and the door will open.

  10. #10
    Member
    Registered: Sep 2012
    Thank you for the great help,

    I see where I got confused, I thought I had to frob the table with the 3 items, but I have to drop them on the table instead (didn't even think of this!). Mine works, sort of.. I can pick up the same item again and drop it another 2 times which will also activate the door. I need to make it so that the trapthreshold does a -1 to the global counter when an item is picked up again from the table.

    Also, I noticed that in your demo, even though your threshold is set to 4 and global to 1, the door opens after dropping 2 keys on the table. Changing it to 5 works, but sounds risky?

  11. #11
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    You could add FrobInert to the objects after dropping it, so you can prevent collecting it again (add metaproperty-->FrobInert).
    The items are falling through the table in this case. That's why the stim doesn't always work correctly. I recommend making a very thin solid under the table and adjust the dimensions of the table (z offset).

  12. #12
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Unna, you're solving a different problem than what he asked. Frobbing an object with an object is a completely different operation from physically dropping an object on an object.

    In SS2 there's a pair of scripts named ToolConsumable and ObjConsumeButton. You put the first script on an object that can be "consumed" (a battery, etc), and the second script on the object that will be frobbed with the first, acting like a button when it receives an object of the correct ConsumeType archetype. These scripts could do exactly what Niborius wants, in combination with an NVScript capacitor.

    If there any equivalent to these scripts in Thief?

    Edit: The statues that receive the talismans in The Haunted Cathedral work somewhat like this. The talismans are actually keys that are taken from the player when used.
    Last edited by ZylonBane; 27th Nov 2018 at 00:59.

  13. #13
    Member
    Registered: Sep 2012
    @Zylon

    Either way are fine by me, although frobbing would be preferable. It's what got me a little confused though.

    I'll see if I can look into the talismans of T1, although I don't have the game installed at the moment.

  14. #14
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    The Talisman-Ward setup involves some specialized scripts, so their actions may not be desirable, and they haven't been ported to T2 (not even with PublicScripts). I don't think any key-lock system would be suitable in this case because the lock will be toggled by each 'key', and the locked schema will confuse the player because it will seem like something has been done wrongly.

    Here's what you should do:
    Make the table frobbable: FrobInfo property, WorldAction: Script (it doesn't matter that the table doesn't have any scripts, it just makes it frobbable).

    To each inventory object (the ingredients):
    Add an Act/React source. Stimulus: AlchemyStim.
    Propagator: Contact.
    Edit shape: Contact types: Select Frob in Inv -> World. Collision is selected by default. You can leave it selected if you also want to allow the player to drop the objects, otherwise deselect it.
    In this case the intensity number doesn't matter, so go with 7.
    Add the FrobInfo property: ToolAction: Move
    If you only want frobbing to work and not dropping, also add the property Inventory > Can't Drop This: True, so that the player will very quickly work out how to use the objects.

    Each ingredient will send an AlchemyStim to any object it's used on.

    Give the table a receptron for this, no min, no max (or min 6.9, max 7.1 if you prefer).
    Effect: DestroyObject. Target: 'source' (i.e. the specific ingredient that was used).
    Add another receptron for the same stim/intensity: Frob object. Target: Object number/name of the object with the TrapThreshold script.

    That script doesn't respond to being frobbed, so give the TrapThreshold object another script: TrigFrobber (also from tnhScript). This converts a frob messages to a TurnOn messages, which TrapThreshold does respond to. You can then give this a CD link to whatever effect you want.


    You can customize that setup. E.g. you could add another receptron that causes a small puff of smoke each time an ingredient is use.
    Each ingredient sends the same stim, but you could create a custom stim for each one, allowing the table to respond differently, e.g. different ingredients appearing to go in to different bowls (one receptron effect is 'change object model', so you could replace an empty bowl with a full one), but always frobbing the TrapThreshold object.

    edit: Alchemy video:
    Last edited by R Soul; 4th Dec 2018 at 17:12.

  15. #15
    Member
    Registered: Sep 2012
    That's a super detailed explanation, and I really appreciate your effort in helping me. Still, I'm stuck somewhere. When I use an ingredient on the table, it disappears correctly, but it doesn't do anything afterwards. I even tried to change the "reaction" of the table to trigger the door directly, and it didn't open.

    I have to add that the table has its Receptron on the world object, not in the .gam hierarchy. The ingredients do have their own hierarchy.

    Scripts are activated of course. I did everything step-by-step exactly as you told me to

  16. #16
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    I'd be happy to have a look at the setup if you upload some screenshots of object properties, or the mission (if it's an FM in progress, rather than a test mission, if you isolate the place with an area brush I promise not to peek).

  17. #17
    Member
    Registered: Sep 2012
    Sent you a pm! Thanks!

  18. #18
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    Fixed. There 'threshold' object also needs the property FrobInfo: WorldAction: Script so that the TrigFrobber script will respond to being frobbed by the table. In the demo, you set the threshold value to 2, but it should have been 1 because there was only 1 ingredient in place.

  19. #19
    Member
    Registered: Sep 2012
    Yes!! That works!! I didn't know about the FrobInfo on the Threshold object, but it makes sense now.

    I had set the Threshold value to 2 because I thought "global" meant the value it's on when you load the mission.

    Thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •