Game Maker's Garage Forum
Game Creation => GameMaker => Topic started by: Gnome on May 04, 2008, 09:13:22 AM
-
what does it do? ???
-
It displays another card's picture on the current card.
EXAMPLE:
You are on card 10. In a script in card 10 you write:
PICT 20
When you run that script it will show card 20's picture in the picture area.
-
Oh, That'll save me a bunch of time!
Thanks Al!
-
I once tried to use PICT/PICT CLEAR in a timer and it didn't work...I was trying to get a "flashing" effect.
the code was something like
ON TIMER 10 PICT CLEAR
ON TIMER 10 PICT
ON TIMER 10 PICT CLEAR
ON TIMER 10 PICT
Am I totally messing this up? :D
-
Yes. In order to do a flashing effect using the PICT command you need a blank card. Also, since you cant put TIMERs within TIMERs you have to use a loop script. This is how I would cause the flashing effect. just so you know this flashing effect would be permanent until you go to a different card.
(lets use 25 as our blank card and 20 as our current card)
"Loop Script ON"
IF x = 0 THEN
x = 2
ON TIMER 10
x = 1
PICT 20
END TIMER
END IF
IF x = 1 THEN
x = 2
ON TIMER 10
x = 0
PICT 25
END TIMER
END IF
If you need to put other stuff in the card script you can
IF y = 0 THEN
y = 1
'all my cool commands and stuff'
END IF
-
Card 25 doesn't have to be blank. You can use this as a way to keep flashing between 2 pictures to create sort of an animated card picture. Here's really simple code to do it.
ON TIMER 10
TOGGLE X
IF X = 0 THEN PICT 25
IF X <> 0 THEN PICT 20
END TIMER