Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Temas - deathmetal

1
Preguntas y respuestas / Funciones de string
Agosto 07, 2013, 02:33:28 AM
Hola, en la realización de mi sistema de diálogos me he topado con que no sé utilizar las funciones de strings. Alguien que las domine sería tan amable de poner un ejemplo de cada una? ya que la ayuda del manual de GM no es muy especifica, o al menos no me ha sido de mucha ayuda... Uso GM8
2
Quiero dibujar texto con un sprite pero no dibuja las ñ ni los acentos. en otros temas he visto como solucionar el problema pero usando fuentes normales y no de sprite. en  el manual encontré que el sprite debe estar en el mismo orden que el formato ascii por lo que le añadí a mi sprite las ñ y los acentos en donde deberían de estar basandome en el mapa de caracteres del windows, pero sigue sin aparecer. ¿Es posible hacer eso?
3
Preguntas y respuestas / View que tiembla
Agosto 05, 2013, 06:40:12 PM
Hola.

Tengo una view de 320 y 320 que sigue al objeto de personaje en un margen de 160. Quiero hacer que la view tiemble en un momento dado, para dar el efecto de que toda la tierra tiembla. Cómo se lograría?
4
Autores originales: Carl Larsson, aka Megabrain, Enigma or Teslago
Editado por: Meziku Asukana

Este escript utiliza la version de GM 5 :GM5:
Es de diálogos al estilo pokemon. Lo que hace es que primero dibujar el cuadro de diálogo en las coordenadas scr_dialog_x y scr_dialog_y. El sprite es del tamaño de toda la pantalla. Después dibuja el texto que le asignamos en el argument0 letra por letra. Si le texto es mayor a cierta cantidad (Que creo que es la variable splitamt) automaticamente lo dibuja después de que le des a la tecla S o A.

