maybe arrays
darkgoddessnight
26 Oct 2006, 12:59alright, for lack of knowledge I have been creating seperate rooms for each characteristic in character creation for each race. This is very very time consuming and have just managed to finish the silver sea aquarians skin color, I still have skin specials characteristics, lips, hair, eyes, etc to go and I have to do it for each race and subrace. Is there an eaiser way to do this? Maybe using arrays?
I think Im Dead
26 Oct 2006, 18:55You could use objects and properties for them. Then use a procedure to guide the player through it, then reuse the same procedure for each step changing just a couple lines. Hell you could even make a procedure to check for any object in the room, get the property type and choices etc, guiding through the whole process and blahblahblah blah.
Here's an example, figured you probably were going for multiplayer so that's the format I did it in...
P.S. Damn I'm good.
Here's an example, figured you probably were going for multiplayer so that's the format I did it in...
define object <hair.color>
properties <total=5; _
1=black; _
2=blonde; _
3=browne; _
4=grey; _
5=red>
end define
define procedure <CharCreation.HairColor>
set string <choice[userid]; null>
set string <valid[userid]; null>
for <i; 1; $objectproperty(hair.color; total)$> msg <%i%. $objectproperty(hair.color; %i%)$|n>
msg <Choose your hair color. 1-$objectproperty(hair.color; total)$|n>
enter <choice[userid]>
for <i; 1; $objectproperty(hair.color; total)$> {
if ( #enter# = %i% ) then set string <valid[userid]; true>
}
if ( #valid[userid]# <> true ) then {
msg <That is not a valid choice.|n>
do <CharCreation.HairColor>
}
else {
property <player%userid%; hair.color=$objectproperty(hair.color; #choice[userid]#>
do <NEXT CHARACTER CREATION STEP>
}
end define
P.S. Damn I'm good.
darkgoddessnight
26 Oct 2006, 19:40thankyou so much, this is exactly what I needed.
darkgoddessnight
27 Oct 2006, 00:58So here is my code:
' "test"
' Created with QDK 3.53 - UNREGISTERED VERSION
!include <net.lib>
define game <test>
asl-version <350>
gametype multiplayer
start <test room 1>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
startscript do <charcreation_race>
disconnect property <#name[userid]#; not loggedin>
player startscript
player startscript
end define
define options
login off
register on
end define
define synonyms
end define
define room <test room 1>
script do <choose_race>
define object <races>
invisible
properties <total=13; 1=Aquarian; 2=Avarian; 3=Draconian; 4=Dwarf; 5=Elf;
6=Fae; 7=Guartolan; 8=Gnome; 9=Halfling; 10=Human; 11=Kitharran; 12=Ogre; 13=Oried>
end define
end define
define procedure <charcreation_race>
set string <choice[userid]; null>
set string <valid[userid]; null>
msg <Choose your race. 1-$objectproperty(races; total)$|n>
for <i; 1; $objectproperty(races; total)$> msg <%i%. $objectproperty(races; %i%)$|n>
enter <choice[userid]>
for <i; 1; $objectproperty(races; total)$> {
if ( #choice[userid]# = %i% ) then set string <valid[userid]; true>
}
if ( #valid[userid]# <> true ) then {
msg <That is not a valid choice.|n>
do <charcreation_race>
}
else {
do <racedesc#choice[userid]#>
property <player%userid%; races=$objectproperty(races; #choice[userid]#>
msg <Do you want to be a .....>
}
end define
On the last part I need to show the type of race that is chosen. I know it will involve the #choice[userid]# but what do I add to that to show the race?
thanks in advance,
Shadow*
' "test"
' Created with QDK 3.53 - UNREGISTERED VERSION
!include <net.lib>
define game <test>
asl-version <350>
gametype multiplayer
start <test room 1>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
startscript do <charcreation_race>
disconnect property <#name[userid]#; not loggedin>
player startscript
player startscript
end define
define options
login off
register on
end define
define synonyms
end define
define room <test room 1>
script do <choose_race>
define object <races>
invisible
properties <total=13; 1=Aquarian; 2=Avarian; 3=Draconian; 4=Dwarf; 5=Elf;
6=Fae; 7=Guartolan; 8=Gnome; 9=Halfling; 10=Human; 11=Kitharran; 12=Ogre; 13=Oried>
end define
end define
define procedure <charcreation_race>
set string <choice[userid]; null>
set string <valid[userid]; null>
msg <Choose your race. 1-$objectproperty(races; total)$|n>
for <i; 1; $objectproperty(races; total)$> msg <%i%. $objectproperty(races; %i%)$|n>
enter <choice[userid]>
for <i; 1; $objectproperty(races; total)$> {
if ( #choice[userid]# = %i% ) then set string <valid[userid]; true>
}
if ( #valid[userid]# <> true ) then {
msg <That is not a valid choice.|n>
do <charcreation_race>
}
else {
do <racedesc#choice[userid]#>
property <player%userid%; races=$objectproperty(races; #choice[userid]#>
msg <Do you want to be a .....>
}
end define
On the last part I need to show the type of race that is chosen. I know it will involve the #choice[userid]# but what do I add to that to show the race?
thanks in advance,
Shadow*
darkgoddessnight
27 Oct 2006, 14:37I figured it out! *dances around happily*
xordevoreaux
03 Aug 2007, 15:57I once built a system where each room was a different color of the rainbow (don't laugh) and you picked up your race, gender, etc., separately in each room, but the way you did it was by visiting the vending machine in that room. I think this time I'm just going to put all the vending machines in each room and the player can't leave that room until a token has been spent in each or the player hits a button on the wall that says "Generic Genesis Model A-54" or something.