1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

A minor Trigger Problem

Discussion in 'StarCraft II Modding' started by Giantr, Apr 27, 2010.

  1. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    I made a Trigger that was Creating Zergling at an Building every X seconds. It worked like a charm, but I thought to make the units go at the rally point of the building, It worked again. BUT I'm getting a strange error:

    Trigger Error in:

    'gt_ZerglingSpawns_Func': Could not
    get 'point' from parameter in
    'Order Targeting Point'(value: 65535)

    Here is my code:

    • Zergling Spawns
      • Events
        • Timer - Every 3.0 seconds of Game Time
      • Local Variables
        • Point = No Point <Point>
        • Unit Group = (Empty unit group) <Unit Group>
      • Conditions
      • Actions
        • Variable - Set Unit Group = (Command Center units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, with at most Any Amount)
        • Unit Group - Pick each unit in Unit Group and do (Actions)
          • Actions
            • Variable - Set Point = (Position of (Picked unit))
            • Unit - Create 1 Zergling for player (Owner of (Picked unit)) at Point using default facing (No Options)
            • Unit - Order (Last created unit) to ( Attack targeting (Unit Rally Point Target Point((Picked unit), 1, 1))) (Replace Existing Orders)



    Any suggestions on how to remove the Error Message?

    I have also attached the map, It's an .rar since the site doesn't yet allow for the attachment of Sc2 maps.
     

    Attached Files:

  2. Mr.Cheese

    Mr.Cheese

    Joined:
    Feb 27, 2009
    Messages:
    114
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The problem is in the very last line of code when you order the zerglings to attack. You are telling them to attack the rally point. You are getting an error message because Starcraft 2 doesn't know what that rally point is.

    Rewrite that last line and remove the rally point (or define it above, I'd just remove it).

    An example of how it is in my map:

    Unit - Order (Last created unit) to ( Attack targeting CUSTOM POINT) (Replace Existing Orders)

    And CUSTOM POINT is whatever point you name.
     
  3. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    The interesting bit is that the units actually indeed do attack the rally point. It just shows an Error.
     
  4. Wezthal

    Wezthal

    Joined:
    Jun 7, 2007
    Messages:
    179
    Resources:
    9
    Icons:
    8
    Skins:
    1
    Resources:
    9
    You don't need those local variables. Remember, no more leaks. (garbage collection)
     
  5. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    It's cleaner that way.

    Anyone that can post an Action line to help me, with the problem?