Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. 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;
  2. 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?
  3. jshock

    Stuck on loading screen

    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?
  4. jshock

    Stuck on loading screen

    Just standard IT protocol questions, could either of you provide a mission file/folder for us to look at?
  5. 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.
  6. You will need an if exitWith check in the while loop, something like this: //Psuedo code while {blah} do { //code if (isNull _marker) exitWith {}; };
  7. 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.
  8. 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?
  9. 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.
  10. Cryptic title, cryptic information....must....see...what it is all about....I must... :p
  11. 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.
  12. jshock

    Simple Patrol Script

    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.
  13. I caught that one earlier Iceman :D.
  14. Got to love consistency huh :D.
  15. jshock

    Simple Patrol Script

    Or use this: http://www.armaholic.com/page.php?id=23644
  16. That could do it. And that's how all us mission developers are :p.
  17. 60-80 AI shouldn't cause any issues server side if they are spawned in properly, unless I'm misunderstanding what you are saying?
  18. 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.
  19. Look up the lockDriver command, it may be of use.
  20. 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.
  21. Init.sqf I think would work, or even the unit's init field depending on your situation.
  22. 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.
  23. Yep, A3 Assets links to all those pages too :p.
  24. jshock

    Few more questions

    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.
×