9 years ago
Applying material_state in interactions
I made an object that I would like to be able to change its material state depending on how it is used in game. However I can't get the state change to work -- the actual material state itself works fine (when applied with the design tool I mean), and I'm not getting any exceptions either when I try to do the state change in game (by way of the interaction).
Right now, for testing / unborking, I'm trying to get it to work the way the Bonsai Pot does it, with an immediate super interaction that's available directly on the object. (Next step would be to tie that into the actual crafting procedure, but for that I want to verify first that the state change works on its own .. )
What I have atm:
* State list, like in the bonsai (I'm only using the last one -- "_grape" -- for testing):
S4_5B02819E_00000000_9C7DAF25_pbox_juiceblender.xml
* Individual states, also like in the bonsai:
S4_5B02819E_00000000_DA2106E1_pbox_juiceblender_grape.xml
* Interaction (C+P from the bonsai, more or less):
S4_E882D22F_00000000_99B82F067DC5279D_pbox_juiceblender_ChangeObjMaterialState_grape_Immediate.xml
* And finally, the object tuning - relevant bits:
S4_B61DE6B4_00000000_80607E2FF8C97A8F_pbox_object_JuiceBlender.xml
Can't post the full code here since it's telling me "Body is 13997 characters too long" =P
The name of the material state is correct as well, as far as I can see -- I gave the object a catalog instance with "drink_08" as material variant name, and with the design tool I can use that just fine.
Object upload is here -- this is split into three packages, "interactions" is the most interesting one right now (plus "object" which has the actual recolour). The previous version, without the material stuff, is also available here.
Right now, for testing / unborking, I'm trying to get it to work the way the Bonsai Pot does it, with an immediate super interaction that's available directly on the object. (Next step would be to tie that into the actual crafting procedure, but for that I want to verify first that the state change works on its own .. )
What I have atm:
* State list, like in the bonsai (I'm only using the last one -- "_grape" -- for testing):
S4_5B02819E_00000000_9C7DAF25_pbox_juiceblender.xml
Spoiler
3951525336
4124636623
801373366
517599605
4031633664
3659597537
* Individual states, also like in the bonsai:
S4_5B02819E_00000000_DA2106E1_pbox_juiceblender_grape.xml
* Interaction (C+P from the bonsai, more or less):
S4_E882D22F_00000000_99B82F067DC5279D_pbox_juiceblender_ChangeObjMaterialState_grape_Immediate.xml
Spoiler
3659597537
0x77CF3624
Actor
Object
False
OBJECT
26171
TEEN
YOUNGADULT
ADULT
ELDER
CHILD
Actor
* And finally, the object tuning - relevant bits:
S4_B61DE6B4_00000000_80607E2FF8C97A8F_pbox_object_JuiceBlender.xml
517599605
set1-materialVariant
3951525336
drink_03
4124636623
drink_04
801373366
drink_05
4031633664
drink_07
3659597537
drink_08
517599605
77076
77077
77076
True
35956
35957
35957
NONE
11076654988444116893
Can't post the full code here since it's telling me "Body is 13997 characters too long" =P
The name of the material state is correct as well, as far as I can see -- I gave the object a catalog instance with "drink_08" as material variant name, and with the design tool I can use that just fine.
Object upload is here -- this is split into three packages, "interactions" is the most interesting one right now (plus "object" which has the actual recolour). The previous version, without the material stuff, is also available here.