Jump to content
Sign in to follow this  
G4meM0ment

Check if waypoint is reached

Recommended Posts

Hi guys,

I'm trying to script on one of my first missions - no problems since yet.

But I cant find one thing, or lets say statement, I searched for 2 hours in the internet for an solution, but I cant find

a way to check if a unit reached a waypoint.

Does anyone of you know how to do that? My idea in the game is:

1.) A unit reaches a waypoint (three more units too)

2.) A new waypoint will be activated

Thank you for helping me.

Greets

Julian

Share this post


Link to post
Share on other sites

You can Group a Trigger with a unit and you'll get new Activation options, for vehicle (the specifically linked unit), Whole Group, Group Leader or Any Group Member.

Not sure why you'd need to if this is part of a waypoint chain, you'd already have the next waypoint laid out in the editor. Also waypoints for players is silly. :)

Instead of generalizing what you are trying to do, what exactly are you trying to do?

Share this post


Link to post
Share on other sites
You can Group a Trigger with a unit and you'll get new Activation options, for vehicle (the specifically linked unit), Whole Group, Group Leader or Any Group Member.

Not sure why you'd need to if this is part of a waypoint chain, you'd already have the next waypoint laid out in the editor. Also waypoints for players is silly. :)

Instead of generalizing what you are trying to do, what exactly are you trying to do?

I wanna have kind of HMMWV group driving in a row. So I wanna check if all groups already in the row, if not the others will wait.

AND you said waypoints for players are silly what would you use instead?

Share this post


Link to post
Share on other sites
I'd use markers and objectives instead of actual waypoints. The trigger solution would still work.

For convoys I'd suggest Norrin's convoy script since as you've discovered, AI drivers are morons. :) Seems there might be other solutions as well.

Thank you that looks great :D

Do you know how to execute that script? I tried to create an trigger with an condition, and tried to add ["pos1"....],[vehicle...] but I think that wont work.

Share this post


Link to post
Share on other sites

That download is actually a test mission you can try out and see how they did it. Just open it in your single player editor and copy the files over to your other mission.

Share this post


Link to post
Share on other sites
That download is actually a test mission you can try out and see how they did it. Just open it in your single player editor and copy the files over to your other mission.

Ohh thank you, didn't understood this :P

But now I got it how to do it. I think I need to put the names of the vehicles and positions into the init.sqf, but wont that start on mission start?

Do you know how to start them via trigger? (Sorry for asking dump questions, but I didn't made any serious missions yet :/ )

Share this post


Link to post
Share on other sites

Take the init.sqf from that demo mission and rename it convoyStepoff.sqf

Then make a radio trigger with this as it's onAct:

nul = [] execVM "convoyStepoff.sqf"

You can then use the radio trigger to start the convoy moving. Of course changing the pos1 text to match your locations and the c1 text to match your vehicle names.

Share this post


Link to post
Share on other sites
Take the init.sqf from that demo mission and rename it convoyStepoff.sqf

Then make a radio trigger with this as it's onAct:

nul = [] execVM "convoyStepoff.sqf"

You can then use the radio trigger to start the convoy moving. Of course changing the pos1 text to match your locations and the c1 text to match your vehicle names.

Thank you very much :D Works great!

But there's one thing I wanna mention, is it normal that the convoy guys will disembark if they can see enemys? Because they do even if there is no vehicle destroyed.

Share this post


Link to post
Share on other sites

You might try setting them all to careless to prevent that, but they'll let themselves be destroyed if they get attacked.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×