Page MenuHomeFeedback Tracker

enableSimulationGlobal and hideObjectGlobal don't work in SP
Closed, ResolvedPublic

Description

Both enableSimulationGlobal and hideObjectGlobal don't work in singleplayer at all, unlike other global commands.

All other global commands seem to work fine in a singleplayer and have their desired effect. {F23875}

Details

Legacy ID
4091609477
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Open the Editor from the main menu.
  2. Place the player unit.
  3. Place another unit and name it "test"
  4. Preview the mission.
  5. In the debug console run "test hideObjectGlobal true" or "hideObjectGlobal test" (both have no effect).
  6. Again in the debug console run "test enableSimulationGlobal false".
  7. Shoot the unit, still behaves as if simulation is enabled.
Additional Information

It's inconsistency at best and makes a mission developers life that little bit more frustrating when developing a scenario for both single and multi-player.

Event Timeline

Nimrod edited Steps To Reproduce. (Show Details)May 2 2014, 12:12 PM
Nimrod edited Additional Information. (Show Details)
Nimrod set Category to Scripting.
Nimrod set Reproducibility to Always.
Nimrod set Severity to None.
Nimrod set Resolution to Fixed.
Nimrod set Legacy ID to 4091609477.May 7 2016, 6:32 PM
Nimrod edited a custom field.

do hideObject and enableSimulation work? Both hideObjectGlobal and enableSimulationGlobal are server commands, and since in SP there is no server it is expected for the commands not to work.

Nimrod added a subscriber: Nimrod.May 7 2016, 6:32 PM
Nimrod added a comment.May 2 2014, 9:35 PM

Both of those commands do work, however there are other "server" global functions that work fine in SP, such as setObjectTextureGlobal.

Like I said before, it's a real pain just these two commands not working in SP. So developers can't make a scenario to work both in SP and MP easily using one command.

Does setObjectTextureGlobal also need to be executed on server only?

Here is your answer!

There are other commands that say they need to be exectued on the server but work just fine in singelplayer (such as assignCurator). It's just inconsistent beacuse these are the ONLY 2 global functions that don't work in singeplayer at all.

If I was to make a mission for the steam workshop and added the singleplayer and multiplayer tags to the mission, it would obviously be available in both from the singeplayer scenario menu and when starting a multiplayer server.

Point being in that mission is if I have a missionFlow.fsm with a condition to run server side only, and after the condition say I want to hide an object, I would use hideObjectGlobal to hide it for all current clients and JIP. However this wouldn't hide anything at all in singeplayer so I would have to add an if statement (isMultiplayer) there to use either hideObject or hideObjectGlobal.

Just additional scripting for something that should work using the global command in both situations anyway.

I can agree to that

if (isMultiplayer) then {
hideObjectGlobal
} else{
hideObject
}

Could be easily added internally. It took a few months to get alternative syntax for hideObjectGlobal. This only tells me that person who made hideObjectGlobal did not think from mission maker point of view. same goes for enableSimulationGlobal.

Nimrod added a comment.May 3 2014, 2:25 AM

Exactly, it's a definite quality of life improvement for mission makers!

Do an isServer in SP/Editor KK.

@kju Im well aware that isserver returns true in sp, but this is not the server I had in mind. I can only speculate why hideobjectglobal is different. It was probably limited to the server execution in mp for security reason and this backfired in sp.

Yep the change of logic/inconsistency is bad.
One way or another (ie you suggested in 70132) it should be solved by BI.

Hello guys,

could you please upload a simple repro mission describing the problem? It helps us a lot when analysing multiple bugs.

Thank you very much!

Nimrod added a comment.May 6 2014, 1:02 PM

Added repro mission. Try running this same mission in both the singleplayer and mutliplayer editor.
In the multiplayer editor when previewed, the 2 units will have the desired effect and have their simulation disabled as well as being hidden.
In the singleplayer editor however, when previewed both units simulation will still be enabled and both units will be visible despite using both hideObjectGlobal and enableSimulationGlobal functions.

Again this is very inconsistent behaviour for global functions and I implore you to read the ticket and comments in detail.

Iceman added a comment.May 6 2014, 1:14 PM

Thank you for the repro mission, it shows the problem nicely. The issue has been assigned to our programmers.

Thank you, have a nice day.

Today's notes -> Fixed: hideObjectGlobal script command (was working in the opposite way)

When did it break? It was working fine since introduction of alt syntax, the only issue with it was that it wasnt working in SP...It still doesnt work in SP

Hopefully this has been fixed today, will test soon.

It is fixed. However there are other issues with enableSimulaionGlobal worth looking into http://feedback.arma3.com/view.php?id=18994

Hello,
this one is fixed on exe revision 124720 and higher. Issues mentioned by Killzone Kid will get some love, too.
Thank you.

Helio added a comment.Jun 10 2014, 3:26 PM

Hello,

I just tested it on 124746, and it seems to be broken again. :/

enableSimulationGlobal and hideObjectGlobal both don't work in the editor/ SP.
Can anyone confirm?

Helio added a comment.Jun 10 2014, 4:52 PM

additional info:

  1. "object hideObjectGlobal hidden" is also not working when used in the Init of the unit, even in MP on dedicated,...

Repro:
-place a unit with "this hideObjectGlobal true" in the Init and run the mission on a dedicated server: no effect. (it works via debug console though)

  1. ...while enableSimulationGlobal does, though not from the very beginning of the mission, which may lead to unwanted side effects :

Repro:
-place an empty car with "this enableSimulation false" and another one with "this enableSimulationGlobal false" in their Init fields
-add "setdamage 1" and an altitude of 10
-run the mission on a dedicated server:

-> both cars will hover in the air, so the simulation is disabled, but the car with the global-command will explode and burn (just like the command was entered a moment later) while the other one with "enableSimulation false" wont.

You can alternatively place a hidden flying helicopter with "enableSimulationGlobal false" in the Init, and the players will always hear the sound of the rotor.

Most likely related to http://feedback.arma3.com/view.php?id=18994

Reopening,
could anyone else please confirm that it is broken (also on Steam Dev) for you?
Thank you.

Helio added a comment.Jun 10 2014, 6:47 PM

I just checked with 124861, and everything works great there! All the issues mentioned above are gone. :)

I should have done that in the first place, but I was sure the fix was supposed to be included in 1.20 (124754) already.. I'm sorry for the confusion!

Marking resolved then, thanks.

this works for me

  1. "object hideObjectGlobal hidden" is not working when used in the Init of the unit, even in MP on dedicated,...

Repro:
Place a unit with "this hideObjectGlobal true" (or hideObjectGlobal this) in the Init and run the mission on a dedicated server: no effect. (it works via debug console though).

  1. ...while enableSimulationGlobal does, though not from the very beginning of the mission, which may lead to unwanted side effects

both are still valid in Version 1.22.125300!
Actually hideObjectGlobal and enableSimulationGlobal seem to only work during mission runtime, seems like there is no way to hide/disable any objects prior to mission start with these commands, even if the objects themselves exist already and are not null.

@highhead,

would it be possible to create another ticket regarding your issue?

Thank you.

edit:

Just tested both commands again in the init of units in 1.22.125300, and hideObjectGlobal does _not_ work in MP (dedicated) now.

The hide-module is also affected: Simulation is off, but you can still see the unit on a dedicated server.

new ticket here:
http://feedback.arma3.com/view.php?id=19354

MadDogX added a subscriber: MadDogX.May 7 2016, 6:32 PM

Mass closing tickets marked as resolved more than 1 month ago.

If the issue is in fact not resolved, please create a new ticket referencing this one and ask for it to be re-opened.