When touch is pressed-stop actor from spawning.....

iTouchGameriTouchGamer Member Posts: 681
edited November -1 in Working with GS (Mac)
Is there a way to do this??

Not the actor that is pressed, a different actor that I have spawning..

Comments

  • ChaserChaser Member Posts: 1,453
    Make global game attribute so that when it is say 1 it spawns and 0 it doesnt. on the second actor touch is pressed change that attribute to 0
  • iTouchGameriTouchGamer Member Posts: 681
    Ok thanks! But I have the actor spawning every second.....I'm just a little confused.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Have a interger attribute called spawn and have it set to 0

    In the actor you have spawning have a rule when attribute spawn= 0

    then put your timer in that rule where its every sec, then put the spawn behavior in that timer in the rule

    then in the actor you want to press to stop spawning have when touch is pressed change attribute spawn to 1
  • iTouchGameriTouchGamer Member Posts: 681
    This isn't working for me lol. I'm just confused. I did all of what you guys said, but it's still spawning.... :(
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    iTouchGamer said:
    This isn't working for me lol. I'm just confused. I did all of what you guys said, but it's still spawning.... :(

    what other rules do you have. Take a screen shot of your rules in the spawn actor, and in the actor you press to stop spawning
  • iTouchGameriTouchGamer Member Posts: 681
    Wait a sec lol, I have an actor, that when I move it, spawns another actor, so the 1st actor is like drawing a line of the 2nd actor.

    I have a rule in the 1st actor that says:http://f.cl.ly/items/1a2k3q0Q2H3l1H0e3y2Z/Screen shot 2011-02-18 at 9.39.35 PM.png
  • AsymptoteellAsymptoteell Member Posts: 1,362
    fixing the link.
    iTouchGamer said:
    Wait a sec lol, I have an actor, that when I move it, spawns another actor, so the 1st actor is like drawing a line of the 2nd actor.

    I have a rule in the 1st actor that says: http://f.cl.ly/items/1a2k3q0Q2H3l1H0e3y2Z/Screen shot 2011-02-18 at 9.39.35 PM.png

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you have no time in the timer, put every .5 seconds to start . Also i noticed your spawning a dot, spawn it in front of the actor instead of behind just so you can see if its working. And that rule should be in the actor you want to be spawning the actor
  • iTouchGameriTouchGamer Member Posts: 681
    That's the point, I want it to make it look like the actor is drawing the dot. It spawns every 0 sec. which means always, so it looks like a line. lol sorry if this is confusing.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    iTouchGamer said:
    That's the point, I want it to make it look like the actor is drawing the dot. It spawns every 0 sec. which means always, so it looks like a line. lol sorry if this is confusing.

    Your gonna kill your performance in about 2 mintues spawning something every 0 seconds, besides the fact its not gonna work how you want like that.

    First thing first just change it how i said and see if it works, you can adjust it once its working
  • AsymptoteellAsymptoteell Member Posts: 1,362
    Timers only work down to .1 seconds. Anything less registers as .1 secs.
  • iTouchGameriTouchGamer Member Posts: 681
    Ok, I tried that, and it worked, but now it doesn't look like a line.... just dots.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Asymptoteell said:
    Timers only work down to .1 seconds. Anything less registers as .1 secs.

    well technically every 0 seconds will spawn as much as the cpu can pump out.

    @iTouch change it to 0.1 seconds
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Also i didntknow you wanted a line, i just though a trail of dots. If you want a actual line the best way is not o not make it a with a bunch of dots , but an actor that has a line image or a actor scaled to be a line. Try what i posted above though changing the timer to 0.1 seconds and see if you liek it like that. IT will give you a nice dotted line effect.

    Then to finsih your question have a rule in the actor you want to touch to stop the spawning, when actor recieves event touch is pressed change attribute spawn to 1
  • iTouchGameriTouchGamer Member Posts: 681
    Ok, thanks! The 0.1 thing worked, as well as the stop spawning. I'm gonna try and find a good line to make as an actor....
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    iTouchGamer said:
    Ok, thanks! The 0.1 thing worked, as well as the stop spawning. I'm gonna try and find a good line to make as an actor....

    glad its working.
  • iTouchGameriTouchGamer Member Posts: 681
    Asymptoteell said:
    Try this: http://gamesalad.com/game/play/79364

    Would I just put that "Segment" in instead of the dot actor?
Sign In or Register to comment.