/*
Originally written by: Carl Larsson, aka Megabrain, Enigma or Teslagon.
Edited by: Meziku Asukana
You'll have to give credit to the creator, and I'd like it if you gave credit to me too.
EX: scr_dialog("TEXT", true, 0)
0=black text
1=white text
Check the sprite "spr_textbox" and you'll see them. Thats where this comes from.
And you can add more, although it'd kinda wreck a pokemon fan game. :D
Oh yeah, the "bg" is 240x161, so umm, yeah. You'll have to do just that.
*/
if argument1 = true
/*
Checks to see if dialog asked for is wanted.
Tip: You could use a global variable, set to true at first, allowing
the game to execute the dialog, then some event happens, and you don't
want it to be able to be read anymore. Like a postsign or something.
There's also a piece of script at the end of this that uses this variable.
*/
{
  keyboard_clear(vk_enter);
  /*
  The player might've clicked space/enter at the end of a dialog, and
  might be reading somemore, so this stops it from going on, so the
  player is allowed, humanely, to read it. lol
  */
  scr_dialog_x = view_x[0];
  //Sets View X variable, usually set to 0.
  scr_dialog_y = view_y[0]+view_height[0];
  /*
  Sets View Y variable and adds how tall it is, in this case *in a pokemon
  game*, it should be 160 or so. Game Screen: 240x160 WxH
  And both two lines of script above should end up to be the lower left corner.
  */
  draw_sprite(spr_textbox,0,scr_dialog_x,scr_dialog_y-160);
  /*
  So first, we have to draw the dialog box. Its up first, before the letters are drawn,
  b/c then, the letters will appear over the box. lol. *made it complicated probably*
  */
  scr_dialog_pause = false;
  //Added to fix a glitch that skipped pieces of text.
  scr_dialog_split = false;
  //Saves a variable to false. Will be explained further on.
  scr_dialog_texttype=argument2;
  //Determines which dialog text to use. Explained at the very top.
  scr_dialog_text = argument0;
  /*
  Saves the first thing typed in "scr_dialog(1, 2, 3)" into a variable.
  It SHOULD be text wrapped in QUOTES.
  */
  scr_dialog_pos  = 1;
  scr_dialog_disp  = '';
  scr_dialog_wait = 0;
  scr_dialog_finished = false;
  /*
  Above are miscallaneous, and are required for proper functionality. Ok?
  You pay the price for messing with it. :D
  */
  scr_dialog_splitamt = 55;
  /*
  Will be explained further on. *coexists with split var*
  Those set all the dialog variables.
  */
 
  if string_length(scr_dialog_text) > scr_dialog_splitamt
  {
  scr_dialog_text = string_copy(argument0,1,scr_dialog_splitamt);
  while string_char_at(scr_dialog_text,scr_dialog_splitamt)!=' '
  {
  if scr_dialog_splitamt < 70
  {
    scr_dialog_splitamt+=1;
  }
  scr_dialog_text = string_copy(argument0,1,scr_dialog_splitamt);
  if scr_dialog_splitamt = 70
  {
    break;
  }
  }
  scr_dialog_split = true;
  scr_dialog_resttext = string_copy(argument0,scr_dialog_splitamt,(string_length(argument0)-string_length(scr_dialog_text))+1);
  /*
  This explains both two lines of script above.
  If the text in the first argument is bigger than the splitamt value
  It'll save the split value to true, which happens around the end of this
  And save the rest of the text after the number of chars in splitamt.
  This is a handy function that lets the game itself seperate the text.
  */
  }
 
  //The rest of the script will explained later...I'm tired now and want to SCRIPT! :0
  scr_dialog_text = string_replace_all(scr_dialog_text,'#','');
  if string_length(scr_dialog_text) > 35
  {
    scr_dialog_lines = 1;
  }
  if string_length(scr_dialog_text) < 36
  {
    scr_dialog_lines = 0;
  }
  if string_char_at(scr_dialog_text,1) = ' '
  {
    scr_dialog_text = string_replace(scr_dialog_text,' ','');
  }
  for (scr_dialog_li=1;scr_dialog_li<=scr_dialog_lines;scr_dialog_li+=1)
  {
    scr_dialog_add_13 = 0;
      while string_char_at(scr_dialog_text,(35*scr_dialog_li)-scr_dialog_add_13) != ' ' or scr_dialog_add_13 < 7
      {
        if string_char_at(scr_dialog_text,(35*scr_dialog_li)-scr_dialog_add_13) = ' ' or scr_dialog_add_13 > 7
        {
          break;
        }
        scr_dialog_add_13 += 1;
      }
    scr_dialog_mark_13[scr_dialog_li] = (35*scr_dialog_li)-scr_dialog_add_13;
    scr_dialog_text = string_insert(" #",scr_dialog_text,(35*scr_dialog_li)-scr_dialog_add_13);
  } 
  scr_dialog_text = string_replace_all(scr_dialog_text,'# ','#');
}


if scr_dialog_finished = false
{
  scr_dialog_disp = string_copy(scr_dialog_text,1,scr_dialog_pos);
  if keyboard_check(global.ctrl_cancel)=true
  {
    scr_dialog_pos += 3;
  }
  else
  {
    scr_dialog_pos += 1;
  }
  /*
  Explains ALL nine LINES above, including the {'s -_-. This gives it the effect as typing it, letter by letter.
  That +=1 there makes it one letter by letter, if you change it to 2, it'll do 2 by 2
  */
  if scr_dialog_texttype=1
  {
    draw_text_sprite(scr_dialog_x+16,scr_dialog_y-38,scr_dialog_disp,16,999,spr_textwhite,'!',1);
  }
  else
  {
    if scr_dialog_texttype=0
    {
      draw_text_sprite(scr_dialog_x+16,scr_dialog_y-38,scr_dialog_disp,16,999,spr_textblack,'!',1);
    }
  }
  screen_refresh();
  if scr_dialog_text = scr_dialog_disp
  {
    scr_dialog_finished = true;
  }
}

