Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Firstly as a 3D artist and a UI designer and developer second. Coppercube is a brilliant and amazing product Niko. Well done!! I have one problem with two possible solutions. It's built around the configurator concept. The only thing that's messing me up is the logic. I have a car and I have imported all the elements individually. e.g. body panels etc. The idea is to click on a body panel and have it go from white to red successively and then back to white to indicate severity of the damage. As far as I can understand it. Adding multiple behaviours to a single node does not work as it only sees the last action you added. My javascript is very basic and I'm struggling with the logic to make it work. Any help would be greatly appreciated. Thanks in advance. |
||||
|
Mutliple behaviors should work, but if you have multiple ones which influence the same thing (like the position), then this will cause conflicts. Depends on what you want to do exactly, there are usually workarounds possible. If you could write down in detail what you need, we might be able to help you |
||||
|
Thanks for the reply erik. Alright. I'll try to flesh it out as best I can. I have a 3d model of a car where all the panels on it have been imported as separate items. The function I require is that on click - this item. e.g. FrontRightDoor . It will change to yellow. I have no problem with the first one. Since I'm just changing the texture. But it has to change to red when you click it again and then back to white. And that's pretty much it. I have tried adding more than one action but this hasn't worked as I expected. I come from a predominantly Director - lingo background and in many cases this way of doing things worked very well for multiple actions on an object or node. I figured that javascript would be the only solution. Though I'm lost when it comes to specifying and structuring variable statements. Any ideas? |
||||
|
I tried to make an example "so I learn something, too." I am attaching a scene basis that I created. link : https://www.dropbox.com/s/i01gkq... PS: translation by Google. |
||||
|
Wow pmax!! That's almost exactly what I'm looking for. How did you do it? |
||||
|
Open the file "change_texture.ccb" with CopperCube and controls the whole scene. Since we use Google to translate everything is very slow to explain. |
||||
|
Ah yes. For some reason my PC seems to have thrown away it's file associations. Thank you very much pmax. This will be perfect. I will post a demo soon. |
||||
|
You can do it with a Behavior and multiple Actions which have additional Actions embedded. When the object is clicked use a variable to keep track of the number of clicks and assign the texture based on that variable. When you're at the end of your sequence, change the texture *and* reset the variable to start over. Behavior: When clicked on do something ----Action: Add 1 to variable objColor (variables are created equal to zero) ----Action: If objColor = 1 --------Action: Change to texture 1 ----Action: If objColor = 2 --------Action: Change to texture 2 ----Action: if objColor = 3 --------Action: Change to texture 3 --------Action: set variable objColor to 0 |
||||
|
Thanks to everyone for your invaluable input. I ma in the process of finishing up this project and will post the end result soon. |
||||
|
Sorry to revive an old thread. I cant get to the Dropbox link to work. Is there any other type of template I can download that is similar to this one? |
||||
|
I restored DropBox link. |
|