problem with AddToPic

Robin_Gravel 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
Brian_Provinciano 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.
Robin_Gravel Thanks for answering Brian.




/******************************************************************************/
(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
Brian_Provinciano 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.
Robin_Gravel 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