Jump to content
Sign in to follow this  
kaski

Waypoints usable only with GPS

Recommended Posts

I want on my custom DayZ version that waypoints are only available with GPS. Since setting server settings doesn't help with this, I guess I have to disable waypoints and create a custom script to handle this. Can you points me to right direction if it is possible please?

Share this post


Link to post
Share on other sites
This is ArmA 2 area, not Day Z.

I know. DayZ uses ArmA 2 and is scripted mod. I don't know any reason why I shouldn't post it here since if I would like to create this on arma2oa mission, it would be same.

Share this post


Link to post
Share on other sites

Hmm the thing is: Arma2 ppl seem to dislike DayZ for some reason, I really don't know why and truth to be told - I don't want to horn into the discussions about it...

The funny thing is, that you'll get help for other Mods, regardless of their size or publicity :>

So a little hint for you: just try to phrase your problem for ArmA2 and you'll get help. You have to either ask in DayZ-Forums to implement the codes you get from here or get some basic knowledge in scripting so you can do it yourself :)

Share this post


Link to post
Share on other sites
>So a little hint for you: just try to phrase your problem for ArmA2 and you'll get help.

Exactly. DayZ discussion is against the rules here, but it doesn't always seem to be enforced. Just provide enough information to get the help you need.

Share this post


Link to post
Share on other sites

No idea why people dislike DayZ here, it all started from arma 2 and is now being developed as a standalone. It isn't any different than other arma 2 missions/addons. We (small group of people) didn't like standard dayz and started to develop it in our way. We have now over 5000 users registered to play our mod and we are growing. 2 days ago, almost 300 new members registered. Few streamers (where on has almost 1 million followers) are interested and will bring more players for us. I'm just trying to give players better experiense and things that they want from us.

I know basic scripting and I know how to add/change/delete things. I like scripting/coding and have learned basic things of c# and java by my own. I'm not asking directly copypaste ready scripts, I want directions. I already stated this on my first post. If you have nothing to say about my problem, please stop posting about your opinions of dayz, why people hate/love it etc. I found gazillion similiar threads via google hence the reason I asked this here. Let's not make this one like others. Please.

Share this post


Link to post
Share on other sites

Okay, just to wholly understand your problem:

  • Do you already have waypoints in your map or will they be dynamically created?
  • What exactly do you mean with "available only with GPS"? I think we need some more details about the scenario here, like do you want AI to follow waypoints only if they have the GPS-Item in their equipment or do you just want to hide/show waypoints for the player?

Depending on your wanted scenario, there are several commands you can go with.

Using hasWeapon and magazines will allow you to check if they have the item in their equipment.

Once they do, you can use commands like showWaypoint or lockWP to change waypoint attributes.

To wrap the above commands up, you have to either use a script with a waitUntil{GPS IN EQUIPMENT}; ontop or a trigger to fire with the same condition.

Share this post


Link to post
Share on other sites

Ah yea, sorry. I have explained problem bit wrong. I mean waypoints that appear when you press SHIFT-MOUSE1 on Map. You will have this green icon on your interface then and it shows how far waypoint is.

Share this post


Link to post
Share on other sites

Easy peasy. In your server config, where class difficulties is defined:

hud = 0;
hudGroupInfo = 0;
hudPerm = 0;
hudWp = 0;
hudWpPerm = 0;

This will turn off all HUD waypoint info for all players on the server.

*edit* - NOPE. I thought this used to work, but apparently it does not. Not sure if this is possible.

This is a feature that this mod really needs. I wonder if it is being addressed in the standalone version?

**moar edits** - I knew it! There is a way, and I have used it in the past. I'm just not using it on my server now.

In addition to the above server.cfg edits, you need to run this addon on your server:

UnlockDifficultyOptions_Configuration_C_OA_PROPER.pbo

Edited by Harzach

Share this post


Link to post
Share on other sites

