Axe Software Forums
  Quest Developer Forum
  Last game


Author Topic:   Last game
Jim Jones posted 16-02-2003 21:59 GMT     
I am working on my last game, and I am trying to make extra little thing for it. I am trying to make it so you can clone someone, then define what they say by typing in something like, define speak for #clone#. The reson for the #'s is because their are multible clones.
Evelsvia posted 17-02-2003 20:28 GMT         
well, i guess if you are using QDK the command /clone could be used or wotever then you just make a new NPC or wotever it is, make the object or wotever different, and just set the Alias the same, and keep the same description etc
Evelsvia posted 17-02-2003 20:29 GMT         
unless u mean u wanna keep everything the same, except for when u select the speak option and they say something, well then u just set the speak script different from each other, but keep the alias the same and everything.
I think Im Back posted 18-02-2003 10:16 GMT          
Ok, I can whip this code out for you easy, but I need a little information. Firstly, do you need to have a specific number of clones that are made in the game(like the player makes a clone or two of themselves for some reason) or do you need to be able to have a limitless number of clones(for some sort of odd game with multiple story lines or some odd sort of total recall scenario...yes I know there weren't any clones in total recall)?

Secondly, what intention of use did you have for the clone, is it supposed to be a tool used by the player to like, call gateguard a pansy and try to fight him while the player sneaks in... Or is the clone going to be following the player character around mimicing it's actions and/or taking commands from the player?

I had a few more questions but I'm fairly buzzed. Um, in closing I say, if you'd rather make the code yourself. Simply have some sort of command interacting with an object to make the clone, then a command to give the clone a property called "say" and use another command to invoke the $objectproperty(clone;say)$ and you can easily have a clone that can say anything.

That was incredibly vague, but it did make sense, I promise.

Jim Jones posted 22-02-2003 06:32 GMT          
Let me make this easier. Say their is a machine that makes clones. You could make millions and millions of clones. I want to be able to define speech for them.
I think Im Back posted 22-02-2003 11:19 GMT          
I was bored and drunk so I made it with QDK with a few refinements manually. I didn't inclue support for infinite clones, just coz it would have made me think a little more than the beer wanted me to, but it does what you wanted, make clones. If you wanted to, you could simply change the code so the object created isn't named, #clone-name# but just a clone-$rand(0;1000)$ then give it the alias #clone-name# and the prefix 'a clone of" so you could have infinite clones(well, there would be an error if it tried to use the same random number twice... trying between 0 and 1000000 for even less chance of that happening OR just put it to check if the object "clone-47"(for example) exists and if so, pick a different random number. I had the command to make clones say something be whisper "clone name" with the name of the clone after whisper and of course no parenthesis. If you wanted to, you could set the command to whisper "clone name" say and have it say text and alternatively whisper "clone name" ask to have it ask a preprogrammed in question if you wanted. This should be a simple enough snip of code for you to figure out how to work it all on your own. If not, well, then, uh, you have bad hygiene... I gotta go.

' Created with QDK 3.12

define game <>
asl-version <311>
start <lab>
game info <Created with QDK 3.12>
command <read #@object#> doaction <#object#; read>
command <touch #@object#> doaction <#object#; touch>
command <enter #enter-text# computer screen> {
set string <say-text; #enter-text#>
doaction <pc; make>
}
command <push #@object#> doaction <#object#; push>
command <whisper #@object#> doaction <#object#; whisper>
define variable <player-name>
type string
value <player>
end define
end define

define synonyms
end define

define room <lab>
alias <The Laboratory>
look <Tables crowded with beekers, bunsen burners, and assorted melted lab gloves surround you in this small room. One side of the room seems to be dedicated to a huge contraption of cables, pipes, stray wires and a series of six, long glass tubes, each standing a bit taller than a man.>

define object <pc>
alias <computer screen>
look msg <As you look at the computer screen you notice a message is displayed on it and the cursor blinks eagerly.|n>
prefix <a glowing>
action <read> msg <BioClone 4.7|n|nWelcome to BioClone. To begin the cloning procedure please TOUCH the COMPUTER SCREEN with your index finger to initiate a genetic scan.|n>
action <touch> {
set string <clone-name; #player-name#>
msg <You touch the computer screen and it flashes a bright white, instantly scanning your genetic make up.|nA few seconds pass and the computer displayes a message.|n|n"BioClone acknowledged DNA of #player-name#. To continue with the cloning process, please PUSH the 'Begin' button on the COMPUTER SCREEN."|n>
}
action <push> {
msg <You push the 'Begin' button on the computer screen and suddenly the wall of machinery behind the computer begins going crazy.|n|nA loud hum emits from the wall as lights begin to blink, steam shoots out from a few places, a few sparks fly and suddenly you notice a shadowy figure appear in one of the six tubes.|n>
msg <The computer screen flashes a bright white and displays some text.|n|n"Clone #clone-name# created.|nTo finalize cloning process, please enter the desired mental programming for your clone. To do so simply ENTER (DESIRED PROGRAMMING) COMPUTER SCREEN."|n|nThe computers cursor then begins to blink eagerly once more.|n|n>
}
action <make> {
msg <Slowly the tube with the shadowy figure in it begins to depressurize and the the tube's front hatch opens.|n|nOut steps your new clone.|n>
create object <#clone-name#; lab>
property <#clone-name#; say=#say-text#>
action <#clone-name#; whisper> msg <$capfirst(#clone-name#)$ says, "$objectproperty(#clone-name#;say)$.">
}
end define

end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define