• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Problems with 2 location

Myth

Freebooter
Good evening. Problems in two locations. Moved from Pirates of the Caribbean out of the city with a waterfall. All the files are there, but the soldiers did not go in it, just stand still. The second problem is: I need to add in a prison cell in the "bed" two locator. Need to add a locator for each level of "bed". The character has to look to the left. But I can not calculate the coordinates, because I can not get up there.
 

Attachments

  • 1.jpg
    1.jpg
    876.8 KB · Views: 197
  • 2.jpg
    2.jpg
    424.3 KB · Views: 160
  • Code jungle wit waterfall.txt
    2.5 KB · Views: 134
Trial and error + view the locators in GM Viewer might be an option.
Not quick, but possible.
 
I cannot look at your code right now.
Last time I recall characters tasked to move who would not move, there was something wrong with the walk patch.
Or the characters were placed outside the walk patch.
Could that be the case here?
 
Little has changed location code posted below. The position of the locators is the same as the original. Only renamed from goto to patrol. DouExit_p.ptc in the folder there is a file. Also the original.

Tonight I want to restore the old file locators and write code to place the soldiers for this particular location. I think that could affect rename locators.
 

Attachments

  • new 1.txt
    2.6 KB · Views: 115
@Myth: You may want to also post the code you use to place the soldiers on their locators.
 
That's not a function I'm familiar with.
Might be something CoAS-specific.

Do you have any idea how that function works?
Can you show the exact section of code that runs to place the characters?
 
I attach a file with this function, a standard feature, written by the creators of the game. With standard forts there are no problems.
 

Attachments

  • new 1.txt
    4.4 KB · Views: 118
Is that function call part of your quest code?
From where does it get run?

Two questions spring to mind:
- Does a function intended for forts work in a town outskirts location?
- Can't you just replace it with some low level PlaceCharacter or ChangeCharacterAddressGroup lines?
 
Error in location is not in the script. Now I put the soldiers set a character in the scene. The result is the same.
 
The problem was due to rename locators. Can anyone suggest how to do so and called locators Patrol and the characters were not in place?
 
Last edited:
I know Tool, after I change with it locators characters no longer walk on location
 
Last edited:
The only thing I can see is what already has been discussed: you have changed all goto to patrol. I'm not sure what
patrol does but goto is the standard locator used for ex for citizens to walk around between. Why not test with them
as goto and see?
 
The only thing I can see is what already has been discussed: you have changed all goto to patrol. I'm not sure what
patrol does but goto is the standard locator used for ex for citizens to walk around between. Why not test with them
as goto and see?

With old locators everything is working correctly. Locators Patrol Group - is locators for the soldiers in the forts. You can move from this location or to the gate of the city, or in jail. That's why I wanted to be placed in this location soldiers. While I see three options: leave only the soldiers at the gate, write a function installing soldiers at this location (currently used standard feature), or try to add locators and see what happens.
 
This is a fairly common way to place temporary soldiers for quest purposes in PotC:
Code:
            ref sld;
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.0, Nations[FRANCE].fantomModel.m6, "goto", "goto3");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.0, Nations[FRANCE].fantomModel.m3, "goto", "goto4");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.0, Nations[FRANCE].fantomModel.m4, "goto", "goto1");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.0, Nations[FRANCE].fantomModel.m2, "goto", "goto2");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m5, "reload", "reload12");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m2, "reload", "reload1");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
            sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, Nations[FRANCE].fantomModel.m3, "reload", "reload1");
            LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");

Alternatively, soldiers can be added in the Location init files.
There they can be set to permanently wander the location, or be in location "none" until needed for quest purposes.

These are common ways of putting quest characters in place:
Code:
PlaceCharacter(characterFromID("researcher"), "goto");
Or:
Code:
ChangeCharacterAddressGroup(characterFromID("Researcher"), "KhaelRoa_port", "officers", "reload2_1");

These are all examples from PotC of course, but generally CoAS tends to be very, very similar.
 
Back
Top