Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
EmpireEarthManiac
Posts: 20
Joined: 19 May 2018, 21:51

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by EmpireEarthManiac » 23 May 2018, 20:40

Leader wrote:
23 May 2018, 14:05
It means that your ONESHOT rule is not being executed at all, so everything you put in RULE/ACTION doesn't work (including those text messages, UnlockObjectives and Movement functions).

Please paste your RULE and ACTION where Unlock/Move functions are called.
Here is an example of one of my RULE and ACTION

Code: Select all

////////////////////////////////////////////////////////////
// VCCamp
////////////////////////////////////////////////////////////
RULE ruleVCCamp ONESHOT
if(PlayerHasLOSToAnyoneInGroup(1, "groupVCCampBuildings")
then actionVCCamp
END_RULE

ACTION actionVCCamp
SCRIPT WORLD
DoDelay(fDelay);

STEP
SetObjectiveCompleted("Obj_tetoffensive_1");
STEP
SetObjectiveUnlocked("Obj_tetoffensive_2");
STEP
CreateDialogBox( "tx_tetoffensive_blank", tx_tetoffensive_destroyvccamp", false);
STEP
CreateDialogBox( "tx_tetoffensive_blank", tx_tetoffensive_destroyvcairbase", false);
STEP
SetObjectiveUnlocked("Obj_tetoffensive_3");
SetObjectiveUnlocked("Obj_tetoffensive_4");
STEP
CarveShroudArea(1, "areaVCAirbase");
STEP
CreateDialogBox( "tx_tetoffensive_blank", tx_tetoffensive_rallysvietnamese", false);
STEP
SelectGroupForPlayer("groupNVMainForce", 4);
MoveSelectionToArea("areaJungleRegroup);
ClearSelection();
STEP
SelectGroupForPlayer("groupVCTroopsFour", 3);
MoveSelectionToArea("areaJungleRegroup");
ClearSelection();
STEP
SelectGroupForPlayer("groupVCTroopsFive", 3);
MoveSelectionToArea("areaJungleRegroup");
ClearSelection();
STEP
SelectGroupForPlayer("groupNVTroopsTwo", 4);
MoveSelectionToArea("areaJungleRegroup");
ClearSelection();
STEP
SelectGroupForPlayer("groupMarinePatrolOne", 6);
MoveSelectionToArea("areaMarineCamp");
ClearSelection();
STEP
SelectGroupForPlayer("groupMarinePatrolTwo", 6);
MoveSelectionToArea("areaMarineCamp");
ClearSelection();

END_SCRIPT
END_ACTION


User avatar
Dr.MonaLisa
High Representative
Posts: 7528
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by Dr.MonaLisa » 23 May 2018, 20:52

If you change:

Code: Select all

ACTION actionVCCamp
SCRIPT WORLD
DoDelay(fDelay);

STEP
SetObjectiveCompleted("Obj_tetoffensive_1");
STEP
to:

Code: Select all

ACTION actionVCCamp
SCRIPT WORLD
PrintMessage("Movement Test Should Move Now!!!");
PrintMessage("Movement Test Should Move Now!!!");
PrintMessage("Movement Test Should Move Now!!!");
DoDelay(fDelay);

STEP
SetObjectiveCompleted("Obj_tetoffensive_1");
STEP
You don't see any messages like "Movement Test Should Move Now!!!"?
If yes, it means that this part is incorrect:

Code: Select all

if(PlayerHasLOSToAnyoneInGroup(1, "groupVCCampBuildings")
Maybe groups for Player are not set.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

EmpireEarthManiac
Posts: 20
Joined: 19 May 2018, 21:51

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by EmpireEarthManiac » 23 May 2018, 21:48

Leader wrote:
23 May 2018, 20:52
If you change:

Code: Select all

ACTION actionVCCamp
SCRIPT WORLD
DoDelay(fDelay);

STEP
SetObjectiveCompleted("Obj_tetoffensive_1");
STEP
to:

Code: Select all

ACTION actionVCCamp
SCRIPT WORLD
PrintMessage("Movement Test Should Move Now!!!");
PrintMessage("Movement Test Should Move Now!!!");
PrintMessage("Movement Test Should Move Now!!!");
DoDelay(fDelay);

STEP
SetObjectiveCompleted("Obj_tetoffensive_1");
STEP
You don't see any messages like "Movement Test Should Move Now!!!"?
If yes, it means that this part is incorrect:

Code: Select all

if(PlayerHasLOSToAnyoneInGroup(1, "groupVCCampBuildings")
Maybe groups for Player are not set.
Groups for player?

User avatar
Dr.MonaLisa
High Representative
Posts: 7528
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by Dr.MonaLisa » 23 May 2018, 21:57

EmpireEarthManiac wrote:
23 May 2018, 21:48
Groups for player?
"groupVCCampBuildings"
From what I understand you need to have LOS to units from this group to execute ACTION.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

EmpireEarthManiac
Posts: 20
Joined: 19 May 2018, 21:51

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by EmpireEarthManiac » 24 May 2018, 00:08

Leader wrote:
23 May 2018, 21:57
EmpireEarthManiac wrote:
23 May 2018, 21:48
Groups for player?
"groupVCCampBuildings"
From what I understand you need to have LOS to units from this group to execute ACTION.
Yes, but when my troops come into line of sight with that group the objective isn't set to completed or anything else in the action section

User avatar
Dr.MonaLisa
High Representative
Posts: 7528
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by Dr.MonaLisa » 24 May 2018, 09:14

That's why something is wrong with this action and you should try to find out what.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

EmpireEarthManiac
Posts: 20
Joined: 19 May 2018, 21:51

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by EmpireEarthManiac » 24 May 2018, 14:49

Leader wrote:
24 May 2018, 09:14
That's why something is wrong with this action and you should try to find out what.
On a side question if I have a group of units from 2 players how would I do SelectGroupForPlayer?

User avatar
Dr.MonaLisa
High Representative
Posts: 7528
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by Dr.MonaLisa » 24 May 2018, 15:05

EmpireEarthManiac wrote:
24 May 2018, 14:49
On a side question if I have a group of units from 2 players how would I do SelectGroupForPlayer?
Use the "SelectGroup()" function instead then.
Please note that the information provided in this topic earlier were a work-around to help you resolve this issue, but most likely those functions work fine. I didn't know that it was the ACTION issue. It means that everything after incorrect action wasn't executed.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

EmpireEarthManiac
Posts: 20
Joined: 19 May 2018, 21:51

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by EmpireEarthManiac » 26 May 2018, 05:17

Leader wrote:
24 May 2018, 15:05
EmpireEarthManiac wrote:
24 May 2018, 14:49
On a side question if I have a group of units from 2 players how would I do SelectGroupForPlayer?
Use the "SelectGroup()" function instead then.
Please note that the information provided in this topic earlier were a work-around to help you resolve this issue, but most likely those functions work fine. I didn't know that it was the ACTION issue. It means that everything after incorrect action wasn't executed.
Ok, I just thought about it that some groups had units from 2 players and was wondering the the SelectGroupForPlayer would still work or if I had to do something else

EmpireEarthManiac
Posts: 20
Joined: 19 May 2018, 21:51

Re: Why won't groups move when I want them to and why won't it set objectives to completed and unlocked?

Post by EmpireEarthManiac » 29 May 2018, 19:18

Leader wrote:
24 May 2018, 15:05
EmpireEarthManiac wrote:
24 May 2018, 14:49
On a side question if I have a group of units from 2 players how would I do SelectGroupForPlayer?
Use the "SelectGroup()" function instead then.
Please note that the information provided in this topic earlier were a work-around to help you resolve this issue, but most likely those functions work fine. I didn't know that it was the ACTION issue. It means that everything after incorrect action wasn't executed.
I was busy over the weekend, so when I get some free time I will go and fix the script and let you know if it works.

Post Reply

Return to “EE2 files, modding, maps, testing, etc.”