-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gravity sensor is not Eden Compatible #234
Comments
Will take a look today or tomorrow 👍 |
@butch2k This works. Only thing to keep in mind is that the ID of the sensor needs to be a high value. In my example I used 25 because player will not place more than 25 sensors. Else worst case, there will be two sensors with ID_25 (will not cause any issue). CONCLUSION:
Issue will be closed later during the week |
Nope it's the Gravity Sensor code which is not correct. If you check the code it lacks the same failsafes as the createGunshotSensor Function, it tries to initialize using the publicVariable and generate an error. I edited the code to have it working properly as underlined above else it generate errors like: 14:37:19 Error in expression < [0, 0, -5]; |
Ok will take a look for this during the weekend :) |
Sorry for long time , not on computer for several weeks due to trip in different country. Will work on it when back 🪖 |
Gravity Sensor Create function is missing this bit:
`
params ["_sensor", "_sensorId"];
// If only one of the two parameter is passed (not authorized).
if ((!(isNil "_sensor") && (isNil "_sensorId")) || ((isNil "_sensor") && !(isNil "_sensorId"))) exitWith
{
"Missing one of the two parameters for 'fn_createGravitySensor.sqf'!" call BIS_fnc_error;
};
// If used during mission.
if ((isNil "_sensor") && (isNil "_sensorId")) then
{
player removeItem colsog_sensor_gravityInventoryItem;
_sensor = createVehicle [colsog_sensor_gravityInventoryItem, getPosATL player, [], 0.5, "CAN_COLLIDE"];
};
// If used in Eden Editor.
if (!(isNil "_sensor") && !(isNil "_sensorId")) then
{
_sensor setVariable ["COLSOG_sensorID", _sensorId, true];
};
`
As it is currently it can't be deployed in Eden as SensorId is not settable.
The text was updated successfully, but these errors were encountered: