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 - fck

Pages: [1]
1
Mega Tokyo SCI Archive / Re:Larry 3 Bamboo Forest Blues
« on: January 07, 2003, 01:00:28 AM »
 ;D Thanks for the help!

2
Mega Tokyo SCI Archive / Larry 3 Bamboo Forest Blues
« on: December 06, 2002, 06:29:30 AM »
I tried to play Larry 3, but got totally stuck in the forest.  I got hold of a hint list telling me N-N-E-E-N ext, but that did not help me either.   How does the convension work?
1.Ok,  you are in the forest : Go N and exit frame going N.
2. N: Continue N and go E on junction.  Exit frame going E.
3. E: Continue E and go N on junction.  

But there no junction in the frame!  How should I read the instructions?  Any hints? Please!

3
Mega Tokyo SCI Archive / Re:Al Pond 2 is ready!
« on: November 27, 2002, 04:10:40 AM »
It now worked perfectly!  Nice game.  Not too difficult and the hints are just enough to prevent you from getting stucked totally.

4
Mega Tokyo SCI Archive / Re:Keypress events?
« on: November 25, 2002, 04:04:56 AM »
I hope this will help you.  You cannot use Shift on it own, but that should not be a problem.  Use can use any other key or a Ctrl-key sequence.  I would steer away from Fn buttons and be careful of some Ctrl sequences.  I had eq. a reboot when I used F6.

Here is a somewhat verbose explanation in a tutor format:

INTERCEPTING KEYBOARD AND MOUSE EVENTS

For this demonstration, Ego will change into Brian if the player presses B (capital) and back to Ego when E (capital) is pressed.

Add Brian as a view as described in the Tutorial Chapter 19 (Resource->Add Sample->View->Brian and save it as view number 1.

In the instance of RoomScript add the following code:
Code: [Select]
(instance RoomScript of Script
  (properties)
  (method (handleEvent pEvent)
    (var str)  //Local variable
    (super:handleEvent(pEvent))

.
.
    (switch( (send pEvent:type) )
       (case evKEYBOARD
          (if(== (send pEvent:message) KEY_B )  //Check if B was pressed
              (send gEgo:view(1))  //switch to Brian
              (send pEvent:claimed(TRUE))
          )//if B

          (if(== (send pEvent:message) KEY_E )  //Check if B was pressed
              (send gEgo:view(0))  //switch to Ego
              (send pEvent:claimed(TRUE))
          )//if
       )//evKEYBOARD

       //For fun intercept the Mouse event as well
       (case evMOUSEBUTTON
          (Print("You pressed a Mouse Button!"))
       )//evMOUSEBUTTON
    )//switch
  )//method
)//instance

The code: send pEvent:claimed(TRUE)): specified whether the event object can be used; in this case the :Said: command will ignore the event when the player presses either a B or E.

Compile and test.  Ego will be transformed into Brian if you press a B and back to Ego if you press an E.  If it does not work, the values may not be declared in the Keys.sh file.  Open the file (..\SciStudio\include\Keys.sh) to view the defined values.  You may want to expand the list with the lower case values (a=$61,..z=7a).  If you want to trap other values, you can view the value of the key code by adding the following code just below the :case evKEYBOARD: statement:

Code: [Select]
=str ""
(Format(str "str=%x" (send pEvent:message)))
(Print(str))

Test by pressing Ctrl-k.  The value should be $0b.  You can add the value in the Keys.sh file or using it directly in the statement (if(== (send pEvent:message) $0b)  ext

5
Mega Tokyo SCI Archive / Re:ego views
« on: November 13, 2002, 02:40:42 AM »


[attachment deleted by admin]

6
Mega Tokyo SCI Archive / Re:ego views
« on: November 13, 2002, 01:10:51 AM »
Have a look at my ChangeState posting.  From your description it seems that the code I puzzled out is doing more or less what you want to do.  

7
Mega Tokyo SCI Archive / Re:Al pond 2 is ready!
« on: November 12, 2002, 06:06:04 AM »
I visited the Casino, Pool,NBI, ext and then talked to Chief, sailed to the boat, got hint I need rope, but Tim refuses to offer rope!  A bug or do I miss something?  The points are 50 of 73.

8
Mega Tokyo SCI Archive / Re:Actor Movements for Newbie
« on: November 08, 2002, 01:52:57 AM »
Same here!  Could not find an error.  Did you resolve the problem yet?  Here is my code which works fine on my PC

     /*************************************
      * Add the rest of your initialization stuff here *
      *************************************/
     (aMan:
        init()
        setCycle(Walk)
        setMotion(
            DPath
            45 85
            120 140
            250 155
            315 155 )
     )//aMan
  )//init
)//instance
/************************************/
(instance aMan of Act
   (properties
       x 300
       y 50
       view 200
   )//properties
)//instance
/************************************/