if keyboard_check(vk_space)
{
  keyboard_clear(vk_enter);
  screen_refresh();
}

if scr_dialog_finished = true
{
  screen_refresh();
  io_clear();
  if scr_dialog_pause = false
  {
    do
    {
      keyboard_wait();
      if keyboard_lastkey=global.ctrl_trigger
      {
        scr_dialog_wait=1;
      }
      else
      {
        if keyboard_lastkey=vk_f12
        {
          event_perform_object(type_bts,ev_keyrelease,vk_f12);
          io_clear();
        }
        else
        {
          io_clear();
        }
      }
    }
    until (scr_dialog_wait=1)
  }
  sound_play(sfx_dialog)
  //You know, the pokemon games have that sound effect. Its removable.
  screen_redraw();
  io_clear();
  if scr_dialog_split = true
  /*
  So yeah. That split var from before. Let me explain it now.
  The splitamt var is set to a number of how many chars should be able
  to fit in the dialog box. This split variable sees if the dialog is over
  the splitamt. It is set to true if it is over splitamt, else, the
  the following script doesn't happen.
  */
  {
    scr_dialog(scr_dialog_resttext,true,scr_dialog_texttype);
    /*
    So then, the text saved from before is now shown, and loops
    if it continously is bigger than the splitamt value.
    */
  }
}
else
{
  sleep(50);
  //Sets some time between drawing letters.
  scr_dialog(argument0,false,scr_dialog_texttype);
}



PERO yo lo quiero usar en GM 8  :GM8: por lo que traté de adaptarlo y este fue el resultado.
Las adaptaciones que hice fue mover las coordenadas para ajustarlas a mi view, así como eliminar la funcion de draw_tex_sprite por otro script que lo único que hace es dibujar texto con sprite.

Argument0= //Texto a dibujar
Argument1= //No tengo ni idea
Argument2= //El color del texto 0=rojo, 1=blanco


//
//Originally written by: Carl Larsson, aka Megabrain, Enigma or Teslagon.
//Edited by: Meziku Asukana
//You'll have to give credit to the creator, and I'd like it if you gave credit to me too.
//EX: scr_dialog("TEXT", true, 0)
//0=black text
//1=white text

if argument1 = true

//Checks to see if dialog asked for is wanted.
//Tip: You could use a global variable, set to true at first, allowing
//the game to execute the dialog, then some event happens, and you don't
//want it to be able to be read anymore. Like a postsign or something.
//There's also a piece of script at the end of this that uses this variable.

