Cardia on 12/2/2015 at 15:02
I´ve seen this in some missions, but how can i for explample place an item in a jewel box or in a footlocker, i have this task where this women ask garrett to find the doll of her daughter and place it in the footlcker, once the doll is placed in the footlocker a key appears, how can i make this happen, how can i place something in a footlocker and then make a key appear?
ZylonBane on 12/2/2015 at 15:35
You neglected to mention if the player should be able to take it back out of the footlocker. If not, it's just a standard Consume setup.
Cardia on 12/2/2015 at 16:32
Quote Posted by ZylonBane
You neglected to mention if the player should be able to take it back out of the footlocker. If not, it's just a standard Consume setup.
the item should not be pickupable again
Random_Taffer on 12/2/2015 at 17:04
Quote Posted by cardia1
the item should not be pickupable again
I don't remember exactly, but it isn't too hard to setup.
Check out how I did the setup for dropping the money box on the desk in the apartment in Vagabond.
IIRC, I used an invisible, invincible rat to watch the desk. Once it detected the money box there, it would cause it to become unfrobbable, then trigger something else.
There's probably a more elegant way to do this, though.
R Soul on 12/2/2015 at 17:27
Make a copy of the doll, and place it in the footlocker, then make it invisible and unfrobbable. When the real doll is used on the footlocker, it gets deleted and the copy becomes visible.
1) Make a custom stim ((
http://dromed.whoopdedo.org/dromed/customstim) instructions here). Call it DollStim.
2) Edit the proerties of the real doll (the one that will be given to the player)
Add Act/React > Sources:
Stimulus: DollStim
Propagator: Contact
Intensity: 1
Click on Edit Shape:
Contact Types: Collision, Frob in Inv -> World (Collision allows the doll to be dropped on the footlocker. Remove it if you don't want that)
Add Engine Features > FrobInfo
Inv Action: Move
Tool Action: Move
3) Make a copy of the doll, and edit the properties:
Add Renderer > Render Type: Not Rendered
Place it in the footlocker.
Make a not of its object ID
4) Edit the footlocker's properties:
Add Act/React > Receptrons:
Add:
Stimulus: DollStim
Min: 0.9
Max: 1.1
Effect: Destroy Object.
Target Object: Source
(this will delete the original doll)
Add another one:
Stimulus: DollStim
Min: 0.9
Max: 1.1
Effect: Remove Property
Target Object: [the ID of the copied doll]
Edit Effect:
Prop Name: rendertype
(the copied doll should become visible)
That's the doll part done. The key part depends on how it should appear. Does it just pop into existence in front of the player, or should it go straight into the player's inventory?
Random_Taffer on 12/2/2015 at 17:27
Actually on second thought, this isn't going to help you because you can't drop something inside a foot locker. It will simply float on top.
What you'd want to do is have the item behave like a key which "opens" the thing that triggers a non-frobbable duplicate object to port in inside the footlocker and also ports the one the player has in their inventory to a blueroom.
EDIT: OR JUST DO WHAT R SOUL SAID
ZylonBane on 12/2/2015 at 17:47
Is a setup that complicated really what Looking Glass did for, say, the Watchman's Grave in The Haunted Cathedral, or the elemental wards in Return to the Cathedral?
Yandros on 12/2/2015 at 18:12
I don't know, but I wouldn't consider Robin's suggestion complicated. It's an appropriate usage of A/R, and is more elegant than a conversation pseudo-script or similar setup which requires an AI and other additional objects.
ZylonBane on 12/2/2015 at 20:38
Hm. In SS2 the script "ObjConsumeButton" is used as a general-purpose solution for this sort of scenario. Drag, say, a battery from inventory onto a generator, and the script "consumes" the dragged item and then sends a TurnOn signal. Does this not exist in T2?