Jump to content

dematti

Member
  • Content Count

    96
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

2 Followers

About dematti

  • Rank
    Corporal
  1. dematti

    Deny Roadkill TK

    Ok, almost there! It works, but the units starts ending up in the middle of the car, repeatedly triggering the event until death. Just need to add that one line which moves the unit a bit. This one should be solvable
  2. dematti

    Deny Roadkill TK

    Hi, Thanks for the suggestions. I got both scripts, Eh "HIT" and "HANDLEDAMAGE" to work, but it seems that BOTH are not always launched on fast impact. The "setdamage 0" part is not launching on time, You can notice that when the soldier loses/drops its weapon (and ragdoll starts). When that happens it is already too late and "settdamage" doesn't affect the unit anymore. Is there something I can do to make the unit "unconscious" instead of immediately "ragdoll" dead? If I need to take a different approach, any suggestions are welcome, the goal is to deny roadkill by ai teammates. Thanks
  3. dematti

    Deny Roadkill TK

    Great! Thanks, EH "hit" was only used for testing. I will change to "Handledamage" as suggested. I did have the following questions about "Handledamage": Does this mean I have to load the EH only once as im spawning each unit multiple times?
  4. dematti

    Deny Roadkill TK

    Thanks, but tried that one before, doesn't work. Tried solving it but i'm stuck here: Using a waypoint script I'm adding an EventHandler (using "hit" for now): The idea is to replenish damage when a unit has been hit by a friendly vehicle. { _unit addEventHandler ["Hit",{[_this select 1,"east"] execvm "Roadkill.sqf"}] } foreach _unitsGroup; script: _killer = _this select 0; _side = _this select 1; _vehicle = vehicle _killer; if ((_vehicle isKindOf "LandVehicle") && (_side == "west") && (side _killer == west)) then { _this setdamage 0; }; if ((_vehicle isKindOf "LandVehicle") && (_side == "resistance") && (side _killer == resistance)) then { _this setdamage 0; }; if ((_vehicle isKindOf "LandVehicle") && (_side == "resistance") && (side _killer == west)) then { _this setdamage 0; }; if ((_vehicle isKindOf "LandVehicle") && (_side == "west") && (side _killer == resistance)) then { _this setdamage 0; }; if ((_vehicle isKindOf "LandVehicle") && (_side == "east") && (side _killer == east)) then { _this setdamage 0; }; exit I was hoping this would stop AI from teamkilling with vehicles. But I get following error on line "_this setdamage 0;" : "array, expected object" Can someone see what I'm doing wrong?
  5. Hello, You could try and download an ai driving mod like VCom Driving. If they still dont stick to the road they should be smarter around objects. Good luck!
  6. Hi, Driving ai are still killing teammates on foot that are crossing their path. I have used several ai driving mods/scripts trying to solve the issue but it doesn't help. Going for the last resort, which is to completely deny roadkill by a teammate. So, I'm looking for a script that will undo damage taken by a vehicle, only when the same side is driving it. Can someone help? Thanks.
  7. Hi, Currently I'm spawning vehicles using this code: _mycar = "SUV_UN_EP1" createvehicle (position player); I also add this to my init.sqf mymoney = 0 Now I have been trying various things to deduct money whenever I repair or refuel a vehicle using this code mymoney = mymoney - 10 I cant seem to find a solution, is there an easy way to pay for fuel or repairs? Thx
  8. Ok, thx xxAnimusxx! the problem was I couldn't make the link between the unit and the script. _this (offcourse!) was the line I had to use in the loop, when naming them isn't possible. THX!
  9. Ok I found a solution for most of this. I'm just struggling how to stop the script if the spawned unit gets killed. How do I stop a script from running if a spawned unit gets killed? (spawned by a script which respawns MULTIPLE units) The script needs to keep running for other alive units spawned by this script. to spawn my unit(s) I use this code: classname createunit [position, group, init, skill] in the init of this unit I execute the salary script, but I need it to stop if the unit dies. thx
  10. Hi, I'm trying to make a money system template to put extra realism into some missions. Currently I have a bank, car seller, gun seller, unit seller and a real estate agent. I am also trying to add daily salaries for bought units which I will have to pay for using my bank account. The salaries owned are defined by one number which I put in my init ( ownedsalary = 0 ) So when I go to the bank the "ownedsalary" amount can be deducted by paying for it untill it reaches 0 again. Here is my issue: 1) I am spawning the unit using one code: classname createunit [position, group, init, skill] How can I create a daily loop, adding to the ownedsalary code? I should run a script from its init but I cant figure out how to make this script. The problem is I cant name the unit because more units are spawned using the same script which means they cant have the same name? 2) I am using different skills for spawned units (0.25, 0.50, 0.75) so how can I make one unit more expensive then another? Using multiple scripts is the best solution I guess. 3) If the unit gets killed, the script should stop and no money should be added to "ownedsalary" Who can help me to get this to work? Thanks for your help edit: sorry for posting in the wrong section
  11. Hi, After all these patches, ai STILL manages to run over a lot of soldiers, its actually unbelievable. I was wondering if there could be a fix to this gamebraker? Is there a script or something that could be made to revive a soldier if he has been killed by a vehicle? THX
  12. dematti

    RUBE Weather Module

    I was also thinking that, but I use one init from missionfolder:RUBE/init.sqf and another one from the mission folder itself. deleting the original one, leaving just the RUBE/init.sqf folder did not do the trick, thats why its pretty weird. I going to try to merge the 2 inits and keep you posted. Thanks! edit: it is not the init file, it seems that adding to much into mission folder keeps it from working, not one of the files itself ---------- Post added at 02:16 AM ---------- Previous post was at 12:52 AM ---------- I tried it with the mod too and doing exactly as above, still the same story...
  13. dematti

    RUBE Weather Module

    Hi, Thanks for your replies. I found out the problem, it seems that, when I add other scripts into my mission folder, the dialog doesnt show up. these scripts are mainly .sqf files, one .init file, and one .fsm file. I thought one of the scripts might be interfering with the weather script, but after testing there is no script interfering with a certain other script. For the weather script to work, it seems I can add no other sqf's or .fsm files in my mission folder. seems a bit weird, but its the only way for me to get it to work.
  14. dematti

    RUBE Weather Module

    Been looking for something like this for years now, thanks. Looks great, but after hours I still cant get it to work. I followed (or tried following) everything posted about this, and I'm going crazy here, I have a description.ext and init.sqf in my mission folder. I load up the demo (because I still havent figured out how to use your own objects for your own missions) everything is there, but I use the action command and nothing pops up, nothing happens. Didn't find this ANYWHERE... Do I put the RUBE folder in my mission folder or do I use it as a mod? I use the script version. Can you please explain step by step what to do when using the script version, I'm sure it will help out not only me but a lot of people this is just too hard to use. this is what I did: ???1/ put RUBE folder in mission folder or as mod??? (both seem to work, only sometimes not and sometimes it does) 2/ add the init.sqf in mission folder 3/ add the description.ext in mission folder ??4/ add init to player?? thx
  15. I have CBA and still experience congestion. Would love to find a workaround for this, a loading screen would be useful and quicker than rescripting everything. I would only have to run it for 10sec about every hour to let the scripts catch up.
×