View topic - Spring.AddMarkerPoint()


All times are UTC + 1 hour


Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: Spring.AddMarkerPoint()
PostPosted: 05 May 2012, 17:43 

Joined: 27 Jun 2011, 12:43
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?
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 00:06 
Moderator

Joined: 19 May 2009, 20:10
5th argument is boolean to set local or non-local points. Default is local points (=false).
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 00:15 
Lua Coder
User avatar

Joined: 20 Feb 2007, 01:10
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. :(
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 01:09 
Moderator

Joined: 19 May 2009, 20:10
very_bad_soldier wrote:
That argument was added at some point, right?

Because some widgets were spaming points. That got more annoying the bigger the game was.
Quote:
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. :(

That is a good point.
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 12:44 

Joined: 27 Jun 2011, 12:43
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?
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 12:52 
Moderator

Joined: 05 Aug 2009, 19:42
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
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 13:49 
Moderator

Joined: 19 May 2009, 20:10
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?

Normally they are documented in the wiki. But it's not up to date.
What always works: engine source code.

Quote:
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"

As said, make the points only locally. No one want's point spam.
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 14:17 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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. :|
Top
 Offline Profile  
 
PostPosted: 06 May 2012, 16:00 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Make it local. I hate it when people with widgets that autospam markers join my games.
Top
 Offline Profile  
 
PostPosted: 07 May 2012, 16:18 

Joined: 27 Jun 2011, 12:43
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.
Top
 Offline Profile  
 
PostPosted: 07 May 2012, 17:35 
Lua Coder
User avatar

Joined: 20 Feb 2007, 01:10
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.
Top
 Offline Profile  
 
PostPosted: 07 May 2012, 17:46 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
SirMaverick wrote:
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. :(

That is a good point.
I guess the idea was that some players would still use outdated widgets (that spam global) so it was the goal to "break" those.

thanks for updating arguements LEDZ :)
Top
 Offline Profile  
 
PostPosted: 08 May 2012, 21:53 

Joined: 27 Jun 2011, 12:43
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:
Image

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).
Top
 Offline Profile  
 
PostPosted: 09 May 2012, 00:46 
Moderator

Joined: 05 Aug 2009, 19:42
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)
Top
 Offline Profile  
 
PostPosted: 09 May 2012, 01:11 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
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)

Even 0 is true in Lua, only nil & false translate to boolean false.
Top
 Offline Profile  
 
PostPosted: 09 May 2012, 10:35 

Joined: 27 Jun 2011, 12:43
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?
Top
 Offline Profile  
 
PostPosted: 09 May 2012, 16:51 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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)
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.