Author Topic: problem with AddToPic  (Read 1719 times)

0 Members and 1 Guest are viewing this topic.

Offline robingravel

problem with AddToPic
« on: May 30, 2003, 02:40:52 PM »
In the SCI studio help I can read:

void AddToPic(heapPtr viewList)

Draws the views contained in the viewList directly onto the picture as if they were originally part of the picture. They will stay there until the picture is discarded.


Example
AddToPic(viewList)
 

But it doesn't tell me how to make viewList.

Any help are welcomed.


Robin Gravel



Offline Brian Provinciano

Re:problem with AddToPic
« Reply #1 on: June 01, 2003, 05:08:03 AM »
Have a look in the class system scripts for how the inventory is done, as well as the cast. Heck, all of the lists listed in Main.sc will give you examples: gInv, gSounds, gLocales, gRegions, gCast to name a few.

Offline robingravel

Re:problem with AddToPic
« Reply #2 on: June 01, 2003, 10:43:24 AM »
Thanks for answering Brian.

Quote


/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 805)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm805 of Rm
 (properties
  picture scriptNumber
  north 0
  east 0
  south 0
  west 0
 )
 (method (init)
  (super:init())
  (self:setScript(RoomScript))

  (switch(gPreviousRoomNumber)
   (default
    (send gEgo:
     posn(150 130)
     loop(1)
    )
   )
  )
  AddToPic(
    view(send pView:0)
    loop(send pView:0)
    cel(send pView:0)
    priority(send pView:0)
    ((send pView:160) (send pView:70))
  )
  SetUpEgo()
  (send gEgo:init())
 )
)
(instance RoomScript of Script
 (properties)
)

I tried it and i got "indefined symbol pView"


Robin Gravel

Offline Brian Provinciano

Re:problem with AddToPic
« Reply #3 on: June 01, 2003, 01:40:51 PM »
No. That's not what I said.

There are many other things that use lists, such as the gCast, gInv, etc. Have a look at how they are used in the scripts and you will then understand how to use the AddToPics.

Offline robingravel

Re:problem with AddToPic
« Reply #4 on: June 02, 2003, 08:34:01 AM »
I checked it but I still clueless. I'm still not familiar with SCI kernels but I will if I get help.

Hey! I found addtopic in feature.sc.

I'm wondering if AddToPic has the same command than addtopic in AGI.


Robin Gravel


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.054 seconds with 22 queries.