Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
6 years ago
Auto-translated
I tried it. It also consumes nil. With the same unsatisfactory result. I even renamed all the city names, just in case there was an extra space or (which would be strange) a Russian "T" instead of an English one. But no.
I have a serious question – can I upload a test version of the map here so you can take a look? Maybe you'll understand it right away. Or maybe it will suddenly work normally for you, which would also be a result...
In reply to Ment
User Avatar
6 years ago
Auto-translated
Ment
I tried it. It also consumes "nil" with the same unsatisfactory result. I even renamed all the cities, just in case there was an extra space or (which would be strange) a Russian "T" instead of an English one. But no.
I have a serious question – can I upload a test version of the map here so you can take a look? Maybe you'll understand it right away. Or maybe it will suddenly work normally for you, which would also be a result...
Yes, I can take a look.
User Avatar
6 years ago
Auto-translated
Thank you very much! Cyclops near the castle join the player's army. The problem occurs when leaving the castle gates. The script triggers incorrectly and starts a cutscene. In the attachment, rename the zip file to h5u.
Attachments 1
1 file attached • Total size: 1.2 MB
User Avatar
6 years ago
Auto-translated
it seems the problem is simply that the Line function doesn't launch the check thread (P0_check), but instead immediately launches the function that should run after all cities have been destroyed (P0_change_state).
User Avatar
6 years ago
Auto-translated
I’m just a piece of fun (Thank you very much!).
6 years ago
Auto-translated
Hello everyone. I'm having big problems with the caravan. I've searched for information in the API, but there are practically no interactions with it. Situation: I'm creating a caravan for PLAYER_1 (the player), setting its destination, angle, and assigning an army. I need to make it so that troops cannot be taken from the caravan. If I use SetObjectEnabled, it doesn't affect the caravan, and besides, I need the AI to be able to attack it. I can't assign PLAYER_NONE, and if I give it the ID of a non-existent player, it becomes neutral, but it refuses to move. Any ideas on how to implement this? I don't want to implement the function with even more workarounds. I was thinking of creating an allied player and giving them a command with PLAYER_1; naturally, then the caravan couldn't be taken, and it could be attacked, but does it make sense to create a new player just for one caravan? By the way, thanks to Khotabych for helping with the previous question.
User Avatar
6 years ago
Auto-translated
In principle, your approach is correct. Usually (in campaigns), the armies/garrisons/castles/caravans that you want to make inaccessible for attack are given to an allied player.
I use the following method in scenarios: I create players:
a) us
b) n enemies
c) a player loyal to us
d) a player not loyal to us
Essentially, there's nothing wrong with adding an allied player. And no workarounds are needed, although I have one: simply check in the processing loop how close we are to the caravan, and if we are too close, stop the movement.
User Avatar
6 years ago
Auto-translated
Hello everyone, I have an interesting problem. I've tried to find a solution in various ways, but I keep running into obstacles. So, I have 3 questions, and answering just one of them would be enough:
1) Every dwelling has a property where you can set up a guard, but this always results in a weekly increase in the number of that unit. How can I adjust the quantity?
2) Can a dwelling be given a garrison like a mine, while still retaining its recruitment function?
3) Can I create a message with an image, similar to the one that appears when capturing a high-level dwelling?
User Avatar
6 years ago
Auto-translated
Try using the AddObjectCreatures(...) function. You can trigger a message by simply setting the dwelling to a non-functional state, then using a QuestionBox. If the player agrees, initiate the battle, and after the battle, restore the dwelling to its functional state.
In reply to }{0TT@6bI4
User Avatar
6 years ago
Auto-translated
}{0TT@6bI4
Try using the AddObjectCreatures(...) function.
It doesn't work.
}{0TT@6bI4
You can display a message by simply setting the dwelling to a non-working state, then using a QuestionBox. If the player agrees, a battle begins; after the battle, the dwelling returns to its working state.
I understand that. Is it possible to include a building icon in this message?
User Avatar
6 years ago
Auto-translated
Like, for example, when attacking a Gargoyle Lair or an Ent Grove?
Try TalkBoxForPlayers; you can set an icon in it.
User Avatar
6 years ago
Auto-translated
Is this a feature from a mod? There is no mention of it in the scripting guides.
User Avatar
6 years ago
Auto-translated
In the folder with the game manuals, there are two script-based guides. One has a filename indicating that it is for the 3.1 version of Tribes of the East. The other has no indication.
So, the first one is not for 3.1. And the second one is for 3.1. They are mixed up.
User Avatar
6 years ago
Auto-translated
----------------------------------------------------------------------------------------
--Wrapper for TalkBoxForPlayers---------------------------------------------------------
----------------------------------------------------------------------------------------
--params – description of the table of values

function TalkBox(parametrs)
print("TalkBoxStarted");
TalkBoxForPlayers(PLAYER_1,
parametrs.icon, --Icon
nil, --Text for the icon
GetMapDataPath()..parametrs.text, --Main text of the message
nil, --Text after the answers
parametrs.func, --Function - answer handler
0, --"Close" button mode (on/off)
GetMapDataPath()..parametrs.name, --Title
nil, --Text before the answers
0, --Answer highlighted by default
GetMapDataPath()..parametrs.ans1, --Answer 1
GetMapDataPath()..parametrs.ans2, --Answer 2
GetMapDataPath()..parametrs.ans3, --Answer 3
GetMapDataPath()..parametrs.ans4, --Answer 4
GetMapDataPath()..parametrs.ans5); --Answer 5
print("TalkBoxFinished");
end;

Calling TalkBox involves setting an array of parameters:
talkbox_parametrs=
{icon=...
text=...
name=...
ans1=...
ans2=...
ans3=...
ans4=...
ans5=...
func=...
}

TalkBox(talkbox_parametrs);
In reply to Ment
User Avatar
6 years ago
Auto-translated
Thanks, Hottabych...
Ment
In the folder with the game manuals, there are two script guides. One has a filename that indicates it's for version 3.1 of Tribes of the East. The other has no indication.
So, the first one is not for 3.1. And the second one is for 3.1. They are mixed up.
I have a pirated version of the game, and the manuals were downloaded from the internet. Nevertheless, the Novik guide doesn't have this either.

Statistics

Welcome our newest member: recijeb