by FDARI » Sat Jul 14, 2012 7:41 am
I don't know exactly what it does, but I picked up medikits up to 800 without any restriction. The restriction is there until I call teleport_newmap. On the new map, I can eat all the health.
Spoiler: Not that relevant anymore
Attached demo: Spawns some health (medikit) and gives you a moment to verify that you cannot exceed maximum by walking over them, then calls teleport_newmap and repeats the procedure. After the teleportation, you should be able to have all the health you want.
Spoiler: All the code
Code: Select all
#library "newlevel"
#include "zcommon.acs"
global int 1:donetele;
script "newlevel" enter
{
spawnforced("medikit", getactorx(0) + 100.0, getactory(0), getactorz(0), 0, 0);
spawnforced("medikit", getactorx(0) - 100.0, getactory(0), getactorz(0), 0, 0);
spawnforced("medikit", getactorx(0), 100.0 + getactory(0), getactorz(0), 0, 0);
spawnforced("medikit", getactorx(0),-100.0 + getactory(0), getactorz(0), 0, 0);
delay(188);
if (donetele) terminate;
donetele = true;
teleport_newmap(2, 0, true);
}
EDIT: In my actual project (this is obviously just a demonstration case) I also had some issues with accuracy and stamina. I got values in the 12000 and 30000 area; they may even have been consistent. I wonder if I'm being assigned a bogus player class.
EDIT: The trigger criterium was not method of changing level (teleport_newmap) but changing level at all. It applies to the most recent revision (r3765) and probably a few revisions back.
Triggers: NEXTMAP works (no problem). MAP MAP02 works (no problem). TELEPORT_NEWMAP triggers bug. Normal level change triggers bug.
Bug details: Stamina and accuracy are not correct. The incorrect stamina permits you to grab extra health. (Stamina 38904, Accuracy 57312)
New discovery: Saving the game breaks accuracy and stamina (in the same manner as when you change levels). It may be that level change isn't the cause at all. Level change triggers autosave. It may well be saving that contains the faulty code. (You don't need to load the game to get the error; it's wrong from the moment you save)
I don't know exactly what it does, but I picked up medikits up to 800 without any restriction. The restriction is there until I call teleport_newmap. On the new map, I can eat all the health.[spoiler=Not that relevant anymore]Attached demo: Spawns some health (medikit) and gives you a moment to verify that you cannot exceed maximum by walking over them, then calls teleport_newmap and repeats the procedure. After the teleportation, you should be able to have all the health you want.[spoiler=All the code][code]#library "newlevel"
#include "zcommon.acs"
global int 1:donetele;
script "newlevel" enter
{
spawnforced("medikit", getactorx(0) + 100.0, getactory(0), getactorz(0), 0, 0);
spawnforced("medikit", getactorx(0) - 100.0, getactory(0), getactorz(0), 0, 0);
spawnforced("medikit", getactorx(0), 100.0 + getactory(0), getactorz(0), 0, 0);
spawnforced("medikit", getactorx(0),-100.0 + getactory(0), getactorz(0), 0, 0);
delay(188);
if (donetele) terminate;
donetele = true;
teleport_newmap(2, 0, true);
}[/code][/spoiler][/spoiler]EDIT: In my actual project (this is obviously just a demonstration case) I also had some issues with accuracy and stamina. I got values in the 12000 and 30000 area; they may even have been consistent. I wonder if I'm being assigned a bogus player class.
EDIT: The trigger criterium was not method of changing level (teleport_newmap) but changing level at all. It applies to the most recent revision (r3765) and probably a few revisions back.
Triggers: NEXTMAP works (no problem). MAP MAP02 works (no problem). TELEPORT_NEWMAP triggers bug. Normal level change triggers bug.
Bug details: Stamina and accuracy are not correct. The incorrect stamina permits you to grab extra health. (Stamina 38904, Accuracy 57312)
New discovery: Saving the game breaks accuracy and stamina (in the same manner as when you change levels). It may be that level change isn't the cause at all. Level change triggers autosave. It may well be saving that contains the faulty code. (You don't need to load the game to get the error; it's wrong from the moment you save)