How to make a sprinkler head

ChucklingMonkeyChucklingMonkey Member Posts: 92
edited November -1 in Working with GS (Mac)
Hi,

How would I make a sprinkler head? What i want it to do is is every 5 seconds come up from the ground, and then go back into the ground. I think I would have to do a timer which is every 5 seconds and change image to the between the ground image and the top image. Just seeing if I'm right on that. And what I want it to do is when it is above ground to spray a substance that would cause the player to loose health but it can only spray up to a certain distance. And lastly when the sprinkler head is down in the ground your able to to shoot at it which would cause it to die and disapear. How would I do this?

Thanks

Comments

  • hotMagichotMagic Member, PRO Posts: 266
    A sprinkler like one of those arc ones that goes back and forth? Or the one that goes sideways, then comes back?
    Or one that goes in a circle?

    Side view? Top view?
  • ChucklingMonkeyChucklingMonkey Member Posts: 92
    hotMagic said:
    A sprinkler like one of those arc ones that goes back and forth? Or the one that goes sideways, then comes back?
    Or one that goes in a circle?

    Side view? Top view?

    Side View, 2D, The ones that look like this http://www.infinitidebtsolutions.net/images/sprinkler1.jpg
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    i would do this:

    make a attribute called sprinklerUp

    first off have your sprinkler image behind the ground actor and below it.

    Next have a rule every 5 seconds change attribute sprinkerUp to 1

    make a rule in the sprinkler when attribute sprinklerUp=1 interpolate self position to whatever(whatever the right position is above ground)

    then open up the otherwise section of that rule and put a interpolate behavior, interpolate self position y to whatever its starting y is when its hidden

    then finally have a rule somewhere when attribute sprinklerUp=1
    timer after 1 seconds run to completion CHECKED
    --change attribute sprinklerUp to 0

    cheers
  • ChucklingMonkeyChucklingMonkey Member Posts: 92
    JohnPapiomitis said:
    i would do this:

    make a attribute called sprinklerUp

    first off have your sprinkler image behind the ground actor and below it.

    Next have a rule every 5 seconds change attribute sprinkerUp to 1

    make a rule in the sprinkler when attribute sprinklerUp=1 interpolate self position to whatever(whatever the right position is above ground)

    then open up the otherwise section of that rule and put a interpolate behavior, interpolate self position y to whatever its starting y is when its hidden

    then finally have a rule somewhere when attribute sprinklerUp=1
    timer after 1 seconds run to completion CHECKED
    --change attribute sprinklerUp to 0

    cheers

    Thank you so much! One question, where do I put the 5 second rule? And what about how to make it spray?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    u can put it in the sprinkler if u want
  • ChucklingMonkeyChucklingMonkey Member Posts: 92
    JohnPapiomitis said:
    u can put it in the sprinkler if u want

    No I mean how would I have the sprinkler spray out water up to a certain distance that can harm the player?
  • hotMagichotMagic Member, PRO Posts: 266
    I would make a separate object called water. From what you told us, from sideview it would look kind of like it shoots both directions.

    When sprinkler gets up to Up position as John described, then either Spawn or telelport (via changing the coordinates, which is less costly) that object to a relative position of the sprinkler head.

    It can have an animation to make it look good.

    Set it up so when player touches an object of tag water, he gets damaged.

    Is that what you were meaning?
  • ChucklingMonkeyChucklingMonkey Member Posts: 92
    hotMagic said:
    I would make a separate object called water. From what you told us, from sideview it would look kind of like it shoots both directions.

    When sprinkler gets up to Up position as John described, then either Spawn or telelport (via changing the coordinates, which is less costly) that object to a relative position of the sprinkler head.

    Yeah Thanks soo much!

    It can have an animation to make it look good.

    Set it up so when player touches an object of tag water, he gets damaged.

    Is that what you were meaning?

Sign In or Register to comment.