Jump to content
  • 0

Headless Client Won't Stand Where I Want It To


Darth_Rogue

Question

I'm running an HC and everything works beautifully except for the fact that I can't seem to get the HC character to stand where I want it to.  I put specific coords in the mission.sqm for the HC in a corner of the respawn box so he will be out of the way, but no matter what I do he insists on standing in the exact middle of the respawn box.  I even tried different coords in another corner and also updated the database for the character position as well, but it still insists on being in the middle.  

 

So my question is this:  How the hell do I force the HC character to be in a specific location and actually have it stand where I tell it to be?

 

  

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

I'm running an HC and everything works beautifully except for the fact that I can't seem to get the HC character to stand where I want it to.  I put specific coords in the mission.sqm for the HC in a corner of the respawn box so he will be out of the way, but no matter what I do he insists on standing in the exact middle of the respawn box.  I even tried different coords in another corner and also updated the database for the character position as well, but it still insists on being in the middle.  

 

So my question is this:  How the hell do I force the HC character to be in a specific location and actually have it stand where I tell it to be?

 

its not the best solution but you can always add scripts to port HC where you want. Not sure how it will work with epoch AH

Link to comment
Share on other sites

  • 0

Pretty sure the HC is seen as a normal player, so he spawns as normal, what about using setPos to move him once he logs in ?

 

 

So should this work then?

side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[] = {13801.7,0.604355,6891.48};
		    azimut = 304.037;
                    id = 100;
                    side = "LOGIC";
                    vehicle = "HeadlessClient_F";
                    player = "PLAY CDG";
                    init = "this enableSimulation false; this allowDamage false; this setPOS [13801.7,6891.48,0.604355]";
                    leader = 1;
                    skill = 0.60000002;
                    text = "HC_HAL";
                };
            };
Link to comment
Share on other sites

  • 0

Ok so the mission.sqm route didn't work.  Now I'm trying this:

 

HC_HALPresent = if(isNil "HC_HAL") then {False} else {True};  //Change "HC_HAL" to whatever your HC is named in your mission.sqm

if(HC_HALPresent) then
	{
	if (!hasInterface) then
		{

			selectPlayer HC_HAL;
			HC_HAL setPos [13807.4,6868.03,0.925186]; //These coords can be chosen by you as anywhere you deem a "safe" position for the HC to stand
	
		};
	};

 

No joy with that either.  No script errors though, so that's good.  It just plain doesn't work.

 

I think part of the problem is that on every restart the headless client is treated as a new character in Epoch.  It won't use the same playerID in the database twice, which means you can't assign coords to it.  

Link to comment
Share on other sites

  • 0

The way the HC works is like this:

 

  • HC connects to server
  • HC joins the headless client slot
  • HC logs in, is assigned the HeadlessClient_F object
  • Epoch server code takes over, reassigns HC to a player object and places it inside the cloning lab

This is the same reason why players are VirtualMan_EPOCH objects in the mission.sqm but are Epoch_Male_F or Epoch_Female_F ingame. Any attempt to switch the HC to another unit other than the player object assigned causes the Epoch server to freak out and kick the HC off the server.

Link to comment
Share on other sites

  • 0

Basically, yes. Something that tells the server that the client is an HC and that the Epoch code should keep its "hands off". I haven't dug far enough to Epoch code to know whether a clientside or serverside change is needed.

 

Edit: I realized that I was completely off the mark about one thing. If your goal is to move the HC "player" somewhere else, all you have to do is to have your script wait until your HC is of type "Epoch_Male_F, which seems to be the default gender for the HC, and then use setPos on the HC object to move it where you want. In a normal Arma 3 environment, the unit defined in mission.sqm is what the player (or HC) would occupy once they enter the game. But Epoch code uses that unit as a temporary stepping stone to the actual player object.

 

What would need a change to Epoch code is if you wanted to swap the HC player object with something else. Sorry for the confusion.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...