# How to do stuff with the scenes using the "If(condition

**URL:** <https://forum.kirupa.com/t/how-to-do-stuff-with-the-scenes-using-the-if-condition/3531>\
**Category:** programming\
**Created:** [October 21, 2001, 12:35pm UTC](https://forum.kirupa.com/t/how-to-do-stuff-with-the-scenes-using-the-if-condition/3531 "2001-10-21T12:35:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2001, 12:35pm UTC](https://forum.kirupa.com/t/how-to-do-stuff-with-the-scenes-using-the-if-condition/3531/1 "2001-10-21T12:35:23Z")

</div>

How can I do something like:  
If some guy presses a button in scene 1 and after that presses another button and goes to scene 2 then scene 2 appears but if he hadn’t pushed the button in scene 1 ,before he went to scene 2, then scene 2 wouldn’t have appeared

* * *

visit my homepage at [www.hot.ee/syko](http://www.hot.ee/syko)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2001, 2:09pm UTC](https://forum.kirupa.com/t/how-to-do-stuff-with-the-scenes-using-the-if-condition/3531/2 "2001-10-21T14:09:24Z")

</div>

button 1:

on(release){  
&nbsp &nbsp &nbsp &nbsp \_root.button1pressed=1;  
}

the if statement:

if(\_root.button1pressed){  
&nbsp &nbsp &nbsp &nbsp …do this…  
}else{  
&nbsp &nbsp &nbsp &nbsp …do that…  
}

sensical?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2001, 2:58pm UTC](https://forum.kirupa.com/t/how-to-do-stuff-with-the-scenes-using-the-if-condition/3531/3 "2001-10-21T14:58:58Z")

</div>

…yes very…  
thanx man…
