Jump to Main Content

Knowledge Base

Knowledgebase Home | Glossary | Favorites | Contact Knowledgebase Home | Glossary | Favorites | Contact
Search the Knowledgebase Browse by Category
How can I change a material's textures using a Trigger behavior?
A number of different triggers can be used to instigate the change of a Material's textures. In this example we are going to use the Trigger\Keyboard Trigger.

Add the following Behaviors to the environment: Trigger\Keyboard Trigger, Misc\Property Modifier
.

1. Set the Keyboard Trigger Key property to A. Then set the Trigger property to Property Modifier then set the Trigger Event property to Start.

2. Set the Modifier property of the Property Modifier to Increment Only. Set the Target property to be the Material whose texture you want to change. Set the Property property to Texture. Finally click on the button in the High Value property and choose the replacement texture from the dialog.

To test, press the A key. The Keyboard Trigger will capture the key press, and then trigger the Start event of the Property Modifier Behavior which will change the texture being used by the Material Behavior.



Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.

Powered by ActiveKB Knowledgebase Software