Connection ErrorBad RequestSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
But the fact is that it works, and I personally verified it in the map "Astralia".
I don't know how it works for you in Astralia, but I did something similar in Gnomania. It worked in 90% of cases, but in 10% of cases, the computer moved in the opposite direction. I had to add the MoveHero function. That's how it is.
So, in the first batch, everything worked except for the AI attractor. They run wherever they want. Is there no other way? And, before the battle starts, could a message pop up?
Part two. I need the following: when you approach a unit, a message pops up, the unit disappears from the map, and troops are added to your army. It's a specific hero. Second: when you defeat a monster, a message pops up.
And finally, the last thing: quests. The first one doesn't have much meaning and sounds like this: reach the road to Al-Safir. Just so it appears and is considered completed after the trigger with the cutscene in the previous part. Two more: the main one is to kill the enemy hero, and the secondary one is to collect groups of creatures from the map (this also includes the previous scripts for adding them to the army). How can this be done? Please help!
Okay, out of the first batch, everything worked except for the AI attractor. They run wherever they want.
This was predictable. If possible, it should be replaced with MoveHero(hero,x,y);Gilraen
And, before the battle starts, a message should pop up?
I would set a "town" region so that it needs to be crossed before attacking the town. Then: function show_mes(hero) if hero=="EnemyHero" then MessageBox(GetMapDataPath().."mes.txt"); end; end; Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,"town","show_mes");Gilraen
I also need this: you approach a unit, a message pops up, the unit disappears from the map, and troops are added to your army. + collect groups of creatures from the map.
function Add(hero) if hero=="YourHero" then MessageBox(GetMapDataPath().."mes2.txt"); AddHeroCreatures("YourHero",CR_ID,QUANTITY); k=k+1; if k==n then --number of creatures to collect SetObjectiveState("Obj",OBJECTIVE_COMPLETED); end; end; end; SetObjectEnabled("monster",nil); Trigger(OBJECT_TOUCH_TRIGGER,"monster","Add");Gilraen
Second: you defeat a monster and a message pops up.
You can simply write a script in the monster's properties, in the script tab. Write MessageBox there, and that's it.Gilraen
Just so that it appears and is marked as completed after the trigger with the video in the previous part.
Thanks, I'll try in the evening. I just didn't quite understand how to add creatures – what are the variables k and n, and what does CREATURE_ID look like?
k -- the number of joined units. n -- the number required to complete the task. CREATURE_ID -- the creature's ID (can be found in the ID's_for_script.pdf file or something similar).
Okay. Regarding SetObjectEnabled – this doesn't make the unit disappear, but I need it to disappear (the hero revives dead warriors, and they join him). The task is as follows: two revived groups and three recruited groups. Revived: Thunderbirds, Mages; recruited: Golems, Mages, Thunderbirds. Is it possible to combine them into one variable? And where can I find DefeatHero?
Tasks. Does SetObjectiveState need a function? Does it work just like that? And how do I add a description to the task?
Yes, I forgot... `RemoveObject('monster')` – removes the object. Regarding resurrection, please provide more details.
`DefeatHero` – in the map properties tree, under objectives, objective kind.
`SetObjectiveState` works like this.
Objective description – objectives, objective description.
Regarding resurrection – this is a plot point. But here’s what else I need. Move Hero: can it be made to work on the opponent’s turn, or the day after the item is received? How can I make it so that player heroes don’t have action points? And the collection quest: it’s completed when the triggers for the message and joining are activated – how do I write that?
Wow, so much work for such a small map! Should I somehow diversify it? And thank you, Ment, Ser9K.
My MessageBox isn't working. Never mind, I'll figure it out.
Is there a way to describe how to set up a quest in as much detail as possible? A simple one, without any specific meaning, just entering a region where the text for the quest is displayed? And how do I configure DefeatHero: description, activation, and so that a video plays and the mission ends upon completion?
Now, about other maps. I'm curious, how does "Summon Ilm-Hijra" from Tribes of the East work? Is it about moving objects?
And how do I take troops away from a hero? I just want to prepare a special map for November of this year (a little hint: what will happen in November?), and the main part of it should also be scripted. And what I said is the most important thing. Can you help me?
I also had to figure it out for a long time. The problem was that I was typing messages in Notepad, and it automatically chooses the wrong format. Anyway, take a look at this topic; it has everything written about MessageBox.Gilraen
Is it possible to describe in as much detail as possible how to set a task?
Do you mean, including the name and description of the task? Or did I misunderstand? Because the scripting part is exhausted by the SetObjectiveState function. You can also sometimes use SetObjectiveProgress.Gilraen
How to configure DefeatHero: description, launch, and so that a video plays and the mission ends upon completion?
Here's how (+screenshot):
function P0_end() StartDialogScene("bla-bla"); Win(1); end;
function P0_start() SetObjectiveState("P0",OBJECTIVE_ACTIVE); Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER,"P0","P0_end"); end;
Trigger(Trigger Type, parameters,"P0_start");
Gilraen
It's interesting how "Summon Ilm-Hijdra" from Lords works. Is it moving objects?
Yes, it seems to be a scripted spell that moves an object. Although I didn't delve into the script there.:) Gilraen
Oh my God! This MoveHero doesn't work either!! I can understand these two heroes – no one wants to die, but they should still work with scripts!!! My enemy heroes either do whatever they want (until I set up blocks) or just stand there (like in the last three cases). I've already tried calling them with MoveHero and attracting them with AiAttractor, but no – they're just stubborn!
Oh Lord! This MoveHero doesn't work either!! I can understand these two heroes – no one wants to die, but they should work with scripts!!! My enemy heroes either do whatever they want (until I set up blocks) or just stand there (like in the last three cases). I've already tried calling them with MoveHero and attracting them with AiAttractor, but no – they're stuck!
From a fan-made scripting guide: if you want the computer player to rush to a certain object on the map and only follow a specific path, block all other paths and give that object the highest priority. However, don't forget to remove the priority as soon as the player reaches it, otherwise the AI will keep bumping into it in the most inappropriate way for the rest of its days.