Anyway, I introduced a massive bug after using a custom implementation of the infinite storage mod and apologize for this. Invisible wall were appearing randomly on some maps, blocking path for players.
I think it is now fixed for my mod but I know it is not the case for all mods.
It seems that some other mods are using similar system (infinite storage) so here is an information about the bug and how to fix it.
There seems to be 2 causes of the bug :
The first comes from CreateObject method which doesn't like non safe location as argument. I am not sure it can really put the invisible wall at a wrong location but CraeteObject will "chose" a valid location for you if the one you give in parameter is not valid.
So consider using SetLocation right after CreateObject :
[color="#99ccff"]location[/color] lLoc = ...; [color="#99ccff"]object[/color] oStorage = CreateObject(OBJECT_TYPE_PLACEABLE, R[color="#3366ff"]"genip_invisible_wide.utp"[/color], lLoc, [color="#3366ff"]" "[/color]); SetLocation(oStorage, lLoc);This was done in the standard infinite storage mod so most of the time, you don't need to change anything.
The seconds bug is heavy. "char_stage" doesn't exist in Awakening. It's new name is "gxa_char_stage". So if you are too confident and create the Location like this :
[color="#99ccff"]location[/color] lLoc = Location(GetObjectByTag([color="#3366ff"]"char_stage"[/color]), Vector(), [color="#cc99ff"]0.0f[/color]);You are probably pointing the 0 point of the current map, not the "char_stage". And that's why all storage created when the player use awakening may be created on the wrong map.
So consider checking the validity of the area before doing anything else with it :
[color="#99ccff"]object[/color] oArea = GetObjectByTag([color="#3366ff"]"char_stage"[/color]);
[color="#99ccff"]if[/color] (IsObjectValid(oArea) != [color="#99ccff"]TRUE[/color])
{
oArea = GetObjectByTag([color="#3366ff"]"gxa_char_stage"[/color]);
}
[color="#99ccff"]if[/color] (IsObjectValid(oArea) == [color="#99ccff"]TRUE[/color])
{
[color="#99ccff"]location[/color] lLoc = Location(oArea, Vector(), [color="#cc99ff"]0.0f[/color]);
oStorage = CreateObject(OBJECT_TYPE_PLACEABLE, R[color="#3366ff"]"genip_invisible_wide.utp"[/color], lLoc, [color="#3366ff"]" "[/color]);
EnablevEvent(oStorage, [color="#99ccff"]FALSE[/color], EVENT_TYPE_INVENTORY_ADDED);
EnablevEvent(oStorage, [color="#99ccff"]FALSE[/color], EVENT_TYPE_INVENTORY_REMOVED);
EnablevEvent(oStorage, [color="#99ccff"]FALSE[/color], EVENT_TYPE_INVENTORY_FULL);
SetTag(oStorage, [color="#3366ff"]"blablabla"[/color]);
SetObjectInteractive(oStorage, [color="#99ccff"]FALSE[/color]);
SetLocation(oStorage, lLoc);
}
If you are using talmud storage, it is line 746 of talmud_storage_h file :
[color="#99ccff"]location[/color] lStorage = Location(GetObjectByTag(TAL_STORAGE_AREA_TAG), Vector(), [color="#cc99ff"]0.0[/color]);
Modifié par anakin5, 30 juin 2010 - 09:52 .





Retour en haut






