1. I am using MapMarkerGenericRadius to create a marker on the map, it is not rendered when the server is started, it will be rendered if I manually reload the plugin after the start. Any idea on what could be wrong ?


    The code:
    MapMarkerGenericRadius m =GameManager.server.CreateEntity("assets/prefabs/tools/map/genericradiusmarker.prefab", newVector3(0,0 ,0)) asMapMarkerGenericRadius;
    m.alpha=0.8f;
    m.color1=Color.green;
    m.color2=Color.green;
    m.radius=3;
    m.Spawn();
    m.SendUpdate();
     
  2. Look at my Map Block plugin.
     
  3. @Kappasaurus So to get markers to spawn after a restart would that require _markers to be stored in a data file? I'm still learning but would that mean saving "player.transform.position" (as i'm printing markers via a /print chat command)

    What would be the best way to save coordinates and then get _marker to spawn it from data?
     
  4. That is one method of doing to but you can probably save it with the map too.

    _marker is just a private field. I'm respawning it every time a player joins. There's probably a better way to do that, you can look in the client Assembly-CSharp and see what actions are performed and probably just send an update.
     
  5. Kappasaurus, I did look into your plugin in the first place, but I was missing UpdateMarker called in the OnPlayerIinit. I have added it and now works as expected. Why do we need to Kill/Spawn/SendUpdate the entitiy on each player init ?
     
  6. I am still having issues with the marker movement. Could someone provide a sample with:
    a) A marker being created in the center of the map, on the server start
    b) That same marker beeing moved to the a different position during game play

    Thanks
     
  7. It seems it's only rendered if it's created while the player is connected. All you have to do is kill the marker and respawn it at a different location. If you do it rapidly enough you don't even need to redraw it when players connect.