Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change member and disappear problem

Status
Not open for further replies.

soldieryap

Programmer
Aug 15, 2000
59
MY
i created a image and a animated image... i set when the animated image INTERSECTS image, the image will change to another cast member and disappear .... but it how to make it disappear?

sprite(me.spriteNum).member = member("changed")
updateStage

this script will change the image then disappear after that?

when i try this code:
sprite(me.spriteNum).member = member("changed")
sprite(me.spriteNum).memberNum = 0

it will disappear very fast before change the member... so how to do that??? thankxx
 
You might want to try expirementing with the "pause" or "timer" lingo right after you change the castmembers and before you make it disappear.

Not sure but you could try something like:

onpauseForTwo
startTimer
repeat while (the timer <120)
end repeat
end

this pauses the animation for two seconds (120 ticks) before allowing it to continue. If you call the procedure before you allow the sprite(me.spriteNum).memberNum = 0 to run, it should do the trick.

another option is:

on pauseForTwo
t = the ticks + 20
repeat while (the ticks < t)
end repeat
end

Good luck, if it doesn't work it should point you in the right direction.
 
i think taht you are talking here about an explosion and the member you are mentioning is the flames, if this is the case (or something similar) there is a better way to do it

-have a sprite that already is the flame but keep it
invisible

- when the intersection happens,set the coordinates of the flame to the proper position, set the visible of the flame to true, wait a little (use the code code given in the previous feedback) make the misible of the sprite you want to kill to false, and then make the visible of the flame false again.
this method is better because it allows more flexibility, in terms of fading out..etc

tell me if you think it was helpful :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top