×
Меню
Индекс

MSFD Placing an item near the PC

[no fix] PlaceAtPC, "Object_ID", count_enum, distance_enum, direction_enum
 
PlaceAtPC, "Secret Message", 0, 30, 1
PlaceAtPC, "ancestor_ghost", 1, 256, 1
 
This function places a new reference of "Object_ID" near the player. The function lets you define a direction relative to the player where the object is going to appear and a distance (in units). If that location is not safe (in the air, in a wall, etc), the object will be placed at one of the other axis or at the player’s exact location (feet). (Erratum: Thanks to Isildur and Esteban for pointing out that number_enum and distance_enum were switched around in previous versions.)
 
Direction is:
 
0 = front
1 = back
2 = left
3 = right
 
 
Note (DinkumThinkum):
According to Bethesda, on the PC version an overflow loot bag will be created if there are more than 1024 objects in a single cell.
 
However, if you try to put a large number of objects into a cell using 'PlaceAtPC', the game will lockup completely. Don't know the minimum number that will cause the crash, but 'PlaceAtPC p_restore_health_e 2000 0 0' will definitely do it.☺
 
In other words: the game engine won't create an overflow loot bag for excess items that are added to a cell by a script; instead, it just crashes when the maximum number of items per cell is exceeded. I ran into this with 'PlaceAtPC', but I would guess that any script function that adds items to a cell would have the same problem. I would also guess that the crash occurs as soon as the number of items in the cell reaches the number that would normally trigger the creation of an overflow loot bag.