• 0

    posted a message on Adding event to another trigger
    Quote from Forge_User_04585675: Go

    Not entirely sure what you're trying to do. Can you just use "run trigger" in your other trigger? Or make your new trigger an action definition instead?

    I don't know. Maybe I could. The thing is, I'm used to the WC3 editor, and it's (obviously) not the same thing as the SC2 editor. Maybe there's a better/easier/more efficient way to do this, but this is the way I'm used to do it:

    Step 1. Create a Unit Group Step 2. Add units to <Unit_Group> 3. For every unit in <Unit_Group>, do... 4. Add (Picked Unit) to event: "TriggerAddEventUnitRange"

    What this will do is: Whenever ANOTHER (matching condition) unit comes within range of a unit from <Unit_Group> - something will happen.

    Why would I do all this, you may ask? In case I decide to add many, many units to <Unit_Group>, this is an efficient way to add each and every one of them to the trigger.

    Like I said: maybe there's an easier way to do this in the new editor which I don't know about. In that case feel free to inform me, I would love to learn. =)

    EDIT:

    Quote from Forge_User_04585675: Go

    It is called "Veiw Script" under the Data menu and shows you the entire map script. It is built 1 second after you make any change to GUI so no need to save.

    Thanks. =)

    Quote from Forge_User_04585675: Go

    TriggerAddEventUnitRange (gt_TradingStationRange, null, UnitGroupLoopCurrent(), 1.0, true);

    Yes that should work. Do remember that "1.0" is 1 tile. Also it will fire when any unit enters range of the unit returned by UnitGroupLoopCurrent which depending on how many units receive this event could possibly lead to performance problems.

    How many (ish) are we talking about for performance issues? 10? 100? 1000? 10000? I know every little thing adds up and all that, but I would like to get a basic idea of how much I've got to work with. :P

    Posted in: Triggers
  • 0

    posted a message on Adding event to another trigger
    Quote from Forge_User_04585675: Go

    Dynamic event attachment is not supported by GUI. You will need to use "custom script" features to directly call the event attachment natives. You could also write a GUI wrapper for them but this still requires understanding the custom script feature.

    I have a basic understanding. I used to do a lot of map editing in Warcraft III, but the editor in SC2 is so different.

    Quote from Forge_User_04585675: Go

    You call it like you would any other native function. This is similar to a classic c function call (tutorials how to make such calls litter the internet as C is a major language).

    I need to know some of the data. Such as the name of the trigger that I want to add this event to. In WC3 there used to be a function "convert trigger to custom text" - which allowed me to find out these kind of things. I haven't seen any function like that in SC2, though.

    Quote from Forge_User_04585675: Go

    Of important note is that u is a unit reference so you will need to wrap a unit as a unit reference when passing it as an argument. Use null to represent any unit however you probably need to define the origin unit as some unit for the event to work. Quote:

    I figured one of the units would be the specific unit I'm checking for, and the other unit would be the one that comes within range?

    EDIT: I found ctrl+F11 which fits my need for "convert to custom script".

    UPDATE: Here's what I want to do: In Map init: -add a bunch of units (manually) to a unit group -loop through the unit group -throw in this script:

    TriggerAddEventUnitRange (gt_TradingStationRange, null, UnitGroupLoopCurrent(), 1.0, true);

    Will this work? "null" represents "Any Unit gets within range of ...", right? Will gt_<trigger_name"> suffice?

    Posted in: Triggers
  • 0

    posted a message on Adding event to another trigger

    Hello. I'm trying to create a trigger without an event. I want to add an event from another trigger.

    Here's what I want to do: Pick a unit group. Loop through the group. Add each of the units in that unit group to an event doing: 'A unit gets within X range of (Picked unit)'.

    I can't find any action that suits my purpose, though.

    I found this on google: native void TriggerAddEventUnitRange (trigger t, unitref u, unit fromUnit, fixed range, bool state); I think this is what I'm looking for, but I don't know how to use it.

    EDIT: I don't have Heart of the Swarm, if that matters.

    Posted in: Triggers
  • 0

    posted a message on Final Fantasy rip-off

    Hi.

    I am currently working on a map that is a rip-off of the FF-series. Why? -Because I love the old games in the series and think the newer ones are crap, so I wanted to make a "new FF game old school style." (Mostly inspired by FFVII.)

    I haven't done much, there's still a lot to be done. Here's what I've done so far, gathered in a short youtube clip:

    I want to hear your thoughts on the clip. Does it look promising? Would you want to play a map like this, once it's done? Does anything look weird? (Keep in mind that this map is still very early in development.) I am mostly focusing on re-creating the old school combat system that FFVII had. Thoughts on the combat system is much appriciated.

    Thanks in advance.

    Posted in: Map Feedback
  • 0

    posted a message on Make specific units stop talking

    Hi.

    I want to prevent certain units from responding when I select them, using triggers. Does anyone know how to do this?

    Thanks.

    Posted in: Triggers
  • 0

    posted a message on Making a list?

    Hi.

    I'm trying to make a menu (using dialogs) with an inventory (and other stuff). My first idea was to make some sort of a list so that I can easily add/remove items from the list and use data from the list to populate the dialog windows. The problem is I don't know how to make a list like that, or if it's even possible?

    How can I make such a list? If it's impossible: how would you suggest I make my inventory?

    Thanks in advance.

    Posted in: Triggers
  • 0

    posted a message on [Trigger Library - Map] General Functions/Conditions

    I would love to be able to compare texture at certain points. (To be used to kill units when they enter a certain texture, for example lava.)

    Posted in: Project Workplace
  • 0

    posted a message on Could someone fix and upload my map for me?

    I can't say it good enough, so I'm gonna let Anakin say it for me:

    Thank you very much. =)

    Posted in: General Chat
  • 0

    posted a message on Could someone fix and upload my map for me?

    I do hide and show game UI, but not World.

    Posted in: General Chat
  • 0

    posted a message on Two questions

    I have no idea what you're talking about.

    I just want to change the model of any existing unit to that of a missile. In WC3 this was done in 3 seconds.

    Posted in: Data
  • 0

    posted a message on Two questions

    1. Problem solved. Thank you very much. =)

    2. I have no idea how to change the model of a unit. =/

    Posted in: Data
  • 0

    posted a message on Two questions

    Hi.

    I have two questions:

    1. When an Ursadak dies on my map, it leaves a big pile of junk (death animation - explode). This is all very nice and funny, but since I use and kill a lot of Ursa's, it gets cluttered easily. Is there any simple way to clean up this bloody mess? (I've tried waiting a few seconds and "Remove unit", but it doesn't work, for some reason.)

    2. I need a unit that looks like a projectile. -Preferably a spiky cannonball. I haven't been able to find any unit/model like this, and need help in doing so. (A rocket/missile could work as well, I guess.)

    The object of the "cannonball" is to travel straight forward and explode, killing anything it touches.

    Posted in: Data
  • 0

    posted a message on Problem with sliding trigger
    Quote from obliviron: Go

    (Custom value 0 of Hero[i]) != 1.0 Hero[i] != No Unit

    Basically you are saying to the editor that No unit has a custom value of 1.. You must have a unit there. You also have a function that moves a unit, and it will only run if Hero[i] = No Unit, so it does not execute.

    Second, create the following AFTER the If/Then/Else: Set i = 0, otherwise, i will increase by 4 every time the trigger runs (4, 8, 12, etc).

    You need to learn how triggers work.

    The condition: Hero[i] != No Unit

    means:

    if Hero[i] is Not equal to No Unit (null)

    meaning:

    if Hero[i] is Actually a unit (any unit)

    then... Do actions..

    I agree that checking the custom value is a bit off, but it's the easiest way I can work around checking terrain texture at point. (Since it's missing in SC2, for some weird reason..)

    Since i is a local variable it will create a new one for each trigger, every time the trigger runs. i is initialized as 0. So no, it won't increase everytime a trigger runs. (It can even run two triggers at the same time, without interfering with each other, since it's local. Unlike global.)

    So anyway. I fixed my debug message by changing the trigger a bit (it now works better with my map, so it was a win-win.)

    My real problem still remains, however; the units still spin around in circles for no apparent reason. Pausing the units is sadly not an option, since they are "heroes" and the players has to be able to move them around.

    EDIT: Why does these forums fuck up my text when I press enter?

    Posted in: Triggers
  • 0

    posted a message on Problem with sliding trigger

    Hi.

    I'm having a bit of problem with my sliding trigger. First off, here's the trigger:

    Slide
        Events
            Timer - Every 0.1 seconds of Game Time
        Local Variables
            i = 0 <Integer>
        Conditions
        Actions
            General - For each integer i from 1 to 4 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Custom value 0 of Hero[i]) != 1.0
                            (Status of player i) == Playing
                            Hero[i] != No Unit
                        Then
                            Unit - Move Hero[i] instantly to ((Position of Hero[i]) offset by 0.4 towards (Facing of Hero[i]) degrees) (Blend)
                        Else
    

    (The Custom value check is there to see if the unit is not in a certain area - as comparing terrain at point isn't available in SC2.)

    First of all: This trigger gives me debug messages. Saying "try again". I imagine this message appears every 0.1 seconds, so it doesn't go away. I figured this was because I only have 1 Hero assigned, but I thought my 'Hero[i] != No Unit' -condition would take care of that.

    Secondly: My hero goes straight forward for a random amount of time (ie working as intended.) Then, all of a sudden (completely random) the hero turns on it's own. Some times it ends up spinning around in a very tight circle, round and round. I figured this might be because the hero's idle animation makes it turn and look left and right. -Any way to prevent this?

    Bonus question: Is there a way to draw terrain using triggers?

    Thanks in advance.

    EDIT: Actually, it seems like everytime I order the unit to move while sliding, it starts spinning when it reaches it's destination. No idea why.

    Posted in: Triggers
  • 0

    posted a message on Could someone fix and upload my map for me?

    I can tell you all right now that it's not a trigger error. What I need help with is those damned Game Variants. =/

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