Page MenuHomeFeedback Tracker

hcsetgroup script wont work
Closed, ResolvedPublic

Description

I have been trying to add a tank platoon to a high command group led by the player with 4 rifle squads under his command. I used a trigger with the condition OPFOR not present and onAct, the code (see steps to reproduce) and put no OPFOR on the map. The tanks never joined my hc group.

Details

Legacy ID
3010351967
Severity
None
Resolution
No Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce

-New map (original problem on Altis, this instance on Stratis)
-Place player
-Place Rifle Squad (I am only placing one in this instance)
-Place High Command - Commander
-Place High Command - Subordinate
-Ungroup High Command modules from each other
-Sync the Player to High Command - Commander, High Command - Commander to High Command - Subordinate, High Command - Subordinate to Rifle Squad Leader
-Place a Tank Platoon
-Place a Trigger on the other end of the Airbase
-Under the trigger select OPFOR as the faction
-Under the trigger select 'Not Present'
-Under the trigger add code (not in quotes) to onAct "Player hcSetGroup [tank]"
-Assign the player the Name: Player
-Assign the lead tank in the tank platoon the Name: tank
-Click Preview and look at High Command bar with only the rifle squad, no tank platoon

Additional Information

My original problem was on Altis in the salt flats trying to test some concepts for a map I want to make. The reproduction was at the Airbase on stratis. Both yielded the exact same results. I believe I am following the syntax from the BI page (https://community.bistudio.com/wiki/hcSetGroup).

Event Timeline

jshear95 edited Additional Information. (Show Details)
jshear95 set Category to Scripting.
jshear95 set Reproducibility to Always.
jshear95 set Severity to None.
jshear95 set Resolution to No Bug.
jshear95 set Legacy ID to 3010351967.May 7 2016, 4:57 PM

I advise trying this instead.

  1. Don't name your player 'player'
  2. your argument is a vehicle not a group. Try "Player hcSetGroup [group tank]"