• 0

    posted a message on Best way to do Dialogs ?

    @patrickwobben: Go

    There are no methods for fetching the contents of a dialog, except for list items. Ergo, you have to use global variables for the Dialog Items.

    I don't understand what you mean by "shown 1 by one"?

    You should create the dialog items, store them in global variables and hide them all. When, for instance, your unit interacts with an NPC, you show the buttons and other dialog elements you need (one by one) for the specific player or players.

    Posted in: Triggers
  • 0

    posted a message on HALP! Randomize heroes and give item

    I am not convinced that the above code does a complete shuffle of integers.

    I recommend you randomize the array before creating the heroes. You can use Fisher-Yates shuffle algorithm for this purpose, which should be implemented somewhat like this:

        Events
            Whatever
        Local Variables
            n = 10 <Integer>
            ShuffledArray = 0 <Integer[n]>
            j = 0 <Integer>
            i = 0 <Integer>
            swap = 0 <Integer>
        Conditions
        Actions
            -- Initialize the array (set to straight forward array [1, 2, 3, ... , n])
            General - For each integer i from 1 to n with increment 1, do (Actions)
                Actions
                    Variable - Set ShuffledArray[i] = i
            -- Randomize array
            General - For each integer i from n to 1 with increment -1, do (Actions)
                Actions
                    Variable - Set j = (Random integer between 1 and i)
                    Variable - Set swap = ShuffledArray[j]
                    Variable - Set ShuffledArray[j] = ShuffledArray[i]
                    Variable - Set ShuffledArray[i] = swap
            -- A randomized array is now stored in ShuffledArray
    

    The result will be as in this example:

    • ShuffledArray[1] = 2
    • ShuffledArray[2] = 10
    • ShuffledArray[3] = 6
    • ShuffledArray[4] = 7
    • ShuffledArray[5] = 4
    • ShuffledArray[6] = 1
    • ShuffledArray[7] = 9
    • ShuffledArray[8] = 5
    • ShuffledArray[9] = 3
    • ShuffledArray[10] = 8

    If you implement this as a function you can change the variable n to a parameter and return the ShuffledArray as a comma separated string (the editor cannot return arrays, do'h). You will have to split the text string into an integer array again in the receiving trigger, so I'm not sure much is gained from creating a function for this.

    Also, the 0.3 wait time between the creation of each hero made me curious. Why is this time needed?

    Lastly, make sure your item array points to the correct items ;)

    - Kafoso

    Posted in: Triggers
  • 0

    posted a message on Best way to do Dialogs ?

    @patrickwobben: Go

    There are two key variable types for this: Dialog and Dialog Item

    The Dialog is the container and you can store 1 dialog in a variable and show it to or hide it from specific players. You don't need a Dialog for each player.

    Dialog Items are the elements within the dialog, e.g. buttons and images. You can make an array for this or you can simply make variables for each dialog item, depending on what you're comforable with and what you need.

    In your case you will need to collapse or expand the space between buttons, depending on the number of buttons (options) you want to be shown. There's a condition to check whether a specific Dialog Item is enabled or disabled.

    If the dialog is likely to be used or definately will be used, you should create it on map initialization and then show/hide it as needed for the desired players. Otherwise you may wait with doing so until (or if) it is needed.

    Dialog Designer: http://forums.sc2mapster.com/resources/project-workplace/14457-dialog-designer-beta-3/

    Dialog Basics Tutorial: http://forums.sc2mapster.com/resources/tutorials/17969-dialogs-really-great-looking-dialogs-part-1/

    The search bar is an awesome feature! ;)

    Posted in: Triggers
  • 0

    posted a message on Beam targeting ground with rectangular search area and unit interception - HRALP!

    @DrSuperEvil: Go

    Of course I need a Persistent, several actually. :)

    I have successfully converted the Colossus' Thermal Lance attack to an ability with just one beam that slides from the caster to the end point instead of from left to right. The ability also targets the ground instead of a unit.

    But thee beam type I need is quite different from the Colossus' Thermal Lance attack. Actually, it's easier to not think of it as a "Beam" per se (in regard to the SC2 editor), but merely a ray of light. If you point a laser pointer at a wall in a room with some sort of mist, you will see the little red dot at the wall, but you will also see the line between the laser pointer and the wall, due to the particles (mist) in the room. If a person steps betwen the laser pointer and the wall, the dot will now be located at the person.

    There is one pre-existing ability in the SC2 editor which does this: The TerraTron Attack Beam. However, I simply cannot get this beam to show (the model when duplicating the ability), turn or break when a unit intercepts the beam. As a matter of fact, if you insert TerraTron in a map (and make him targetable, selectable and all that redundant stuff) and you fire his attack beam, it will not show either. I still inflicts the damage, though.

    Posted in: Data
  • 0

    posted a message on Beam targeting ground with rectangular search area and unit interception - HRALP!

    I'm working on a map where I need a beam type spell. I'm having a bit (read: lot) of trouble getting this to work so I'm hoping there are some Data Editor pros out there who need a challenge.

    • The beam must go from a caster unit to a point on the ground (NOT a unit)
    • The beam should last 10 seconds, unless the spell channelling is manually cancelled by the player controlling the casting unit or if the spell is otherwise interrupted.
    • If a unit enters the beam anywhere between the launch point and the impact point, the beam will become shorter and only span between the casting unit and the unit intercepting the beam.
    • Units that intercept the beam should receive damage. Only one unit can be hit at a time.
    • (This is not a priority) The beam should turn with the casting unit, with the impact point always being in front of the caster.

    I've made an illustration of the concept you can see in the picture below:

    Beam Illustration

    So far I figure what is needed (besides the beam graphics) is:

    • A Site Mover for shortening the beam on unit interception. The same Site Mover can be used if the beam is turned to either side.
    • A periodic Search Area for collision detection with units.
    • A Damage effect picking the closest unit to the position of the Site Mover.

    And much more, but I'll let you guys work on that.

    I haven't attached a map since my attemps are rather... messy ;)

    Thanks in advance

    - Kafoso

    Posted in: Data
  • 0

    posted a message on Setting the rotation of camera properlly (Solved!!)

    @Claymuffin: Go

    Use polar offset or another offset type.

    If you decide to go with polar offset, use Sin/Cos for calculating the points (x,y) the camera will face. If the camera doesn't move throughout the game you can calculate these points at the beginning and merely load the angle from an array, instead of performing calculations continuously.

    Posted in: Triggers
  • 0

    posted a message on Looking for partners for Medieval Wizard Arena map - NEW: Preview Video

    @DarkRevenantX: Go

    Thanks a bunch for your inputs :)

    I use the Trigger Editor for most of the things I make, but sometimes the Data Editor can offer some pretty neat tricks that will otherwise require a major work-around in the Trigger Editor.

    There's no PvP in Magicka, indeed, which is why I will be using mana for balancing. However, it won't be a standard Blizzard "your mana will be restored fully in 2 minutes if you just stand around and do nothing"; regeneration will be way higher, especially out of combat.

    Opposites and combinations are the aspects that make the Magicka spell system so very unique and fun. I agree that things can get hecktic in PvP, where things aren't as predictable as PvE. As a result, damage you do to yourself and/or friendly units can be reduced, but I very much plan on keeping friendly fire in the game. And yes, there are douches out there who will abuse this (friendly fire), but then I'll have to implement a system later on that punishes such behavior.

    I chose those specific recruitment requirements to ensure I don't become a teacher (again), educating people in the functionalities of the SC2 Map Editor. And if you throw another look at the requirements, there are few people, who study or have interrest in Computer Science or work in this business, who won't qualify :)

    Thanks for the headsup. At the current stage I just wanted to get this announcement up and running, so people will notice it. And I'll definately upload a Demo of the map when the time comes.

    Cheerio

    - Kafoso

    Posted in: Team Recruitment
  • 0

    posted a message on Looking for partners for Medieval Wizard Arena map - NEW: Preview Video

    I am looking for 1-2 partners who share my passion for Medieval type games, such as Diablo, Dungeon Siege, and Magicka, just to name a few.

    The map

    Preview

    Embed Removed: https://www.youtube.com/v/_PxPYmjkjJI?fs=1

    Map type

    Hero Arena (5 vs 5)

    General themes

    • Medieval
    • Magic/spells (as opposed to SciFi laser beams that you normally see in SC2 maps)
    • Wizards battling each other

    Goals

    • The map should be "easy to learn, difficult to master".
    • Each time you join a game you start fresh (perhaps win statistics will be saved in later versions).
    • The map has to feel like a game, not just a Starcraft 2 map.
    • Bring back some of the WC3 custom map spirit (everything is so dark and sad in SC2 :< ).

    Spell casting system

    The spell casting system is largely based on the spell casting system found in the game Magicka; a trial version of this game can be downloaded via Steam, but I suggest you buy the whole game, 'cause it's great fun and it's only about €7.

    I immedially (almost) fel in love with this system, 'cause if you don't watch what spells you combine and how you cast them, you end up cauterizing yourself or killing a team mate. Friendly fire is something you should really watch out for, not to mention accidently healing your enemies. This is a great break from how most games work these days; press "2" and Lightning Orbs on fire will shoot from your behind and annihilate everything (read: just enemies) around you.

    Custom UI and mechanics

    As you can see on the screenshot below I already started working on a Diablo inspired interface for the map. It still needs some love and polishing, and some elements are still missing, but it illustrates the general idea: to make the map feel different and unique.

    Also, you may notice the rocks on the screenshot. Some are on fire and some have rings/waves of frost on them. These are spells I've started working on. They will make a lot more sense once you've played Magicka! :)

    My map making experience

    I've worked on several maps since the start of Warcraft 3: Reign of Chaos, and when Starcraft 2: Wings of Liberty was in the stores, I finished the single player missions and immediately started working on maps and helping people using the SC2 Map Editor. I'm a bit rusty, though, as I have had a 5-6 months break from the editor, but it is all coming back to me.

    What I expect of my partners

    • You know your way around in the SC2 Map Editor
    • You are dedicated, you can accept other people's opinions and majority decisions
    • You don't mind reading tutorials or watching them on e.g. YouTube
    • You have created custom abilities that go beyond Stimpack not inflicting damage upon use
    • You have created advanced triggers
    • You have some programming experience (e.g. in Java or C languages)
    • You have some understanding of how to implement mathematical equations and algorithms using triggers, action definitions, functions, etc. (don't worry, I don't expect you to implement pathfinding algorithms and the like)

    Bonuses

    • You have implemented software using Object Oriented Programming (OOP) and you can see how it may be done with triggers
    • You excel in working with the Data Editor, e.g. using this to create advanced abilities rather than the Trigger Editor
    • You can create custom 3D models in 3D Studio Max
    • You have created or helped creating other WC3 or SC2 maps

    Contact me

    If you're up for the task and you want to join the fun creating a fantastic SC2 map that, hopefully, will bring joy to many players around the world, then throw me a Private Message or an e-mail to [email protected] (write a meaningful subject or it might end up as spam ;> ).

    I hope to hear from you. Also, everyone is welcome to comment on the map ideas that I have briefly describe aboved, and the screenshot. But keep in mind it is still a work-in-progress.

    Thanks for your time

    - Kafoso

    NB The "hiring" part in the heading may indicate some kind of sallery; there is none ;)

    Posted in: Team Recruitment
  • 0

    posted a message on Prevent attacking through walls (terrain)?

    @BudSMoken: Go

    (Necro!)

    The game already has a variety of algorithms for checking line-of-sight and pathing, and these work beautifully. Why they don't apply to weaponry I do not understand.

    I've tried using Validators, checking for obstacles between the two points. But it seems the Marines will still spot each other and just stare at one another. Essentially, this behavior should not only apply to a unit's weapon, but to its field-of-sight all together.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Inflict damage on unit (Warcraft 3 Editor style)

    @Kafoso: Go

    This damage system is now obsolete due to the implementation of a built-in damage system in the editor that came with patch 1.1.0.

    Added a trigger to deal damage from a unit.

    Posted in: Galaxy Scripting
  • 0

    posted a message on How exactly these triggers works?

    @Azzaaer: Go

    First question: You can just do another condition if needed and subtract the Dying unit. And there are no "is-dead-in-10-milliseconds"-stages or anything like that.

    Second question: Check "Status Of Player" instead. You can select "Left The Game", "Playing", and "Unused".

    Posted in: Triggers
  • 0

    posted a message on Data tables?

    @sangeli: Go

    When you create a Data Table you can store various variable types in it using a reference string, representing the column in a table. So instead of having e.g. 5 unique variables, or worse arrays, you need just one variable, the Data Table.

    If you want to store the name of several units, for instance, you can use the reference string combined with an integer; the integer being the row ID. This is very handy in loop scenarios, e.g. during map initialization: "(UnitName + String(IntegerA))"

    Posted in: Miscellaneous Development
  • 0

    posted a message on using variables like in wc3???

    @PsychoMC: Go

    Variables are now placed in the same tree as Triggers, Actions Definitions, Functions and so on. Try selecting a Trigger in the library tree in the left-most area and press [Ctrl+B]. Name your variable and set the variable type.

    For changing the values in the variable simply use the "Set Variable", as Quelor described.

    Posted in: Triggers
  • 0

    posted a message on Help with understanding dialog boxes

    @James7285: Go

    First, read my reply here: http:forums.sc2mapster.com/development/triggers/9722-array-overflow-in-function/#p5

    To sum up: You create the dialog and place all elements (dialog items) during map initialization. This way you can always reset a dialog by running this Trigger (or Action Definition) again later on. You then show the dialog when needed in a seperate trigger, using the global variable.

    You need a global variable for your button also of type "Dialog Item".

    If you want the message to pop up at a normal chat message simply register a "Button was clicked" event in another trigger and add a Text Message in the action section.

    EDIT First of all you should add the dialog to your global variable using the Set Variable call. "Set YourGlobalDialogVaribale = (Last Created Dialog)."

    Posted in: Miscellaneous Development
  • 0

    posted a message on Change Unit Height bug?

    @rush8192: Go

    Do you use a time interval for adjusting the height?

    Please paste a screenshot of your trigger (upload it to e.g. www.imageshack.us or install Dropbox (www.dropbox.com) on your computer and make a public link). I doubt anyone will steal your ideas. Besides, if people are bright enough to help you out with the trigger they're bright enough to make the trigger themselves. ;)

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