I'm trying to implement a game idea of my own and have decided galaxy editor can be a good prototyping tool for me. However I'm new to galaxy editor and here are some specific and general questions I'd like to ask. let's start from my purpose.
I'm trying to make an ability that will create some persistent visual effect (will last until overwritten otherwise) on specific region once cast. Hence I ran into many confusions and obstacles in the attempt. The approach I'm taking right now is to create doodads with the visuals i want (lava splash, for example) and hide all of them during initialization, then create a trigger that listens on the specific ability, then show/hide doodads within in the region where the ability was cast.
Problems are
1. I need to create a custom function that converts Point into Region, where I need some insight on the 'point' struct, how am I suppose to get this info? or more generally, where are all source code of built in functions are kept?
2. I heard there're conditions to judge if a point is within bonds of a specific region, but all I can find under conditions are and/or/if etc. Can anyone tell me more on in regard of this topic?
3. Is it possible to create persist visual on map w/o trigger? "Effect" with custom/other existing model for example?
Any other suggestions are welcomed, such as alternates that i can achieve my goal.
The best way to figure out the Galaxy equivalent of GUI code is to write a line of code in the GUI, and then push CTRL + F11 to open up a Script window that shows you the raw code of all of your Triggers combined.
1. There is a function "Convert Circle To Region" that you can look at here. The main parameters are a radius, and a point. You specify the center point, and a circular region is generated with a radius you specify around that point.
You could create this in standard GUI Code, and after you've successfully created this line of code, press CTRL + F11 to open the Script window I was talking about and scroll down the window until you find the line of code you've written in the GUI. In this window, it will display the Galaxy Script version of that line of code.
2. The function you're looking for to compare whether a point is in a region is "Point Is In Region" which is documented here. To use it, create an If statement, and as the condition, you should have If (Point Is In Region(pt, reg) == true) then.. Again, remember if you want to get the Galaxy Script version of this line of code, open up the Script Window.
3. This one is a little hard to understand... You would like to make a visual effect fill up the area of this region, I take it... but for how long? If it's not a fixed amount of time, what condition will end the visual effect? This one is a little hard to follow... care to explain a little more?
You can create visual effects with data only, create a model type of cator with the visual effect you want, then give it Create and Destroy events according to your needs, like the creation and destruction of the persistent effect. Of course you will still need triggers to control regions.
Thank you very much for all the tips. What i find out so far is that Blizzard seems not disclosing any of their IP, including all source code of basic type definitions. Therefore I simply can not manipulate an existing type, such as a Point or Region, in my own custom script. I actually end up using the Point to Region function in my script, where I had to loop through all the regions I've got each time (YAK >_<). I think i'll just stick to this no-so-elegant solution for now, just feeling kinda stupid for not able to play with more basic types in my code.
For the third question, what I had in mind was actually a visual effect in specific region, that last until certain condition changed. I think SoulFilcher pretty much answered about it. I'm using doodads as the placeholder for now, by hiding all during init and show/hide those in certain region when condition's met.
I believe you could index your regions basing on their starting and ending coordinates and when you get the point coordinates, well, just look for something within said boundaries. If all regions are the same size, you could simply index them numerically by a given multiplier and then just divide the pointcoordinates between said multipliers and you get the given region. No galaxy, but quick mockup, assuming your regions are 8.0,8.0 sized.
Region[0][0] = {origin(0.0, 0.0), end(8.0,8.0)}
Region[0][1] = {origin(0.0, 8.0), end(8.0,16.0)}
....
Region[1][0] = {origin(8.0, 0.0), end(16.0,8.0)}
Region[1][1] = {origin(8.0, 8.0), end(16.0,16.0)}
...
all of these could be filled via a loop or smth
Then if you have a point with coordinates (4.5,11.2) you just divide 4.5/8=0.5625, 11.2/8=1.4, aka [0][1]
Attached is a .7z archive of the most recent standard galaxy files, with some additional reference compilations. See also Deaod's docs on galaxy script, its operators and types, and optionally an explanation of bitwise operators.
I'm trying to implement a game idea of my own and have decided galaxy editor can be a good prototyping tool for me. However I'm new to galaxy editor and here are some specific and general questions I'd like to ask. let's start from my purpose.
I'm trying to make an ability that will create some persistent visual effect (will last until overwritten otherwise) on specific region once cast. Hence I ran into many confusions and obstacles in the attempt. The approach I'm taking right now is to create doodads with the visuals i want (lava splash, for example) and hide all of them during initialization, then create a trigger that listens on the specific ability, then show/hide doodads within in the region where the ability was cast.
Problems are 1. I need to create a custom function that converts Point into Region, where I need some insight on the 'point' struct, how am I suppose to get this info? or more generally, where are all source code of built in functions are kept? 2. I heard there're conditions to judge if a point is within bonds of a specific region, but all I can find under conditions are and/or/if etc. Can anyone tell me more on in regard of this topic? 3. Is it possible to create persist visual on map w/o trigger? "Effect" with custom/other existing model for example?
Any other suggestions are welcomed, such as alternates that i can achieve my goal.
The best way to figure out the Galaxy equivalent of GUI code is to write a line of code in the GUI, and then push CTRL + F11 to open up a Script window that shows you the raw code of all of your Triggers combined.
1. There is a function "Convert Circle To Region" that you can look at here. The main parameters are a radius, and a point. You specify the center point, and a circular region is generated with a radius you specify around that point.
You could create this in standard GUI Code, and after you've successfully created this line of code, press CTRL + F11 to open the Script window I was talking about and scroll down the window until you find the line of code you've written in the GUI. In this window, it will display the Galaxy Script version of that line of code.
2. The function you're looking for to compare whether a point is in a region is "Point Is In Region" which is documented here. To use it, create an If statement, and as the condition, you should have If (Point Is In Region(pt, reg) == true) then.. Again, remember if you want to get the Galaxy Script version of this line of code, open up the Script Window.
3. This one is a little hard to understand... You would like to make a visual effect fill up the area of this region, I take it... but for how long? If it's not a fixed amount of time, what condition will end the visual effect? This one is a little hard to follow... care to explain a little more?
You can create visual effects with data only, create a model type of cator with the visual effect you want, then give it Create and Destroy events according to your needs, like the creation and destruction of the persistent effect. Of course you will still need triggers to control regions.
@gerudobombshell: Go
Thank you very much for all the tips. What i find out so far is that Blizzard seems not disclosing any of their IP, including all source code of basic type definitions. Therefore I simply can not manipulate an existing type, such as a Point or Region, in my own custom script. I actually end up using the Point to Region function in my script, where I had to loop through all the regions I've got each time (YAK >_<). I think i'll just stick to this no-so-elegant solution for now, just feeling kinda stupid for not able to play with more basic types in my code.
For the third question, what I had in mind was actually a visual effect in specific region, that last until certain condition changed. I think SoulFilcher pretty much answered about it. I'm using doodads as the placeholder for now, by hiding all during init and show/hide those in certain region when condition's met.
Again, much appreciated for your time and tips :)
I believe you could index your regions basing on their starting and ending coordinates and when you get the point coordinates, well, just look for something within said boundaries. If all regions are the same size, you could simply index them numerically by a given multiplier and then just divide the pointcoordinates between said multipliers and you get the given region. No galaxy, but quick mockup, assuming your regions are 8.0,8.0 sized.
Region[0][0] = {origin(0.0, 0.0), end(8.0,8.0)} Region[0][1] = {origin(0.0, 8.0), end(8.0,16.0)} .... Region[1][0] = {origin(8.0, 0.0), end(16.0,8.0)} Region[1][1] = {origin(8.0, 8.0), end(16.0,16.0)} ... all of these could be filled via a loop or smth
Then if you have a point with coordinates (4.5,11.2) you just divide 4.5/8=0.5625, 11.2/8=1.4, aka [0][1]
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
Attached is a .7z archive of the most recent standard galaxy files, with some additional reference compilations. See also Deaod's docs on galaxy script, its operators and types, and optionally an explanation of bitwise operators.