turn off touch

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
hey guys,
is there a way to turn the touch off until an actor collides with some other actor so that the players touches don't spawn new actors? I have it set up right now that I want to pan around and show the level without the player being able to do anything the panning is completed. any thoughts? thanks.
SM

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    have a attribute called touchOn and set it to 0

    have all the rules that you want disabled at first in a rule that says if attribute touchOn=1

    then whenever you want to turn them on after a touch or collide behavior, just change attribute touchOn to 1

    cheers
  • SAMmanSAMman Member Posts: 228
    thanks for the reply. I am trying that but it doesn't seem to work. maybe I am missing something.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yeah that works so you gotta be missing somethign.

    OK so first off make your new game attribute called touchOn and have it set to 0.

    Now next say you have a rule when touch is pressed spawn actor or something like that, make a new rule that says when attribute touchOn=1. Then take the other when touch is pressed spawn rule and put it inside the new touchOn rule. Now do that to all the rules you want to be disabled at first.

    Then whenever you want them to turn on use a change attribute behavior and change attribute touchOn to 1.
  • SAMmanSAMman Member Posts: 228
    yeah, that makes sense. but what I want is to be able to click and spawn at the same time. right now with that set up that way, I click and then it spawn in the last place I clicked after that attribute is changed to 1.
  • SAMmanSAMman Member Posts: 228
    I think it is a bug in my game and it must be interfering with another attribute. thanks for the help.
  • SAMmanSAMman Member Posts: 228
    it works in the demo I just made. huh, must be on me then.
Sign In or Register to comment.