9
Mega Tokyo SCI Archive / Re:Newbie chapter 15
« on: October 14, 2002, 03:16:05 AM »
The best advice is to highly structure and comment your code, otherwise you will be for ever plagued by bracket errors - something like this:

(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")
    )//if look
  )//method handle event
 
  (method(doit)
    (super:doit())
    (if(==(send gEgo:onControl()) ctlYELLOW)
       (send gEgo:view(300))      //Wade scene
    )(else
       (if(==(send gEgo:onControl()) ctlFUCHSIA)
          (send gEgo:view(30))       //Swim scene
       )(else
           (if(==(send gEgo:onControl()) ctlRED)
             (send gRoom:setScript(egoDrowning)) //Drowning scene
           )(else
              (if(==(send gEgo:onControl()) ctlBLACK) //Normal walking
                 (send gEgo:view(0))       //Walk
              )//if Black
           )//if Red
        )//if Fuchsia
     )//if Yellow
  )//method doit
)//end instance Script


10
Mega Tokyo SCI Archive / Re:ChangeState problem
« on: October 09, 2002, 08:23:32 AM »
Hi Guys! The solution is very simple!  For other people, like myself still trying to master SCI, here is the solution:

Do not call in the doit() function a separate script.  Change the code to be something like this:

(if(==(send gEgo:onControl()) ctlYELLOW)
        (send gEgo:view(300))
     )(else
     
        (if(<>(send gEgo:onControl()) ctlYELLOW)
            (send gEgo:view(0))
        )//if
       )//else

View 300 is a view of Ego swimming in the 4 directions.
View 0 is the default walking view.

You would typically call a script with a ChangeState method if you want to set up a scene where Ego is drowning, then you want to print some messages and lastly call the dying scene.

Any expert out that could advise on the "jump on box problem" - Please!!! It take hours  for a beginner to sort it out these things on your own!

11
Mega Tokyo SCI Archive / ChangeState problem
« on: October 04, 2002, 07:14:27 AM »
I want to program a scene where Ego walks in the water and gets knee deeper ext.  I used a control area in the Roomscript which trigger the egoInWaterScript.  All works fine, but once the ChangeState in activated, I cannot reset it.  So, if Ego walks in the water again, the scene does not repeats itself.


(instance RoomScript of Script
  (properties)
  (method (doit)
     (super:doit())
     (if(== (send gEgo:onControl()) ctlYELLOW)
        (send gRoom:setScript(egoInWaterScript))
     )//if
  )//method


(instance egoInWaterScript of Script
   (properties)
   (method (changeState newState)
      (super:changeState(newState))
      =state newState
      (switch (state)
         (case 0
            (send gEgo:loop(4))      //in water loop
            (send gEgo:setMotion(NULL)) //stop walking
            (send gEgo:cel(1))       //knee deep
            =cycles 5
         )//case 0
         
         (case 1
            (send gEgo:cel(2))    //waste deep
         )//case 1
      )//switch
   )//method
)//instance

Any help on this?

Another question: How can I make Ego to jump onto a box?  If you just position him on top of the box, the view priorities hide legs behind the box and this creates the wrong visual impression.

12
Mega Tokyo SCI Archive / Re:Help with "Said" Commans
« on: September 19, 2002, 05:58:54 AM »
Thanks, it help somewhat.  Have someone sorted out what the different types in the vocabulary means?  Some are obvious, but others I found puzzleing, even allowing for my very rusty grammer rules now dating back many years.

13
Mega Tokyo SCI Archive / Help with "Said" Commans
« on: September 15, 2002, 03:33:58 PM »
I struggle with the Said command.  I have a feeling it is the way words are setup in the VOCAB file, but in the tutor there is no explanation.  I want to react  on the input "never say die" but Said('never/say/die') does not work.  Any hint and pointers for help?

Pages: [1]

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

Page created in 0.058 seconds with 21 queries.