How to make a sprinkler head

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
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
Or one that goes in a circle?
Side view? Top view?
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
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?