-
Content Count
29 -
Joined
-
Last visited
-
Medals
Posts posted by z1_
-
-
11 minutes ago, itisnotlogical said:Well, yes and no. It gives you a lot more control to decide exactly where the vehicles go, and at what speed. The downside is they will always drive in a straight line between points. That makes the driving very consistent, but it takes a lot of tweaking to i.e. move smoothly through a turn. It also seemed to have a problem if I defined more than nine waypoints, but I'm not sure if that's a problem with the game or myself.
It seems to me that an ideal use case would be to use waypoints across long distances or in sparsely-populated areas, then switch to setDriveOnPath when consistency is required and you want very specific movements.
I also tried https://community.bistudio.com/wiki/BIS_fnc_unitCapture as I saw suggested in a few other threads, but that just moved the vehicle along the ground without actually turning the wheels. It was very jittery and just looked wrong, as well as requiring several "takes" to get the inputs just right.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.
-
Does that setDriveOnPath make the convoys move together more realistic? Let me know how that goes.
-
1 hour ago, itisnotlogical said:I decided to control the vehicles with https://community.bistudio.com/wiki/setDriveOnPath, but BIS_fnc_stalk seems a lot better than using standard waypoints for the bomber. Thank you for the assist!
I'll have to check that out, still learning myself.
-
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
-
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.
-
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; } };
-
1 hour ago, panther42 said:@z1_, first of all, the code you've been posting is SQS syntax, yet you have it in an SQF script?
SQF should be execVM "whatever.sqf" See SQS to SQF conversion.
For a suggestion, you could try lookAt as utilized in this topic.
Another option is the animationSources for the spotlight. I had a specific post in mind, but unable to locate it at this time.
Ok, I found the post I was thinking about, and I doubt it will help much with this spotlight. Here's the post though, in case you need it for anything else...
Another one you may give a try is by ALIAS on SW. I've never tried it, but he may not even use a spotlight item, just create a light source. Could be an option to look into these script(s).
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.
-
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.
-
6 minutes ago, sarogahtyp said:Are you sure it will not break out? Try shorter sleep times like
sleep (random [1,3,7]);
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.
-
Just now, sarogahtyp said:Are you sure it will not break out? Try shorter sleep times like
sleep (random [1,3,7]);
I'll let you know how that works. Thanks
-
13 hours ago, sarogahtyp said:nul = [] spawn { _array = [spot_1,spot_2,spot_3,spot_4,spot_5]; while { isNull (gunner1 findNearestEnemy gunner1) } do { { gunner1 doTarget _x; sleep (random [5,10,15]); } forEach _array; } };
you just have to define how long that while loop has to run. Above I used findNearestEnemy. The while loop should run as long as objNull is returned by this command.
Not tested.
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.
-
On 7/26/2021 at 6:53 PM, Harzach said:Or a little tidier:
nul = [] spawn { _array = [spot_1,spot_2,spot_3,spot_4,spot_5]; while {true} do { { gunner1 doTarget _x; sleep (random [5,10,15]); } forEach _array; } };
Just as an example, of course.
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;
-
That works so much better, thanks again.
- 1
-
Read my mind lol
-
9 minutes ago, Harzach said:You can place a few gamelogics at positions where you'd like them to look, then use doTarget on the "gunner".
nul = [] spawn { while {true} do { gunner1 doTarget spot_1; sleep (random [5,10,15]); gunner1 doTarget spot_2; sleep (random [5,10,15]); gunner1 doTarget spot_3; sleep (random [5,10,15]); gunner1 doTarget spot_4; sleep (random [5,10,15]); gunner1 doTarget spot_5; sleep (random [5,10,15]); } };
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.
-
Thanks for the syntax, I was using archaic stuff i learned when i was messing with camera scripts
-
2 minutes ago, Harzach said:You can place a few gamelogics at positions where you'd like them to look, then use doTarget .
Good idea, thanks.
-
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.
-
Maybe I'll try doing a unitCapture. Hopefully I only have to capture the spotlight.
-
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?
-
On 7/23/2021 at 3:09 PM, panther42 said:@z1_ have you looked at some of the civilian scripts by the community instead of these #$%@ modules by BIS?
If not, I can give you some recommendations, or possibly modifications I've done to a couple of my favorites.
Yeah, I have a few. Usually just use Mongos. Was trying to build my own based off the modules as a learning experience.
On 7/23/2021 at 1:32 AM, gc8 said:Why not simply set the module position when creating it?
_pos = getpos triggernameHere; _item0 = createUnit ["ModuleCivilianPresence_F",_pos ,[],0,"CAN_COLLIDE"];
also make sure you have errors turned on from the launcher
Thanks for the info, I'll give it a try.
-
8 hours ago, gc8 said:are you sure this variable is working?
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.
-
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.
-
I also figured I need the modules to not init until everything spawned and connected
Solved: Rotate the old CUP Spotlight
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
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.