• 0

    posted a message on Different Abilities for Different Players from a Single Structure

    @Azkit: Go

    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 !

    Posted in: Miscellaneous Development
  • 0

    posted a message on Building Placement - Anywhere?

    @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:

    General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Unit type of (Last created unit)) == YourBarrackType
                Then
                    Unit - Move (Last created unit) instantly to (Point(((X of (Position of (Last created unit))) - 3.0), ((Y of (Position of (Last created unit))) - 1.0))) (No Blend)
                Else
    

    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?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Building Placement - Anywhere?

    @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:

            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Unit type of (Last created unit)) == Barracks
                Then
                    Unit - Move (Last created unit) instantly to (Point(((X of (Position of (Last created unit))) + 1.0), ((Y of (Position of (Last created unit))) + 1.0))) (No Blend)
                Else
    

    Adjust the offsets to whatever suits your need!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Building Placement - Anywhere?

    @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

    Posted in: Miscellaneous Development
  • 0

    posted a message on On the fly (fake) cliff

    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:

    1. Raise the cliff, will always create a High Cliff, regardless of what is already there)
    2. Lower the cliff, will always create a Low Cliff (read - hole in the ground)
    3. 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 !

    Here's the link to the map.

    Posted in: Project Workplace
  • 0

    posted a message on [solved] Region - Add a Positive Rectangle

    @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 !

    Posted in: Galaxy Scripting
  • 0

    posted a message on [solved] Region - Add a Positive Rectangle

    Ok, I can't figure out how this thing is working:

    Region - Add a Positive Rectangle
    

    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):

        Local Variables
            testregion = (Empty region) <Region>
        Actions
            Region - Add a Positive rectangle (120, 120, 125,125) to testregion
            Unit - Create 1 Beacon (Zerg Small) for player 0 at (Center of testregion) facing 270.0 degrees (Ignore Placement)
            Unit - Create 1 Beacon (Terran Small) for player 0 at (Bottom-left of testregion bounds) facing 270.0 degrees (Ignore Placement)
    

    I thought I had found work around to place a rectangular region correctly:

            Region - Add a Positive rectangle (-3.0, -3.0, 0.0, 0.0) to testregion
            Region - Move testregion to (Point(110.0, 125.0))
    

    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 !

    Posted in: Galaxy Scripting
  • 0

    posted a message on Help Respawning heroes [code included]

    @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)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Damaging an unit in a trigger

    @Aztron: Go

    Frenzy Cast
        Events
            Unit - Any Unit uses  Frenzy at Generic6 - Complete stage (Ignore shared abilities)
        Local Variables
            Y = 10.0 <Real>
        Conditions
        Actions
            Unit - Set (Triggering ability target unit) Life to (((Triggering ability target unit) Life (Current)) - Y)
    

    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)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Help Respawning heroes [code included]

    @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:

    Unit Dies
        Events
            Unit - Any Unit dies
        Local Variables
            Type = No Game Link <Game Link - Unit>
            Player = 0 <Integer>
            Point = No Point <Point>
        Conditions
        Actions
            Variable - Set Point = (Position of (Triggering unit))
            Variable - Set Player = (Triggering player)
            Variable - Set Type = (Unit type of (Triggering unit))
            General - Wait 2.0 Game Time seconds
            Unit - Create 1 Type for player Player at Point facing 270.0 degrees (No Options)
            UI - Display "BACK FROM THE DEAD" for (All players) to Subtitle area
    

    p.s: Owner of (Triggering unit) is actually Triggering Player :p

    Posted in: Miscellaneous Development
  • 0

    posted a message on Civilization Wars

    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 :)

    Posted in: Project Workplace
  • 0

    posted a message on If-Then Scripting Help

    @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 !

    Posted in: Galaxy Scripting
  • 0

    posted a message on If-Then Scripting Help

    @RogueSniper: Go

    It might be better to use triggers based on the 'Player Property changes' Event.

    Example for Player 1:

    Moar Troops  Trigger
        Events
            Player - Player 1 Minerals changes 
        Local Variables
        Conditions
            (Player (Triggering player) Minerals) >= 10
        Actions
            Unit - Create 1 Marine for player (Triggering player) at MADNESS SPAWNING POINT facing 270.0 degrees (No Options)
            Player - Modify player (Triggering player) Minerals: Subtract 10
    

    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 !

    Posted in: Galaxy Scripting
  • 0

    posted a message on Generating random terrain

    @progammer: Go

    you're right, my bad for not actually testing it on a map :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Generating random terrain

    @Jrad3412: Go

     Unit - Create X Braxis Alpha - Destructible Debris (1x1) for player 1 at (Random point in Region) facing 270.0 degrees (No Options)
    

    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!

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.