Basically I want to be able to a POINT to my map and give it a name, say "START".
Then I want to run some triggers from my mod and create units at that point, however I need to be able to reference the point by it's name. So it may involve searching through all POINT objects on the map until I find one matching that name.
Cant you do it with variable, just set a variable for point with the name Start, when you want, just refer it back to that variable. Or you really want to specify point by string value ? (kind of like player type in text and then refer a corresponding point)
The problem is the trigger is in a MOD, and I'm placing the START point in a MAP.
So I need some way for the MOD to check if the start point exists, and if it does use it to create units - if it doesn't show a warning.
If it was possible to do this just by naming a point on the MAP, then it would be great, as it makes the map super easy to setup. I mean I can add it to the global data table or something if I really have to.
I can't just use a variable though, because the triggers in the mod won't be able to reference the variables since they don't know about the map.
All placed objects in the editor are stored in XML files (Objects and Regions) and are only accessible through Galaxy by a numerical ID. When you are using the GUI, it does the mapping from the name associated with that ID in the XML and pulls up the number.
So to answer your question, it is not possible to do this without either having someone use the editor to select the point, or manually translating from the named point to its numerical index for every map you want to do this in.
Actually I an probably work around this by creating a new Unit or Doodad, then when the map initializes I can get that unit, delete it and spawn a point - or just spawn the units on that unit.
@KratsAU: Go
If you're looking to spawn a unit or doodad, try the invisible pylon. ;) You can set it's radius to 0 so it will be completely non intrusive to gameplay. ;) Hope that helps (if that's the route you end up taking).
Thanks, yeah it looks like i needed to use a unit. First I was trying to create a trigger with an event that created units when a Players Hero walked in range of a point (the point being a spawn pool for example).
Couldn't quite get what I wanted though, so I ended up just running periodic timer that gets all of a set unit type and puts them in a group, picks the closest one that is within a set range of a unit and spawn units from that.
Basically the idea is, I want to be able to create a map, and place "spawner" points or units on the map that the triggers can work with automatically, without having to be set in variables.
Anyhow it is working now, you can create any map you like, place spawners and starting point, include the mod as a dependency and away you go!
Basically I want to be able to a POINT to my map and give it a name, say "START".
Then I want to run some triggers from my mod and create units at that point, however I need to be able to reference the point by it's name. So it may involve searching through all POINT objects on the map until I find one matching that name.
Is this possible?
If not is it possible with regions?
@KratsAU: Go
Cant you do it with variable, just set a variable for point with the name Start, when you want, just refer it back to that variable. Or you really want to specify point by string value ? (kind of like player type in text and then refer a corresponding point)
The problem is the trigger is in a MOD, and I'm placing the START point in a MAP.
So I need some way for the MOD to check if the start point exists, and if it does use it to create units - if it doesn't show a warning.
If it was possible to do this just by naming a point on the MAP, then it would be great, as it makes the map super easy to setup. I mean I can add it to the global data table or something if I really have to.
I can't just use a variable though, because the triggers in the mod won't be able to reference the variables since they don't know about the map.
All placed objects in the editor are stored in XML files (Objects and Regions) and are only accessible through Galaxy by a numerical ID. When you are using the GUI, it does the mapping from the name associated with that ID in the XML and pulls up the number.
So to answer your question, it is not possible to do this without either having someone use the editor to select the point, or manually translating from the named point to its numerical index for every map you want to do this in.
Okay thanks, I'll guess I will have to use the global data table instead.
That's the only way for a trigger library to access a variable in the map I assume?
Actually I an probably work around this by creating a new Unit or Doodad, then when the map initializes I can get that unit, delete it and spawn a point - or just spawn the units on that unit.
@KratsAU: Go If you're looking to spawn a unit or doodad, try the invisible pylon. ;) You can set it's radius to 0 so it will be completely non intrusive to gameplay. ;) Hope that helps (if that's the route you end up taking).
S/F
Thanks, yeah it looks like i needed to use a unit. First I was trying to create a trigger with an event that created units when a Players Hero walked in range of a point (the point being a spawn pool for example).
Couldn't quite get what I wanted though, so I ended up just running periodic timer that gets all of a set unit type and puts them in a group, picks the closest one that is within a set range of a unit and spawn units from that.
Basically the idea is, I want to be able to create a map, and place "spawner" points or units on the map that the triggers can work with automatically, without having to be set in variables.
Anyhow it is working now, you can create any map you like, place spawners and starting point, include the mod as a dependency and away you go!
@KratsAU: Go
Great idea btw!! I'd like to see the mod when you're done w/ it. ;)