_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
New here? I'm Roha — want a quick tour?
I need to implement a couple of functions: 1) a text message should pop up only when a specific hero approaches a certain location, and 2) after capturing a town, a quest should be activated: "prevent the town from being captured" (by other players).
function Message(hero)
if hero==Hero Name then
MessageBox("/Path/File.txt")
end;
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Region Name", "Message")Code 2: function DefendtownObjectiveActivate()
SetObjectiveState("Quest Name", OBJECTIVE_ACTIVE, PLAYER_1)
end;
Trigger(OBJECT_CAPTURE_TRIGGER, "Castle Name", "DefendtownObjectiveActivate");How do I add images to the loading screen and the map selection menu? First, let's add an image to the main loading screen, or the PWL picture. Start by choosing any image you like, then in any graphics editor (I'll use paint.NET as an example here, but you can also use Adobe Photoshop or others; a simple paint program won't work), change its size to 1024x766, then change the canvas size to 1024x1024. Fill the resulting white (transparent) area with black. Create a folder in your game's directory (if one doesn't already exist) named "Complete," and no other name. Save your image in it in .tga format, preferably 32-bit. Open your map in the map editor, then go to Map Properties Tree => PWL => New => Enter a name in English and click Add Type; after the name you entered, the text .(Texture) should appear. Click OK, and in the window that appears, select the Src file property => ... => Choose your image. You don't need to change any other properties; the default settings are correct. Hover over your texture file on the left in the file system tree and right-click => Export. Done. If everything is correct, 1024 and 1024 will appear in the Width and Height parameters on the right side of the window. We can now see the result in the game. However, something terrible might happen: the image will be sent to the upper left corner, its border will be stretched to the side, and a wide black bar will appear at the bottom. This is fixed by setting the texture settings within the editor, as for previews (see "Making Previews"). Now, let's create additional satellite images that are displayed in the scenario selection menu. To do this, choose an image you like and change its size to 240x180 in a graphics editor, save it in .tga format in the Complete folder, 32-bit. In the map editor, open your map, then go to Map Properties Tree => Thumbnail images => Right-click => Add => New => Enter a name in English and remove Add Type, i.e., the text .(Texture) should not appear. Click OK, in the window, select your image in Src file, properties - Type, change REGULAR to TEXTURE_2D, Conversion Type, set CONVERT_TRANSPARENT, Format - TF_8888, Instant load => true. Hover over the texture file in the file system tree, right-click, Export. Repeat the procedure as many times as you want images (previews).
Happy New Year to everyone. Google didn't help. I'm asking here. Is there a way to remove the player limit of 8 heroes?
It seems to break the interface, so I think it can't be done without mods.
dragon = 1
function lostDragon() ---- Checks if the dragon is lost
while 1 do
sleep ( 10 );
if GetHeroCreatures("Ohtarig", 83) == 0 and dragon == 1 then
SetObjectiveState("q5", OBJECTIVE_FAILED);
sleep ( 10 );
Loose();
break
elseif GetHeroCreatures("Ohtarig", 83) == 0 and dragon == 0 then
SetObjectiveState("q5", OBJECTIVE_FAILED);
end;
end;
end;
startThread (lostDragon)
--first video and boss fight--
function PokaAstrida()
dragon = 0
RemoveHeroCreatures('Ohtarig', 83, 1)
print('Zdes byl multik')
sleep(5)
StartCombat('Ohtarig', nil, 1, 41, 1, nil, nil, nil, nil)
sleep(5)
MessageBox("/Maps/SingleMissions/ChoiseOTW1/MagiPoka.txt");
sleep(5)
SetObjectiveState("q5", OBJECTIVE_FAILED);
Trigger(REGION_ENTER_AND_STOP_TRIGGER , "Corrupted", nil);
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER , "Corrupted", 'PokaAstrida');