Doors i think =\

ac19189
14 Mar 2004, 16:42
I feel like such a noob after seeing that battle script i couldn't even get past the first line :oops: i am working on my first game and just got done buying this great program now comes the first question of many :roll: this is what im doing im try to make an airlock when you first get in a menu pops up then it ask close aft or open fwd what i want to do it make it so if the player opens fwd first then he gets sucked out the aft and bye bye birdy but if he closes the aft first then opens the fwd then he can go on with out being sucked out of the one so many holes like a little tea cup and simple terms would help i have no clue at all what im doing i have emailed support more times in the last week then i get online :oops: NOOB :p thanks

Anonymous
15 Mar 2004, 20:17

im try to make an airlock when you first get in a menu pops up then it ask close aft or open fwd what i want to do it make it so if the player opens fwd first then he gets sucked out the aft and bye bye birdy but if he closes the aft first then opens the fwd then he can go on with out being sucked out



Making an airlock is a doddle, but I really do not like the idea of popping up a menu to control it, because that is going to be quite horrible to implement and restrictive to the player in practice.

Follow my logic, player steps into airlock, menu pops up asking if he wants to "open fwd or close aft". He replies he wants to close aft...

O.K. - now he's in a closed (both ends) airlock, how are you going to let him open the fwd hatch? If you have the same menu automatically pop up again, he'll never be able to do anything but answer the menu questions because you'd trap him in a loop! You could have a different menu once he's inside with both hatches shut, the new menu letting him open either hatch, but then you are assuming he doesn't ever want to do the trip in the reverse direction - if he did you'd need yet another menu...

Also, with a menu popping up on entry, he'd never get to read the room description and would be unable to examine things - or put on his space helmet or whatever - I think this all adds up to a nasty implementation of an airlock.

I'd suggest you build a description of the hatch state into the airlock description and then provide individual commands for opening the 'fwd' and 'aft' hatches, (which don't have to exist as objects) this would look better, not restrict your player, work in both directions AND avoid trapping your player into making a menu choice when all he wants to do is examine the airlock!

Al (MaDbRiT)

ac19189
15 Mar 2004, 21:33
lmao no where to run mwhaha i c what you are saying but then what i dont get is how would i make it so if he doesnt close the aft and just open the fwd how do i set it so he get a auto game over but if he closes the aft then opens the fwd then he can go on his way

surgeville
16 Mar 2004, 02:13
Use a flag(boolean control) to test the state of the doors.

ac19189
16 Mar 2004, 02:31
i know thats the first thing that came to my head but i have no clue how to set it up i could set a flag but i have no clue how to setup the flag or getting it to even do what i want thats why i was hoping someone could help

codingmasters
16 Mar 2004, 05:45
ac19189, I would love to help, but I haven't been able to understand a single thing you've said. In your next post (if there is to be one), use full stops, commas and other punctuation. To get in to this forum you have to be 13 or over, or get a document signed by your Mum and Dad. If you are 13 or over you should know how to use puctuation so try it

Matthew G.

ac19189
16 Mar 2004, 05:58
Im sorry for any problems I might have caused you in trying to read my text I chat a lot online so I kind of type slang a lot it makes it easy on me but hard on others ill try to be better about it. What I am trying to do is make an airlock with a fwd door and an aft door only problem I am having is setting it up so if you dont close the aft door first then open the fwd you get pushed out the airlock from the air and you get game over but if you close the aft then open the fwd you walk in as if you had no problem. Understand? O i also see where you got lost on my last post not even I can read it. :oops:

surgeville
16 Mar 2004, 15:45
Here's an example that I used. It could be easily changed(applied) to your airlock scenario.
It shows how to make the state of a flag and how to test the state of the flag.

To make this is an online language you might understand:
Noob need to make this work with text that is understandable but need be change to make more readable so that can be interechanged with the aft and other door in situation that need be updated so that when game work it don't have sheet have instead door so that game change here ya go noob.

