×
Меню
Индекс

MSFD Помещение предмета рядом с игроком

[no fix] PlaceAtPC, "Object_ID", count_enum, distance_enum, direction_enum
кол-во, дистанция, положение относительно лица игрока.
 
PlaceAtPC, " ancestor_ghost", 1, 256, 1
 
Эта функция помещает новую копию объекта "Object_ID" рядом с игроком.
Функция позволяет задать направление появления объекта по отношению к положению игрока и дистанцию (в пунктах).
Если это место небезопасно (в воздухе, в стене и т.д.), то объект будет помещен с другой стороны или прямо у игрока под ногами.
(Опечатка: Спасибо Isildur и Esteban. Они указали, number_enum и distance_enum должны были стоять наоборот).
 
Примечание.
Можно вызывать в любом удобном виде.
Т.е. при активации предметов, глобальным скриптом, при нажатии на поверхность (т.е. кто-то наступил на "мину") (но "сообщение" получил игрок).
 
направления:
 
0 = front впереди
1 = back сзади
2 = left слева
3 = right справа
 
PlaceAtPC, "Secret Message", 1, 30, 0  ;призовет к игроку объект "секретное послание" прямо пред его Лик на расстояние 30 ед и в кол-ве 1 штуки.
 

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.