Jump to content

dreadedentity

Member
  • Content Count

    1224
  • Joined

  • Last visited

  • Medals

Everything posted by dreadedentity

  1. dreadedentity

    HandleDamage Question

    You'll want to add the event handler, and check that the bullet is the same kind fired from sniper rifles. If it is, set the car damage to 1. this addEventHandler ["HandleDamage", { private "_return"; _return = 0; //car is invincible unless conditions are met if (isPlayer (_this select 3)) then //shot must be from a player/prevents AI fluke { if ((_this select 4) == "RIFLE_BULLET_CLASSNAME") then //additionally, the ammo used must be correct. { _return = 1; //allow engine to handle setting the damage, you could also use (_this select 0) setDamage 1; it would do the same thing }; }; _return; }]; Use a "Fired" event handler to get the classname of the bullet you want to use: //add to player this addEventHandler ["Fired", { hint (_this select 4); }];
  2. This command does not do what you think it does
  3. dreadedentity

    Looking for Developers

    That's weird, I guess forum search links expire after a while. My link was just a link to all of my started threads. I just updated the link, not sure if it'll work for you though. Go here http://forums.bistudio.com/search.php and type my name into the "User Name" field and click search now
  4. dreadedentity

    change variable name Global, how

    I don't think that will work, try to stay away from reserved words
  5. dreadedentity

    Looking for Developers

    http://goo.gl/f6EKIJ Very interested now, still, I'd like do a sit-in for a while before I agree to anything (you can understand) You can find all of my released works here
  6. dreadedentity

    Looking for Developers

    Interesting. I am familiar with sqf and could possibly be interested in helping out. There's a few things that I'd like to know first, though, such as: Overall progress (just a rough %tage is fine) Future plans (are we trying to get a working beta, then release while improving, or wait until it's finished and bug-tested before releasing) Your personal role in the project (also, no offense, but why do you have 3 web-developers? Is there a currently-playable version available that needs a website?) Your reason for doing this in the first place Feature list and detailed progress report (use asterisks to mark progress, none for 0%, 5 for 100%) I was also hoping you would clarify this: Animation falls under graphic design, unfortunately for your 4 graphic artists, so you can put them to work :) Not sure why you need 4 artists when you already have a texturer and 6 modelers though Thanks a lot. I'm interested in reading your response.
  7. Copy and paste them to the location you want to add them, then select the entire group and rotate them by holding shift, then clicking and dragging one of the units. All of the selected units should rotate around the center point. They just kept previewing and moving the vehicles until they got them in the right place. Or they used something like MCC to build their missions
  8. dreadedentity

    How can I define this variable?

    I'm assuming the players init looks something like this, then? [this] execVM "myScript.sqf"; this is a magic variable that refers to the object itself, but that's it, just that one element. You should change it to something like: [this, "Pilot"] execVM "myScript.sqf";
  9. dreadedentity

    change variable name Global, how

    Yes, and that's what it does too. But you can't just put that because you are using strings and a string cannot be a variable, so you have to do some trickery to get it to work.
  10. dreadedentity

    How can I define this variable?

    _this select 1 doesn't exist so the game sets _unitrole to nil. Basically it looks like this: _unitrole = nil; Check the other script where you call this one and make sure all of the parameters are filled in
  11. If you want to do it from vehicle init then this would be much better: { _x addItemCargoGlobal ["FirstAidKit", 2]; }forEach (everyBackpack this); Note: The backpacks need to already be inside the vehicle otherwise this won't work. Only works on backpacks that are already inside your vehicle.
  12. dreadedentity

    change variable name Global, how

    All setVehicleVarName does is make it so if you use hint on an object, instead of returning the default engine-given name to the object (such as "ce06b00# 164274: offroad_01_unarmed_f.p3d") it will return whatever you set the var name to. _myVehicle = createVehicle ["B_Soldier_F", [0,0,0], [], 0, "CAN_COLLIDE"]; hint str _myVehicle //ce06b00# 164274: b_soldier_f.p3d _myVehicle setVehicleVarName "MyLittleSoldier"; hint str _myVehicle //MyLittleSoldier It doesn't change the variable reference to the object, you have to do that manually or you can automate it using the code I posted
  13. dreadedentity

    change variable name Global, how

    KK is right, I don't see how that's supposed to work. Also, can you be a little more specific with that you want to change the variable for? Not sure why you need setVehicleVarName. This should be sufficient for changing a variable everywhere (keep scope in mind as well) MP_fnc_changeVar = compileFinal ' _old = (_this select 0); _new = (_this select 1); call compile format ["%2 = %1", _old call {_this;}, _new]; '; [["_myOldVar","newVar"],"MP_fnc_changeVar",nil,true] call BIS_fnc_MP;
  14. dreadedentity

    OFP style CTF flag carrying?

    maybe we have to use setFlagTexture now before it will show up?
  15. dreadedentity

    Is it possible to preload textures?

    I think preloadObject is still dependent on a player's Object View Distance. I'm curious though, as to why you want to do this.
  16. [] execVM "myScript.sqf"; //essentially the same as [] spawn compile preprocessFileLineNumbers "myScript.sqf"; I'd be very surprised if someone were able to run out of RAM. A few nights ago I conducted a test and was able to hold 26905 elements in an array, with each element consisting of a 6 character string. Now, originally I had done the math without string identifiers (because I'm not sure how all that stuff is handled). My finding can be found here. But even with string identifiers, an array of that size only takes up just over 188 kilobytes. Now considering that my game was running with approximately 1.3GB of the ~4GB available to 32-bit applications, you could create an 14336 of those arrays with the remaining memory, or one large array containing 385,714,285 (yes, that is hundred-millions) before running out of available RAM. I would be sincerely surprised if RAM was an issue to anyone ---------- Post added at 21:59 ---------- Previous post was at 21:53 ---------- Continuing on with what Larrow was saying, because of the time it takes for hard-drive access with preprocessing files, I think it would be much more time-efficient to only execVM one script containing preprocesses for all of your other scripts and saving them into variables, pretty much exactly what the game already does with compiling functions you put in description.ext. Such a file could possible look like: DE_myScript = compileFinal preprocessFileLineNumbers "myScript.sqf"; DE_myRevive = compileFinal preprocessFileLineNumbers "myRevive.sqf"; DE_myEventHandlers = compileFinal preprocessFileLineNumbers "myEventHandlers.sqf";
  17. dreadedentity

    Correlate UID to player?

    private ["_uidList","_randomUID","_exitLoop"]; _uidList = [PUID1, PUID2, PUID3]; _randomUID = _uidList select (floor random (count _uidList)); _exitLoop = false; { if (isPlayer _x) then { if ((getPlayerUID _x) == _randomUID) then { //add action here //note: action will only be added on computer this is run. if dedicated, then command fails because dedicated servers can't use actions _exitLoop = true; }; }; if (_exitLoop) exitWith {}; //exit loop after finding player object to save resources }forEach allUnits;
  18. dreadedentity

    Suppression script

    It's also worth noting that execVM does the same thing as spawn, so if it's a really long script you should probably put it in a script anyway
  19. If you're trying to do this from editor then you need to put down a game logic and put this in the initialization field 0=[] spawn {waitUntil {uniform player == "CLOTHINGTYPE"}; myTask setTaskState "SUCCEEDED";};
  20. dreadedentity

    CopyToClipboard Help

    copyToClipboard (preprocessFile "myScript.sqf"); Note: this doesn't do anything to add line breaks probably a low chance of this working, it looks like copyToClipboard can only work with strings
  21. dreadedentity

    Grid Refrence to World Position

    What you mean reversed axis? Just switch the numbers around, it'll work the same Burt, extremely good find, man. I'll have a play with this later
  22. well you could always try \n might work
  23. It sounds like your friend turned off the mods or never had them
×