Just to be clear though. I don't care how much you chat online. It is always easier to convey your thoughts with proper grammer and proper language.


action <speak> {
if ask <Did you bring down your sheets?> then flag on <answer>
else flag off <answer>
if flag <answer> and got <Sheets> then speak <Good job! Now go put them in the laundry room.> else {if flag <answer> and not got <Sheets> then speak <Don't lie to me. I know you don't have the sheets. Go back upstairs and get them!>}
if not flag <answer> and not got <Sheets> then speak <Go back upstairs and get the sheets!> else {if not flag <answer> and got <Sheets> then speak <Stop messing around. Go put those sheets in the washing machine.>}
}

MaDbRiT
16 Mar 2004, 20:30
Finally found five minutes to do something other than work!

Here's a cut n' pastable demo piece of a working "airlock", it allows the player to pass from the 'cargo bay' of his spaceship and into space - or back - but only if he uses the airlock properly.

You can load the 'code' from this posting into QDK and see how it was written, or save it as an ASL file and run it to see it in action.

Hope this points you in the right direction.

Al (MaDbRiT)


' "Airlock Demo"
' Created with QDK Pro 3.52

define game <Airlock Demo>
asl-version <350>
game author <MaDbRiT>
gametype singleplayer
start <bay>
game info <Created with QDK Pro 3.52>
startscript {
flag on <outer_closed>
flag off <inner_closed>
}
end define

define synonyms
end define

define room <bay>
alias <cargo bay>
prefix <the>
look <A cavernous, empty hold, unlit except for the light spilling in from _
the open airlock. >
place <the; airlock>
end define

define room <airlock>
prefix <the>
out <the; bay>
script msg <|nThe airlock has simple controls, allowing the user to seal _
or unseal the inner or outer hatches. Someone has scrawled a warning and _
taped it to the wall. _
It says; |cr|b|s18|nBE CAREFUL - SAFETY INTERLOCK BROKEN!|s00|cb|xb>
description {
msg <a small, almost featureless room. |nThe inner hatch is |xn>
if flag <inner_closed> then msg <sealed shut.> else msg <open.>
msg <The outer hatch is |xn>
if flag <outer_closed> then msg <sealed shut.> else msg <open.>
}
afterturn override if not flag <outer_closed> and not flag <inner_closed> then {
msg <There is a huge explosion as the ship instantly depressurises - _
blasting you and most of the ship's contents into space in lots of _
little pieces...|n|n(You must NEVER have both hatches of an airlock _
open at the same time)>
playerlose
}
command <seal inner;seal inner hatch;close inner;close inner hatch> {
if flag <inner_closed> then msg <The hatch is already sealed shut.> else {
msg <The hatch door hisses as it seals shut.>
flag on <inner_closed>
create exit out <airlock;>
}
}
command <seal outer;seal outer hatch;close outer;close outer hatch> {
if flag <outer_closed> then msg <The hatch is already sealed shut.> else {
msg <The hatch door hisses as it seals shut.>
flag on <outer_closed>
create exit out <airlock;>
}
}
command <unseal outer;unseal outer hatch;open outer;open outer hatch> {
if not flag <outer_closed> then msg <The hatch is already unsealed.> else {
msg <The hatch door unseals with a loud hiss.>
flag off <outer_closed>
create exit out <airlock;space>
}
}
command <unseal inner;unseal inner hatch;open inner;open inner hatch> {
if not flag <inner_closed> then msg <The hatch is already unsealed.> else {
msg <The hatch door unseals with a loud hiss.>
flag off <inner_closed>
create exit out <airlock;bay>
}
}
end define

define room <space>
look <floating weightless outside the ship. Beneath you a dull red glow _
emanates from the open airlock.>
down <airlock>
end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define

springo
14 Aug 2004, 17:06
ac, i thank you and ne one who help make that airlock system as i needed the same sorta thing. so thx again ac. (soz i cant remember ur full screen name)