Topic:   PICT command   (Read 9644 times)


0 Members and 1 Guest are viewing this topic.

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
PICT command
« on: May 04, 2008, 09:13:22 AM »
what does it do?  ???
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: PICT command
« Reply #1 on: May 04, 2008, 10:18:30 AM »
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.

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
Re: PICT command
« Reply #2 on: May 04, 2008, 10:51:22 AM »
Oh, That'll save me a bunch of time!
Thanks Al!
« Last Edit: May 04, 2008, 10:51:41 AM by Gnome_Again »
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

Charlo


  • GMG-er

  • **


  • Posts: 451
Re: PICT command
« Reply #3 on: May 04, 2008, 08:57:35 PM »
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

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: PICT command
« Reply #4 on: May 04, 2008, 09:52:17 PM »
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
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: PICT command
« Reply #5 on: May 05, 2008, 07:27:24 AM »
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
« Last Edit: May 05, 2008, 07:29:54 AM by AlStaffieri »