Page 1 of 1

game.setActiveCombatArea

Posted: Wed Mar 23, 2011 6:29 pm
by anselmus
How to calculate the "game.setActiveCombatArea", to redo the "init.con".
So having a minimap with exact size of the area of the game?
Remembering that I refer to Battlecraft. (ingamemap).
Thanks.

Re: game.setActiveCombatArea

Posted: Wed Mar 23, 2011 7:34 pm
by fo0k
Take Berlin as an example

Here is the map below. A full size medium map is used for Berlin but the active area is just 4 terrain squares up in the top right (as viewed in BC)

The settings for the active area in Berlin are : game.setActiveCombatArea 1536 1536 512 512

The first 2 values are where the area will start (1536x1536) then the second 2 values are how big the area will be (512x512)

Image


*I think :)

Re: game.setActiveCombatArea

Posted: Thu Mar 24, 2011 1:56 am
by anselmus
In my case the area of the game is from the opposite direction, then it would be: 0 1536 512 512, correct?

Re: game.setActiveCombatArea

Posted: Thu Mar 24, 2011 2:31 am
by fo0k
If you mean the top left of the map? Then I think so, yes

but.. I'm not certain if the x or y value is first.. So you should just test it and see if it is correct.

Please let me know so this can be corrected if wrong. You should at least have enough info here to work it out after a couple of tries.

Re: game.setActiveCombatArea

Posted: Thu Mar 24, 2011 3:59 am
by Apache Thunder
The game uses vectors in this order: X Z Y (Left to right, up/down, front back). If it's a vector two, then it's Left to right then front to back. So in this case a vector 2 would read as X Y. Left to right is almost always the first vector. The next one differs depending on if it's a vector 2 or 3.

If your using a 2D object as reference (like combat area or the position dot settings for the vehicle icon in the HUD), then X would be left/right, and Y would be up/down in a vector 2 code.

Re: game.setActiveCombatArea

Posted: Fri Mar 25, 2011 4:58 am
by Swaffy
Oh, wow. Thanks. I can use this on one of my maps.

What file do I find the scripting in?

Re: game.setActiveCombatArea

Posted: Fri Mar 25, 2011 7:18 pm
by anselmus
Init.con,but you will need Ed42 to finalize. because the ingame mini map needs to be redone in Editor42.
When Battlecraft creates the ingame mini map it does the hole map... it does not read the game.setActiveCombatArea line,
Editor42 reads this line so when saving the map in Editor42 the ingame mini map is created correctly, you then just copy the ingamemap.DDS file from the map that you used in Editor42 and then paste it in to the map you are working on.
To save the map in Editor42 you first need to switch to "Minimap Options" then "File" "Save" it then should say saved in the middle of the screen and your done.
In my case told me how to calculate the correct coordinates... but now I know.... :mrgreen:

Re: game.setActiveCombatArea

Posted: Sat Mar 26, 2011 12:48 am
by Fizzy
Hey Anselmus,
good to see the info I sent you worked,
I had no Idea this place was here...... I will have a look around ;)

Fizzy.

Re: game.setActiveCombatArea

Posted: Sat Mar 26, 2011 4:11 pm
by anselmus
Yeah, I have to share their wisdom with the staff ... hehe.
I realized that their information was more accurate to remedy the doubts posted.... :)

Re: game.setActiveCombatArea

Posted: Thu Aug 24, 2023 2:57 pm
by Crash42modder
Apache Thunder wrote: Thu Mar 24, 2011 3:59 am The game uses vectors in this order: X Z Y (Left to right, up/down, front back). If it's a vector two, then it's Left to right then front to back. So in this case a vector 2 would read as X Y. Left to right is almost always the first vector. The next one differs depending on if it's a vector 2 or 3.

If your using a 2D object as reference (like combat area or the position dot settings for the vehicle icon in the HUD), then X would be left/right, and Y would be up/down in a vector 2 code.
How do we know which map is vector 2 or 3?