{
  keyboard_clear(vk_enter);
  /*
  The player might've clicked space/enter at the end of a dialog, and
  might be reading somemore, so this stops it from going on, so the
  player is allowed, humanely, to read it. lol
  */
  scr_dialog_x = view_xview;
  //Sets View X variable, usually set to 0.
  scr_dialog_y = view_yview+100;
  /*
  Sets View Y variable and adds how tall it is, in this case *in a pokemon
  game*, it should be 160 or so. Game Screen: 240x160 WxH
  And both two lines of script above should end up to be the lower left corner.
  */
  draw_sprite(dialog_box_spr,0,scr_dialog_x,scr_dialog_y);
  /*
  So first, we have to draw the dialog box. Its up first, before the letters are drawn,
  b/c then, the letters will appear over the box. lol. *made it complicated probably*
  */
  scr_dialog_pause = false;
  //Added to fix a glitch that skipped pieces of text.
  scr_dialog_split = false;
  //Saves a variable to false. Will be explained further on.
  scr_dialog_texttype=argument2;
  //Determines which dialog text to use. Explained at the very top.
  scr_dialog_text = argument0;
  /*
  Saves the first thing typed in "scr_dialog(1, 2, 3)" into a variable.
  It SHOULD be text wrapped in QUOTES.
  */
  scr_dialog_pos  = 1;
  scr_dialog_disp  = '';
  scr_dialog_wait = 0;
  scr_dialog_finished = false;
  /*
  Above are miscallaneous, and are required for proper functionality. Ok?
  You pay the price for messing with it. :D
  */
  scr_dialog_splitamt = 55;
  /*
  Will be explained further on. *coexists with split var*
  Those set all the dialog variables.
  */
 
  if string_length(scr_dialog_text) > scr_dialog_splitamt
  {
  scr_dialog_text = string_copy(argument0,1,scr_dialog_splitamt);
  while string_char_at(scr_dialog_text,scr_dialog_splitamt)!=' '
  {
  if scr_dialog_splitamt < 70
  {
    scr_dialog_splitamt+=1;
  }
  scr_dialog_text = string_copy(argument0,1,scr_dialog_splitamt);
  if scr_dialog_splitamt = 70
  {
    break;
  }
  }
  scr_dialog_split = true;
  scr_dialog_resttext = string_copy(argument0,scr_dialog_splitamt,(string_length(argument0)-string_length(scr_dialog_text))+1);
  /*
  This explains both two lines of script above.
  If the text in the first argument is bigger than the splitamt value
  It'll save the split value to true, which happens around the end of this
  And save the rest of the text after the number of chars in splitamt.
  This is a handy function that lets the game itself seperate the text.
  */
  }
 
  //The rest of the script will explained later...I'm tired now and want to SCRIPT! :0
  scr_dialog_text = string_replace_all(scr_dialog_text,'#','');
  if string_length(scr_dialog_text) > 35
  {
    scr_dialog_lines = 1;
  }
  if string_length(scr_dialog_text) < 36
  {
    scr_dialog_lines = 0;
  }
  if string_char_at(scr_dialog_text,1) = ' '
  {
    scr_dialog_text = string_replace(scr_dialog_text,' ','');
  }
  for (scr_dialog_li=1;scr_dialog_li<=scr_dialog_lines;scr_dialog_li+=1)
  {
    scr_dialog_add_13 = 0;
      while string_char_at(scr_dialog_text,(35*scr_dialog_li)-scr_dialog_add_13) != ' ' or scr_dialog_add_13 < 7
      {
        if string_char_at(scr_dialog_text,(35*scr_dialog_li)-scr_dialog_add_13) = ' ' or scr_dialog_add_13 > 7
        {
          break;
        }
        scr_dialog_add_13 += 1;
      }
    scr_dialog_mark_13[scr_dialog_li] = (35*scr_dialog_li)-scr_dialog_add_13;
    scr_dialog_text = string_insert(" #",scr_dialog_text,(35*scr_dialog_li)-scr_dialog_add_13);
  } 
  scr_dialog_text = string_replace_all(scr_dialog_text,'# ','#');
}


if scr_dialog_finished = false
{
  scr_dialog_disp = string_copy(scr_dialog_text,1,scr_dialog_pos);
  if keyboard_check(vk_space)=true
  {
    scr_dialog_pos += 3;
  }
  else
  {
    scr_dialog_pos += 1;
  }
  /*
  Explains ALL nine LINES above, including the {'s -_-. This gives it the effect as typing it, letter by letter.
  That +=1 there makes it one letter by letter, if you change it to 2, it'll do 2 by 2
  */
  if scr_dialog_texttype=1
  {
  draw_set_color(c_white)
    dialogo_script(scr_dialog_disp,scr_dialog_x+8,scr_dialog_y+4);
  }
  else
  {
    if scr_dialog_texttype=0
    {
    draw_set_color(c_red)
      dialogo_script(scr_dialog_disp,scr_dialog_x+8,scr_dialog_y+4);
    }
  }
  screen_refresh();
  if scr_dialog_text = scr_dialog_disp
  {
    scr_dialog_finished = true;
  }
}



