First-Person Orientation
Lucien88
15 May 2011, 01:11I'm trying to create a first person RPG. The problem is, it's supposed to be a MMO, or at least, a 2 player. To do this, I want to be able to increase stats, modify stats, and keep character info, such as height, weight, size, color, race, gender... Sort of a Scifi thing.
My problem is that I can't figure out how to make this work. I can't figure out how to store and call the player information, and use it in battle, or other stat related formulas, such as lifting boulders, or opening castle gates and stuff.
My problem is that I can't figure out how to make this work. I can't figure out how to store and call the player information, and use it in battle, or other stat related formulas, such as lifting boulders, or opening castle gates and stuff.
Lucien88
15 May 2011, 20:50While we're at it, I was inspired to do an Animorphs based game, and I wanted to give the player the power to morph. I wanted it to Aquire the Hawk, and then, Morph it in a Story-Related tutorial, where he Aquires the Hawk, and discovers he's Tobias, making his Alias=Tobias (Hawk).
My problem, is making the Morphing work. I tried making a clone and putting it in a hidden room, then moving it to the current room, but, it kept trying to target Tobias (Hawk), even though I want it to target Redtail Hawk Morph. Here's the ASL
' "Animorphs Infinity"
' Created with QDK 4.1.5
!include <stdverbs.lib>
define game <Animorphs Infinity>
asl-version <410>
start <The Barn>
game version <Beta V1.0>
game info <Created with QDK 4.1.5>
command <Morph #@Morph#> {
msg <You become a #@Morph#.>
move <#@Morph#; #quest.currentroom#>
}
verb <Aquire> msg <You can't Aquire that.>
end define
define options
debug on
panes on
abbreviations on
end define
define room <The Barn>
look <You see an old barn, belonging to Cassie's dad, who uses the barn as the Wildlife Rehabilitation Center, which takes care of injured animals, then releases them back into the wild. This is also the base of operations for the Animorphs, who need a private place to plan, but is easily accessible. |n|nThere is a dirt floor below you, and rafters above you, a window giving a great view of anywhere nearby with raptor eyes. There's hay in the horse stalls, which are generally used for large animals, such as deer. Cages are always everywhere, and usually filled with animals of various kinds.>
define object <Male Redtail Hawk>
alt <Hawk; Redtail>
look <You see a male Redtail Hawk, his feathers are a bright brownish color, and his tail feathers are... You guessed it, red. He's not a small bird, and commonly tackles mice for breakfast. He's got sharp orange talons, and a nasty curved beak.>
prefix <a>
displaytype <Character>
article <him>
gender <he>
properties <Fly; Walk = Slow; not Swim; Small; Bird; Claws>
action <Aquire> {
clone <Male Redtail Hawk; Male Redtail Hawk Morph; Morph List>
msg <You have aquired a Red Tail Hawk Morph.>
property <Male Redtail Hawk; alias=Tobias (Hawk)>
property <Male Redtal Hawk Morph; Alias=Redtail Hawk Morph>
}
end define
end define
define room <Morph List>
look <A list of all morphs.>
end define
My problem, is making the Morphing work. I tried making a clone and putting it in a hidden room, then moving it to the current room, but, it kept trying to target Tobias (Hawk), even though I want it to target Redtail Hawk Morph. Here's the ASL
' "Animorphs Infinity"
' Created with QDK 4.1.5
!include <stdverbs.lib>
define game <Animorphs Infinity>
asl-version <410>
start <The Barn>
game version <Beta V1.0>
game info <Created with QDK 4.1.5>
command <Morph #@Morph#> {
msg <You become a #@Morph#.>
move <#@Morph#; #quest.currentroom#>
}
verb <Aquire> msg <You can't Aquire that.>
end define
define options
debug on
panes on
abbreviations on
end define
define room <The Barn>
look <You see an old barn, belonging to Cassie's dad, who uses the barn as the Wildlife Rehabilitation Center, which takes care of injured animals, then releases them back into the wild. This is also the base of operations for the Animorphs, who need a private place to plan, but is easily accessible. |n|nThere is a dirt floor below you, and rafters above you, a window giving a great view of anywhere nearby with raptor eyes. There's hay in the horse stalls, which are generally used for large animals, such as deer. Cages are always everywhere, and usually filled with animals of various kinds.>
define object <Male Redtail Hawk>
alt <Hawk; Redtail>
look <You see a male Redtail Hawk, his feathers are a bright brownish color, and his tail feathers are... You guessed it, red. He's not a small bird, and commonly tackles mice for breakfast. He's got sharp orange talons, and a nasty curved beak.>
prefix <a>
displaytype <Character>
article <him>
gender <he>
properties <Fly; Walk = Slow; not Swim; Small; Bird; Claws>
action <Aquire> {
clone <Male Redtail Hawk; Male Redtail Hawk Morph; Morph List>
msg <You have aquired a Red Tail Hawk Morph.>
property <Male Redtail Hawk; alias=Tobias (Hawk)>
property <Male Redtal Hawk Morph; Alias=Redtail Hawk Morph>
}
end define
end define
define room <Morph List>
look <A list of all morphs.>
end define
Alex
16 May 2011, 08:21You have a problem here:
move <#@Morph#; #quest.currentroom#>
That references the display name for the object, but you want to be moving the code name for the object. It should be:
move <#Morph#; #quest.currentroom#>
move <#@Morph#; #quest.currentroom#>
That references the display name for the object, but you want to be moving the code name for the object. It should be:
move <#Morph#; #quest.currentroom#>
Lucien88
16 May 2011, 16:30Even after changing it, I'm getting this message. So, it's still not working.
INIT: Quest 4.1.5 (build 4.1.125)
INIT: Opening file C:\Users\Aaron\Documents\Animorphs Infinity.asl on 5/16/2011 at 11:01:22 AM
INIT: Including library 'stdverbs.lib'...
INIT: - Searching for C:\Users\Aaron\Documents\stdverbs.lib (game path)
INIT: - Library not found in game path.
INIT: - Searching for C:\Users\Public\Games\Quest\stdverbs.lib (Quest path)
INIT: - Found library, opening...
INIT: Finished loading file.
INTERNAL ERROR: 9 - 'Subscript out of range' occurred processing script line 'move <#Morph#; #quest.currentroom#>'
INIT: Quest 4.1.5 (build 4.1.125)
INIT: Opening file C:\Users\Aaron\Documents\Animorphs Infinity.asl on 5/16/2011 at 11:01:22 AM
INIT: Including library 'stdverbs.lib'...
INIT: - Searching for C:\Users\Aaron\Documents\stdverbs.lib (game path)
INIT: - Library not found in game path.
INIT: - Searching for C:\Users\Public\Games\Quest\stdverbs.lib (Quest path)
INIT: - Found library, opening...
INIT: Finished loading file.
INTERNAL ERROR: 9 - 'Subscript out of range' occurred processing script line 'move <#Morph#; #quest.currentroom#>'
Alex
16 May 2011, 19:23I'm not getting a problem with the ASL you posted. I type "morph red" and I don't get any error - am I missing out a step?
Lucien88
17 May 2011, 00:39This is after I changed it. I keep getting an Internal Error, and that message.
Honestly, I'm trying to do a few things that aren't happening. First, I want to set it so that Morph only works on animals that have been 'Aquired'. It's set as a verb, but I'd like to have it as a Command instead, since I plan on trying to make it into a 2 or more player game.
' "Animorphs Infinity"
' Created with QDK 4.1.5
!include <stdverbs.lib>
define game <Animorphs Infinity>
asl-version <410>
start <The Barn>
game version <Beta V1.0>
game info <Created with QDK 4.1.5>
command <Morph #Morph#> {
msg <You become a #Morph#.>
move <#Morph#; #quest.currentroom#>
}
command <Set Name #Player#> enter <#Player#>
command <Say #text#> msg <#Player# says "#text#.">
verb <Aquire> msg <You can't Aquire that.>
end define
define options
debug on
panes on
abbreviations on
end define
define room <The Barn>
look <You see an old barn, belonging to Cassie's dad, who uses the barn as the Wildlife Rehabilitation Center, which takes care of injured animals, then releases them back into the wild. This is also the base of operations for the Animorphs, who need a private place to plan, but is easily accessible. |n|nThere is a dirt floor below you, and rafters above you, a window giving a great view of anywhere nearby with raptor eyes. There's hay in the horse stalls, which are generally used for large animals, such as deer. Cages are always everywhere, and usually filled with animals of various kinds.>
define object <Male Redtail Hawk>
alt <Hawk; Redtail>
look <You see a male Redtail Hawk, his feathers are a bright brownish color, and his tail feathers are... You guessed it, red. He's not a small bird, and commonly tackles mice for breakfast. He's got sharp orange talons, and a nasty curved beak.>
prefix <a>
displaytype <Character>
article <him>
gender <he>
properties <Fly; Walk = Slow; not Swim; Small; Bird; Claws>
action <Aquire> {
clone <Male Redtail Hawk; Male Redtail Hawk Morph; Morph List>
msg <You have aquired a Red Tail Hawk Morph.>
property <Male Redtail Hawk; alias=Tobias (Hawk)>
}
end define
end define
define room <Morph List>
look <A list of all morphs.>
end define
define selection <Animal List>
end define
Honestly, I'm trying to do a few things that aren't happening. First, I want to set it so that Morph only works on animals that have been 'Aquired'. It's set as a verb, but I'd like to have it as a Command instead, since I plan on trying to make it into a 2 or more player game.
' "Animorphs Infinity"
' Created with QDK 4.1.5
!include <stdverbs.lib>
define game <Animorphs Infinity>
asl-version <410>
start <The Barn>
game version <Beta V1.0>
game info <Created with QDK 4.1.5>
command <Morph #Morph#> {
msg <You become a #Morph#.>
move <#Morph#; #quest.currentroom#>
}
command <Set Name #Player#> enter <#Player#>
command <Say #text#> msg <#Player# says "#text#.">
verb <Aquire> msg <You can't Aquire that.>
end define
define options
debug on
panes on
abbreviations on
end define
define room <The Barn>
look <You see an old barn, belonging to Cassie's dad, who uses the barn as the Wildlife Rehabilitation Center, which takes care of injured animals, then releases them back into the wild. This is also the base of operations for the Animorphs, who need a private place to plan, but is easily accessible. |n|nThere is a dirt floor below you, and rafters above you, a window giving a great view of anywhere nearby with raptor eyes. There's hay in the horse stalls, which are generally used for large animals, such as deer. Cages are always everywhere, and usually filled with animals of various kinds.>
define object <Male Redtail Hawk>
alt <Hawk; Redtail>
look <You see a male Redtail Hawk, his feathers are a bright brownish color, and his tail feathers are... You guessed it, red. He's not a small bird, and commonly tackles mice for breakfast. He's got sharp orange talons, and a nasty curved beak.>
prefix <a>
displaytype <Character>
article <him>
gender <he>
properties <Fly; Walk = Slow; not Swim; Small; Bird; Claws>
action <Aquire> {
clone <Male Redtail Hawk; Male Redtail Hawk Morph; Morph List>
msg <You have aquired a Red Tail Hawk Morph.>
property <Male Redtail Hawk; alias=Tobias (Hawk)>
}
end define
end define
define room <Morph List>
look <A list of all morphs.>
end define
define selection <Animal List>
end define
Alex
17 May 2011, 16:04Leave the @ on the command declaration, since the player can type in any valid text that resolves to the object. You don't use the @ on the "move" command, because your code needs the code name, not the display name.
Here's the corrected ASL:
I then played it like this:
I didn't get any errors with the corrected ASL.
Here's the corrected ASL:
' "Animorphs Infinity"
' Created with QDK 4.1.5
!include <stdverbs.lib>
define game <Animorphs Infinity>
asl-version <410>
start <The Barn>
game version <Beta V1.0>
game info <Created with QDK 4.1.5>
command <Morph #@Morph#> {
msg <You become a #Morph#.>
move <#Morph#; #quest.currentroom#>
}
command <Set Name #Player#> enter <#Player#>
command <Say #text#> msg <#Player# says "#text#.">
verb <Aquire> msg <You can't Aquire that.>
end define
define options
debug on
panes on
abbreviations on
end define
define room <The Barn>
look <You see an old barn, belonging to Cassie's dad, who uses the barn as the Wildlife Rehabilitation Center, which takes care of injured animals, then releases them back into the wild. This is also the base of operations for the Animorphs, who need a private place to plan, but is easily accessible. |n|nThere is a dirt floor below you, and rafters above you, a window giving a great view of anywhere nearby with raptor eyes. There's hay in the horse stalls, which are generally used for large animals, such as deer. Cages are always everywhere, and usually filled with animals of various kinds.>
define object <Male Redtail Hawk>
alt <Hawk; Redtail>
look <You see a male Redtail Hawk, his feathers are a bright brownish color, and his tail feathers are... You guessed it, red. He's not a small bird, and commonly tackles mice for breakfast. He's got sharp orange talons, and a nasty curved beak.>
prefix <a>
displaytype <Character>
article <him>
gender <he>
properties <Fly; Walk = Slow; not Swim; Small; Bird; Claws>
action <Aquire> {
clone <Male Redtail Hawk; Male Redtail Hawk Morph; Morph List>
msg <You have aquired a Red Tail Hawk Morph.>
property <Male Redtail Hawk; alias=Tobias (Hawk)>
}
end define
end define
define room <Morph List>
look <A list of all morphs.>
end define
define selection <Animal List>
end define
I then played it like this:
You are in The Barn.
There is a Male Redtail Hawk here.
You see an old barn, belonging to Cassie's dad, who uses the barn as the Wildlife Rehabilitation Center, which takes care of injured animals, then releases them back into the wild. This is also the base of operations for the Animorphs, who need a private place to plan, but is easily accessible.
There is a dirt floor below you, and rafters above you, a window giving a great view of anywhere nearby with raptor eyes. There's hay in the horse stalls, which are generally used for large animals, such as deer. Cages are always everywhere, and usually filled with animals of various kinds.
> aquire red
You have aquired a Red Tail Hawk Morph.
> morph hawk
You become a Male Redtail Hawk.
I didn't get any errors with the corrected ASL.
Lucien88
17 May 2011, 17:05That fixed it. Thanks. But, that leaves a couple of more questions. I want it so that Morphing a particular animal (Hawk in this case) only works after Acquiring it, which isn't the case right now.

Pertex
17 May 2011, 18:52That should not be a problem. If you aquire an animal set a property 'aquired' and check this property when morph is called.