Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sithlord2

Pages: [1]
1
SCI Syntax Help / Re: Beginner's question: why won't this compile?
« on: January 16, 2019, 03:10:40 PM »
So, next challenge was to see if I could change the colors of the menubar. I guess the file MenuBar.sc would be a good place to look. Call me naive, but I expected it to be easy, like, just change two variables or something like that...

It seems... I was wrong:

---
         (MENU_COLOURS
            (= wndCol 16)
            (while (and (u> wndCol 15) (!= wndCol -1))
               (= wndCol (GetNumber {New Text Color: (0-15)}))
            )
            (if (!= wndCol -1)
               (= wndBack 16)
               (while
                  (or
                     (and (!= wndBack -1) (u> wndBack 15))
                     (== wndCol wndBack)
                  )
                  (= wndBack (GetNumber {New Background Color: (0-15)}))
               )
               (if (!= wndBack -1)
                  (= gWndColor wndCol)
                  (= gWndBack wndBack)
                  (gTheWindow color: gWndColor back: gWndBack)
               )
            )
         )
---

Okay, I have no clue what I should change...

Is there a demo or template game that comes with documented code?

2
SCI Syntax Help / Re: Beginner's question: why won't this compile?
« on: January 16, 2019, 02:46:18 PM »
Thanks. I switched to Sierra Script syntax, and everything seems to work as expected :-)

3
SCI Syntax Help / Beginner's question: why won't this compile?
« on: January 16, 2019, 11:42:54 AM »
So I installed SCICompanion, created a new game(Sci Studio syntax), and I created a view that I want to add to the default room. The view is called "n001". If I understand the tutorials correctly, I should add the an instance of the view at the end, and call the init routine.

This what I have:

---
/******************************************************************************
 SCI Template Game
 By Brian Provinciano
 ******************************************************************************
 rm001.sc
 Contains the first room of your game.
 ******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 1)
/******************************************************************************/
(use "main")
(use "controls")
(use "cycle")
(use "game")
(use "feature")
(use "obj")
(use "inv")
(use "door")
(use "jump")
(use "dpath")
/******************************************************************************/
(instance public rm001 of Rm
   (properties
      picture scriptNumber
      // Set up the rooms to go to/come from here
      north 0
      east 0
      south 0
      west 0
   )
   (method (init)
      // same in every script, starts things up
        (super:init())
        (self:setScript(RoomScript))
        
        // Check which room ego came from and position it
        (switch(gPreviousRoomNumber)
            /******************************************************
             * Put the cases here for the rooms ego can come from *
             ******************************************************/ /*
            (case north
              (send gEgo:
                 posn(210 110)
                 loop(2)
              )
           )*/
            // Set up ego's position if it hasn't come from any room
           (default
              (send gEgo:
                 posn(150 130)
                 loop(1)
              )
           )
        )
      
      // Set up the ego
      SetUpEgo()      
      (send gEgo:init())
      (send n001:init())
      
      
      

        /****************************************
         * Set up the room's music to play here *
         ****************************************/ /*
      (send gTheMusic:
         prevSignal(0)
         stop()
         number(scriptNumber)
         loop(-1)
         play()
      )*/

        /**************************************************
         * Add the rest of your initialization stuff here *
         **************************************************/
  )
)
/******************************************************************************/
(instance RoomScript of Script
   (properties)
   (method (handleEvent pEvent)
        (super:handleEvent(pEvent))

        /*****************************************
         * Handle the possible said phrases here *
         *****************************************/
        (if(Said('look'))
            Print("You are in an empty room")
        )
    )
)
/******************************************************************************/


(instance n001 of Prop
   (properties
      view 001
      x 150
      y 100
      loop 0
      cel 0
      priority 0
   )
)
---

But this refuses to compile. I get the error "Unknown identifier: can not send to n001".

What am I missing?

Pages: [1]

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

Page created in 0.053 seconds with 20 queries.