if scr_dialog_finished = true
{
  screen_refresh();
  io_clear();
  if scr_dialog_pause = false
  {
    do
    {
      keyboard_wait();
      if keyboard_lastkey=vk_space
      {
        scr_dialog_wait=1;
      }
      else
      {
        if keyboard_lastkey=vk_f12
        {
          event_perform_object(type_bts,ev_keyrelease,vk_f12);
          io_clear();
        }
        else
        {
          io_clear();
        }
      }
    }
    until (scr_dialog_wait=1)
  }
  //sound_play(sfx_dialog)
  //You know, the pokemon games have that sound effect. Its removable.
  screen_redraw();
  io_clear();
  if scr_dialog_split = true
  /*
  So yeah. That split var from before. Let me explain it now.
  The splitamt var is set to a number of how many chars should be able
  to fit in the dialog box. This split variable sees if the dialog is over
  the splitamt. It is set to true if it is over splitamt, else, the
  the following script doesn't happen.
  */
  {
    scr_dialog(scr_dialog_resttext,true,scr_dialog_texttype);
    /*
    So then, the text saved from before is now shown, and loops
    if it continously is bigger than the splitamt value.
    */
  }
}
else
{
  sleep(50);
  //Sets some time between drawing letters.
  scr_dialog(argument0,false,scr_dialog_texttype);
}


El problema es que.... el texto nunca se dibuja en las coordenadas que le puse. Se dibuja donde se le da la gana. Tanto el texto como el cuadro de diálogo. Imagino que habrá alguna variable que modifique las coordenadas... pero no la encuentro. Alguien ve el problema? :C

EDIT

Cuando quieres dibujar algo fuera del evento draw, además de refrescar la pantalla debes usar las funciones de view_xport y view_yport, en lugar de view_xview y view_yview...
5
Hola. En mi RPG quiero utilizar sprites como texto y tengo un sprite pero no es precisamente el que más me gusta, por lo que agradecería cualquier sprite de fuente de texto que tengan para ver cual se ajusta a mi proyecto. ¡Gracias!
6
Hola. Estoy haciendo un RPG y quiero que cuando la escena sea la cima de un acantilado, se vea de fondo el paisaje a lo lejos, pero dándole el efecto de profundida correspondiente. Buscando temas previos me topé con uno donde daban este código:

background_x[0]=view_xview*0.7;

y lo he intentado pero no me resulta. He cambiado los valores para buscar alguno y simplemente el background sigue igual. Alguna sugerencia?

Uso GM8
7
Grafismo & Composición / Tilesets 16x16 y 32x32
Julio 30, 2013, 07:29:34 AM
Hola, estoy armando un RPG y tengo tilessets que en realidad son de 16x16 en el sentido de que si vas a armar sólo cuadrados es fácil armarlos de 32x32, pero si quieres hacer formas más complejas tienes que hacerlo de 16x 16 pero es complicado. He estado buscando la manera de hacer que las partes de 16x16 volverlas de 32x32 añadiéndoles formas. Anexo una imagen para mostrar. Mi pregunta es si existe algún programa? Averigué sobre uno llamado tiled map pero no hace lo que busco, alguien sabe una manera más sencilla que usando el paint copian y pegando millones de veces?
8
Hola a todos. utilizo eventos Draw en varios objetos los cuales dibujar figuras o textos distintos y me gustaría que cada uno se dibujara en colores diferentes, pero cuando utilizo draw_set_color, todo se dibuja del mismo color hasta las acciones de otros objetos ¿Cuál es el problema? :GM8: :GM8: :GM8: :GM8: :GM8: :GM8: :GM8:
9
Buenas a todos, comunidad.

Escribo este post porque no encuentro los códigos necesarios. Utilizo el GM 8.0. :GM8:

En la sección de descargas tienen varios ejemplos de diálogos personalizados con texto de sprites pero ninguno en GM 8. Alguien los tiene a la mano para que me faciliten los scripts?

Estoy trabajando en un RPG y necesito agregarle los diálogos.

Gracias de antemano
10
no se, instale el gm8 y me salieron unos archivos en mis documentos, no los borre, los movi, pero empeze un juego y volvieron a salir

