• 0

    posted a message on Projectile Problems

    I'm working on a system where I need to fire projectiles based on where a player clicks.

    Requirements:
    They have to go off when they hit a tree, a specified doodad (like a rock) or a unit.
    They have to go a specified distance.
    They have to move in a straight line.

    I'm rather bad with the data editor, so most of my work has been with the trigger editor, but I can't find a way to do this. I currently have flying banelings with no collision and a battlecruiser model flying around, but they go around trees, sometimes bug and take completely non-linear paths. Any ideas?

    Additionally, I'm trying to make normal units simply stop when they hit trees, instead of automatically going around them. How do I implement this?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera Problems

    I'm trying to make a certain camera follow a different unit for each player, showing the mouse. I also want the camera to slightly move in the direction of the mouse relative to the unit on the screen (so if I bring mouse to the right of unit, the camera pans right a tiny bit).

    I'm using this for camera so far, under Map Initialization:

    Camera - Apply Camera 001 for player (Picked integer) over 0.0 seconds with Existing Velocity% initial velocity, 0% deceleration, and Don't Include Target

    Camera - Follow for player (Picked integer) (Unit group(Mech[(Picked integer)])) with the camera and Clear Current Target

    Posted in: Miscellaneous Development
  • 0

    posted a message on (Several Solved Problems) + Changing Hotkey for Stop

    @Docablo: Go

    Ah, thanks. Now, to work on the more complicated 3D portion of this. : /

    Posted in: Miscellaneous Development
  • 0

    posted a message on (Several Solved Problems) + Changing Hotkey for Stop

    Not yet, working on this for now.

    I had a few revelations while at school, here's what my solutions to my own problems are:

    Remove the rotation of the unit in lieu of simply ordering the unit to stop choppiness and other such problems, and for the finding slope, have two variables that record the x, y and z information (points), and every cycle replace one with the other and the other one with current location. Then compare difference in Z and difference in square root of sum of squares of x and y of both points.

    The other two problems, with not-turning and stopping in one place, stem from: The distance 40 being too far ahead, so when the unit gets to the edge of the map it's being ordered to move off the edge and it ignores the orders. Additionally, the S button is also the hotkey for "stop", which is what's screwing that up. Figured these out recently. How do I change hotkey for stop?

    Posted in: Miscellaneous Development
  • 0

    posted a message on (Several Solved Problems) + Changing Hotkey for Stop

    Okay, I tried it out, got it somewhat-working. E accelerates, d decelerates, s turns left and f turns right. I have several problems: While turning left (and only left, not right), it's detecting "stop" commands and if you hold it for more than approximately two seconds the unit stays in one place and turns there. If you click repeatedly in smaller intervals, it works. When turning right, it goes fine for some time and suddenly stops turning at all, going in a straight line. At first I thought maybe degrees didn't wrap around, but there's no way Blizzard screwed that up.

    Apart from these two problems, this is very choppy. It's annoying, and even if the above problems are fixed, unless it becomes less choppy it'll be neigh-unplayable. Does anyone have any advice on fixing it or have an example map to see how it should be done?

    Additionally, I want to make acceleration and deceleration depend on terrain slope, so... is there any way to detect slope of terrain looking at the profile of the unit (so, the slope of the floor under the unit while looking at the unit from its side)?

    Because I REALLY need the choppiness removed, here's the main trigger that brings everything together:

    Movement Control 2
    
        Events
    
            Timer - Every 0.0 seconds of Game Time
    
        Local Variables
    
        Conditions
    
        Actions
    
            General - Pick each integer from 1 to 16, and do (Actions)
    
                Actions
    
                    General - If (Conditions) then do (Actions) else do (Actions)
    
                        If
    
                            Turning[(Picked integer)] == -1
    
                        Then
    
                            Variable - Set Direction[(Picked integer)] = ((Facing of Mech[(Picked integer)]) + 5.0)
    
                            Unit - Make Mech[(Picked integer)] face Direction[(Picked integer)] over 0.0 seconds
    
                        Else
    
                            General - If (Conditions) then do (Actions) else do (Actions)
    
                                If
    
                                    Turning[(Picked integer)] == 1
    
                                Then
    
                                    Variable - Set Direction[(Picked integer)] = ((Facing of Mech[(Picked integer)]) - 5.0)
    
                                    Unit - Make Mech[(Picked integer)] face Direction[(Picked integer)] over 0.0 seconds
    
                                Else
    
                    Variable - Set Speed[(Picked integer)] = (Mech[(Picked integer)] Movement Speed (Current))
    
                    Unit - Order Mech[(Picked integer)] to ( Move targeting ((Position of Mech[(Picked integer)]) offset by 40.0 towards Direction[(Picked integer)] degrees)) (Replace Existing Orders)
    
                    General - If (Conditions) then do (Actions) else do (Actions)
    
                        If
    
                            Speed[(Picked integer)] >= 0.0
    
                            Acceleration[(Picked integer)] < 0.0
    
                        Then
    
                            Unit - Set Mech[(Picked integer)] Movement Speed to ((Mech[(Picked integer)] Movement Speed (Current)) + Acceleration[(Picked integer)])
    
                        Else
    
                            General - If (Conditions) then do (Actions) else do (Actions)
    
                                If
    
                                    Speed[(Picked integer)] <= 10.0
    
                                    Acceleration[(Picked integer)] > 0.0
    
                                Then
    
                                    Unit - Set Mech[(Picked integer)] Movement Speed to ((Mech[(Picked integer)] Movement Speed (Current)) + Acceleration[(Picked integer)])
    
                                Else
    

    I'll be very, very grateful - this is a very frustrating problem.

    Posted in: Miscellaneous Development
  • 0

    posted a message on (Several Solved Problems) + Changing Hotkey for Stop

    I'm making a ESDF-based movement system, where s and f are turning (as opposed to moving sideways). E and D will be accelerating forwards and backwards, and I want s and f to, without stopping the unit or otherwise impeding movement, slightly shift its movement by a few degrees and continue doing it while they're held down. It somewhat works using a simple on-keypress direction-change, but that both requires repeated presses and stops the unit's movement. If I add a while-loop (while key is pressed), it seems unable to execute the function and returns an error. Help?

    EDIT: Also, is there any way to detect mouse position? I'm trying to make the hellion's turret face the mouse, but the only mouse-related anything I can find is {point, x, y, etc} clicked.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Triggers in Mods?

    Bumpity.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Triggers in Mods?

    I want to create a SCII version of "Phantom" (random person gets extra resources, has to kill everyone else, you don't know who) and some other similar melee-based games. I want to use a mod to do this, to allow players to load random melee maps and play these games on them. However, I have no idea how to create triggers in mods. Are mods restricted to simple data edits or something?

    Additionally, is there any way to create configuration options for while in the lobby? When you create a custom game right now and use a melee map, it allows you to do this to select game type; I'd like, for these mods, to allow for basic configuration using dropdowns, so I can store several similar mods in one and have the host choose so everyone can see the specifics in-game.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Separating ability control

    Basically, I want to do it so that all units move and attack properly by themselves, but don't use special abilities. I want the player owning these units to have no control over movement or targeting, but to be able to cast the spells of the unit on in-range targets. How would I go about doing this? Thank you in advance.

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