[Faded] Trying to make minimap clickable to spawn hallucination

KatzenfleischKatzenfleisch Join Date: 2014-03-21 Member: 194881Members, Squad Five Blue, Squad Five Silver, NS2 Community Developer
edited December 2015 in Modding
Hi,

I am trying to use the alien feature on the minimap that enable a player to set his next spawn location using the minimap. So far it works as follow:
  1. Player press "C" (minimap is visible but mouse cursor is not present)
  2. Player click once (mouse cursor became visible and allow to click on minimap)
  3. Player click again and set the location

I would like to reproduce this for a player to implement a new ability for the Faded: Spawn an hallucination if the Faded click on the minimap at a given location (with of course a text near the minimap showing the number of hallucination left, etc).

So far I got stuck in GUIMinimap.lua, GUIMinimapFrame.lua, self.showingMouse and desiredSpawnPosition: the mouse is locking everything, the cursor is not displayed, etc.

However I got the event on the minimap and coord translation are okay (SendKeyEvent() function, mostly). At best I would like to be able to do this without having to completly overload NS2 original files directly since it's often mod breaking.
Sign In or Register to comment.