Spring.AddMarkerPoint()
Moderator: Moderators
Spring.AddMarkerPoint()
The Spring.AddMarkerPoint() device is local only; what is that shares a marker point placed by a player in-game with the other players? I assumed when using Unit Markers v3 that everyone could see the marks.
How can this be accomplished?
How can this be accomplished?
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Spring.AddMarkerPoint()
5th argument is boolean to set local or non-local points. Default is local points (=false).
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Spring.AddMarkerPoint()
That argument was added at some point, right? Quite strange that it defaults to local points since it changes the behavior of all widgets. All old widgets that used to do "global" markers need to be modified to work as they did in the past.
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Spring.AddMarkerPoint()
Because some widgets were spaming points. That got more annoying the bigger the game was.very_bad_soldier wrote:That argument was added at some point, right?
That is a good point.Quite strange that it defaults to local points since it changes the behavior of all widgets. All old widgets that used to do "global" markers need to be modified to work as they did in the past.
Re: Spring.AddMarkerPoint()
Thanks guys. SirMaverick, where can I look to find out this sort of information (all the arguments to a function) so I don't have to ask these sort of questions?
As for the spam, I plan to add a widget:Intialise message (that come from the player that starts the widget) saying something "I am using unit marker v4"
Also, I have added functionality that automatically deletes old commander markers after ~15 secs so that it doesn't become annoying.
What I plan on doing next is to make delete an old marker if the same commander is spotted again.
What do you think?
As for the spam, I plan to add a widget:Intialise message (that come from the player that starts the widget) saying something "I am using unit marker v4"
Also, I have added functionality that automatically deletes old commander markers after ~15 secs so that it doesn't become annoying.
What I plan on doing next is to make delete an old marker if the same commander is spotted again.
What do you think?
Re: Spring.AddMarkerPoint()
so you're creating a widget that will spam "enemy commader here" points?
rather make it local, if people want that info they can get the widget themselves
rather make it local, if people want that info they can get the widget themselves
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Spring.AddMarkerPoint()
Normally they are documented in the wiki. But it's not up to date.LEDZ wrote:Thanks guys. SirMaverick, where can I look to find out this sort of information (all the arguments to a function) so I don't have to ask these sort of questions?
What always works: engine source code.
As said, make the points only locally. No one want's point spam.As for the spam, I plan to add a widget:Intialise message (that come from the player that starts the widget) saying something "I am using unit marker v4"
Re: Spring.AddMarkerPoint()
It's up to date with everything recorded in the changelog form 83 onwards. If you know something is missing - add it in the right place.
Re: Spring.AddMarkerPoint()
Make it local. I hate it when people with widgets that autospam markers join my games.
Re: Spring.AddMarkerPoint()
I understand that people find it annoying but I have put emphasis on making sure it tidies up after itself and doesn't spam everytime something is seen (if it hasn't moved very far).
I can always turn it off it is annoying someone on my team. I think the problem was people have a had a bad experience with previous unit markers.
I can always turn it off it is annoying someone on my team. I think the problem was people have a had a bad experience with previous unit markers.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Spring.AddMarkerPoint()
I guess the most important part is WHAT you are actually marking. The original unit marker did it only for nukes and antinukes which I am still considering as useful information for the whole team.
On the other hand I am not interested to know every time a commander is spotted on the other side of the map.
On the other hand I am not interested to know every time a commander is spotted on the other side of the map.
Re: Spring.AddMarkerPoint()
I guess the idea was that some players would still use outdated widgets (that spam global) so it was the goal to "break" those.SirMaverick wrote:That is a good point.very_bad_soldier wrote:Quite strange that it defaults to local points since it changes the behavior of all widgets. All old widgets that used to do "global" markers need to be modified to work as they did in the past.
thanks for updating arguements LEDZ :)
Re: Spring.AddMarkerPoint()
Knorke: No worries, I thought I ought to help where I can since people have helped me. I noticed I didn't do it exactly right but I couldn't find a template for adding those sorts of arguments.
One point of confusion; it's boolean (true or false) but with trial and error I figured that it accepts 0 or 1 in the Local argument. What's the precedent?
The units it marks:
The commander is marked with the player's name for easy recognition of who you are against on the front line and notice that the marker text is coloured to the same colour of that of the owner. It removes old marks automatically once the same unit is spotted in a different position (at least 100 meters away).
One point of confusion; it's boolean (true or false) but with trial and error I figured that it accepts 0 or 1 in the Local argument. What's the precedent?
The units it marks:
The commander is marked with the player's name for easy recognition of who you are against on the front line and notice that the marker text is coloured to the same colour of that of the owner. It removes old marks automatically once the same unit is spotted in a different position (at least 100 meters away).
Re: Spring.AddMarkerPoint()
lua like c/c++ is weaker typed than f.e java, so statements like f.e "if 5 then" are considered valid and evaluate to true (all non 0 is true)
Re: Spring.AddMarkerPoint()
Even 0 is true in Lua, only nil & false translate to boolean false.gajop wrote:lua like c/c++ is weaker typed than f.e java, so statements like f.e "if 5 then" are considered valid and evaluate to true (all non 0 is true)
Re: Spring.AddMarkerPoint()
What I mean is that on the wiki the argument for localOnly is boolean, but to me that means true or false, when it actually accepts 0 or 1. How should that be represented in the wiki?
Re: Spring.AddMarkerPoint()
Yeah that was my mistake, misread the code. However jk chagned it to now accept booleans as well (which in the future should probably be preferred)