engima
Member-
Content Count
548 -
Joined
-
Last visited
-
Medals
Everything posted by engima
-
Sleep not working after JIP
engima replied to seba1976's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, I have news. This looked interesting, so I gave it a real try, with two licences, a hosted server and a JIP. First I can confirm that it really is the sleep command that does not do its job. I actually narrowed it down to these three lines in the init file: init.sqf: hint "Waiting 120 seconds..."; systemChat "Waiting 120 seconds..."; sleep 120; hint "I'm disabling the teleport."; systemChat "I'm disabling the teleport."; And sleep still does not work for the JIP! An what is more is that the mission gets really wierd after that. After leaving game for the lobby, only one slot is visible (I had two from the begining). And if I then leave the server it is impossible to get in again. There was a small update today. Maybe sleep for JIPs got broken...? EDIT: I forgot - actually uiSleep seemed to work for the delay part. But the problems I described with the mission slots remained. -
[RELEASE] TypeSqf Editor - [OpenSource]
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
- 205 replies
-
- 2
-
Sleep not working after JIP
engima replied to seba1976's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I cannot see where variable SAC_user_input is set, but if it is not reset the second time when you enter as a JIP the behavior will be as you described. -
[RELEASE] TypeSqf Editor - [OpenSource]
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Going open source under the MIT licence.- 205 replies
-
- 1
-
[RELEASE] TypeSqf Editor - [OpenSource]
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
New version. Version 0.68 -Separated the analyzer window and the SQX build result window into two tabs in the editor (big thanks to Josef!). -Fixed: protected methods were not possible to collapse and expand. -Minor improvements and fixes. -SQX: Fixed serious issue when referencing properties in class inheritance with more than two levels. -SQX: Minor improvements and fixes.- 205 replies
-
[RELEASE] Engima's Traffic Script
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Version 1.7 is now also available on Armaholic: http://www.armaholic.com/page.php?id=30093 -
[RELEASE] Engima's Traffic Script
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm updating the script to version 1.7. v1.7 - Fixed: The same car had different random texture on different clients. Now all players see the same texture on all cars. - Fixed: Script error when no players are in the mission. For now only for TypeSqf distribution channel (at Armaholic as soon as I can make it) http://typesqf.no-ip.org/cpack/details/Engima.Traffic Have fun! -
[RELEASE] Engima's Traffic Script
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Vehicles should start spawning at once when script starts, but in certain cases, like the one I described, there can be an initial delay. -
[RELEASE] Engima's Traffic Script
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Spawn distance between 10 and 30 is problematic. Vehicles only spawn on roads, so there must be a road segment within that range. And also, the script use the first five minutes to collect all road segments, so chances that your eventual road segment is initialized within half that time is 50%. Try better values for spawn range. Like default, 800-1200. -
Troubles with publicVariable..
engima replied to Generalmonimo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Given alternatives reflect different needs and maybe different philosophies. publicVariable: This is how you ”set a variable value on the other machines”. You also have the possibility to take some action when the value is set, using publicVariableEventHandler. remoteExec: This is how you ”execute a function on other machines”. Personally I don’t really like this, because if you use it frequently the code tend to be hard to read. The code can make the impression that execution is ”jumping” between clients in an uncontrolled manner. Event based remote executions: The publicVariable event handling philosophy I find much better, but the syntax is somewhat obscured. So what I do is that I use remoteExec, but I only call ”On” functions all collected in one reciever file. And these ”On” functions always just reflect source machine (server or client) events, and then routes the event to the correct execution path within the target machine. It is never a direct function call. Here’s an example. I never call ”createSomeVehicle”, or ”showMyMessage” on another machine. What I do is telling what is happening on the source machine, like ”onVehicleNeeded” or ”onLocationTaken”. This way I never mix the control flow responsibilities between different machines and methods. And if you want anything more to happen than just a message being shown when a location is taken, simply add one line of code in the onLocationTaken ”event handler.” -
[RELEASE] Engima's Traffic Script
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have not tried it, but I’ve seen this, which might be what you are asking for: -
[SOLVED]How to add LOITER Way-points with OnMapSingleClick??
engima replied to zagor64bz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
”If another waypoint was added soon after the LOITER waypoint, the LOITER waypoint will act as a MOVE waypoint” According to the exclamation marked text here: https://community.bistudio.com/wiki/Waypoint_types -
How to delete an object at random with a script?
engima replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It seems like he knows that, and actually is looking for a way to do it in a script also. Reason unknown though. I need to add that you can check the existance of a variable (or unit) with isNil: if (!isNil ”red2”) then { // red2 exists and handling it here will not generate script errors. }; -
How to delete an object at random with a script?
engima replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if (random 100 < 75) then { // With a chance of 75% deleteVehicle red2; }; -
friendly AI leader keeps calling the insertion chopper back
engima replied to karphead's topic in ARMA 3 - MISSION EDITING & SCRIPTING
First of all I’d have the chopper crew and the insertion squad in two separate groups (well, you probably have already). Second, commands like disableAI is probably a little too micro managing. Instead, look at commands like moveout and unassignVehicle. The problem I guess is that the units are still assigned to the chopper, and the natural behavior for AI is to try to enter the vehicle they are assigned to. -
Since one of the recent updates (I guess) the black script error screen in game only shows me a shortened (...) file name, so I always now have really hard to find in which file the script error occurred. Even in the .rpt file the file name is shortened. Anyone seen this, or know anything about it?
-
Plane wont kick players out
engima replied to Mr Sovic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That’s possible. But what about the other commands? A good practice I would say, is to always deal with the player on its local machine. So I would still go for locality. -
Plane wont kick players out
engima replied to Mr Sovic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think it is a locality issue. The last piece of code that has the units do the jump out I’d guess need to be executed on each player’s machines. I’m not sure exactly which of the commands, but moveOut and addBackpack (and maybe more of them). Create a function for the jump out that takes a player unit as an argument, and make sure it is called on each player’s machine respectively. -
getVariable returning <null>
engima replied to bumyplum's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In SP or MP? If MP, then you should use the alternative syntax of setVariable to broadcast the variable to all other machines. unit setVariable [var, value, true]; https://community.bistudio.com/wiki/setVariable -
[RELEASE] TypeSqf Editor - [OpenSource]
engima replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
New version. Version 0.67 -Added feature to create and deploy a PBO file directly from the TypeSqf editor to Arma's Missions or MPMissions (or a custom) folder. -Added support for all script commands up until Arma 3 version 1.94 (into ScriptCommands.xml). -Updated the file templates so that all methods now include parameters in the method header. -Minor fixes and improvements. -SQX: Added true inheritance. -SQX: Class properties can now be protected (and not only public like earlier), and have a protected setter. -SQX: Class methods can now be protected (and not only public or private like earlier). -SQX: Added the "return" statement. -SQX: Extended the method log tool to include return values (and not only calls like earlier). -SQX: Updated color themes - Go to Tools and reset the color themes for the changes to take effect. -SQX: Minor fixes and improvements.- 205 replies
-
- 2
-
Spawned AI not following waypoints sometimes
engima replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I had a similar problem a while ago. I had it happen when I spawned vehicles out in the terrain, but it worked when spawning them on a road. My solution was to monitor their movement after spawn, and if they did not get moving in a minute I deleted their waypoint and created a new. That usually had them start moving. I’m not sure if I gave them different behavior for different waypoints, but I had some kind of randomizaton about that. -
remove items from array by iteration (not unique values)
engima replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I’d say that ZaellixA’s second while is the one to choose if you for some reason do not want the _items variable to reference a new array. I.e. using the deleteAt command. -
remove items from array by iteration (not unique values)
engima replied to M1ke_SK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is how I often do: private _itemsToKeep = []; { if (keep_condition) then { _itemsToKeep pushBack _x; }; } foreach _items; _items = _itemsToKeep; But ZaellixA’s solution also seems like a good one. Except I’d do the delete phase in the first loop and skipped the second. EDIT: Corrected the pseudo style code to more exact SQF code after Dedmen’s comment below. (The ”keep_condition” will still need to be replaced by an actual keep condition.) -
Playable unit only for Admin
engima replied to TheoneandonlyNOR's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not possible. But maybe you can set name of the group of one player to ”Admin”, and then use the ”admin” command to black fade the screen if any other than the admin use the slot. Bonus question: I don’t know. -
Ok, tanks, that's interesting. Then I will try again. How do I know when BI adds own HandleDamage EH (for JIPs)? waitUntil { ... }; ?