Skip to content

Current questions and answers regarding the map editor.

User Avatar
#5126
Auto-translated
}{0TT@6bI4
Are you talking about SetObjectOwner? Well, assigning ownership of an object (in this case, a Castle) to player 3 is equivalent to capturing it. Did you want the Castle to be automatically captured by player 3 after something happens? Or do you just want the AI to start capturing that Castle? Or initiate a scripted siege of the Castle?
Now I understand what you mean. It's just that if we're going to implement this workaround, how would it look in more detail?
1) Two heroes belonging to player 3 are initially located near the Castles and run towards them. (How would we implement this?)
2) How do we get them into the city so that they are actually inside the city?
And then we can do everything you mentioned earlier.

And another important question is, how can we test scripts directly in the game (currently on a Multiplayer map)?
Right now, I have to launch the script editor, then the game itself, wait for everything to load, close the game, and edit.
I saw a method of creating an additional .lua file in the game folder ("Heroes"/data/test/lua) and initializing it in the game @test.lua (I don't remember exactly how), but I couldn't get it to work. Please advise.