example:
mob/var/dloc
mob/proc/Death()
//random death stuff
src.loc=locate(dloc)
mob/Login()
usr.dloc = "13,16,1"
Now im not too sure on the usr.dloc = "", any ideas?
ID:156854
![]() Jul 12 2010, 5:25 pm
|
|
Anyways so i'm wondering how i would go about making a mob's death location a certain place depending on which race you choose. I think it would be something like this
example: mob/var/dloc Now im not too sure on the usr.dloc = "", any ideas? |
![]() Jul 12 2010, 6:06 pm
|
|
Anything in "parenthesis" is made into text,quite wrong in a situation using numbers.
|
Hmm i think you misunderstood. When the person creating there character chooses a certain race i want them to be respawned different to other races. I want to know how i would go about saving there starting location as dloc.
|
Placing numbers in quotes,is still wrong in a situation using numbers because it is made in to text.
switch(src,"What race do you want to be.","Choosing race.","Rat","Snake") |
Using tags is a much better alternative. Hint: you can edit the tag, and other, variables by right clicking the object in the map file during development.
|
mob
var dloc mob/newchar Goku icon = 'person.dmi' icon_state = "goku" race = "Saiyan" Gohan icon = 'person.dmi' icon_state = "gohan" race = "Halfling" Piccolo icon = 'person.dmi' icon_state = "piccolo" race = "Namekian" mob/Login() switch(input("What race would you like to be?")in list("Saiyan","Halfling","Namekian")) if("Saiyan") src.newchar = new /mob/Goku () usr.dloc = locate(13,16,1) if("Halfling") src.newchar = new /mob/Gohan () usr.dloc = locate(6,52,1) if("Namekian") src.newchar = new /mob/Piccolo () usr.dloc = locate(3,5,2) mob/proc/Death() //random death stuff if(usr.race=="Saiyan") usr.locate = usr.dloc if(usr.race=="Halfling") usr.locate = usr.dloc if(usr.race=="Namekian") usr.locate = usr.dloc This could probably help you out. if you edit all the coordinates and mobs and stuff to fit your characters, this should fix your problem. I hope this works, let me know if it doesn't |
lol but lol it lol causes lol tons lol of lol problems lol for lol everybody lol else lol because lol it's lol wrong lollll
lol and lol in lol fact lol I'd lol bet lol good lol money lol that lol it lol does lol not lol work lol for lol you lol but lol you lol just lol don't lol notice lol it lollll lollllllllllllllllllll |
Zhalten64 wrote:
and if your so good at coding that you telling me i'm wrong, read my post at 7:23 and help me out 7:23? Anyway, aside from usr being wrong in pretty much every place every where in DM, setting up the variable like that wouldn't allow you to save it. The easiest way would be to do what RichardKW somewhat said (though I'm not sure what he's talking about with text in parenthesis, or src=usr by default?), you could also use a param string, but that would require more work. |
I meant to say that anything in quotes, is made text. If you have a good save system that covers the mob, you should be fine. Otherwise you should look up the read and write procs.
dloc=locate(1,1,1)// usr is not required in this situation. |