Jump to content

chartier

Member
  • Content Count

    37
  • Joined

  • Last visited

  • Medals

Everything posted by chartier

  1. Oh yes, and that daytime... Make the mission start from 000 hours. Add in "init.sqs" (before weather things if you don't want the time change the weather estimation): ; skips the time from 0 to 24 hours skipTime (random 24) Again, haven't tested this one!
  2. I haven't tested this one by myself but you can try the following: add to the "init.sqs" script: ; get a random real value from 0 to 3: _randVal = random 3 ; choose a weather ; sunny ?(_randVal <= 1):0 setOvercast 0 ; cloudy ?((_randVal > 1) && (_randVal <= 2)):0.5 setOvercast 0 ; stormy ?(_randVal > 2):1 setOvercast 0 exit Hopefully that works!
  3. chartier

    Disembarking ai when needed

    The "canFire" worked fine! If the vehicle is equipped with some weapon and gunner position canFire returns TRUE, otherwise FALSE. Thanks! But now I encountered another problem: How can I script AI soldier switch the place from driver to gunner position? I made a workaround for that by first disembarking the soldier and again assigning the solder as a gunner for that vehicle. That is not a clean solution though because it would be nice if soldier doesn't leave the vehicle at all. I tried already "moveInGunner" but nothing happened. Again, any ideas?
  4. I haven't tried this one out but could the "kill barrier" be created with a trigger with size of respawn area: West/East present, repeatedly Condition: this On activation: "_x setDammage 1" forEach list killBarrierTrigger Hopefully that works!
  5. chartier

    Disembarking ai when needed

    Thanks LauryThorn, I will try that "canFire" -method later!
  6. chartier

    Disembarking ai when needed

    Sorry for misleading question. I meant that how can I determine if the vehicle has a position for gunner in first place. For example: ?(is there a gunner pos in (vehicle AIplayer)):switch place from driver to gunner for tank above would be true, for 5tTruck false etc...
  7. chartier

    How do i create a list?

    Getting the coordinates can be done with "getPos" -method MyNewVehicle = "T55G" createVehicle (getPos MyTankFactory) or with marker placed in your desired place: MyNewVehicle = "T55G" createVehicle getMarkerPos "tankFactory"
  8. chartier

    Multiple supports

    Of course, if the two vehicles are already out of fuel. The above script can be used when it is not known beforehand which vehicle runs out of fuel first. I mean, WTruck1 waits near fuel station and goes for the support mission only when some vehicle is requesting it. I have a habit to see everything in more complicated way
  9. chartier

    Multiple supports

    You can use the "setWPPos" -method to dynamically set waypoint position. Try for example the following: name of the tank: WTank1 name of the fuel truck: WTruck1 Fuel truck's first waypoint is of type "SUPPORT" [WTruck1,1] setWPPos (getPos WTank1) This could be executed by a trigger that meets the condition: (fuel WTank1) == 0 Again, it should be noted that only one vehicle at a time executes the script. Otherwise another vehicle (here, Vulcan) might "steal" the support truck before it even gets to the tank... One solution to this might be to use a boolean variable to indicate if support truck is already reserved. Or maybe playing around with synchronization?
  10. Thanks SCLZ! You are probably right about nearestObject so I did the script old-fashioned way: - Created a "Civilian present" -trigger (radius several thousand meters) and on activation listing all the units that would activate it. Empty vehicles are type "Civilian". - Passed the vehicle array and AI unit to the script. - Manually compared each object distance in script. I did a "canMove" check for each object in array to be sure only vehicles are taken into account but I don't know if this is really needed...
  11. Hi! I'm working on a script that finds a closest vehicle for AI player to board but I'm not able to get nearestObject method to work. All it returns is a <NULL-object> no matter what object "type" I try. I don't want to compare every existing vehicle distance because there are a LOT of them in my mission. Any ideas how to make my script to work? Script: _user = _this select 0 _nearestVeh = nearestObject [_user,"LandVehicle"] _user move getPos _nearestVeh _user assignAsDriver _nearestVeh [_user] orderGetIn true BTW, I'm using OFP version 1.42.
  12. chartier

    How do i create a list?

    The vehicle list "CfgVehicles" can be found in BIS comref guide. You need an IE 6.0 to view the complete reference guide. I'm not sure what all "+" and "-" signs preseding the vehicle names mean, maybe class visibility (+ public, - private)?
×