game.setActiveCombatArea

Ask questions, discuss ideas, get answers
Post Reply
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

game.setActiveCombatArea

Post 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.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: game.setActiveCombatArea

Post 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 :)
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Re: game.setActiveCombatArea

Post by anselmus »

In my case the area of the game is from the opposite direction, then it would be: 0 1536 512 512, correct?
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: game.setActiveCombatArea

Post 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.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: game.setActiveCombatArea

Post 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.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: game.setActiveCombatArea

Post by Swaffy »

Oh, wow. Thanks. I can use this on one of my maps.

What file do I find the scripting in?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Re: game.setActiveCombatArea

Post 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:
User avatar
Fizzy
Posts: 4
Joined: Sat Mar 26, 2011 12:35 am
Contact:

Re: game.setActiveCombatArea

Post 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.
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Re: game.setActiveCombatArea

Post 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.... :)
Crash42modder
Posts: 72
Joined: Mon Feb 03, 2020 7:15 am

Re: game.setActiveCombatArea

Post 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?
Post Reply