ID:151389
 
I've had this idea for a game I'm going to make, of making a click style creation system, by using objects.

Basically, I have an object, the icon of that race and by clicking on it, you change your race to the race of that object.

Then you click done, and after everything else is applied(hair, etc.) you're placed on the map.

I was thinking you could use the Click() ability for this, but I'm unsure if it would work in practice.

What do you guys think?

Aurelius

P.S. - If I'm not explaining it well enough, please tell me I'll try harder :P
Many, many games on BYOND use a system like this. I'd say it's certainly better than input() menus for choosing everything.
In response to LordAndrew
My question, reworded I suppose, is this: Would the Click() proc be able to do that sort of task?

Up until now I've only ever seen it applied to Objects in a players inventory. Yet, I'm wanting it to change variables and even change their location at one point.

I guess what I'm asking is, is that possible for a measly little Click()?

Aurelius
In response to Aurelius6299
Yes.
In response to LordAndrew
Ok, I've been typing this up as I go, and I got 0 errors, but when I ran it nothing happened.

Login
mob/Guest
Login()

if(!loc)
loc = locate(20,495,3)


Then once I'm at (20,495,3) which is my title screen, there's a New Character obj, that's just a blank icon.
obj/Title_Screen
New_Character_1
icon = 'Title Screen.dmi'
name = "New Character"
density = 1
Click()
usr.loc = locate(6,495,3)


This should take me to my Creation Screen. But when I click it, nothing happens.

Thanks for your quick replies by the way.

Aurelius

P.S. - I know this is rapidly advancing to the Code-Problems forum. Was not my primary intention.
In response to Aurelius6299
The reason it doesn't work is because it has a blank icon. By default, Click() won't work on something it can't see. While I don't recommend having a blank title screen, for the time being you can set mouse_opacity = 2 for the title screen obj and it will always be clickable under any circumstances.
In response to LordAndrew
I've never heard of Mouse_Opacity before. O.O now I feel un-informed.

I'll check it and see if that works.

Aurelius
In response to Aurelius6299
Now it works perfectly! Thanks a lot!

Would you mind if I added you to my pager in case I have further problems in the future?

Aurelius
In response to Aurelius6299
Sure go ahead, though I will warn you that I'm not actually that good of a programmer so my advice may not be the best. :P
In response to Hiro the Dragon King
That was actually really impressive. I would love to know how it was done. I am looking to do something similar in a game I am working on. I just could not for the life of my find any good demos or libs on it.
In response to Moussiffer
It's actually a few years old now. The source no longer works because I've since mangled the libraries I wrote for it. It really is all just smoke and mirrors with screen objects.