Page MenuHomeFeedback Tracker

unassignCurator does not work
Closed, ResolvedPublic

Description

The command unassignCurator appears to have no effect.

Details

Legacy ID
4279714505
Severity
None
Resolution
Not A Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Create a mission in which a unit is set as the owner of a curator module.

Add this into an init field or init.sqf:

{unassignCurator _x;} forEach allCurators;

Event Timeline

SilentSpike edited Additional Information. (Show Details)
SilentSpike set Category to Scripting.
SilentSpike set Reproducibility to Always.
SilentSpike set Severity to None.
SilentSpike set Resolution to Not A Bug.
SilentSpike set Legacy ID to 4279714505.May 7 2016, 6:43 PM
SilentSpike added a subscriber: SilentSpike.

To whoever voted against the issue:

Could you explain why? Are you able to get this command working?

Seems the problem might be a bit more specific, this works:

this addAction ["Unassign Curator Module",{unassignCurator (getAssignedCuratorLogic (_this select 0))}];

I wonder if it might be a multiplayer related issue as I can also get the original snippet working in the SP editor. Whereas I was testing in a MP environment before. Will try and get a consistent repro up.

Figured it out, simply a case of the command being called at mission start causing it to have no effect because the curator objects presumably aren't yet assigned.

Tested using this in init of appropriate unit:

systemChat format ["AssignedCurator is %1",getAssignedCuratorLogic this];

Returns:

"AssignedCurator is <NULL-object>"

Issue can be closed unless this is unexpected behavior.

Closing then. Thanks.