First time script

OurJud
Can someone please explain why this first time script isn't working quite right.

The lift which gives access to my players apartment requires a retina scan to operate the lift, but I don't want to make the player go through the sequence each time, so have this:

firsttime {
msg ("You approach the scanner and rest your head againsts the rubber surround. A soft red light pans across your eyes and emits a high-piched bleep.")
UnlockExit (retscanopen)
}
otherwise {
msg ("You rest your head againsts the rubber surround and wait for the beep.<br/><br/>The lift doors open and you step inside.")
MoveObject (player, elevator2)
}

If I navigate to this location, try to call the lift, I have to go through the retina scan (correct). Then if I move away and come back, call the lift again, the 'otherwise' script is called, but it doesn't print the message describing the player using the scanner. Instead, it just goes straight to 'move player' script.

I want to bypass the player having to manually use the scanner, and print the action automatically instead.

HegemonKhan
the likely reason your 'otherwise's' 'msg' Script doesn't work is probably due to the ' <br/><br/> ' in it, which has 1 or 2 mistakes:

1. you got the wrong syntax (typo) for it, the correct syntax is this:

<br></br>

2. make sure that your Script (in code view) has the:

<![CDATA[ (scripts) ]]>

<ELEMENT xxx="xxx"><![CDATA[
-> // scripts
]]></ELEMENT>

------------------------

I'm not quite understanding what you mean or are asking for with this:

I want to bypass the player having to manually use the scanner, and print the action automatically instead.

OurJud
I didn't input that code manually, HK, I just copy and pasted it from the 'code view' of the script I set up using the UI.

Okay, so the first time you need to use the lift to get back up to your apartment, the sequence is (baring in mind my description tells the player there is a retina scanner by the lift):

Player input: "enter elevator"
Response: "There is no button to call the elevator"
Player input: "use scanner"
Response: "You approach the scanner and rest your head againsts the rubber surround. A soft red light pans across your eyes and emits a high-pitched beep. The elevator doors open."
Player input: "enter elevator"
Response: "Going up. Please wait..." (script moves player to apartment lounge)

BUT, I don't want to force the player to have to do this every time, so the second time, I want the sequence to be:

Player input: "enter elevator"
Response: "You approach the scanner and rest your head against the rubber surround. A soft red light pans across your eyes and emits a high-pitched beep. The elevator doors open and you step inside.
(Script moves player to 'elevator2')
Response: "Going up. Please wait..." (script moves player to apartment lounge)

george
Can you play that part of the game as is and cut and paste the transcript of game output here?

OurJud
I'll try, george. Hold on.

jaynabonne
The code you listed is in the scanner's "use" script in the game you posted. So they will only see the message if they type "use scanner" a second time. Once you unlock the exit, they are free to bypass the scanner and go straight into the elevator.

jaynabonne
You can modify the exit to run a script when the player traverses it. Then you can do the same thing as what "use scanner" does in the otherwise.

OurJud
Actually I can't. It's not even triggering the locked sequence now.

I'm going to have to strip this game right back to my intro!! I'm completely and utterly lost - I'm getting errors when I try to go in directions I know I can go, firsttime scripts don't work properly,...

I just can't get my head around the mechanics of this IF builder!!

I'm not a happy bunny right now, and am wondering if it's worth all this grief!! Something is going to break and I suspect it will be my front room window as I hurl my PC through it.

jaynabonne
Before you do that, you have an "archived" copy above in the code you posted. If things have gone awry, you can always go back to that. I've attached it in case that helps.

jaynabonne
Also keep in mind that you're crafting more advanced things. There's bound to be some failures. (But that's how we learn!) Keep going like this, and you'll be answering questions here soon. :)

OurJud
The big man has shown a little mercy... for now.

All exits and returns - check!
First-time scripts - check!
Retina-scan which only makes you perform the action the first time - check!
Walloping headache - check!
Sore throat from screaming - check!

Mental maturity of six year-old - check!

Silver
Save often. And keep changing the file name when you do from v1 to v2 etc so you have close return points if it all goes pete tong.

OurJud
Silver wrote:Save often. And keep changing the file name when you do from v1 to v2 etc so you have close return points if it all goes pete tong.


That's a good idea. I take it you mean every time you make progress up to a certain point and get things working satisfactorily, change the file name?

Silver
Yeah. Of course I learnt this the hard way. I saved a game I was working on whilst testing it. But that is a different type of file that I saved over the aslx file. Luckily I wasn't too far in but I had to redo the lot.

HegemonKhan
I made a thread here, that you might be interested in:

viewtopic.php?f=18&t=4808

enjoy :D

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums