• 0

    posted a message on Scaled Patrol

    I have not saved this as a library. I suppose you could call it a work in progress.
    For the map that I submitted to the contest, I had created a trigger that would create patrols for me, which I had originally intended to work into other parts of the map. When I was working on another map today, I realized that I wanted this trigger, and then that others might find use for it as well.

    What it does:
    Spawn a unit that has a veterancy level scaled to the player, as well as optionally changing the number of spawned units based on the level of the player (currently +1 every 2 levels)

    What it should do / was planned to do, but does not do:
    Originally, I had intended for this to be rolled in to "every time an enemy creates a unit, do this trigger to it" kinda deal, but I never got around to it.
    Also, write a trigger that fires when the player gains a level, and award extra exp to certain units.
    Also, rewrite the debug patrol into a function that gets passed a unit type. This would actually be relatively easy, but Zerglings made just fine patrols :P
    Finally, I wanted to incorporate it into a periodic that would basically slowly populate an area with patrols, wiping out old ones, and replacing them with new ones, to have some variation in unit levels.

    What you need to know:
    There is an effect which adds XP, which this thing calls. I wound up with too much lag when using it at 1exp that I changed it to 10, since all of my level experience points were in multiples of 10 anyway. There is a library a few posts down for giving XP through triggers that will do an even better job, I only didn't include it because I was on a bit of a purity kick with the map.

    Finally, the code:

    Patrols
        Events
            Game - Player Any Player types a chat message containing "patrol", matching Exactly
        Local Variables
            Zerglings To Spawn = (10 + (Stack count of Protag_Veterancy on Protaganist[1])) <Integer>
            empty variable 1 = 0 <Integer>
            empty variable 2 = 0 <Integer>
            EXPtoGive = 0 <Integer>
        Conditions
        Actions
            General - For each integer empty variable 1 from 1 to ((Experience level of Protaganist[1]) - 1) with increment 1, do (Actions)
                Actions
                    Variable - Set EXPtoGive = (EXPtoGive + (50 * empty variable 1))
            Variable - Set EXPtoGive = (EXPtoGive / 10)
            General - For each integer empty variable 1 from 1 to Zerglings To Spawn with increment 1, do (Actions)
                Actions
                    Unit - Create 1 Zergling for player 15 at (Random point in Patrol Zone 1 between 5.0 and 50.0 distance from enemy units of player 15 (prefer points within 10.0 of an enemy building)) using default facing (No Options)
                    AI - Enable script control for (Last created units)
                    Unit - Order all units in (Last created units) to ( Patrol targeting (Random point in (Region((Position of (Last created unit)), 10.0)))) (Replace Existing Orders)
                    Unit - Add 1 Protag_Veterancy to (Last created unit) from Protaganist[1]
                    Unit - Add 1 Strength to (Last created unit) from Protaganist[1]
                    Unit - Add 1 Agility to (Last created unit) from Protaganist[1]
                    Unit - Add 1 Intellect to (Last created unit) from Protaganist[1]
                    General - For each integer empty variable 2 from 1 to EXPtoGive with increment 1, do (Actions)
                        Actions
                            Environment - Execute Give 10 EXP on (Last created unit) from (Last created unit)
                    Unit - Set (Last created unit) custom value 7 to (Real((Experience level of (Last created unit))))
    
    Posted in: Triggers
  • 0

    posted a message on Swoop

    It seems like I'm missing something very simple. Therefore, I bump again.

    Posted in: Data
  • 0

    posted a message on Items with Requirements

    My workaround to check equipping was to have two inventories, one for "equipped" items (Inventory 1), and one for carrying items (Inventory 2).
    Then I just ran this:
    (Inventory Container of (Triggering inventory item)) == 1

    But honestly, I think one of the alternate inventory systems should be able to handle this. At this point, it's easier to try to tweak one of them or write your own than try to work with what Blizzard left us.

    Posted in: Data
  • 0

    posted a message on Three-Headed Hydra

    So...still no idea how to roll a unit or properly rotate an alternative-axis turret?

    Posted in: Data
  • 0

    posted a message on Swoop

    Still haven't worked it out :/

    Posted in: Data
  • 0

    posted a message on The Elite Forces of Raynor's Raiders
    Quote from Mienk: Go

    I want to do LoS in a cone style similar to what they did in Commandos but I'm not sure how to do that yet, nor am I sure how to let the players know what is in a specific unit's LoS.

    You should be able to use a "search area" effect. I keep duplicating the mothership's cloak field. By narrowing the radius on that, it should be the first step in what you're trying to accomplish.
    As for displaying the cone, there's an event in actors for "selected", you may be able to use that to draw the "flashlight".

    A random little idea passed through my head of the team being assigned to a Zerg base on one of the missions, and the spy mentioning something about sneaking around being difficult, and the scientist says "Well, we did capture this.", pulling back a curtain to reveal a changeling on a slab, and the spy going into a fit about having to wear it.

    Anyway, I could help some with triggers or data if you get stumped. I'm not really up for being part of the team, but I'll help where I can, maybe work out a puzzle or two for you if you need.

    Posted in: Team Recruitment
  • 0

    posted a message on Swoop

    Please to bumping.

    Posted in: Data
  • 0

    posted a message on Swoop

    This is probably far too easy, but I can't get it to work right.

    I have an ability that applies a behavior to a unit (Ability -> Effect Apply Behavior), and tried to tweak it so that it looked like the Air unit applying the ability was swooping down to apply it. it looks like this now:

    Ability -> Effect (Set)
    Effect (Set) -> Effect "Swoop Down", Effect (Create Persistent)
    Effect "Swoop Down": Height = -3 over 3 seconds
    Effect (Create Persistent) [which is probably where my problems are]: 
         Initial: Apply Behavior [ability never gets applied to target, likely because persistent is not conveying target]
         Expire: "Swoop Up"
         Expire Delay: 3
    
    Posted in: Data
  • 0

    posted a message on Three-Headed Hydra

    Hit things with a fresh head this morning and made some progress.
    I took turret rotation code from a test map made by s3rius, and have been attempting to adapt it.

    rotate
        Events
            Game - Player Any Player types a chat message containing "rotate", matching Exactly
        Local Variables
            c = 0.0 <Real[3]>
            f = 0.0 <Real>
            myUnit = No Unit <Unit>
            turret_actor = No Actor <Actor>
        Conditions
        Actions
            Variable - Set myUnit = Boss 1 -  Three-Headed Hydra [48.90, 17.90]
            Variable - Set turret_actor = (Actor connected to (Actor for myUnit) via reference "::global.HydraTurretBody")
            General - Custom Script:
                    lv_c[0]=PointGetX(UnitGetPosition(lv_myUnit));
                    lv_c[1]=PointGetY(UnitGetPosition(lv_myUnit));
                    lv_c[2]=8.5;
                    lv_f+=0.02;
                    if (lv_f>1){
                        lv_f=-1;
                    }
                    ActorSend(lv_turret_actor, "AttachSetRotation {TurretZ 0} -0.707107,"+FixedToString(lv_f,6)+",-0.000000");
                    ActorSend(lv_turret_actor, "AttachSetPosition {TurretZ 0} "+FixedToString(lv_c[0],6)+","+FixedToString(lv_c[1],6)+","+FixedToString(lv_c[2],6));
    

    So, pre-rotate, things currently look like this:
    http://dl.dropbox.com/u/10363853/worstcompassroseever.jpg
    Notice that the hydralisk, it's attached (oversized for visual ease) "head", the top of the photon cannon turret actor, and the regular unit (drone) are all facing south.

    The actors for that look a little like this:
    http://dl.dropbox.com/u/10363853/HydraActors.jpg

    And the result after rotating looks like this:
    http://dl.dropbox.com/u/10363853/noball.jpg
    Meaning that something is definitely wrong with the numbers I poorly tried to plug in for rotation. My first guess would be the unit coordinates, but since the turret actor is attached to the unit at the origin, I would think X,Y,Z coordinates would be the same for each...but I guess the turret head isn't at the origin anymore, since it's not "on top" of the turret, but rather "in front" of it (pointing southwards instead of upwards).
    But this is just a theory, and I'm not sure what else has to be altered to compensate for changing the axis of rotation.

    Posted in: Data
  • 0

    posted a message on Three-Headed Hydra

    I did a re-scouring of ProzaicMuse's tutorials, created a turret, and successfully got the hydralisk to attach to a turret that would theoretically allow it to rotate along that axis. I then tried copying some code found around sc2mapster to rotate the turret, but have had no luck implementing it.

    I'm not even 100% sure that I'm trying to rotate the right actor.
    I have the unit, which has a Turret Body (type: model) attached to it, there's an actor type turret that uses that, and a model attached to the head of the turret. All of this is more or less copy-pasted from ProzaicMuse's Uberlisk tutorial, verified on turret tutorials, etc.

    Posted in: Data
  • 0

    posted a message on Three-Headed Hydra

    Okay, so there are no attachment points on the hydralisk (and I'm guessing most models) which point backwards (changing the "up" of the attachment point would change the axis of rotation).
    If I could get a turret properly attached that had it's "up" changed to "backward", this could be pulled off, but I have been unsuccessful in changing facing direction.

    Posted in: Data
  • 0

    posted a message on Three-Headed Hydra

    Yes, I have played around with that, to no avail :(

    Posted in: Data
  • 0

    posted a message on Three-Headed Hydra

    I'm trying to create a three-headed hydra using data editor. At this point, it would have been faster to $%&# open max and do it that way. My thinking was to have the base model, and have two other models, scaled down and rotated by about 15 or so degrees.

    APPARENTLY models can be rotated via pitch and yaw (z and x axis, I think), but blizzard has some sort of hatred of barrel rolls, because rotating roll is impossible [source: http://forums.sc2mapster.com/development/map-development/902-rotating-units-around-x-or-y-axis/]. And, if that citation is correct, has been impossible since beta with no resolution.

    So, I tried to get around that and use turrets to rotate stuff. In addition to being too retarded to get the attachments to work right, I've yet to figure out how to get the turret to change by roll instead of yaw.

    So. Three-Headed Hydra. Anyone?

    Posted in: Data
  • 0

    posted a message on [Tutorial] Lagless WASD System using Data Editor

    !$%^, I thought I had something.
    I added "Disable Ability" to the behaviors, so that while moving down, one could not hit "down".
    You could still hold the key, of course, and continue moving in the same direction.
    Diagonal movement is then possible, BUT you have to hit (start pressing) both keys at the same time.
    Hit W+D, move up-right in an effed-up back-and-forth (like programer said, could probly be resolved with a combine validator).
    Hold W, move up. Still holding W, hit D, moves up :(
    Why will command card detect both buttons if I hit them at the same time, but not one after the other? :(< Maybe there's a sneaky trick around this?

    Also, just curious, undoubtedly stupid question, but there's absolutely nothing for a data based mouselook, right?

    Posted in: Tutorials
  • 0

    posted a message on [Models] Possible to convert HL2 Models?

    You'll need to open the model in something that exports to m3. As far as I know, that's either limited to, or best done in 3dsmax.
    HL2 models are typically done in 3dsmax. For more information on how to open / import the model in it, the Facepunch forums (official Garrysmod forums) are the best place to look. I'm feeling lucky got this:
    http://www.facepunch.com/showthread.php?t=504301

    Once you have the file open in 3dsmax, you'll need to use the m3 plugins to export it:
    http://forums.sc2mapster.com/resources/tutorials/4431-misc-converting-eve-online-models-for-sc2/#p8

    But bear in mind that Starcraft uses explicit names for its animations (Walk, Stand, Attack), so each animation will need to be renamed. I honestly don't know enough about SC2 modeling to know if bones make any difference....
    But it's going to be a fairly large job per model, something you'd probably want to try to find a modeling guy to do.

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