Doesn't editing the difficulty configs disable the HUD waypoints permanently? I though the OP wanted to show them IF the player has the GPS-Item in his equipment, but if the waypoints markers are disabled from the very start it won't be able, wouldn't it? :D

Share this post


Link to post
Share on other sites
Doesn't editing the difficulty configs disable the HUD waypoints permanently? I though the OP wanted to show them IF the player has the GPS-Item in his equipment, but if the waypoints markers are disabled from the very start it won't be able, wouldn't it? :D

Gah, you're right as usual. I was thinking about it the wrong way. This is an interesting problem, though.

Share this post


Link to post
Share on other sites

It's as easy to solve as check for shift+click on the map with a "onMapSingleClick" and block it if you don't have a gps ( "hasWeapon").

onMapSingleClick "if (_shift && (player hasWeapon 'ItemGPS')) then {false} else {true}"

Edit: that would only block placing waypoints, if there is any placed you will still see it if you drop the GPS. The only way to totally remove that would be modiying the game UI config interface, as ACE does, or just assing a IDD to the resource so you can edit it latter by script.

Edited by columdrum

Share this post


Link to post
Share on other sites

Of course! Prevent them from placing a waypoint in the first place.

Share this post


Link to post
Share on other sites

Interesting problem indeed xD

You'd have to probe deep into the game engine to be able to find some way to achieve this, something like overwriting the map with a custom one or similar.

Maybe onMapSingleClick could help out? I don't know if you can cancel mouseclicks that way or have to check onmap items after clicking.

// edit: I was too late xD

Edited by XxAnimusxX

Share this post


Link to post
Share on other sites
Edit: that would only block placing waypoints, if there is any placed you will still see it if you drop the GPS. The only way to totally remove that would be modiying the game UI config interface, as ACE does, or just assing a IDD to the resource so you can edit it latter by script.

In this case, I think you've nailed it. It's an open-world mission with no pre-defined or spawned waypoints, so it should work.

*edit* - Ah, I see what you are saying. If you have a GPS, drop a waypoint, then lose your GPS somehow, the waypoint will still be visible. Hmm.

---------- Post added at 16:32 ---------- Previous post was at 16:06 ----------

This topic got me thinking - maybe you could do away with the personal waypoint altogether and spawn a task waypoint with shift+LMB (or different keybind) instead? You would then be able to delete it if the player loses his GPS.

Edited by Harzach

Share this post


Link to post
Share on other sites

Hi and sry for late response. I didn't know about onMapSingleClick and _shift thing. It is working just fine with columdrums code, thank you! Waypoint is still on HUD after dropping GPS but it doesn't matter since you are not able to create new waypoint, working in same way that milivehicles.

Unbelieveable that it was this simple.

Share this post


Link to post
Share on other sites

Sorry for diggin up such an old thread but the forum did not let me pm the author since i am new here.

I would love to add this code to my server but don't know where to add the code.

Anyone?

Thanks.

It's as easy to solve as check for shift+click on the map with a "onMapSingleClick" and block it if you don't have a gps ( "hasWeapon").

onMapSingleClick "if (_shift && (player hasWeapon 'ItemGPS')) then {false} else {true}"

Edit: that would only block placing waypoints, if there is any placed you will still see it if you drop the GPS. The only way to totally remove that would be modiying the game UI config interface, as ACE does, or just assing a IDD to the resource so you can edit it latter by script.

Share this post


Link to post
Share on other sites
Sorry for diggin up such an old thread but the forum did not let me pm the author since i am new here.

I would love to add this code to my server but don't know where to add the code.

Anyone?

Thanks.

Also sorry D: . I myself hate finding unanswered threads. You should be able to add this to the Init.sqf. I want to test this out myself to confirm I'm right. I will edit this post with my results for SP and MP. I have much use for this aswell.

Will be testing on ARMA 3 first, then A2:OA and A2.

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  

×