4len Posted September 25, 2023 Share #1 Posted September 25, 2023 создали объект на карте, выдаёт такую ошибку Please Log in or Register to see this: Spoiler делал всё по разным гайдам(они в приницпе одинакове) Link to comment Share on other sites More sharing options...
alex_good_kaban Posted September 25, 2023 Share #2 Posted September 25, 2023 Когда вы прекратите трогать инит? Столько тем на форуме и каждый раз одно и то же. Используй cfggameplay.json Please Log in or Register to see this: Code Где alt_mapping это папка в mpmission А pripyat.json это файл который ты выгружаешь из DayZEditor Link to comment Share on other sites More sharing options...
veld Posted September 26, 2023 Share #3 Posted September 26, 2023 ...дэйз эдитор, дэйз эдитор...человек волен в в выборе как извращаться.@4len Для чего вам BuilderItems если у вас маппинг без него?....ну да ладно. (сколько раз себе говорил не отвечать на вопросы с "фотографиями"). Цитата void SpawnObject(string type, vector position, vector orientation) { Object obj = GetGame().CreateObjectEx(type, position, ECE_SETUP | ECE_UPDATEPATHGRAPH | ECE_CREATEPHYSICS); obj.SetPosition(position); obj.SetOrientation(orientation); obj.SetOrientation(obj.GetOrientation()); obj.Update(); obj.SetAffectPathgraph(true, false); if (obj.CanAffectPathgraph()){ GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj); } } Другой вариант void SpawnObject( string type, vector position, vector orientation ) { auto obj = GetGame().CreateObject( type, position ); obj.SetPosition( position ); obj.SetOrientation( orientation ); obj.SetOrientation( obj.GetOrientation() ); //Collision fix obj.Update(); obj.SetAffectPathgraph( true, false ); if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj ); } И в конце скрипт здорового человека( у вас РАБОТАТЬ НЕ БУДЕТ) void SpawnObject(string type, vector position, vector orientation, float scale = 1.0) { Object obj = GetGame().CreateObjectEx(type, position, ECE_SETUP | ECE_UPDATEPATHGRAPH | ECE_CREATEPHYSICS); obj.SetPosition(position); obj.SetOrientation(orientation); obj.SetOrientation(obj.GetOrientation()); obj.SetScale(scale); obj.Update(); obj.SetAffectPathgraph(true, false); if (obj.CanAffectPathgraph()) { GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj); } } Я надеюсь вы понимаете к чему приводит последняя строчка в вашем ....и почему void spawn, а не void main?? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now