46
Foro técnico / Re: Dudas sobre conceptos de programación
« on: January 02, 2012, 01:26:24 AM »
no habia caido, lo tienes hecho en la demo de wme lite, pq como no usa el boton derecho pq es para touch (ipad, iphone) lo hace asi
Forum rules - please read before posting, it can save you a lot of time.
Hopefully we can see the birth of WME2 - in 2012
I wish merry Christmas and happy new year to the WME community.
I hope that all of your desires can be completed and that the new year will provide us new games and a good, nice, great, new WME engine![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Merry Christmas, everyone, and all the best for the year 2011!!and a good, nice, great, new WME engineWe can only hope
var objs = new Array();
objs[0] = new Array("agua", "AG");
objs[1] = new Array("bote", "BT");
objs[2] = new Array("llaves", "LL");
var cadena;
// Nos recorremos nuestra lista de pares objeto - cadena
for(var i=0; i<objs.Lenght; i=i+1)
{
var objeto = objs[i]; // Cogemos cada objeto
// Buscamos nuestro objeto en los objetos del inventario
for(var idx=0; idx<Game.TotalNumItems; idx=idx+1)
{
var Item = Game.QueryItem(idx); // Cogemos el objeto del juego
var sino = Game.IsItemTaken(idx); // Comprobamos si lo tenemos en el inventario
if (sino) // Si está en el inventario
{
if (Item.Name == objeto[0]) // Si el objeto que estamos comprobando (de nuestra lista) es el objeto que está en el inventario
{
cadena = cadena + objeto[1]; // añadimos la subcadena del objeto de nuestra lista a la cadena final
}
}
}
}
Game.Msg(cadena);
Sleep(100);