-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
i want to put this EH into unit initialization via script how?
jshock replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well depending on what is "unique" about each unit you could have a series of if statements with the forEach loop, executing something different depending on the unit, and you don't need to worry about unit initialization, as these commands run whenever you exectute them, no need to put them in the initialization of the unit. //put this in the init.sqf { if (vehicleVarName == "unit1") then { _x allowfleeing 0;//should be a number between 0 and 1, 0 being never flee, 1 being flee, not a word _x enablefatigue false; _x addEventHandler ["HandleDamage", { if((damage (_this select 0)) + (_this select 2) > 0.9) then {0.9} else {_this select 2}; }]; }; if (vehicleVarName == "unit2") then { _x allowfleeing 0;//should be a number between 0 and 1, 0 being never flee, 1 being flee, not a word _x enablefatigue false; _x addEventHandler ["HandleDamage", { if((damage (_this select 0)) + (_this select 2) > 0.9) then {0.9} else {_this select 2}; }]; }; //etc. } forEach allunits; -
i want to put this EH into unit initialization via script how?
jshock replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Are you applying this to all units or just a single unit? For all units: //put this in the init.sqf { _x allowfleeing 0;//should be a number between 0 and 1, 0 being never flee, 1 being flee, not a word _x enablefatigue false; _x addEventHandler ["HandleDamage", { if((damage (_this select 0)) + (_this select 2) > 0.9) then {0.9} else {_this select 2}; }]; } forEach allunits; Actually what are you trying to do with the EH, because the way you have it, I'm not too sure what's going on, especially in the if statement? -
Stuck on loading screen
jshock replied to hridaysabz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well I pulled it up in the editor and ran it for about 10mins or so, captured your first sector, and didn't crash, so there is some other issue going on there. And is all you have just the mission.sqm, there aren't any other scripts running, how about mods? -
Stuck on loading screen
jshock replied to hridaysabz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just standard IT protocol questions, could either of you provide a mission file/folder for us to look at? -
Disable movement, unless significant force is applied?
jshock replied to D. Patterson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could try enableSimulation. -
Disable movement, unless significant force is applied?
jshock replied to D. Patterson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
while {true} do { if (_vehicle damage < 0.5) then { //disable move } else { //enable move }; sleep 1; }; Or use a "Hit" event handler with a check on damage. -
Problem exiting while loop
jshock replied to coolfact's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You will need an if exitWith check in the while loop, something like this: //Psuedo code while {blah} do { //code if (isNull _marker) exitWith {}; }; -
Max. Objects in 2d editor ?
jshock replied to havatan19's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah SP will make life a bit easier, and you shouldn't have any issues there either, especially placing them via editor, I did some reading up (all info was coming from terrain makers) that the max object count when making a terrain (aka a map, i.e. Altis/Stratis) is 4,000,000 but I don't know if that applies to the object count of everything else that isn't terrain. But you may as well just do it, and if there aren't any issues, then there you go, if there are, then you know a rough limit on objects :p or you did something wrong somewhere. -
Max. Objects in 2d editor ?
jshock replied to havatan19's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've never had to worry about object limit, partly because I usually keep it simple, and secondly because why even have that many objects. But what I was getting at with script vs. editor is that the script has to be setup properly so that the objects are continuously created for each new connected client (assuming MP mission) which brings FPS down tremendously after a few clients come in, and if they are spawned via editor that issue is of a lesser priority as every connected client would have to load those objects anyhow but they are "native" to the mission not "added" in via script. And I don't know if a "X objects allowed" message will popup, because like I said, I don't think it is realistically attainable, and there isn't a need for that many objects in my opinion either. Could you be more specific as to what your doing, that would help with the answering of this question, I mean are you just placing 1000's of soda cans around the map, making a city, what? -
Max. Objects in 2d editor ?
jshock replied to havatan19's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well you can place however many objects you want, techincally speaking, but realisticly, static objects don't use too much power overall, but I don't think there is a definable limit. It also depends on how they are all spawned in, either in the editor or via script. -
[CODE SNIPPET] Hopefully this blows your mind/Preprocessor Commands are fun
jshock replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Cryptic title, cryptic information....must....see...what it is all about....I must... :p -
Control player input via script?
jshock replied to benargee's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just to clarify for all looking at this, I'm getting that you pretty much want to be able to "slave" a vehicle with the players inputs being it's controls, without the player actually being in the vehicle. Similar to a drone. -
You would have to go in and change a few lines of code around, I tried way back a few months ago, but whatever. In any case, sorry for stealing your thread Iceman, this will be the last off-topic post :p.
-
Unit gear based on classname
jshock replied to HKFlash's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I caught that one earlier Iceman :D. -
Unit gear based on classname
jshock replied to HKFlash's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Got to love consistency huh :D. -
Or use this: http://www.armaholic.com/page.php?id=23644
-
Zenophon's ArmA 3 Co-op Mission Making Framework
jshock replied to Zenophon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That could do it. And that's how all us mission developers are :p. -
Zenophon's ArmA 3 Co-op Mission Making Framework
jshock replied to Zenophon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
60-80 AI shouldn't cause any issues server side if they are spawned in properly, unless I'm misunderstanding what you are saying? -
Unit gear based on classname
jshock replied to HKFlash's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In your second case: case "I_Soldier_GL_F"; //should be case "I_Soldier_GL_F": //<<You used ";" instead of ":" If that does't work, I would venture to guess that "_x" within the cases is not defined properly, but like I said, just a guess. I would also recommend throwing in a default case with some sort of error message, just good practice, and helps you see if the switch is just jumping out with an improperly defined variable. And like Iceman said, they are case sensitive, and you do have a couple extra lowercases in there :p. -
Disable UAV Driver control
jshock replied to tryteyker's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Look up the lockDriver command, it may be of use. -
Design question: why does the game crash when working with dialogs?
jshock replied to bobby budnick's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can I ask if you onow why your game takes 10 minutes to boot up? Because I don't run SSDs or anything fast and fancy, and my game loads up in a minute or two. Have you also looked into using some Steam Start-up Parameters to remove some of the "dead weight" in the loading process, like the splash screens and such? And I would say the game CTDs when there is something broken in the description file, because it's just that, the game can't process the "broken" mission description, so it "has" to crash to deal with the issue. I may be wrong in that thought though. -
Action to remove everything from ground
jshock replied to mr_shadow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Init.sqf I think would work, or even the unit's init field depending on your situation. -
Hit indicator in the targets for range fire missions
jshock replied to legolasindar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, we used it for our training map as well, was nice to get some visual feedback on target. @Legolasindar: I see what you mean now, but that is a GUI, which is a bit out of my expertise, sorry. That being said, however, I wouldn't know how to interface it to the GUI, but you would still use the same basic concept as you see in my example, using the "HitPart" event handler, but instead of creating an object on that spot, you would just need to pass those variables into the GUI, however that's done :p. -
New Altis Building Classnames
jshock replied to Kydoimos's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yep, A3 Assets links to all those pages too :p. -
Few more questions
jshock replied to epicgoldenwarrior's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Are you saying that you used the object, invisible helipad, and put all the building creation stuff in the init field of the helipad? In that case, I would use a game logic (object) for the creation of the building, then see if the setPosATL command will work with that. You may also have to use enableSimulation as well, but I'm not sure.