Author Topic: SCI1.1: Adding to the score and Btest  (Read 3688 times)

0 Members and 1 Guest are viewing this topic.

Offline Cloudee1

SCI1.1: Adding to the score and Btest
« on: June 22, 2015, 01:18:10 PM »
In need of a little guidance here. The AddToScore  procedure in the main script takes a value to be passed through Btest before changing the score. What is this doing... and does that mean that each AddToScore call needs to have a unique Btest value to be passed, since it is setting it as part of the change score process?

Code: [Select]
(procedure public (AddToScore param1 param2)
    (if (not Btest(param1))
        = gScore (+ gScore param2)
        (sq5StatusLineCode:doit())
        Bset(param1)
        (rm0Sound:
            priority(15)
            number(1000)
            loop(1)
            flags(1)
            play()
        )
    )
)


Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline lskovlun

Re: SCI1.1: Adding to the score and Btest
« Reply #1 on: June 22, 2015, 01:24:58 PM »
In need of a little guidance here. The AddToScore  procedure in the main script takes a value to be passed through Btest before changing the score. What is this doing... and does that mean that each AddToScore call needs to have a unique Btest value to be passed, since it is setting it as part of the change score process?
Simple. It makes sure that you can only get points for a particular action once. And yes, it does mean you have to have a list of unique flag numbers.

Offline Kawa

Re: SCI1.1: Adding to the score and Btest
« Reply #2 on: June 22, 2015, 01:59:38 PM »
And #22 seems to be "in a closeup shot so use an exit icon instead of walk."

One to start off with.

Offline troflip

Re: SCI1.1: Adding to the score and Btest
« Reply #3 on: June 22, 2015, 02:27:24 PM »
It looks to me like #22 has to do with being a fly. I haven't played SQ5 all the way through, but it seems like at one point you become a fly?

Anyway, the next iteration of the template game that will come out with (crossing fingers) today's release of SCI Companion has flag 22 completely removed.


So, you can start by adding score flags to your game.sh, starting from 0. e.g.

Code: [Select]
(define FOUND_PLUNGER 0)
(define UNPLUGGED_TOILET 1)
...
« Last Edit: June 22, 2015, 02:30:33 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: SCI1.1: Adding to the score and Btest
« Reply #4 on: June 22, 2015, 02:45:52 PM »
Yes, eventually you beam onto a Genetix research station which is a parody of both the Dynamix name and the movie Silent Runnings. When you beam over there's a fly in the transporter and you end up beaming over with your head on the fly and the fly's head on your body. There are a series of puzzles in this form. Quite a fun section actually!
Brass Lantern Prop Competition

Offline Kawa

Re: SCI1.1: Adding to the score and Btest
« Reply #5 on: June 22, 2015, 03:13:55 PM »
Okay, forget I said anything then :)

*proceeds to use it as such anyway*

Offline MusicallyInspired

Re: SCI1.1: Adding to the score and Btest
« Reply #6 on: June 22, 2015, 03:27:05 PM »
You're still right, of course. There's a closeup section where you have to fly into a room through a keycard lock slot. There's a puzzle here to figure out how to access the door when you're back in your own body again, but I believe there is a button to exit closeup view in this scene...
Brass Lantern Prop Competition

Offline Kawa

Re: SCI1.1: Adding to the score and Btest
« Reply #7 on: June 22, 2015, 04:19:16 PM »
I was referring to the thing in Larry 1/5 where the Walk icon turns into Exit. On further investigation, it's not global flag bit 22 that determines this but this unnamed procedure:
Code: [Select]
(procedure public (proc0_22 param1)
(if (param1)
(icon0: loop(15) cursor(6))
)(else
(icon0: loop(0) cursor(0))
)
(if (== (send gIconBar:curIcon) icon0)
(send global1:setCursor((icon0:cursor)))
)
)
Taken from Larry 5 because 1 won't load. Loop 0 is of course walk and 15 is exit.

I'd think this is a little more interesting for a template game's functionality than "being a fly". ;)

*proceeds to steal implement it right*


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

Page created in 0.032 seconds with 22 queries.