mob/verb/teleport(cheats as text)
if(cheats<="esto")
loc=locate(5,5,1)
ID:167488
Mar 7 2006, 12:54 pm
|
|
i am trying to make a dbl click code where you double click the teleporter and it asks you for the cheat code and u can enter like 12 different codes to go to places. I also want it so that the menu that comes up is costomizable so i can make it say what i want, but i can only make it show up as a verb so far here is the code
|
In response to Flame Sage
|
|
It'd be better to make Passwords a list.
*Edit* In addition, most of that is just plain wrong. For one, there's no find_text() proc. |
In response to Flame Sage
|
|
doesnt work
i made this code turf/teleport/DblClick(cheats as text) but it says cant change constant value |
In response to Mxjerrett
|
|
if(cheats<="esto")
Explain what you're trying to do there. |
In response to DeathAwaitsU
|
|
make a cheat code
|
In response to Mxjerrett
|
|
mob/verb/Cheat() There, that's a cheat code. Now how about you answer my question which was reffering to one specific line of coding? |
In response to DeathAwaitsU
|
|
How can something be less than or equal to text? That's what you have there. <= doesn't mean if thans what the incoming is thats right. You'll want******if(cheat == "esto")******like that.
|
In response to Pyro_dragons
|
|
hmmm well i had it setup in my last cheat system that if you click a verb that said cheat you could type a number of cheats and you would the if(cheat<="esto") or if(cheat <= "sesuoh") or wut ever to enter cheats but now i need to change that to the double click.
But is still doesnt work. The problem isnt with the if line. Theres a problem with the loc locate line it change the constant value |
In response to Mxjerrett
|
|
Mxjerrett wrote:
The problem isnt with the if line. The if line is a problem, it's just not the one you're trying to fix right now. There is a huge difference between "working" and "working properly." Anything that comes alphabetically before "esto" will satisfy that condition. Entering "apple", "cheese", "deoxyribonucleic acid", and even "Z" (since capital letters come before lowercase letters by the computer's thinking) will all teleport the player to locate(5, 5, 1). You need "==" in that expresion if you want it to only react to the unique word "esto". Theres a problem with the loc locate line it change the constant value The proc belongs to a turf, so src is that turf. Any vars that are not declared locally or globally have an implied src. so you are trying to modify the turf's loc. You get that error because turf position can not be changed at runtime. Since this is occuring inside DblClick() usr will be the mob of the person clicking the turf, and the atom whose loc you want to change. |
In response to Shadowdarke
|
|
so if i enter the locating that they click it should work
|
In response to Mxjerrett
|
|
Oh for the love of God, MxJerret. PLEASE, PLEASE read the DM Guide.
turf/teleporter/Click() |
In response to Mysame
|
|
ok but please answer 1 last question how come the findtext is undefined
|
In response to Mysame
|
|
Mysame wrote:
Oh for the love of God, MxJerret. PLEASE, PLEASE read the DM Guide. turf/teleporter/Click() And for the love of us, Mysame, please use 2 or more spaces for a tab. Lummox JR |
In response to Lummox JR
|
|
i fixed it i found out i only had to make all of the findtext lowercase i thought that might work thanks everyone for the help and thx mysame i will go read the guide
[edit] oh this works better you can actually set multiple locatings this way: turf/teleport/DblClick() |
Is that what you want?
untested.