ID:89039
 
Not a bug
BYOND Version:461
Operating System:Windows XP Home
Web Browser:Firefox 3.5.6
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND Developer forums.
I have some problems with click(), my issue with Click() is it does not seem to work with call procs, for some reason in one of my projects i have a simple click creation system, it uses click() for new load and delete like a lot of games do, but thing is it worked for years, and years, and now it does not? I double checked the programing and there is no flaws to it, because it works fine if i put it up into a input screen when the game loads up?


Code Snippet (if applicable) to Reproduce Problem:
/*Note this is taken from different parts of the src, so it may look unorganized.*/
mob/proc/Create()
if(src.creategame)return
if(src.creating)return 0
src.creating=1
switch(alert(src, "Welcome to [world.name]", "Character Creation","Create New?", "Nevermind"))
if("Create New?")
switch(alert(src, "Welcome to [world.name]", "Choose a slot please","Slot 1","Slot 2","Slot 3"))
if("Slot 1")
if(fexists("Players/[src.ckey]/[src.ckey](1).sav"))
src<<"You already have a player in that slot!"
src.creating=0
else
if(src.creategame)return
src.icontype='shinobi.dmi'
src.icon_state=""
src.loc=locate(/turf/Login2)
src.creategame=1
src.creating=1
src.savefile1=1
src.Village_Clan()
if("Slot 2")
if(fexists("Players/[src.ckey]/[src.ckey](2).sav"))
src<<"You already have a player in that slot!"
src.creating=0
else
if(src.creategame)return
src.icontype='shinobi.dmi'
src.icon_state=""
src.loc=locate(/turf/Login2)
src.creategame=1
src.creating=1
src.savefile2=1
src.Village_Clan()
if("Slot 3")
if(fexists("Players/[src.ckey]/[src.ckey](3).sav"))
src<<"You already have a player in that slot!"
src.creating=0
else
if(src.creategame)return
src.icontype='shinobi.dmi'
src.icon_state=""
src.loc=locate(/turf/Login2)
src.creategame=1
src.creating=1
src.savefile3=1
src.Village_Clan()
if("Nevermind")
src.creating=0
turf/New
Click()
usr.Create()
/*Also a side note this used to work i have no idea why it stopped, but im assuming its from a byond update i may have missed something?*/
/*also note i am a rookie programer so it looks a little sloppy.*/




Does the problem occur:It occurs for any click() i seem to work with. I dont think im the only one with this issue.







This seems to be more of a code problem then a BYOND system problem.

Is the icon transparent? If so, there's your source of problem. Setting the mouse_opacity to the opaque value will fix it.
it is a byond system problem, i went to byond build, downloaded byond 448.1030, works fine. honestly i think some of the updates are just crap, for example in the updates the map takes longer to turn slides. I miss byond 355, it was the best update byond had in my opinion. So ill just stay with 448, but ill side note the problem just in case i update my byond. Thank you :).
Several users noticed behavior changes when using big icons and recompiling in newer versions without setting world.map_format to TILED_ICON_MAP. If you did not account for this, that's probably the source of your troubles. This is documented in the release notes for the newer versions.

This is a typical scenario: A login screen is created in an old version by placing a big icon on a map. The map editor splits this up into individual tiles with states like "0,0", "1,0", etc. The author then adds "buttons", which are also turfs, by placing them on top of the background image. The map editor handles this by making the new turf invisible, and making the old turf (a piece of the big background icon) an underlay. When compiled in an old version, TILED_ICON_MAP behavior is used even if the game is played in a newer BYOND version, so the background icon will split up into pieces. When compiled in a newer version however, if world.map_format is not set to TILED_ICON_MAP, none of the states like "0,0" and so on will work anymore, because the big icon won't be split up. The lower right corner icon shows the whole image, and that "pushes back" other turfs it covers on the same layer, which basically means that turf alone will capture all of the clicks. I bet this is exactly the situation you are in.

There are three solutions. First and simplest, just change world.map_format to TILED_ICON_MAP and the program should use the old split-up-big-icons behavior. The second option is to explicitly give your button turfs a higher layer; it won't correct the fact that the map is still setup for a tiled format but it will alleviate the click issue. The third option is to redo the map in the new TOPDOWN_MAP format, but like in the second option make sure the button turfs have a higher layer.
thanks a lot Lummox Jr: , but also i just want to figure out why did they even bother with the update for the map where blue is all around it? i kind of hate it is there a way to get rid of it? also when i move the map to a different Z location it lags like hell before it switches over.Are they going to fix that?
The old gray color didn't show selection rectangles, so it basically just wasn't what we needed for isometric. As for slowdowns when changing z levels, this is largely because we now use (mostly due to the support for isometric maps) a different way of drawing icons and the minimap. (And additional computation goes on to handle displaying pixel offsets, a new feature in the editor.) Tom and I have discussed the possibility of upgrading the map editor to use DirectX in a future release, much like Dream Seeker does now.