Majesty Gold HD

Majesty Gold HD

Customize Majesty!
Create and upload new Quests and Mods for Majesty HD!
Dracoceros 11 27 Mar, 2020 @ 11:17pm
Spawn a unit on one of the four corners?
How do I achieve this, especially since I want to spawn all 4 units on all 4 corners
< >
Showing 1-2 of 2 comments
VikesRule 40 28 Mar, 2020 @ 12:19pm 
I'm not sure how to get it exactly into the corner. I know $RandomEdgeCoord puts units right on the edge of the map, but I don't know how to specify at a corner in that function. There are functions like $ClosestMapEdge and $FarthestMapEdge_OnMap, but again these just put it on the map edge, not necessarily the corner.

I'm thinking you would need to get the X and Y coordinates of each corner spot then do a $MakeCoord for each of those spots, then you can $SpawnUnit at each of those locations using each $MakeCoord output as the coordinate value.

EDIT: Just did some testing myself and yes this does work.

$MakeCoord(1,1); will give a coordinate in the top left corner of the map. As for the other spots, I don't know the exact coordinates for the other corners so you would need to test it out to find them.
Last edited by VikesRule; 28 Mar, 2020 @ 12:40pm
Dracoceros 11 29 Mar, 2020 @ 1:33pm 
Thanks. You get the corners by using a combination of GetX and GetY, and using $GetBoardExtents
< >
Showing 1-2 of 2 comments
Per page: 1530 50