Yes you're right. My tests are done on inventory item.
Thank you for your answer !
Thank you for your answer !
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuswitch(button) {
case eMouseLeft:
Display("left button");
break;
default:
Display("unknown button: %d", button);
break;
enum MouseButton {
eMouseLeft,
eMouseRight,
eMouseMiddle,
eMouseLeftInv,
eMouseMiddleInv,
eMouseRightInv,
eMouseWheelNorth,
eMouseWheelSouth
};
int index_room = 0;
int initial_room = player.Room;
for (int i = 0; i < MAX_ROOM; i++) {
if (Room.Exists(i))
{
/* Note: si cette boucle trouve des pièces qui n'existent pas ou plus, vérifier que
le fichier CRM correspondant ne traine pas dans les fichiers du jeu.
Ce problème ne concerne à priori que l'exécution directe avec F5 (pas l'exec avec le moteur).
Ex: trouve un index de room 10, qui n'existe plus dans l'éditeur : effacer le fichier room10.crm
*/
log(String.Format("room: %d exists", i));
liste_room[index_room]=i;
index_room = index_room+1;
}
} // i < MAX_ROOM ?
liste_room[index_room] = initial_room; // retourne sur la première pièce
index_room++;
liste_room[index_room] = -1; // indique la dernière pièce
index_parcours_room=index_room; // se place sur la dernière pièce
log(String.Format("max rooms : %d", index_room));
if (ask_for_objects_testing == true) {
int initial_room = player.Room;
for (int i=0; liste_room[i]>=0; i++) {
log(String.Format("parsing room: %d", liste_room[i]));
player.ChangeRoom(liste_room[i]);
}
// go back to initial room
player.ChangeRoom(initial_room);
}
Quote from: Crimson Wizard on Sun 02/10/2022 16:21:29Which pieces do you need? The Editor is fully available in 1 zip archive in the "windows_packaging" task.
Inside it has everything necessary for building a game for Linux too (with precompiled binaries for Debian/Ubuntu system).
Quote from: AGA on Thu 29/09/2022 00:07:01It works fine in Firefox on various Windows and Mac versions. No idea what the issue is on Linux, but unless you can give me an idea of the actual issue there isn't much I can do! Do you see any errors in the developer console or networks tab?
function cGenericCharacter_Interact()
{
Character*char = Character.GetAtScreenXY(mouse.x, mouse.y);
switch (char) {
case cPeter: PeterTalk(); break;
case cPaul: PaulTalk(); break;
case cMary: MaryTalk(); break;
// etc etc
}
}
#define iCup 1
#define iKey 2
#!/usr/bin/env lua
-- Archlinux users: community/lua-expat
-- doc: https://lunarmodules.github.io/luaexpat/manual.html#introduction
local lxp_totable = require("lxp.totable")
local function read_file(path)
local hFile = assert(io.open(path, "rb"))
local data = hFile:read "*a"
hFile:close()
return data
end
local function parse_table(t)
for k,v in pairs(t) do
if type(v) == "table" then
parse_table(v)
else
if v == "InventoryItem" then
local item = lxp_totable.torecord(t)
print(string.format("#define %s %d",item.Name,item.ID))
end
end
end
end
local xml_data = read_file("Game.agf")
local data = lxp_totable.parse(xml_data)
parse_table(data)
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.044 seconds with 14 queries.