Making something happen every few seconds...

Started by De-Communizer, Tue 16/09/2008 13:27:03

Previous topic - Next topic

De-Communizer

Hi there, I was wondering about making something change states every few seconds. For example, if I have a security camera - what I want to do is every five seconds, make it swing around to a different angle (which I'd do by changing the sprite, since it's an image) and changing which region on the floor is "active" (to simulate the camera's field of view). How would I make it so that both the active region, and the camera's appearance change every few seconds?

Thanks in advance for your help!

Khris

You'd use a Timer.

As for changing the active region, either enable it and disable the previously active one (by changing their .Enabled property to true/false) or use a variable holding the current active region's number.

SMF spam blocked by CleanTalk