ID:261371
 
Whats the code for a screen before a screen?I want people to be able to choose there icons from Final Fantasy and Dragon Warrior.So i want the screen when you log on to go to names (i got that already) then to a screen were you choose from Final Fantasy or dragon warrior.then when you click wich one you want it goes to a screen were you can choose a person from that game.
Open Server wrote:
Whats the code for a screen before a screen?I want people to be able to choose there icons from Final Fantasy and Dragon Warrior.So i want the screen when you log on to go to names (i got that already) then to a screen were you choose from Final Fantasy or dragon warrior.then when you click wich one you want it goes to a screen were you can choose a person from that game.

To do this you could use several approaches. One is to create a special map z-level to use as your intro screen. Another way is to use the new client.screen functionality to add make this interface visible to the player.

One way I haven't tried, though it would work, would be to modify client.Topic(), and then output the icons at full size into the text (look up \icon[ref] in the reference) along with a link that client.Topic() will recognize. Something like this:
client/Topic(href,href_list[],hsrc)
if(mob.ChoosingIcon && ("icon" in href_list))
mob.ChoosingIcon=0
mob.icon=IconList[href_list["icon"]]
mob.IconChosen()
..()

var/list/IconList=list(
"Guy"='guy1.dmi'
"Girl"='girl1.dmi'
"Table"='table.dmi')

mob
var/ChoosingIcon=0

Login()
// don't call ..()

// do other initialization stuff here

ChoosingIcon=1
src << "Choose your icon:"
for(var/ic in IconList)
// make sure the icon appears in text by preloading it
client.Export("##action=load_rsc",IconList[ic])
src << "<A HREF='?icon=[ic]'><IMG CLASS=icon SRC=\ref[IconList[ic]] WIDTH=32 HEIGHT=32></A>\..."
src << "" // go to a new line

proc/IconChosen()
// move player into position, finish initialization here
...

When a player clicks one of the icons in the text output, it becomes theirs. You can even use this kind of code to allow players to pick their race, class, whatever else you need them to choose. With each race you could also output text explaining what they do. (The ChoosingIcon var is extremely important. Without it, any player can use the .url verb to change their icon and possibly repeat whatever code appears in IconChosen() to complete the login.)

Lummox JR
In response to Lummox JR
thanks Lummox JR and jowy youve both been a great help.I will give this a shot for the charecters.I am learning so fast for being here only a week :)