Anton11 Posted April 2, 2019 Share Posted April 2, 2019 Hi, I am trying to make a wall generator. A wall is divided into segments and each segment has a @windowType attribute which decides what type of window will be displayed on the wallsegment. The user interface will work as follows. The user has access to 2 sliders: one to select a wallsegment on which the changes will apply and a 'select new type of window' - slider, which allows the user to pick out of 5 presets. The chosen preset will be displayed on the wallsegment. The way I got this to work was by declaring an if-statement stating: if(wallselected == @primnum) { @windowpreset = chi('selectNewTypeOfWindow)'; } This works. But a problem occurs. When I want to select another wallsegment that I want to change, the new preset jumps to the newly selected wallsegment, which means that the previous wallsegment (it's @windowType attribute that is) remains unchanged compared to before. Is there a way to make sure that the preset of a wallsegment remains changed, even when the if-statement isn't applicable anymore? I hope this is somewhat understandable. Thank you for looking into this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.