• 0

    posted a message on Problems picking lowest integer

    @theystolemynick: Go

    I've set the values of the array just for the example. The debug line at the end simply outputs the lowest integer found.

    Solution

    Posted in: Triggers
  • 0

    posted a message on [Video] Custom Cast Bar v0.2

    Custom Made Cast Bar

    Here is a demonstration of a custom made cast bar using dialog controls.

    It is entirely dynamic, nothing is hard-coded. So the bar will fill up slower for spells with longer cast times.

    I hope to release the cast bar and related actions in a library once it's completed. A tutorial may also be written.

    v0.2

    Embed Removed: https://www.youtube.com/v/fX-FawA1J5Q?fs=1
    • Now checks that the target is within the visible range of the player unit.
      • Credit goes to RodOfNOD
      • The visibility checking may also be used to check if the player is looking at any point on the map. For example, can make CPU intensive effects only visible when the player is looking at it and not behind.
    • Interruptions now effect the cast bar
    • Tiny notification class added to replace the debug message used previously to make any errors clearly visible. Font size, colour, position, family will change to be a little more attractive in future demos.

    v0.1

    Embed Removed: https://www.youtube.com/v/eh-WZ_G0MOQ?fs=1
    Posted in: Project Workplace
  • 0

    posted a message on [Trigger] Clicking With Camera Mouse Enabled

    @cecilofs: Go

    Edit 2: New solution is prepended to the original post.

    Edit: I just realised the solution below won't work since our original problem of the mouse cursor being hidden arises again and the Highlighted Unit variable will be emptied as when the camera is activated, the Highlight Off event is triggered.

    Another work around can be added though to check if the same unit is still hovered when the mouse is released, and then select it. But make sure that if you click an empty area then release the mouse while hovering on a unit, that unit isn't selected.

    Original Post

    You bring up some good points. The reason the deselection action is in there is because without it, any units you click will be appended to the original selection instead of just one unit being selected.

    As for the dragging issue, perhaps try utilising the Mouse Up trigger. For example:

    Mouse Down

    • Set Variable - Mouse Down Unit <Unit> = Highlighted Unit.

    Mouse Up

    • If Highlighted Unit = Mouse Down Unit
    • Then
      • Select Highlighted Unit

    I haven't tested this yet, but it should select the unit when you release the mouse and complete a click action.

    Posted in: Tutorials
  • 0

    posted a message on [Video] TPS Capture the Flag [CTF] Map

    Still texturing, still placing doodads, and need to fix the terrain cliffs (thanks Xaragoth ;) )

    It's built using the Starcrafter Engine I'm making. Combat system is still being fine tweaked and abilities to add. But hope you can at least enjoy the layout!

    It's built with a 4v4 in mind.

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

    (Game is on lowest settings in video)

    Posted in: Project Workplace
  • 0

    posted a message on [Demo] Starcrafter [SCR] - Movement and Auto Attack

    @progammer: Go

    I've been playing with your system a bit further and I really enjoy it. I had to change the mover to Cliff Jumper to prevent path finding around walls. Lag online is a tad less than what is seen with most systems too, but unfortunately still a factor for anyone wanting to create any twitch mods.

    My question is this, I would really like to implement your system, but is movement as dynamic as seen in the video above possible with it? i.e. The sprinting, the strafing and the rest (using data editor of course)?

    Posted in: Project Workplace
  • 0

    posted a message on [Demo] Starcrafter [SCR] - Movement and Auto Attack

    There's about a 0.5 - 1 second delay after pressing a movement key on Battle.net. And that's with our shoddy latency here in Australia. It still felt quite playable though.

    Offline it's as smooth as any other game you might play. programmer's solution is a very good one, but there's a slight pause between pressing a key and the unit(s) moving offline, otherwise I'd probably incorporate it. You should all check it out though, it's very impressive. But since the main part of Starcrafter will take part offline, I'm happy to continue developing and wait to see if Blizzard ever find a solution for similar game types. :P

    If they don't...i'm sure the online entertainment value will outweigh the problem of the lag.

    Posted in: Project Workplace
  • 0

    posted a message on [Trigger] Clicking With Camera Mouse Enabled

    Contents

    Edit

    cecilofs' post below made a good point that the unit is deselected whenever you want to look with the camera. I've attached v2 of the solution below. Once "Lock Camera Mouse Relative Mode" is called, the unit is technically no longer highlighted because the cursor is automatically hidden.

    The new solution makes use of the original, but now the unit is stored in another variable when the mouse is down. And when the mouse is released (Up), the "Highlight On" trigger will be called if a unit is highlighted. The new version checks that the mouse up highlighted unit is the same one as when the mouse was pressed down and highlights it if so!

    Triggers

    • New Variable

    Triggers v2

    Mouse Down

    • Setting new variable if highlighted unit exists Mouse Down v2

    Highlight Off

    • Checks if highlighted unit is the same as the one when the mouse was pressed down Highlight Off v2

    Original Post

    Some of you may have played around with camera movement using the mouse. i.e. You click your mouse button and drag to move the camera around a point on the map. But there's one problem when using this technique: You can't click on anything to select it! This is a major problem for those wanting to be able to click as well as move the camera.

    Following is a basic tutorial on my solution for this problem which works quite well. It also lets you de-select a unit by clicking on an empty space.

    Here we go:

    First we'll set up the camera. This will also allow you to see why the workaround is needed.

    The Problem

    1. Place your unit on the map. Here I chose an Archon since it's big and shiny. Archon on Map
    2. Now make two triggers called "Mouse Down" and "Mouse Up". These will contain our events for when the mouse button is pressed down or up. Triggers
    3. In your "Mouse Down" trigger, set it to look like the following: Mouse Down
    4. "Mouse Up" should look like this, it's basically the opposite of the "Mouse Down" trigger since we just want to turn the camera rotation off. Mouse Up
    5. Test the map! If you left click anywhere on the map and move your mouse you will see that the camera moves. But hang on, why don't you try and select your unit? You can't right? And there's the problem which we can fix with the following solution:

    The Solution

    The solution makes use of the in-built event that is triggered when you hover your mouse over a unit.

    1. Add 2 new triggers called "Highlight On" and "Highlight Off" and 1 variable called "Highlighted Unit" and make its type a "Unit" Solution Triggers
    2. In "Highlight On" set it up to look like this: Highlight On
    3. "Highlight Off" is a little similar with a few tiny changes: Highlight Off
    4. Head to your "Mouse Down" trigger and just before you turn on all the camera actions add the following: (Note that "deselect all units..." is called "Clear Unit Selection" in the action list. Mouse Down Click
    5. That should be the last step right? Wrong. Last but not least we have to make the unit highlightable so that our highlight triggers actually work. To do this head into the Data Editor (Units), find your unit and uncheck Cannot Be Highlighted from Unit - Flags. I also unchecked Cannot Be Clicked purely for the sake of logic :P Data Editor

    Now test your map and you can see that you can not only move the camera with your mouse, but you may also click the unit and click off it to deselect! This should be very useful for those of you working on RPG type maps with a movable camera.

    Posted in: Tutorials
  • 0

    posted a message on [Demo] Starcrafter [SCR] - Movement and Auto Attack

    Here is a demo of the engine I've been building for Starcrafter [SCR].

    It's a little bit jumpy due to the screen casting, but it's completely smooth when actually playing it.

    It's a very basic demonstration on my test map of the movement system, running, turning, strafing, moving back, sprinting and moving with the right mouse and camera. Also shows right clicking an enemy to begin auto attacking it. Meaning the unit the player is controlling will attack the enemy while moving and even after moving away and back again.

    The first attack the unit begins to move towards the enemy, this is something I must disable. But enjoy the demonstration. There will be more (prettier) ones to come.

    Embed Removed: https://www.youtube.com/v/OuqqZcrZosY?fs=1
    Posted in: Project Workplace
  • 0

    posted a message on Enabling Mouse Click with Camera Mouse Relative Mode Locked Solved!

    EDIT: Tutorial can be found here: http://forums.sc2mapster.com/resources/tutorials/10136-trigger-clicking-with-camera-mouse-enabled/

    I've just solved the problem a minute ago so expect a full tutorial in the coming day or two.

    The problem is quite common, when using the mouse to look with the camera when holding the left mouse down the player becomes unable to click or make any selection.

    OneTwo had a solution in one of his earlier tutorials, that being to move a small circular region to the point where the mouse was clicked and to pick a random unit from within that region to select and attack.

    This was a good work around but only to a point. I wanted the player to actually be choosing the unit or object they want to select so I spent some time researching and fiddling around with certain triggers and digging through the data editor for some way to disable the cursor being hidden. None of this was very fruitful, but a very simple solution came to mind:

    Keep in mind a full tutorial with images and steps will be available soon.

    To start off you have your mouse looking triggers: Mouse Down Mouse Up

    In 'Mouse Down' you would find a function to turn Lock Camera Mouse Relative Mode On. And in 'Mouse Up' you would turn it off again.

    To enable clicking (or a workaround) add a global variable called "Highlighted Unit" and then add two triggers:

    Unit Highlighted

    Event

    • Unit Selection - (Any Unit) is (Highlighted) by Player (Any Player)

    Actions

    • Set Variable - (Highlighted Unit) = (Triggering Unit)

    Unit Unhighlighted

    Event

    • Unit Selection - (Highlighted Unit) is (Unhighlighted) by Player (Any Player)

    Actions

    • Set Variable - (Highlighted Unit) = (No Unit)

    Mouse Down

    At the top of your mouse down trigger insert:

    • Unit Selection - Deselect all units for player (Player)
    • Unit Selection - (Select) (Highlighted Unit) for player (Player)
    • ...Turn camera mouse relative mode on etc....

    Data Editor

    Now head to the data editor and find the unit you want to click and make sure the "Cannot be Highlighted" flag is disabled.

    And that should be it! It also means that if you click on a space that isn't a unit, the previous selected unit will be unhighlighted.

    Expect a prettier post soon.

    Posted in: Triggers
  • 0

    posted a message on [Misc] Text Styles (75% done)

    @Mienk: Go

    A list is also being compiled on the wiki: http://wiki.sc2mapster.com/galaxy/data/actors/ui/highlight-tooltip/

    Posted in: Tutorials
  • 0

    posted a message on [Library] Third Person Movement

    @MangledMind: Go

    Hi MangledMind,

    The camera will always stay with the unit you originally set as your player unit. If you ever need to change the unit, just run the SCR_Add Player Unit action with the player number and the new unit.

    On the units you want to select, make sure the "unselectable" flag is off.

    I haven't tested this online, so I have no idea how much network traffic it causes. The arrays have 16 (15 minus pos 0) keys so I guess it's possible to have 15 players. I recoded it with a goal of making as little changes to movement as possible to save traffic, but a lot of movement functionality had to be sacrificed. I went with functionality at the moment until I get to testing it online.

    EDIT: Just tried it online and it suffers as any WASD movement suffers. i.e. won't trigger the move until 0.5-1 second past the actual key press. It still feels playable though, but only as an RPG.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] Third Person Movement

    Version 0.2 released. Comes in SC2Mod format, only one trigger required to initiate the entire system on any unit you want. System was recoded from scratch to make better use of in-built editor features.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] Third Person Movement

    @Sware: Go

    Thank you for the feedback!

    I've been working on totally redoing the system to make better use of built in behaviours and animations. And to prevent using the 'Move Instantly To' functions to save network traffic.

    The scroll wheel will be fixed in the new version :)

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Data] Creating a Custom Hover Tooltip

    Contents

    1. Creating a Custom Tooltip
    2. Applying Styles

    Creating a Custom Tooltip

    To make changes to the tooltip follow these steps:

    1. Open your data editor (F7)
    2. Actors
      1. Change Data Type to "Actors".
      2. Find the unit you want to edit the tooltip for.
        1. Take note of what's written in the Unit Name field at the top, as we'll use this to find the respective unit.
      3. Find UI - Highlight Tooltip and double click on it.
      4. Change the Text Key field to something new. I like to use "Unit / <Unit Name> / Tooltip".
      5. Write your new tooltip in the text box.
      6. Click OK
    3. Units
      1. Change Data Type to "Units"
      2. Find the unit that you saw in the Unit Name field of the actor.
      3. Edit the Unit - Unit Flags
      4. Uncheck the flag No Tooltip
      5. Click OK
    4. Place the unit on to your map and click Test Document
    5. Now you can hover your mouse over the unit and see your new tooltip!

    Data Screen

    Actors

    Data Screen

    UI - Highlight Tooltip

    UI - Highlight Tooltip

    Units

    Unit - Unit Flags

    Unit - Unit Flags

    In Game

    Carrier Tooltip

    Applying Styles

    You can also apply styles to your tooltip like font style, font size, font colour and position. You can find a list of all styles and what they look like at the wiki entry ( Galaxy / Data / Actors / UI / Highlight Tooltip

    1. Open the UI - Highlight Tooltip value in the data editor (actors) again.
    2. Make sure Show Style Controls is checked. Display as Raw Text is optional. I recommend checking it as you can see exactly what's happening.
    3. Highlight the text you want to add a style to.
    4. The drop down box next to Apply Style should now be active.
    5. Choose your style, and click the Apply Style button.

    Data Screen

    Actors

    UI - Highlight Tooltip

    UI - Highlight Tooltip Styles

    In Game

    Carrier Tooltip with Styles

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