Jump to content

z1_

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Everything posted by z1_

  1. Just wanted to add for anyone who uses this. The doTarget works fine if the unit isn’t in the Spotlight vehicle, like perhaps you want a unit looking around with flashlight. For some reason I had to use lookAt to get them to break loop while in the spotlight. Just wanted to mention that in case you wanted to use in a different way.
  2. Got an AI on the spotlight (CUP_O_SearchLight_static_RU). Got it to turn on and all that but he doesn't really move it around until the enemy is detected. Would like him to rotate it around. Came up with something that kinda works, turns only the light and not the base (which is good), but it flickers and jerks before each turn. Would be cool if it was smooth. Tried turning both the player and the searchlight, but only the searchlight will turn when he's in it. Also it really wouldn't turn much unless I scripted a handful of turns. Tried setDir, setFormDir, setVectorDir and only setDir seems to do anything. Also tried using the player as the direction to turn, but light would barely turn. Looked around but the only spotlight scripts I came across were in regards to them on helo's and couldn't find anything on the forum. #searchlight SL1_1 setDir 45; ~15 SL1_1 setDir 90; ~15 SL1_1 setDir 180; ~15 SL1_1 setDir 225; ~15 SL1_1 setDir 360; ~15 if (SL1G_1 call BIS_fnc_enemyDetected) then {goto "stop";}; goto "searchlight" #stop So this basically worked. He'll stop when the enemy is detected and actually search. The actual rotations look fine but right when he starts each turn the light jerks around which kinda kills immersion. I could live with it, but anyone have an idea?
  3. If you force the engine on it's wheels spin during the playback, but yeah, it's def not smooth from my experience. Tried a lot of different framerates with not a lot of good results. It looks decent on air, but everything else looks kinda weird. Tried it on infantry and he just kinda floated around with his knees bent up like he was jumping.
  4. Does that setDriveOnPath make the convoys move together more realistic? Let me know how that goes.
  5. I'll have to check that out, still learning myself.
  6. You could also try https://community.bistudio.com/wiki/BIS_fnc_stalk itll make the ai run directly towards them. Set the first vehicle as the unit to stalk. Was messing with it last night trying to make my own suicide bomber script. Looks like it has to be a group not object but I’m sure you can make it work if the first vehicle is closest to them
  7. I noticed they’ll not try to go around things if they are in Combat mode. They’ll just plow through most the time. Could try that. I’m sure you tried playing with the distance. Could also try it with some AI modes turned off on the bomber (using ai mode module or something)so maybe he doesn’t pay attention to the vehicle and just runs out. I’m not home or I’d test it.
  8. Okay, so it looks like the lookAt command panther suggested did the trick. This works well. nul = [] spawn { _array = [spot_1,spot_2,spot_3,spot_4,spot_5]; while { isNull (gunner1 findNearestEnemy gunner1) } do { { gunner1 lookAt _x; sleep (random [5,10,15]); } forEach _array; } };
  9. Thanks, that conversion chart is handy. I learned all that sqs syntax working with camera scripts years ago. Oddly enough my script works well, but I did want to use the correct syntax.
  10. Is he treating the logics as an enemy when he breaks or something? No rush on replies or anything, just trying to learn the right way to do things. Mine works perfectly and will probably suffice for a SP mission, but not sure how that kind of scripting works in MP environment.
  11. It seems to break now, but he just stops and looks one direction, doesn't scan around. He has a teammate up there too who definitely knows when I'm shooting. Also doesn't seem to break unless I fire, he doesn't notice me in the light.
  12. I'll let you know how that works. Thanks
  13. The ai wouldn't break out of the loop this way. Unloaded in his vicinity and he kept on doing his turns. Not sure if it has to do with distance. He's high up in a tower. So far my version is working the best, I don't even have to shoot, if he catches me in the light he'll break out of the loop, but it's an ugly script 😛 Any ideas? Tried some other conditions without luck.
  14. How would you make it so it stops script when gunner1 detects an enemy? Noticed he just kept on turning no matter what. I did get it to work well using my original idea and doWatch instead, then when he detects enemy he stops targeting the logics with doWatch objNull and he'll look for the enemy. But I figure there's a way to do it with your loop, plus I couldn't get the random sleep to work along with my idea. Tried a lot of things with while and if/then but wasn't having luck doing it your way. Plus your way could go in an init if I recall correctly, and I have to call mine from a script. this exec "scripts\searchlight.sqs"; #searchlight gunner1 doWatch spot_1; ~ 10 gunner1 doWatch spot_2; ~ 10 gunner1 doWatch spot_3; ~ 10 gunner1 doWatch spot_4; ~ 10 gunner1 doWatch spot_5; ~ 10 gunner1 doWatch spot_6; ~ 10 gunner1 doWatch spot_7; ~ 10 gunner1 doWatch spot_8; if (gunner1 call BIS_fnc_enemyDetected) then {goto "stop";}; goto "searchlight" #stop gunner1 doWatch objNull;
  15. That works so much better, thanks again.
  16. Can I use an array after do target or does it have to be object? Might be interesting to randomize which logic it chooses as well.
  17. Thanks for the syntax, I was using archaic stuff i learned when i was messing with camera scripts
  18. Actually, I would assume if I make that initial script do every degree in the rotation it might look smooth and suffice for my needs. I'll try that.
  19. Maybe I'll try doing a unitCapture. Hopefully I only have to capture the spotlight.
  20. So, I set up a bunch of modules, waypoints, and triggers for the Civilian Presence Module all over the map. Everything works great in editor. I wanted to try exporting it to sqf so I could use as a script and not have all the clutter for use in future missions. It somewhat worked, as everything will load off the script but all the areas become active and spawn as soon as it loads even though nobody set off the trigger. This only happens if I use script, works fine loaded from editor. They are all set to any player - present - repeatable and synced to their respective module. Is there a way to edit the sqf export so it will work correctly and only activate triggers when actually present. There things I could remove? If you want to know what I’m looking at set (at work currently) up the civilian presence mod for one city real quick and do an export. I know I could just merge with missions but I’d like it to not be cluttered if someone decides to edit the missions I upload. Any help would be appreciated, I’m not too savvy on scripting but have a general understanding. I know there’s other options, just want to see if I can get this to work.
  21. Yeah, I have a few. Usually just use Mongos. Was trying to build my own based off the modules as a learning experience. Thanks for the info, I'll give it a try.
  22. So just to test it in general with a named trigger. I named the trigger trig1, then changed all the this in script to trig1. I would assume it's moving them there now. Still didn't have any luck. I even added another object just to see if it would spawn and move there. Again no errors, but nothing happened. Think I need to start smaller and just understand spawning and moving objects correctly, before I worry about spawning logics. If anyone comes across this and can shed more light would be cool.
  23. I'll try to set all the positions to the player tomorrow and see if i have any luck. I better crash. Thanks for the assistance, and anymore you happen to provide.
×