Well, this is a hasty solution to your problem, but have you considered duplicating the barracks?
I.E:
Barracks Type 1 can only produce marines
Barracks Type 2 can only produce marauders
etc...
And then you change the barracks according to which players owns it. If it's player 1, then you replace the building with a Type 1, if it's player 2, well you get the point !
Hmmm, strange that the 'move unit' didn't change anything. Is your barrack of Unit type 'Barracks' or did you change the name? If you changed it, well you would have to adjust the condition.
And did you try decreasing the offset instead of adding to it ? I mean, i gave you the move code with +1 offsets but by the look of your screenshots, you would need to substract at least 3.0 (or more!) on the X axis:
Also, where do you define your 'Spawn Location' Array? Would it have any reason to be modified in any of your triggers, hence resulting in the sliding of your barrack?
Well, I guess you checked, but are the fields 'Pathing Footprint - Placement' the same for both barracks and forge? Should be Footprint 3x3
If yes, I'm afraid I am at loss as to why you have this sliding barrack! It might be due to an attachment point but I don't know how or where to change it :S
Anyway, if you are not against dirty coding, you can always shift the barrack manually after your creation with the following:
Could you provide the code you use?
I can't reproduce your problem, so I can't really try to fix it.
My thought so far would be that your barrack might be created on top of something, then the something is deleted. It would explain why the barrack spawn point is moved, but not why the forge spawn point is not moved :p
I took some time developing a system that would enable on the fly/live cliffs.
I decided to move to another project, but as the results of this one were not so awful, I'm publishing it here so it does no go to waste.
Feel free to rip it apart and use it as you want, and if you do manage to find a better way to do on the live cliff, go ahead and post it :)
I've tried various way for this to work, and this one had the less computation time (Description of the system at the end).
How does it work in game, three abilities:
Raise the cliff, will always create a High Cliff, regardless of what is already there)
Lower the cliff, will always create a Low Cliff (read - hole in the ground)
Add a ramp, will scan for its surrounding, and place an access ramp if there's a high or a low cliff
All of the above use actors terrain deformation to create a cliff-like effect.
Units on the ground can not go on the high/low cliffs unless they walk on a ramp first (or find a glitch :) ).
Units on higher grounds will take half damage from units on low grounds (just here as an example behavior, can be modified).
Limitations:
Non-sight effect is not implemented (i.e you can see through a high cliff)
Not bug-free (hey, I'm no expert !)
Ugliness :D
How does it work in triggers (extensive regions management :p):
Each cliff level is linked to a Region plane. Each units has a cliff level stored in a custom value. When a unit leaves a region plane, its location is saved. On entering the next region plane, it's ported back to the saved location if cliff levels of both units and region are not compatible. If it's a ramp, the units can enter the region, and its cliff level is modified to the ramp one. It can then process to walk on the cliff.
Known bugs:
Changing the ground back and forth to high cliffs/low cliffs/ ramp can create some glitches (small gaps), and trap units.
Creating a cliff under some units will not change their cliff levels.
Actor deformation areas do not match the trigger areas perfectly
I am not going to work on the map for at least a week or so, even If I had a great concept based on this particular mechanism. However, if you ever do find some more bugs and limitations, I'll gladly list them in this post !
Firstly, I made a mistake correcting the copy-paste of my code, so it was 125 and not 1250 :p
Secondly you appear to be correct. I took a break, came back to it and added the Top-Right Bound which simplified the visualization.
I was so stuck on a point + size configuration that it didn't cross my mind the parameters could be the two bounding points of the rectangle :p
I have tested all the parameters and shown the region in games with two beacons (one set at the bottom left, the other at the center).
So far I've not been able to understand how it works... Each parameter seems to modify both size radius and position of the region, at the same time !
Here's the code I used for testing (in the game trigger initialization):
The first two parameters of 'Add a Positive rectangle' are the negative X size and the negative Y size of the region you want to place, and then the region is moved to the wanted location. But it's not working properly :p
On the other hand, Add a Positive circle is working wonderfully :S
Anyway if someone finds out what I did wrong, or how to properly use the function, well respond to this thread !
I did some testing, and apparently your initial problem is due to the fact that information (such as Triggering Unit/Player and so on) get lost for the Trigger after a call to Game - Wait.
You can group your last solution into one trigger if you back up everything important before the Wait call.
The following is working perfectly fine:
UnitDiesEventsUnit-AnyUnitdiesLocalVariablesType=NoGameLink<GameLink-Unit>Player=0<Integer>Point=NoPoint<Point>ConditionsActionsVariable-SetPoint=(Positionof(Triggeringunit))Variable-SetPlayer=(Triggeringplayer)Variable-SetType=(Unittypeof(Triggeringunit))General-Wait2.0GameTimesecondsUnit-Create1TypeforplayerPlayeratPointfacing270.0degrees(NoOptions)UI-Display"BACK FROM THE DEAD"for(Allplayers)toSubtitlearea
p.s: Owner of (Triggering unit) is actually Triggering Player :p
They are actually quite a bunch of flash games using this principle, here is the list I know about:
Nanowar (1 & 2)
Phagewar (1, 2 & 3)
Starbaron
Civilization wars
I love those kind of games, and it's actually great someone took the time to implement it in SC2! And with the multiplayer, it should be wonderful!
However, in my opinion, Civilization wars was one of the worst among the above games, for one main reason: The selection system.
It was painful to group more than one city/blob and send them together. I never got myself to pass more than the first levels because of that (and I finished all the other games, even Phagewar which used a similar selection system but in less annoying).
So I re-watched the video thinking of this particular point and couldn't help but notice you never do a rectangle multi-selection :p
The quality isn't that great and you can't really see this part of the gameplay but here are a few ideas (if it isn't done already ! ):
- Enable a clear use of the rectangle multiselection
- Use of the SC2 grouping system (ctrl + number groups)
Anyway keep up the good work, it's still pretty impressive :)
Damn, you are right :p
And I used to do that for one of my first projects, and I then forgot about it, and now it would actually clear some coding in one of my new map (Where I have a bunch of Timer expires Triggers).
I knew something was not so right about writing all those triggers, but hey, I must be sleep deprived ;D
That should do what you want, balance the variable X for each difficulty setting and you are done :) It's totally random though, so it's not guaranteed the placement would be well done.
Another solution could be to place the rocks at predefined points, but that's up to you!
0
@Azkit: Go
Well, this is a hasty solution to your problem, but have you considered duplicating the barracks? I.E:
And then you change the barracks according to which players owns it. If it's player 1, then you replace the building with a Type 1, if it's player 2, well you get the point !
0
@Fullachain: Go
Hmmm, strange that the 'move unit' didn't change anything. Is your barrack of Unit type 'Barracks' or did you change the name? If you changed it, well you would have to adjust the condition.
And did you try decreasing the offset instead of adding to it ? I mean, i gave you the move code with +1 offsets but by the look of your screenshots, you would need to substract at least 3.0 (or more!) on the X axis:
Also, where do you define your 'Spawn Location' Array? Would it have any reason to be modified in any of your triggers, hence resulting in the sliding of your barrack?
0
@Fullachain: Go
Well, I guess you checked, but are the fields 'Pathing Footprint - Placement' the same for both barracks and forge? Should be Footprint 3x3
If yes, I'm afraid I am at loss as to why you have this sliding barrack! It might be due to an attachment point but I don't know how or where to change it :S
Anyway, if you are not against dirty coding, you can always shift the barrack manually after your creation with the following:
Adjust the offsets to whatever suits your need!
0
@Fullachain: Go
Could you provide the code you use? I can't reproduce your problem, so I can't really try to fix it.
My thought so far would be that your barrack might be created on top of something, then the something is deleted. It would explain why the barrack spawn point is moved, but not why the forge spawn point is not moved :p
0
Hi everyone,
I took some time developing a system that would enable on the fly/live cliffs. I decided to move to another project, but as the results of this one were not so awful, I'm publishing it here so it does no go to waste.
Feel free to rip it apart and use it as you want, and if you do manage to find a better way to do on the live cliff, go ahead and post it :)
I've tried various way for this to work, and this one had the less computation time (Description of the system at the end).
How does it work in game, three abilities:
All of the above use actors terrain deformation to create a cliff-like effect.
Units on the ground can not go on the high/low cliffs unless they walk on a ramp first (or find a glitch :) ). Units on higher grounds will take half damage from units on low grounds (just here as an example behavior, can be modified).
Limitations:
How does it work in triggers (extensive regions management :p):
Each cliff level is linked to a Region plane. Each units has a cliff level stored in a custom value. When a unit leaves a region plane, its location is saved. On entering the next region plane, it's ported back to the saved location if cliff levels of both units and region are not compatible. If it's a ramp, the units can enter the region, and its cliff level is modified to the ramp one. It can then process to walk on the cliff.
Known bugs:
I am not going to work on the map for at least a week or so, even If I had a great concept based on this particular mechanism. However, if you ever do find some more bugs and limitations, I'll gladly list them in this post !
Here's the link to the map.
0
@Sublimity: Go
Firstly, I made a mistake correcting the copy-paste of my code, so it was 125 and not 1250 :p
Secondly you appear to be correct. I took a break, came back to it and added the Top-Right Bound which simplified the visualization. I was so stuck on a point + size configuration that it didn't cross my mind the parameters could be the two bounding points of the rectangle :p
Thanks for the fresh input !
0
Ok, I can't figure out how this thing is working:
I have tested all the parameters and shown the region in games with two beacons (one set at the bottom left, the other at the center). So far I've not been able to understand how it works... Each parameter seems to modify both size radius and position of the region, at the same time !
Here's the code I used for testing (in the game trigger initialization):
I thought I had found work around to place a rectangular region correctly:
The first two parameters of 'Add a Positive rectangle' are the negative X size and the negative Y size of the region you want to place, and then the region is moved to the wanted location. But it's not working properly :p
On the other hand, Add a Positive circle is working wonderfully :S
Anyway if someone finds out what I did wrong, or how to properly use the function, well respond to this thread !
0
@7MM3: Go
It doesn't change much in the script and I am way too used to declare first, then initialize :) But hey, thanks anyway !
(and Owner of (Triggering unit) is Triggering Player, damn it ! :D)
0
@Aztron: Go
Replace Frenzy by your spell, and change the value of Y, and you should be good to go (Unless I misunderstood you totally, of course ;D)
0
@senatorsfc: Go
I did some testing, and apparently your initial problem is due to the fact that information (such as Triggering Unit/Player and so on) get lost for the Trigger after a call to Game - Wait.
You can group your last solution into one trigger if you back up everything important before the Wait call.
The following is working perfectly fine:
p.s: Owner of (Triggering unit) is actually Triggering Player :p
0
They are actually quite a bunch of flash games using this principle, here is the list I know about:
I love those kind of games, and it's actually great someone took the time to implement it in SC2! And with the multiplayer, it should be wonderful!
However, in my opinion, Civilization wars was one of the worst among the above games, for one main reason: The selection system. It was painful to group more than one city/blob and send them together. I never got myself to pass more than the first levels because of that (and I finished all the other games, even Phagewar which used a similar selection system but in less annoying).
So I re-watched the video thinking of this particular point and couldn't help but notice you never do a rectangle multi-selection :p The quality isn't that great and you can't really see this part of the gameplay but here are a few ideas (if it isn't done already ! ):
- Enable a clear use of the rectangle multiselection
- Use of the SC2 grouping system (ctrl + number groups)
Anyway keep up the good work, it's still pretty impressive :)
0
@SquarelyCircle: Go
Damn, you are right :p And I used to do that for one of my first projects, and I then forgot about it, and now it would actually clear some coding in one of my new map (Where I have a bunch of Timer expires Triggers). I knew something was not so right about writing all those triggers, but hey, I must be sleep deprived ;D
Thanks for pointing that out !
0
@RogueSniper: Go
It might be better to use triggers based on the 'Player Property changes' Event.
Example for Player 1:
And then you would have to create some more triggers for additional players, but I guess it will be less laggy on bnet than a 0.2sec timer :p
Oh and don't forget to add a spawning point in the editor (Layer -> Point).
And as ErrorAsh said, the OneTwoSC tutorials are great !
0
@progammer: Go
you're right, my bad for not actually testing it on a map :)
0
@Jrad3412: Go
That should do what you want, balance the variable X for each difficulty setting and you are done :) It's totally random though, so it's not guaranteed the placement would be well done.
Another solution could be to place the rocks at predefined points, but that's up to you!