Home   Help Search Login Register  

Author Topic: Dynamic Markers  (Read 1959 times)

0 Members and 1 Guest are viewing this topic.

Offline messiahua

  • Members
  • *
  • Son of God
    • Armed Assault Ukraine
Dynamic Markers
« on: 09 Feb 2007, 16:23:04 »
I have strange problem, which I can't solve myself. So, I'll start...

I wanted to make dynamic markers in mission for my local gaming group. So I decided not to reinvent the wheel and took dynamic moving markers script from WGL, rewrote it on sqf and modified a little. (attached groupmarker.sqf and unitmarker.sqf files)

We played our first coop session and everything was fine. Markers were moving for groups and unit (helicopter) correctly. It was 1.01 version.
Then, I decided to make a training mission (now version 1.02), which would have two sides playable. I made some modifications to script and suddenly markers started to dissapear during game, even if we played coop in this missions. I thought, that this is some kind of "getpos" problem and markers just go to coords 0,0,0 or something like that. I started to search for a way to identify the source of this problem, but I couldn't. Position of dissapeared markers are correct and markers work fine for a while, so everything is working, but this strange dissapearing problem occurs.

Now I think, that it is somehow related to my mistake in scripts, JIP (because I turned off JIP in our first session) or just arma 1.02 itself.

Here is a part of init.sqf:
Code: [Select]
[...]
//Helis markers

if (!isNull helo_1 && side player == west) then {
    _nul = [helo_1,"helo_1","transhelo","ColorBlack"] execVM "unitmarker.sqf";
};
if (!isNull helo_2 && side player == west) then {
    _nul = [helo_2,"helo_2","transhelo","ColorBlack"] execVM "unitmarker.sqf";
};
[...]

//Alpha marker
if (!isNull a && side player == west) then {
    _nul = [a,"a","a","ColorRed"] execVM "groupmarker.sqf";
};
if (!isNull ea && side player == east) then {
    _nul = [ea,"ea","a","ColorRed"] execVM "groupmarker.sqf";
};
[...]

P.S. I made my custom markers, and third param is for their type.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Dynamic Markers
« Reply #1 on: 09 Feb 2007, 17:54:06 »
setmarkerpos, afaik is now a globally transmitted command over the network
(I have only just started to look at arma coding and havent done any MP testing yet, so this is based on information given)
In OFP setmarkerpos was a local command

When 1.04 is released, a new command "setmarkerposlocal" will be available which will be the correct command for clientside tracking. (Thanks BIS for the error which actually in the end will help the coding community. Now all we need is to pv arrays and strings and we're quids in)



for now setmarkerpos should only be run from 1 machine, eg the server
otherwise every client will be telling every client where to setpos each of the markers, which isnt going to be very network friendly

This unfortunately means that unit tracking  for now is a no no, but group tracking for a coop mission can be done server side

i believe the same problem exists for createmarker too
  for player v player missions i would leave this out entirely

1.04 patch i expect will become availablke when the UK has their 505 release (this only a couple of weeks away at most)
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Dynamic Markers
« Reply #2 on: 10 Feb 2007, 15:29:38 »
Quote
i believe the same problem exists for createmarker too
  for player v player missions i would leave this out entirely

There are also, createMarkerLocal, deleteMarkerLocal,  setMarkerBrushLocal, setMarkerColorLocal, setMarkerDirLocal, setMarkerPosLocal, setMarkerShapeLocal, setMarkerSizeLocal, setMarkerTextLocal and setMarkerTypeLocal commands to supplement the setMarkerLocal.

Another to be aware of is createVehicleLocal.


Planck
I know a little about a lot, and a lot about a little.