Page MenuHomeFeedback Tracker

setOwner RPT warning printed for vehicles
New, NormalPublic

Description

Script command setOwner cannot be used for object '<vehicle class name>'. Use setGroupOwner instead.

is printed when using setOwner on vehicles with passengers, commander or gunner.

It should either not be printed at all for vehicles or only when driver is inside of one. Only driver actually changes the locality of the vehicle, and setOwner works correctly as long as only driver seat is empty (can be seen with owner or local)

Expected behaviour is transfer if there is no driver, no RPT messages printed, as vehicles are NOT supposed to be used with setGroupOwner.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  • Use setOwner on a vehicle with a passenger inside
Additional Information

I am assuming there is a check on every object passed to setOwner that checks if it belongs to any group. When vehicle is empty group VEHICLE returns grpNull, but as soon as there is even a passenger it returns that passenger's group and invokes the "deprecation warning" (setGroupOwner should be used).

Event Timeline

Jonpas created this task.Tue, Feb 12, 2:13 AM