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, 4: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, 5:06 pm
|
|
Anything in "parenthesis" is made into text,quite wrong in a situation using numbers.
|
In response to RichardKW
|
|
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.
|
In response to Rickoshay
|
|
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") |
In response to RichardKW
|
|
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.
|
In response to GhostAnime
|
|
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 |
In response to Zhalten64
|
|
Everywhere you have usr there you shouldn't.
|
In response to Garthor
|
|
well, when i make games it works for me lol
|
In response to Zhalten64
|
|
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 |
In response to Garthor
|
|
lol and lol thats lol why lol i lol have lol 0 lol errors lol on lol my lol game.
lollllllllllll |
In response to Zhalten64
|
|
and if your so good at coding that you telling me i'm wrong, read my post at 7:23 and help me out
|
In response to Zhalten64
|
|
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. |
In response to Falacy
|
|
ill post my topic again then.
|
In response to Zhalten64
|
|
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. |
In response to RichardKW
|
|
Lol posts made me lol. Anyways thanks guys im gonna test the richardkw way.
|
In response to RichardKW
|
|
You have no clue what you're talking about with usr and src, and you can't save a location turf.
|