Hey guys,
I recently finished my first map (though I'm thinking of tweaking it a little, or a lot, before it is published).
Breif history:
If you were given a game, such as bunker wars, zone control, (unit)arena, it's very hard as a map maker to find balance. I played a bunker wars the other day (where you can pick 3 units out of a bunch). I went zealot, collusus, marine. I killed two people, and would have easily won the game, but while I was away from my bunker, I was killed by someone who went marine/marine/marine.. I would have easily killed him in a fight, and took his bunker out.
Now while the above example is my mistake (I guess my strategy was bad?), I feel as though that should not happen.
Now the poll.
Given one of the listed game types above, to help keep balance, using 'one' unit for each player (everyone has marine, everyone has X), would you rather see:
1. Pick one:
a). Incorperate a bunch of maps into one (ie.) One 'Arena' map that has a choice (majority rule) of the unit type used (marines/ghost/marauders/etc)
b.) Individual maps for each (ie.) One map for "Marine Arena"; One map for "Ghost" Arena.
2. Why did you pick option (a) or (b).
My answer:
1. B.
2. I want to say if I join a game, I want to know what it is going to be. To play an Arena game with a unit you don't want to play with, can be agitating, promoting people to join and leave if they do not get what they wanted.
I did however want to vote A, because I feel as though it would be a cool map. Even if I join the same map over and over (with an expecation of a certain play style), I would get a different game each time, and my vote would help contribute to the type I'd want to see.
I'm making another reply, since this is another question, and I feel like the questions keep getting lost in my understanding/questioning examples/paragraphs.
Is it bad to have a trigger for unit enter region for any spot on the map? I feel like the trigger would be called too many times (though it may get called, it won't neccesarily perform actions (depending on the conditions/etc)).
Quote from Shawn91210:
I highly suggest that you go onto sc2mapster's IRC channel. (Freenode, #sc2mapster)
The easiest way that I could see you doing this is by having all the regions in an array to start. Then you wanna select all the regions, copy-paste into the same exact spot and merge them all into one region. That is to say that you have your 50 regions, then one region that is like all of them combined. In that case, you only have one "Unit Enters Region" action and you can iterate through the array to figure out which one it is.
EDIT:: Also, if this isnt the question you were asking, it might be because I didnt read the whole OP. :)
----
I like that idea! That will help take the 50 events out of my trigger. I think my whole map was made with 8 triggers, and I'm still looking to consolidate them.
The OP was with regards to adding all the regions to the array easily. Instead of doing:
Array[0] = region001
Array[1] = region002
Array[2] = region003
...
Array[49] = region050
to do something like:
Array[i] = RegionFromId(i) //since the code actually is RegionFromId(), I didn't know if it was possible to put a variable combination of string + int to equal region001, region002, etc., rather than typing it 50 times in the initial define process.
Quote from hobbidude:
Looks like your part way there. You'll actually not want to use a trigger at all. First you have to assign each of the regions to an integer in a global array in your init trigger; there is no way around this, you have to predefine it. Then instead of using a "unit enters" event and trigger, create a custom action definition that runs a loop everyone once in a while like .1 sec and check if the unit in the region within an integer loop.
----
Thanks for that info. I skipped the very basics of the editor. I'm not sure if creating functions/actions are advanced or basic, but I tried to mess around with creating a new function, but it was a little out of my league. Are there any good tuturials you know of that consists of all the 'advanced' triggering (such as creating own functions/actions/etc.), or even custom scripting (I feel as though the GUI makes doing it more complicated to do that stuff)?
I understand I have to predefine everything too, but I was wondering if there was a faster way, such as setting a loop like this:
Variable: x=001
Variable: area[] = array of regions
For (var i=0; i < 50; i++)
area[i] = regionFromId('region' + x)
x = x+1
That would set area[0] = to region001, then add one to each (area[1], region002).
As stated in my first post, I understand programming a little, so I am just assuming you can add a string and an int to form a return to the function that is able to be called.
If you set a variable the normal way, using the GUI, and go into the script page, it actually just coded it like area[0] = regionFromId(region001), so I didn't know if I was able to copy and paste that and just change the one number, or even set it up with some weird loop to do it, as described above. (I 'm also pretty sure x=001 is not a valid 'int' number for that, but it was written like that to give a quick, and easy to read, example of what it would be doing).
Thanks for the info,
-nooblark
**Edit**
By skipped basics I mean I am highly confused about maps versus mods, sizes and lag. I finished my first map recently, but I'm not publishing it until I'm 100% confidient it is what I want. I don't want to be another person who uploaded a bad map on battle net that got played and forgotten.
Perhaps someone who feels like answering a few dumb questions with that regard can PM me :)
I want to start off by saying I do not, sadly, know any languages. I am however, familair with 'how' they are written. With that being said:
I want a trigger to fire when a unit enters a region.. but not just one region, 50+ different ones. I assume the easiest way to do this is with a function (such as blizzard's triggering(player, region, unit), but I can't seem to figure out how to do it efficiently (to keep the map size/load small).
Here's an example:
Events:
Unit - Any unit enters (region)
Do actions.
But, because I have a bunch of regions, let's call them Region1-50, the only way I've found to do it is as follows:
Events:
Unit - Any unit enters (Region1)
Unit - Any unit enters (Region2)
Unit - Any unit enters (Region3)
etc
Do actions.
For the latter example, I have a global variable I predefined (50 times, ugh) to an array myArrayRegions[].
In my code, I added a for loop to help save a bunch of triggers, it looks like this:
Events:
Unit - Any unit enters (Region1)
Unit - Any unit enters (Region2)
Unit - Any unit enters (Region3)
etc
Actions:
For i 1 to 50 with increment 1, do actions.
Actions:
if Triggering Region = myArrayRegions[i]
Do actions.
This code sucessfully checks that the unit that entered one of the 50 listed regions is equal to one of the regions listed, then executes the code. I scripted it like this, because I thought it would be more efficient than writing 50 triggers (one for each region)
Which brings me to my problem..
I would love a function that I can use for this map (and any other ones I make), that assigns the variables' values. i.e
for i 1 to 50 with increment 1
myArrayRegions[i] = RegionFromId(i); //assuming I know the specific region Id, and can edit them to be incremental of eachother.
That should declare my array to all the regions for me. With two simple for loops, one declaring my variables in the array, and one checking if they are equal to a triggered region, I would save a lot of triggers.
I'm also all ears to find another way to do actions when a unit may enter a large quanity of regions.
I hope this makes sense, and I hope someone else finds this useful.
Thanks in advance,
-nooblark
**EDIT**
I would ideally love a function that sets my variables with a loop.
A bonus would be some way of calling that array (with all its values ( [1] - [50] ), as one event.
0
Hey guys,
I recently finished my first map (though I'm thinking of tweaking it a little, or a lot, before it is published).
Breif history:
If you were given a game, such as bunker wars, zone control, (unit)arena, it's very hard as a map maker to find balance. I played a bunker wars the other day (where you can pick 3 units out of a bunch). I went zealot, collusus, marine. I killed two people, and would have easily won the game, but while I was away from my bunker, I was killed by someone who went marine/marine/marine.. I would have easily killed him in a fight, and took his bunker out.
Now while the above example is my mistake (I guess my strategy was bad?), I feel as though that should not happen.
Now the poll.
Given one of the listed game types above, to help keep balance, using 'one' unit for each player (everyone has marine, everyone has X), would you rather see:
1. Pick one:
a). Incorperate a bunch of maps into one (ie.) One 'Arena' map that has a choice (majority rule) of the unit type used (marines/ghost/marauders/etc)
b.) Individual maps for each (ie.) One map for "Marine Arena"; One map for "Ghost" Arena.
2. Why did you pick option (a) or (b).
My answer:
1. B.
2. I want to say if I join a game, I want to know what it is going to be. To play an Arena game with a unit you don't want to play with, can be agitating, promoting people to join and leave if they do not get what they wanted.
I did however want to vote A, because I feel as though it would be a cool map. Even if I join the same map over and over (with an expecation of a certain play style), I would get a different game each time, and my vote would help contribute to the type I'd want to see.
0
I'm making another reply, since this is another question, and I feel like the questions keep getting lost in my understanding/questioning examples/paragraphs.
Is it bad to have a trigger for unit enter region for any spot on the map? I feel like the trigger would be called too many times (though it may get called, it won't neccesarily perform actions (depending on the conditions/etc)).
0
Quote from Shawn91210:
I highly suggest that you go onto sc2mapster's IRC channel. (Freenode, #sc2mapster)
The easiest way that I could see you doing this is by having all the regions in an array to start. Then you wanna select all the regions, copy-paste into the same exact spot and merge them all into one region. That is to say that you have your 50 regions, then one region that is like all of them combined. In that case, you only have one "Unit Enters Region" action and you can iterate through the array to figure out which one it is.
EDIT:: Also, if this isnt the question you were asking, it might be because I didnt read the whole OP. :)
----
I like that idea! That will help take the 50 events out of my trigger. I think my whole map was made with 8 triggers, and I'm still looking to consolidate them.
The OP was with regards to adding all the regions to the array easily. Instead of doing:
Array[0] = region001
Array[1] = region002
Array[2] = region003
...
Array[49] = region050
to do something like:
Array[i] = RegionFromId(i) //since the code actually is RegionFromId(), I didn't know if it was possible to put a variable combination of string + int to equal region001, region002, etc., rather than typing it 50 times in the initial define process.
0
Quote from hobbidude:
Looks like your part way there. You'll actually not want to use a trigger at all. First you have to assign each of the regions to an integer in a global array in your init trigger; there is no way around this, you have to predefine it. Then instead of using a "unit enters" event and trigger, create a custom action definition that runs a loop everyone once in a while like .1 sec and check if the unit in the region within an integer loop.
----
Thanks for that info. I skipped the very basics of the editor. I'm not sure if creating functions/actions are advanced or basic, but I tried to mess around with creating a new function, but it was a little out of my league. Are there any good tuturials you know of that consists of all the 'advanced' triggering (such as creating own functions/actions/etc.), or even custom scripting (I feel as though the GUI makes doing it more complicated to do that stuff)?
I understand I have to predefine everything too, but I was wondering if there was a faster way, such as setting a loop like this:
Variable: x=001
Variable: area[] = array of regions
For (var i=0; i < 50; i++)
area[i] = regionFromId('region' + x)
x = x+1
That would set area[0] = to region001, then add one to each (area[1], region002).
As stated in my first post, I understand programming a little, so I am just assuming you can add a string and an int to form a return to the function that is able to be called.
If you set a variable the normal way, using the GUI, and go into the script page, it actually just coded it like area[0] = regionFromId(region001), so I didn't know if I was able to copy and paste that and just change the one number, or even set it up with some weird loop to do it, as described above. (I 'm also pretty sure x=001 is not a valid 'int' number for that, but it was written like that to give a quick, and easy to read, example of what it would be doing).
Thanks for the info,
-nooblark
**Edit**
By skipped basics I mean I am highly confused about maps versus mods, sizes and lag. I finished my first map recently, but I'm not publishing it until I'm 100% confidient it is what I want. I don't want to be another person who uploaded a bad map on battle net that got played and forgotten.
Perhaps someone who feels like answering a few dumb questions with that regard can PM me :)
0
Hey guys,
I want to start off by saying I do not, sadly, know any languages. I am however, familair with 'how' they are written. With that being said:
I want a trigger to fire when a unit enters a region.. but not just one region, 50+ different ones. I assume the easiest way to do this is with a function (such as blizzard's triggering(player, region, unit), but I can't seem to figure out how to do it efficiently (to keep the map size/load small).
Here's an example:
Events:
Unit - Any unit enters (region)
Do actions.
But, because I have a bunch of regions, let's call them Region1-50, the only way I've found to do it is as follows:
Events:
Unit - Any unit enters (Region1)
Unit - Any unit enters (Region2)
Unit - Any unit enters (Region3)
etc
Do actions.
For the latter example, I have a global variable I predefined (50 times, ugh) to an array myArrayRegions[].
In my code, I added a for loop to help save a bunch of triggers, it looks like this:
Events:
Unit - Any unit enters (Region1)
Unit - Any unit enters (Region2)
Unit - Any unit enters (Region3)
etc
Actions:
For i 1 to 50 with increment 1, do actions.
Actions:
if Triggering Region = myArrayRegions[i]
Do actions.
This code sucessfully checks that the unit that entered one of the 50 listed regions is equal to one of the regions listed, then executes the code. I scripted it like this, because I thought it would be more efficient than writing 50 triggers (one for each region)
Which brings me to my problem..
I would love a function that I can use for this map (and any other ones I make), that assigns the variables' values. i.e
for i 1 to 50 with increment 1
myArrayRegions[i] = RegionFromId(i); //assuming I know the specific region Id, and can edit them to be incremental of eachother.
That should declare my array to all the regions for me. With two simple for loops, one declaring my variables in the array, and one checking if they are equal to a triggered region, I would save a lot of triggers.
I'm also all ears to find another way to do actions when a unit may enter a large quanity of regions.
I hope this makes sense, and I hope someone else finds this useful.
Thanks in advance,
-nooblark
**EDIT**
I would ideally love a function that sets my variables with a loop.
A bonus would be some way of calling that array (with all its values ( [1] - [50] ), as one event.