Well, in the first set of actions, s3rius has set each index of an array called 'locations' to six different integers which represents the six possible spawn locations (these index values will have to matched to the spawn regions later on).
He then proceeds through the list of players (well, players numbered 0 to 5) and picks a random number to choose the value of one of the indexed locations. If the index number has a value of -1 (i.e. it does not match the previously defined value of the index stored in locations array, we will see how this can happen in a minute), it picks a new random number. The computer will keep picking a new random number until it finds a valid array index value.
Once we have the value for a spawn location, it assigns this number to the player array (which will be used to tell the computer where the player should be spawned at). s3rius then set the value of this location index to -1, so this spawn location can't be used again.
I don't have the editor available to me atm, so I haven't be able to check the test map, but you will need to link the values of the indexes of the player array to the spawn locations, and include a spawn unit action as well, like:
For each integer 0 to 5
Create unit (for player [picked integer] at point (center of region, location [player (picked integer)])
Patience and practice are the best way to learn how to use the editor. Pull apart one of Blizzard's campaign maps where you remember seeing something you would like to replicate to see how they did it. There are also plenty of tutorials around on the trigger editor basics, have a look around ;)
The unit is called a drop pod and it's created by a trigger called "create drop pod" (or some variation on that name, I can't quite remember off the top of my head :P). The trigger is only available if you have the campaign dependencies enabled. In the options list for the trigger you can select either a Zerg or Terran drop pod model. Hope that helps :)
The trigger you laid out is reasonable. Create a changeling "disguise" unit in the data editor with the stats / abilities you want, then use the trigger to switch the units. What more do you want to know? :P
Just be careful, nested for loops are VERY inefficient, code wise. See http://forums.sc2mapster.com/development/map-development/11071-a-warning-to-mapmakers/ for details. I did hear that someone did write some new code to handle it, but I can't remember where it was posted. It might be an idea to look for it if you'll be using a number of nested for loops.
0
Are you sure that the action isn't being fired multiple times by mistake?
0
I'd say its a built in behaviour for the camera. I'm not sure if it can be changed, but hopeful someone will be able to help you out :)
0
@Chairmang: Go
Well, in the first set of actions, s3rius has set each index of an array called 'locations' to six different integers which represents the six possible spawn locations (these index values will have to matched to the spawn regions later on).
He then proceeds through the list of players (well, players numbered 0 to 5) and picks a random number to choose the value of one of the indexed locations. If the index number has a value of -1 (i.e. it does not match the previously defined value of the index stored in locations array, we will see how this can happen in a minute), it picks a new random number. The computer will keep picking a new random number until it finds a valid array index value.
Once we have the value for a spawn location, it assigns this number to the player array (which will be used to tell the computer where the player should be spawned at). s3rius then set the value of this location index to -1, so this spawn location can't be used again.
I don't have the editor available to me atm, so I haven't be able to check the test map, but you will need to link the values of the indexes of the player array to the spawn locations, and include a spawn unit action as well, like:
For each integer 0 to 5 Create unit (for player [picked integer] at point (center of region, location [player (picked integer)])
Hope that clears it up a little :)
0
To start, probably worth having a look in here under "Trigger editing - Camera and Cinematics" http://wiki.sc2mapster.com/galaxy/tutorials/
Good luck :)
0
Patience and practice are the best way to learn how to use the editor. Pull apart one of Blizzard's campaign maps where you remember seeing something you would like to replicate to see how they did it. There are also plenty of tutorials around on the trigger editor basics, have a look around ;)
Tutorial list: http://wiki.sc2mapster.com/galaxy/tutorials/
0
Cool, it'll be interesting to see the ideas everyone comes up with. Hopefully they'll be some nicely original ones in the mix.
0
@dre__: Go
No probs ;)
@Berrala: Go
You could include a "clear animation" on the first or second line of the trigger, to get rid of the attack animation.
0
The unit is called a drop pod and it's created by a trigger called "create drop pod" (or some variation on that name, I can't quite remember off the top of my head :P). The trigger is only available if you have the campaign dependencies enabled. In the options list for the trigger you can select either a Zerg or Terran drop pod model. Hope that helps :)
0
The trigger you laid out is reasonable. Create a changeling "disguise" unit in the data editor with the stats / abilities you want, then use the trigger to switch the units. What more do you want to know? :P
Have a look here, some guys have been working on a changeling based game: http://forums.sc2mapster.com/general/team-recruitment/4397-changeling-rpg-recruiting-team-members/
0
Just be careful, nested for loops are VERY inefficient, code wise. See http://forums.sc2mapster.com/development/map-development/11071-a-warning-to-mapmakers/ for details. I did hear that someone did write some new code to handle it, but I can't remember where it was posted. It might be an idea to look for it if you'll be using a number of nested for loops.
0
Yeah, you typically need to use conditions to refine an event trigger, although this isn't always the case. It depends on the event trigger you use.
0
Ok, got it working by using a couple of triggers. See what you guys think.
0
@Salmon85: Go
Ooh, nice! I've been looking for this for some time :D
0
I haven't tried it, but wouldn't a trigger with "Event: ability is used" and "Action: play animation - walk" work?
0
@DivinoZarathos: Go
To check for abilities: http://wiki.sc2mapster.com/galaxy/triggers/ability-count-for-player/ (Returns 0 if false, effectively)
To check for upgrades: http://wiki.sc2mapster.com/galaxy/triggers/upgrade-count-for-player/ (Returns 0 if false, effectively)
To check for behaviours: http://wiki.sc2mapster.com/galaxy/triggers/unit-has-behavior/ (Boolean, so returns 'true' if true)