• 0

    posted a message on 3D Space simulation / shooter

    That's pretty legit

    Posted in: Project Workplace
  • 0

    posted a message on Galaxy requires CRLF line endings?

    I believe Blizzard does most of their development in a windows environment, so they just natively expect crlf. I wouldn't be surprised if this changes due to their statement that they intend to get the editor working in the mac environment

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Maximum units on map

    There is not technical limit. WC3 had a system where it would prioritize pathfinding for each unit, so that when you had more units then what you could process in a frame, units waited until the processor could handle their pathfinding code. Initially, this didn't matter as graphics capabilities were far behind pathfinding capabilities, but, now WC3 renders pretty quickly with an 8800.

    Right now, we are at that point with sc2 where pathfinding code is faster than graphics processing. It starts to visually lag before we have any problems with pathfinding, making the frames take more time anyway. Granted, this limit is 1000+ units on my computer, and my friends is close to 2000 units or more.

    Simply, without a supercomputer, I don't think we can hit the limit yet.

    Posted in: General Chat
  • 0

    posted a message on No trigger on item pickup

    There is no way to event for items being picked up or equiped. This is highly annoying as I want to add/remove behaviors on items that are in the inventory

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Behaviors on unit-items stay when item is in inventory

    Here is an odd bug. When you pick up an item off the ground, and it has a behavior on it, that behavior remains in effect while the item is in your inventory.

    For example, if you give an item a timed life of 60 seconds, after 60 seconds, that item will die. There seems to be no way to remove a behavior when it goes into your inventory.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [Trigger] 3rd Person Movement

    @SupDood: Go

    You still have the issue where the camera pans when you rotate it, Which is what I limited with the restricting camera bounds. I guess it's just a bug that blizzard has to fix.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] 3rd Person Movement

    @SupDood: Go

    Do you have an example map of this? I'd like to see how you did it.

    Quote from Robeezy: Go

    Great tutorial! I still got one question though. When you want to attack and you keep clicking the mouse button it just does the animation over before letting the previous one finish.

    How to solve this?

    Another thing, if I remove the Attack button it will run away when hit.

    The running away is a default behavior of an idle unit. Fixing that was beyond the scope of the tutorial, but you have to go into the data editor and clear that behavior. As for waiting for the animation to finish, there is no way to get the time of the animation or whether or not the model is doing a certain animation, so no. You could, however, look at how long the animation plays, and limit executing that attack trigger until the animation time has passed since you last attacked.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] 3rd Person Movement
    Quote from Dystisis: Go

    Yeah, like vrumpt said, this doesn't really work.

    At least, the tutorial is inconclusive. I followed it directly and got a syntax error because of the following line:

    CameraSetBounds(player 1 (Unit group(Player)), CameraView, false);
    

    But this doesn't work as there is no unit group created, I think. Therefore, following the Trigger editor this can't even be done.

    Would love to see a working version.

    The function you need is Player Group from Player(). The trigger text I used is not very clear on this, so I will go through today and fix the 3 instances I turn Players into PlayerGroups.

    The map I made while building this tutorial is linked at the very top of the page, so you can use that to compare.

    Quote from Phil4387: Go

    I see your map has the same problem I posted about here: http://forums.sc2mapster.com/development/map-development/499-camera-pitch-restrictions/

    Have you looked into any sort of solution?

    While there is no built in solution, I know you can get the pitch as a Real, and then clamp it to a certain value. I don't know if you can set the pitch exactly, but, poke around

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] 3rd Person Movement

    @SupDood: Go

    Really? I will try this

    Quote from SupDood: Go

    Great, guide! However, you don't need to set the camera bounds. If you take out "set camera bounds" when you set the camera and in "update camera" "camera follow for player 1" will auto follow the player without the jumpy animation.

    So, after playing around with it, I can't get it working as you describe. The camera still pans with mouse relative mode on.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] 3rd Person Movement
    Quote from GoldfishInAPicklejar: Go

    @Kylegar: Go

    ahh ok, do you use right click mouse to move from left to right?

    No, the Archon will automatically move in the direction the camera is facing, and the camera moves naturally around the Archon.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] 3rd Person Movement

    Kay, it's finished now.

    Quote from GoldfishInAPicklejar: Go

    Amazing tutorial, are you planning on writing how to rotate the camera/player with A and D

    Not in the scope of this tutorial, but it shouldn't be too hard to figure out.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] 3rd Person Movement

    This is an advanced article on creating 3rd Person Control system. It assumes you know how to use the Trigger editor and some basics navigating the Galaxy Editor. You can download a working version of the 3rd person controls here: http://dl.dropbox.com/u/1940586/sc2-3psmovement-tut/ZerglingZapTut.SC2Map

    Before We Trigger

    We need a Unit to control, and for this tutorial, I will use an Archon. While much of the tutorial is unit independent, when we get to attacking, we will use the Archon attack for damage dealing, and other units don't have that.

    So, Create an Archon for Player 1 in the center of the map. Also, create a circle region with the radius of 0.25 named CameraView

    And then he said: Let there be Triggers

    So, we got our Archon and our small area, Lets get crackin. Open up the Trigger editor and delete that pesky Melee Initialization trigger. Let's create a global variable that is of type Unit. I'm going to name it Player, and set it to our Archon. Also, I'm a fan of organization, so lets create a new folder in your Trigger Editor and name it Init. In this folder, we will put all of our initialization triggers.

    Create a new Trigger named Init3ps. The Event will be (gasp) Map Initialization. For the actions, we have:

    Init3ps
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Camera - Lock Camera Mouse Relative Mode On/Off(1, On)
            Camera - Turn Camera Mouse Rotation On/Off(1, On)
            Camera - Set the camera bounds for (Player group(1)) to CameraView (Do Not adjust the minimap)
            Camera - Follow for player 1 (Unit group(Player)) with the camera and Clear Current Target
            Region - Attach CameraView to Player with offset (Point(0.0, 0.0))
    

    And run the map. You should now be looking at your Archon in 3rd Person mode! YAY!!!!! WOOP!!!

    Tasty Trembling Triggers Rotating Round Rhombuses

    Now we are going to have some fun with Movement. And by fun, I mean actually do it. Again, I like organization, so we are going to create TWO folders this time, One named 'Update' and the other named 'Movement'

    Inside of Update, we will make a new Trigger named UpdateCamera. This trigger will keep the camera bounds correct while we move our unit, since the camera bounds will not follow a moving region for some reason. TBH, it feels like a bug, so I made this in a separate trigger from other update functions, so that if they fix the bug, we can quickly delete this part.

    UpdateCamera
        Events
            Timer - Every 0.0001 seconds of Game Time
        Local Variables
        Conditions
        Actions
            Camera - Set the camera bounds for (Player group(1)) to CameraView (Do Not adjust the minimap)
    

    Create a Trigger in the Movement Folder named MoveForwardKeyDown. This is when you press the W key, you move forward. This is code roughly based on someone else's project, but I don't remember who. This is the most involved trigger here. The Move Order is fairly specific, and you need to make sure you use the function IssueOrderTargetingPoint

        Events
            UI - Player 1 presses W key Down with shift Allow, control Allow, alt Allow
        Local Variables
        Conditions
        Actions
            General - While (Conditions) are true, do (Actions)
                Conditions
                    ((Current trigger) is on) == true
                Actions
                    Unit - Order Player to ( Move targeting ((Position of Player) offset by 1.0 towards (Camera Yaw of Player(1)) degrees)) (Replace Existing Orders)
                    General - Wait 0.015 Game Time seconds
    

    Finally, we need to break this loop when we lift up the W key, so create a new Trigger named MoveForwardKeyUp. This one is pretty simple.

    MoveForwardKeyUp
        Events
            UI - Player 1 presses W key Up with shift Allow, control Allow, alt Allow
        Local Variables
        Conditions
        Actions
            Trigger - Stop all instances of MoveForwardKeyDown
    

    Triggering a move is great, now lets Trigger a WARRRRRR

    Right, so we have movement and looking done, lets do some Awesome ATTACKING! RAAAAHHH ARCHON ZAP!!! Ahem.

    Anyway, Head on back over to the terrain editor, and place some Zerglings for Player 2. We need something to Zap of course! We also need a Circle region that has a radius of 5 named 'ArchonAttackRange'. zerglings, lol Zerglings. Lol

    After that, Take a quick hop skip and a jump over into the Trigger editor, and create a new folder named 'Attack'. If you can't tell, I REALLY like folders. Organization is great. Anyway, off that tangent. This process will be another few triggers, because we need to set up an attack radius, get every zergling in that radius, and then pick one to zap, preferably one that is close to us. WE CAN DO IT!

    So, The first trigger we are going to make is the one that attaches the Attack Radius region to our Archon. In the Attack folder, create a new Trigger, 'AttachRadiusToPlayer'

    AttachRadiusToPlayer
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Region - Attach ArchonAttackRadius to Player with offset (Point(0.0, 0.0))
    

    Next, Create a new trigger named 'Attack'. This trigger is in quite a few parts, as it is pretty involved, and will use local variables (it makes things easier in the long run).

    So, the first part is simple, make the event when player 1 presses left mouse.

    Then, press Ctrl + B, or create a New Variable named 'TargetGroup'.

            TargetGroup = (Units in ArchonAttackRadius having alliance Enemy with player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) <Unit Group>
    

    Now we have all of our units in that region we attached to our Archon. Lets pick one to destroy. Create another variable named 'Target'. THIS IS IMPORTANT: Your target variable MUST MUST MUST come after your Target Group variable. TargetGroup needs to initialize first.

            Target = (Closest unit to (Position of Player) in TargetGroup) <Unit>
    

    Now that we have our targets, Lets do something about it. Play the attack animation and if there is actually zerglings in our radius fire off a Zap!

        Actions
            Animation - Play Attack animation for (Actor for Player) as Default, using No Options options and Default Time blend time
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Number of Living units in TargetGroup) > 0
                Then
                    Environment - Create Archon - Archon Damage on Target from Player
                Else
    

    Final Attack Trigger Code:

    Attack
        Events
            UI - Player 1 clicks Left mouse button Down.
        Local Variables
            TargetGroup = (Units in ArchonAttackRadius having alliance Enemy with player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) <Unit Group>
            Target = (Closest unit to (Position of Player) in TargetGroup) <Unit>
        Conditions
        Actions
            Animation - Play Attack animation for (Actor for Player) as Default, using No Options options and Default Time blend time
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Number of Living units in TargetGroup) > 0
                Then
                    Environment - Create Archon - Archon Damage on Target from Player
                Else
    

    Run the map, it works now!

    That's it for this tutorial. You may notice that the Archon will auto attack zerglings. Just go into the Data Editor and remove it's Attack ability, since we are making attacks ourselves. Make sure you don't remove it's Move ability though, cause we need that. Thanks for Reading.

    Posted in: Tutorials
  • 0

    posted a message on Zergling Zap! A GE Experiment with Mouselook

    Hi Hi. I love the Galaxy Editor, it's pretty legit. Also, I'm new here, and playing around with the Galaxy Editor. Also, about me, I'm was a programmer for the Empires hl2 mod, so SC2 is alot more...visual.

    I maed a map: Zergling Zap! It's a 3rd person action game where you zap zerglings. Really, it's an experiment in 3rd person movement.

    I'll probably release the triggers that do the controls. It's pretty crappy, and wont work in Multiplayer (I'm using a few GameTimeElasped timers at around .0001 seconds...not gonna fly over network). However, it's fun.

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