kind who make a game within the game I have q
I need another tea which can use to answer this
ex: I want to make a game of rock, paper, scissors
I chose paper.
coder which I use for the other guy estre choose rock, paper, scissors.
I need a coder know the guy meda an answer.
1
2
Jan 28 2014, 8:19 pm
Best response
|
|
Your post doesn't make much sense, and I don't see a question mark anywhere in it. What is your question exactly?
|
tipo que fazer um jogo dentro do jogo eu tenho q
Preciso de outro chá, que pode usar para responder ex: eu quero fazer um jogo de pedra, papel e tesoura Eu escolhi papel. que coder que eu uso para o outro cara escolher pedra, papel e tesoura. e joga comigo Preciso de um coder para o outro chá meda uma resposta. sorry I can not speak much English I had to write in Portuguese |
Even your Portuguese is pretty unstructured; the fact you stuck that into a translator just makes it that much worse.
You want to make a mini-game of Rock Paper Scissors with in your current project and you want someone to code this for you is the general gist I'm getting. |
Hey! Well, if i understood correctly you want a rock,paper,scissor system.
Try this mob ,MistY, |
We really don't like giving out code to someone that doesn't want to try in this section, but I noticed that you followed some of the earlier pitfalls when I was first asked about a system like Rock-Paper-Scissors.
Therefore, I wanted to show what my version would be like. As programmers, we're lazy (and that isn't a bad thing). We like to reuse all of our code as much as possible, so creating the long chains of logic are not too fun. Also, if we want to maybe make the computer pick one type more than the other, or any changes - this would require updates only to be made in one place. This protects our code from bugs. Now another problem is - what if we play two games? Your code uses a mob verb of choice, so it isn't scoped to the procedure. This means that there can be race conditions present, especially if we were to introduce multi-player modes. Here is the example of how I would do it these days: //PVE Rock-Paper-Scissors You can expand this to include a win/loss record - following the practices of OOP only modifying the src. |
o'que I want to be a coder to another tea (person) accepts the game and escoler (stone pael or scissors)
o'que eu quero,ser um coder para um outro chá (pessoa) aceita o jogo e escoler (pedra,pael ou tesoura) esse é o coder q eu fiz this is the code I made q mob/var Jogador = 0 Animacao = 0 mob/var Pedra = 0 Papel = 0 Tesoura = 0 mob verb Joken_Po123(mob/M in oview(1)) // Verb used for firing the beam set category = "Entretreirimento" set name = "JoKenPo" if(M.Kaiten==1||M.sphere||M.counter) usr << "[usr] esta se defendendo!" return if(usr.caught) usr<<"Your captured" return if(usr.Frozen) usr<<"Your frozen" return if(usr.captured) usr<<"Your captured" return if(M.froze) return if(usr.froze) usr<<"Your frozen" return if(usr.resting) usr<<"Not while resting" return if(usr.meditating) usr<<"Not while meditating" return else view(6)<<"JoKenPo - [usr] vs [M]" usr.Frozen=1 usr.froze= 1 M.Frozen=1 M.froze = 1 usr.Pedra = 0 usr.Papel= 0 usr.Tesoura = 0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 usr.overlays += /obj/PPT123 M.overlays += /obj/PPT123 flick("JoKenPo",usr) flick("JoKenPo",M) sleep(50) if(usr) switch(input("JoKenPo - Escolha")in list("Pedra","Papel","Tesoura")) if("Pedra") usr.Pedra = 1 usr.Papel= 0 usr.Tesoura = 0 if("Papel") usr.Pedra = 0 usr.Papel= 1 usr.Tesoura = 0 if("Tesoura") usr.Pedra = 0 usr.Papel= 0 usr.Tesoura = 1 if(M) switch(input("JoKenPo - Escolha")in list("Pedra","Papel","Tesoura")) if("Pedra") M.Pedra = 1 M.Papel= 0 M.Tesoura = 0 if("Papel") M.Pedra = 0 M.Papel= 1 M.Tesoura = 0 if("Tesoura") M.Pedra = 0 M.Papel= 0 M.Tesoura = 1 sleep(5) usr.overlays -= /obj/PPT123 M.overlays -= /obj/PPT123 flick("JoKenPo",usr) flick("JoKenPo",M) sleep(5) flick("JoKenPo123",usr) flick("JoKenPo123",M) if(usr.Pedra == 1&&M.Pedra == 1) view(6)<<"[usr] e [M] empataram!!!" usr.overlays += /obj/Pedra M.overlays += /obj/Pedra sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Papel == 1&&M.Papel == 1) view(6)<<"[usr] e [M] empataram!!!" usr.overlays += /obj/Papel M.overlays += /obj/Papel sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Tesoura == 1&&M.Tesoura == 1) view(6)<<"[usr] e [M] empataram!!!" usr.overlays += /obj/Tesoura M.overlays += /obj/Tesoura sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Pedra == 1&&M.Tesoura == 1) view(6)<<"[usr] Ganhou [M]!!!" usr.overlays += /obj/Pedra M.overlays += /obj/Tesoura usr.Jogador += 1 M.Jogador -= 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Pedra == 1&&M.Papel == 1) view(6)<<"[M] Ganhou [usr]!!!" usr.overlays += /obj/Pedra M.overlays += /obj/Papel M.Jogador += 1 usr.Jogador -= 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Papel == 1&&M.Pedra == 1) view(6)<<"[usr] Ganhou [M]!!!" usr.overlays += /obj/Papel M.overlays += /obj/Pedra M.Jogador -= 1 usr.Jogador += 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Papel == 1&&M.Tesoura == 1) view(6)<<"[M] Ganhou [usr]!!!" usr.overlays += /obj/Papel M.overlays += /obj/Tesoura M.Jogador += 1 usr.Jogador -= 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Tesoura == 1&&M.Pedra == 1) view(6)<<"[M] Ganhou [usr]!!!" usr.overlays += /obj/Tesoura M.overlays += /obj/Pedra M.Jogador += 1 usr.Jogador -= 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Tesoura == 1&&M.Papel == 1) view(6)<<"[usr] Ganhou [M]!!!" usr.overlays += /obj/Tesoura M.overlays += /obj/Papel M.Jogador -= 1 usr.Jogador += 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(usr.Papel == 0&&usr.Pedra == 0&&usr.Tesoura == 0) view(6)<<"[usr] nao escolheu nada por isso [M] ganhou 1 ponto!!!" M.Jogador += 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return if(M.Papel == 0&&M.Pedra == 0&&M.Tesoura == 0) view(6)<<"[usr] nao escolheu nada por isso [M] ganhou 1 ponto!!!" usr.Jogador += 1 sleep(50) usr.overlays -= /obj/Tesoura M.overlays -= /obj/Tesoura usr.overlays -= /obj/Papel M.overlays -= /obj/Papel usr.overlays -= /obj/Pedra M.overlays -= /obj/Pedra usr.froze = 0 usr.Frozen = 0 M.froze = 0 M.Frozen=0 M.Pedra = 0 M.Papel= 0 M.Tesoura = 0 return obj/Pedra layer = MOB_LAYER+1 icon = 'Joken_Po.dmi' icon_state = "Pedra" pixel_y = 32 obj/Papel layer = MOB_LAYER+1 icon = 'Joken_Po.dmi' icon_state = "Papel" pixel_y = 32 obj/Tesoura layer = MOB_LAYER+1 icon = 'Joken_Po.dmi' icon_state = "Tesoura" pixel_y = 32 obj/PPT123 layer = MOB_LAYER+1 icon = 'Joken_Po123.dmi' icon_state = "PPT123" pixel_y = 32 |
Next time, it would be best to create your own thread rather than replying to an old thread.
Please always leave <dm> </dm> when posting code, to ensure formatting is applied. This code has so much redundancy and useless commands in it. It makes it look very bloated, and complicated, more than it should. You're also adding paths to the overlays (you want to add instances of the icon), but you don't need to attempt to take each type out - just keep track of the icons you add. The vars are defined on the mob scope. This is not needed, as you never use them outside of the proc. |
mob/var |
coder does not know the other person use to pick and play, and do not even know where to.
I'm still noob n I can do avansado encoding. if u can help and get meda compress the coder handle and make seri very grateful |
In response to Pedro123456
|
|
Pedro123456 wrote:
coder does not know the other person use to pick and play, and do not even know where to. I hope what you want i mix code of Misticone whit you code just replace the code you have for this and already credits Misticone mob |
obrigado!
só mais uma coisa que tipo de coder eu uso pra conseguir controla um boneco aleio um personagem de uma outra pessoa |
thank you!
one more thing what kind of coder I use to get a dummy allele controls a character of another person |
humm sorry but i didn't understand your question. ""a dummy allele controls a character of another person?"" You mean how can you make a player be able to control another player? Could you repeat your question please? sorry.
Sorry Thanks, ,MistY, |
In response to Misticone
|
|
Misticone wrote:
humm sorry but i didn't understand your question. ""a dummy allele controls a character of another person?"" You mean how can you make a player be able to control another player? Could you repeat your question please? sorry. think it relates to what you say Misticone,for that could place a variable in the move() proc, example: mob/var/controlmob="" |
JEY_SENSEY code is excelent but i'll just show another possible way to do this. I really like to use lists in my codes so I would do something like this:
mob/var/able_to_control = 0 // if this is equal to 0 then the player isn't able to control another player Thanks, ,MistY, |
1
2