|
Post by brainsoup on Feb 13, 2022 14:14:35 GMT -5
Hello!
I'm interested in creating an interaction in which the outcome is based on the object's swatch color. I'm working on an item that you're able to retrieve something from and it is necessary that it matches the original item's color. I'm using "create object" to make the item appear in the sim's inventory.
Currently I'm using "outcome single" which of course means that the outcome will be the same, regardless of the item's color. But I've noticed that there is such a thing called "outcome test based" and I know that each swatch color has a unique instance key. Is it somehow possible to make the game test for the swatch instance of the object and then direct you to a certain outcome based off of that?
Thank you so much if you have any insight on this to share.
|
|
|
Post by MizoreYukii on Feb 24, 2022 21:48:25 GMT -5
Yes, you're looking for a test called object_definition_criteria, and there's also object_criteria. They are similar but differ, can't remember which one is usually the best but I think it's the definition one. Anyhow, inside that test you're wanting an identity_test and to test for it's definition_id. You convert the Object Definition instance of the respective swatch from Hexadecimal to Decimal using the Hash Generator, then insert where it says actual_object. The food stalls in the game are one example of where this is used in an interaction's outcome.
|
|
|
Post by brainsoup on Mar 1, 2022 6:22:33 GMT -5
Awesome, thanks! I'll check that out.
|
|