como le hago para que se queden en una carpeta, esque no me gusta tenerlo todo regado

uso el gm8 lite
11
Preguntas y respuestas / gamemaker 6 windows 7
Junio 01, 2010, 03:30:56 PM
estuve buscando y no encontre respuesta, por eso pregunto

siempre he tenido windows xp y siempre he usado gm 6, es mi favorito meencanta y aparte ya lo tengo registrado y no creo poder registrar otro gm

pero acabo de comprar una lapque tiene windows 7, he he escuchado que gm 6 no funciona en vista, tampoco funcionara en 7 verdad? tendria que usar el 8?
12
Preguntas y respuestas / dibujar posicion relativa
Abril 02, 2010, 03:49:52 PM
me descargue un ejemplo de radar pero no me convence

como dibujo un sprite de 3x3 como si fuera un pixel blanco en la posicion en que estan mis solidos?

en una posicion de la view +32 no se si me explico

es decir: dibujar un minimapa que dibuje todos losobjetos como esos sprites blancos en una esquina superior izq
13
bueno, lo unico que me falta es la musica

pero quiero poner canciones en mp3

pero si las cargo en el gm no se cargaran xD y si las cargo externamente sera espantosamente grande lo que ustedes tendran que descargarse xD

como comprimir mp3 a archivos muy peque?os para poder reproducirlos uno tras otro
14
Preguntas y respuestas / coordenadas multiplos de 16
Marzo 19, 2010, 03:26:49 PM
como elijo una coordenada al azar que este alineadas a la grilla 16*16


por ejemplo

xvar=random(aqui que pongo??!! XD)

para que este alineada a la grilla no se si me explico gracias
15
Preguntas y respuestas / simulacion de mercado
Marzo 09, 2010, 05:50:28 PM
perdonen si ya he posteado esto antes, segun yo si, pero estube buscando el tema y no lo encontre, y segun yo jamas me respondieron pero insistere, si ya habia posteado aceme verlo :)

quiero simular un mercado con personas que se muevan de un lado a otro de manera "natural"

como programar el movimiento aleatorio de personas???

alguna idea?
16
Preguntas y respuestas / que un script devuelva 1
Marzo 09, 2010, 05:40:44 PM
como hago que un script devuelva 1 usandolo asi?

if script(texto1,sprite,texto2,texto3)=1{
acciones}else{acciones}

gracias ^^U
17
tengo un script que dibuja un cuadro de dialogo y hace qu todo el juego se detenga... pero quiero que al apretar derecha o izquierda cambiar el valor de una variable sin que se quite el keyboard wait


utilizo esto: do keyboard_wait() until keyboard_check(ord("A")) al final del script quiero que segun apriete izq o der se cambie el valor de xselect para poder dibujar una u otra cosa segun...
18
buenas

pues hice un sistema de dialigo dibujando todo

ypues tengo un problema yo quiero que solo se quite el dialogo presionando A y puse este codigo

do keyboard_wait() until keyboard_check_pressed(ord("A"))

pero no me funciona... y enque lo revisaba me di cuenta que lo puse al final... donde deberia de ir??

es un script que usa funciones de screen_redraw y screen_refresh para dibujarlo todo (porque no esta en el evento draw)

alguien sabe?
19
buenas

me gustaria saber que codigo pedo usar para cambiar el origen de un sprite durante el juego


gracias :)
20
pues lo que pasa es que en unscript dibujo  un sprite que especifico en uno de los argumentos y dentro del mismo script verifico el sprite que estoy especificando


pero tengo el personaje que puede tener dos tipos de ropas diferentes por lo que necesito dibujar( sin tener que poner if ropa=1... else ...) el sprite que corresponda

pense hacerlo de esta forma

string("chara")+string(ropa)+string("face")

pero me sale que no puede comparar argumentos y sin las comillas me sale que noencuentra la variable chara

no se si m puedan ayudar


ropa solo puede tomar valor 0 o 1