• 0

    posted a message on Regions and Mem Leaks

    @BeLugh: Go

    I'm using global vars becuz I'm creating sort of like structs....

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    I think the whole traceline idea is great. But the problem with it is that we need to create a vector system in order to create a very realistic shooting system.

    Right now, what I've been doing is simply using the point that the center of the camera is looking at and create a sniper damage from the main unit to any unit within that point. Now this is the problem, because what happens if you are targeting the head of a unit, but that is actually pointing to a point far far away from the unit's head? Aha see, that is a problem! Hence we need to create a vector system, instead of using the dumb environment effect that blizzard creates, we need to create an actual missile that goes to that point. If the missile hits something, kill it and it will do damage.

    This map so far uses a line system, so it is much more accurate than sherardt's way of using circle region at the point clicked. It will create circle regions from main unit to target point and figure out which unit is the closest at that "line". But it doesn't make sense because you can pretty much target at a point beyond an enemy unit and still kill it if u get the angle right... So it does not replace the missile system I'm talking about.

    PRESS ESC for the 3rd person view

    Posted in: Tutorials
  • 0

    posted a message on Regions and Mem Leaks

    Hi,

    I know in Wc3 you have to deal alot with memory leaks, in particular whenever you create an object lets say a region, you will have to remove it in the end. However, I couldn't find any function for Destroying or Removing a region in sc2. So I'm assuming that wc3 has like a garbage collection system kinda thing?

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    @sherardt: Go

    Thanks for sharing that map, now I can learn how to implement the traceline.

    The traceline function never works. Focus on the TargetedUnit, it iterates every 0s, but as you can see the traceline_currentTargetUnit is alwayts null...

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    @rrowland: Go

    How do you do that? Do I have to use the periodic method instead and check where the point is?

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    @OneTwoSC: Go

    K, I tried that it works, in fact I don't need the traceline. So what exactly is the point of the traceline?

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    I honestly don't know how to impement this.

    //--------------------------------------------------------------------------------------------------
    // Trigger: Test
    //--------------------------------------------------------------------------------------------------
    bool gt_Test_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gf_Traceline(CameraGetTarget(1), CameraInfoGetValue(CameraInfoDefault(), c_cameraValueHeightOffset), EventPlayer());
        PlayerCreateEffectPoint(EventPlayer(), "PsiStormDamageInitial", gv_traceline_currentTargetPoint[EventPlayer()]);
        MinimapPing(PlayerGroupAll(), gv_traceline_currentTargetPoint[EventPlayer()], 2.0, Color(100.00, 0.00, 0.00));
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_Test_Init () {
        gt_Test = TriggerCreate("gt_Test_Func");
        TriggerAddEventMouseClicked(gt_Test, c_playerAny, c_mouseButtonLeft, true);
    }
    

    Can you enlighten me about how to implement this? I'm trying to make it so that effect spawns on the position where my mouse clicks...

    Refer to the map...

    Posted in: Tutorials
  • 0

    posted a message on Tutorial Request

    I'd like to request an in-depth tutorial of the basics of using the Data Editor. Personally its very hard to migrate from the object editor in Wc3 to the Data editor in Sc2. I don't even know how to set the model and icon of a unit... A tutorial of the Data Editor would be much helpful to I think everyone in here who are new to the galaxy editor.

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