ID:142048
 
Code:
turf
Click(O)
alert("Welcome!")
alert("Please choose which character you would like to play with now.")
usr.loc=locate(7,7,8)


Problem description:
When I try this out and login the turf code works but the entire map is flooded with this code so every place you click on the map activates this code and I only want it to activate when the are placed with it activates it.

Perhaps change turf to area, then; That may solve the issue, However, you may Also want to specify a type. say,
<code> (turf or area here) Clickhere stuff here </code>
In response to Michael pol
Im still having trouble with this. Can u give an example code or an edit of mine?
In response to Dbgtsuperfreak
Dbgtsuperfreak wrote:
Im still having trouble with this. Can u give an example code or an edit of mine?

Absolutely

Dbgtsuperfreak wrote:
Code:
> turf
> Click(O)
> alert("Welcome!")
> alert("Please choose which character you would like to play with now.")
> usr.loc=locate(7,7,8)
>

Problem description:
When I try this out and login the turf code works but the entire map is flooded with this code so every place you click on the map activates this code and I only want it to activate when the are placed with it activates it.


The following is assuming this is a Login Screen of Sorts, and that this is a new button.

area/newplayer
layer = MOB_LAYER
Click(O)
alert("Welcome!")
alert("Please choose which character you would like to play with now.")
usr.loc=locate(7,7,8)


If you still have problems, let me know and I'll try breaking it down simpler if possible.
In response to Michael pol
I think its working im just getting that dumb inconsistant indentation error.
In response to Dbgtsuperfreak
Tab button can fix that mate. Since I had to use space to type it in. All should be good afterwords, hopefully.
In response to Dbgtsuperfreak
Dbgtsuperfreak wrote:
I think its working im just getting that dumb inconsistant indentation error.

That dumb error is the easiest thing to fix in the world if you didn't copy and paste the code you would realise why its happened.

DM GUIDE & DM REFERENCE
In response to A.T.H.K
fixed. thx guys.
In response to Michael pol
Actually is not fixed....when I add the layer to the map over the title screen text...its not calling the function....nothing happens.
In response to Dbgtsuperfreak
Hm, sometimes you can just edit out some of the screen and call it with that, or set the area datum to obj, in which case it is over the turf by default, therefore letting it get clicked. Try that. I'm rather shakey with login screens because the layering is picky.
In response to Michael pol
Well I dont have the text separate, its all one image. I just want a specific area of the image to be Click() so that when I click that spot(s) the function is called.
Dbgtsuperfreak wrote:
Problem description:
When I try this out and login the turf code works but the entire map is flooded with this code so every place you click on the map activates this code and I only want it to activate when the are placed with it activates it.

You need to put that code under the title screen turf. For example, if you had named it /turf/titlescreen, it might look like this:

turf
titlescreen
icon='titlescreen.png'
Click()
alert("Welcome!")
alert("Please choose which character you would like to play with now.")
usr.loc=locate(7,7,8)


Although, you should be checking they haven't already chosen a character and preventing them from clicking it multiple times (You can keep clicking it once the alert pops up, and they'll build up)
In response to Dbgtsuperfreak
Still haven't found a solution.
In response to Dbgtsuperfreak
again this is not a section login screen. The .png is once peice. So I need a turf/area Click() login.
In response to Dbgtsuperfreak
Dbgtsuperfreak wrote:
Well I dont have the text separate, its all one image. I just want a specific area of the image to be Click() so that when I click that spot(s) the function is called.

Well you could always have the Back layer titlescreen image, and then make another image on top of that with an "Click to Enter" text on that.
And have that image that's ontop of the main titlescreen use the Click() proc.

I use to do login screens that way before, and it's a lot simpler to organize if you want more click options later on that way also.
In response to Dbgtsuperfreak
Could you show me the code you made for the Actual Image?

SubZeroChaos