Ok, can someone help me a login click proc.
The only part i really need help with a the caharcter lcick part, can someone show me a demo taht will help me with that or you can give me peice of the code to help me out either way is good, Thanks
ID:270086
![]() Jan 3 2006, 4:48 pm
|
|
![]() Jan 3 2006, 5:43 pm
|
|
Huh? You didn't even tell us what you're trying to do. You have to tell us what you want to do so we can help you.
|
Well, when i login in i want to be able to click on a character that appers on the screen and when you click the character you become that character in the game.
You think you understand. |
You'll need to make world/mob a type of 'placeholder mob' they use while making a new character, override placeholdermob/New() (Remember to use ..()!) in such a way that you get the menu with character icon thingies in them, and use client/Click() to determine what character thing the player has clicked. You then just need to make a new mob, of a type dependent upon what was clicked, and set that mobs key to the client's key.
Simple. :P |
Turf, mob, atoms, and objects all have Click() for a reason.
mob Now, I'm damn sure that is is bad design when using client/Click() as you've mentioned. |
But then you have problems if the mobs that they're going to be clicking on are the same type as the ones they're becoming.
I'd do it like this: client/Click(var/atom/a) Not difficult. AFAIK, that isn't particularly bad design. :P |
Well, *cough* that is why god(BYOND) has such usefull checks as
if(src!=usr) or if(src==usr) Becomming the same mob really isn't problem, but another check could be done to prevent that too if you were concerned. |
I think it's better to overwrite client/Click() in this situation. Or better yet...
client/Click(atom/a) Then you define mob/Creating/Clicking() in such a way that it selects things, and everything is fine and dandy. (I'm more worried with clicking other players once you finish the selection process thingy, incidentally) |