• 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    @zISilenced: Go

    Sorry if I confused you with all my earlier edits. While it's possible to do it as you're doing it, I'd suggest doing what I wrote in my last edit. That is:

    Spawn Unit
        Events
            Timer - Every 1.0 seconds of Real Time
        Local Variables
            Unit Onwer = 0 <Integer>
            Unit Type = No Game Link <Game Link - Unit>
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Number of Living units in (Any units in Spawn Me owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 1
                Then
                    Unit Group - Pick each unit in (Any units in Spawn Me owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                        Actions
                            Variable - Set Unit Onwer = (Owner of (Picked unit))
                            Variable - Set Unit Type = (Unit type of (Picked unit))
                    Unit - Create 1 Unit Type for player Unit Onwer at (Center of Spawn Here) using default facing (No Options)
                Else
    

    This trigger will spawn whatever unit enters the Spawn Me region, for the player that owns that unit, and you can easily add conditions to only allow certain units - or choose a set player, rather then "whoever owns the unit". No need for multiple triggers this way. :p

    Edit: And also, of course, add a condition to make sure the unit count is less then 100.

    Posted in: Triggers
  • 0

    posted a message on Units Patrol in moving region?

    @SouLCarveRR: Go

    This should work great, but in case a Viking ends up outside of the region at any point (like if it tries to chase something that your Battlecruiser isn't going for and they end up going in different directions) you might want to add all the Vikings to a set unit group as they spawn. Then just choose that unit group instead of the above "unit group(convert units in region( convert cicle to region from point (position of unit (the battle crusier) radius of "20")" and they'll get the order no matter where they are.

    Posted in: Triggers
  • 0

    posted a message on Diplomacy Trigger

    @davyswin: Go

    Count the amount of units in the specific region, and set "matching" to "Required: Structures". Below is a trigger that modifies the player's minerals to add 100 minerals per structure on the map.

    Player - Modify player 1 Minerals: Add ((Number of Living units in (Any units in (Entire map) owned by player Any Player matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most Any Amount)) * 100)
    
    Posted in: Triggers
  • 0

    posted a message on Interface help please!

    @Baldey: Go

    Cool tutorial, I'll take a look on it later.

    Otherwise the search function is really your best bet. You will, hopefully, be able to find information on more specific issues that way too. But I guess you could try http://forums.sc2mapster.com/resources/tutorials/6776-tutorials-triggers-character-hero-selection/ - it helped me get through the initial dialog creation process, and provides extra credit as well.

    Posted in: Triggers
  • 0

    posted a message on Play sound when unit has no energy left

    @Darkmatter42: Go

    It's not that common for a unit to actually reach 0 energy. Usually you have like 3 or 5 or so remaining, and since energy is a real value (like s3rius said) you could even have 0.2 and your trigger wouldn't fire. You should just check for < 10 or something, and you'd most likely get it to go off more often. If that was your problem.

    Though I'm guessing the sound would go off as you regen as well, with the event you're using. So a sound would be played when you hit, for example, 5 energy, and then again as you regen up to 6, and again at 7 etc. Maybe some kind of on-screen effect might be a better way to display low energy?

    Posted in: Triggers
  • 0

    posted a message on [Release / Update] Poker Defense - Full Deck

    @BloodyOrange: Go

    I'm not sure what you mean, but all the standard poker hands / poker combinations are in the game - and has been from the start; High Card, Ace High, Pair, Rockets (this one isn't standard, I know, it's a Texas Hold 'Em term), Two Pair, Three of a Kind, Straight, Royal Straight, Flush, Full House, Four of a Kind, Straight Flush and, of course, Royal Straight Flush.

    On another note, 0.6 is out. Fixed an issue with people leaving but their spawn points not being disabled. Also, it's a lot more challenging now then it was in the earlier versions. Heroes / shop coming soon!

    Edit: Yay for grammar!

    Posted in: Project Workplace
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    @zISilenced: Go

    When selecting the variable type, pick "Unit Type". Since the unit type variable will be a link to a specific unit type in the game, it's called a game link in the editor. That's why it says "Game Link - Unit". Set the initial value of a the variable to whatever type of unit you want - and then you can just refer to that variable instead of a unit on the map.

    Edit: Did a neater solution. I think. (Look below for another edit.)

    Spawn Unit
        Events
            Timer - Every 1.0 seconds of Real Time
        Local Variables
            Unit Onwer = 0 <Integer>
            Unit Type = No Game Link <Game Link - Unit>
            Unit Count = 0 <Integer>
        Conditions
        Actions
            Unit Group - Pick each unit in (Any units in Spawn Me owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                Actions
                    Variable - Modify Unit Count: + 1
                    Variable - Set Unit Onwer = (Owner of (Picked unit))
                    Variable - Set Unit Type = (Unit type of (Picked unit))
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Unit Count == 1
                Then
                    Unit - Create 1 Unit Type for player Unit Onwer at (Center of Spawn Here) using default facing (No Options)
                Else
            Variable - Set Unit Count = 0
    

    This trigger checks every second, counts the units in the region, and spawns a copy of a unit if there's only one unit in the region. It'll also spawn for the player that owns the unit, rather then for a set player - in case you need that. Can easily be switched back of course.

    Edit: Here's a better version of the above trigger. Nothing like learning while helping.

    Spawn Unit
        Events
            Timer - Every 1.0 seconds of Real Time
        Local Variables
            Unit Onwer = 0 <Integer>
            Unit Type = No Game Link <Game Link - Unit>
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Number of Living units in (Any units in Spawn Me owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 1
                Then
                    Unit Group - Pick each unit in (Any units in Spawn Me owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                        Actions
                            Variable - Set Unit Onwer = (Owner of (Picked unit))
                            Variable - Set Unit Type = (Unit type of (Picked unit))
                    Unit - Create 1 Unit Type for player Unit Onwer at (Center of Spawn Here) using default facing (No Options)
                Else
    
    Posted in: Triggers
  • 0

    posted a message on Diplomacy Trigger

    @davyswin: Go

    This will create a timer with a 2 sec duration that, when it expires, restarts. In the "Income Timer Restart" trigger, just add how you want the income to be done. I guess that's what you're after?

    Income Timer = (New timer) <Timer>
    
    Income Timer Start
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Timer - Start Income Timer as a One Shot timer that will expire in 2.0 Real Time seconds
            Timer - Create a timer window for (Last started timer), with the title "Income:", using Remaining time (initially Visible)
    
    Income Timer Restart
        Events
            Timer - Income Timer expires
        Local Variables
        Conditions
        Actions
            Timer - Restart Income Timer
    
    Posted in: Triggers
  • 0

    posted a message on need help with give region?

    @davyswin: Go

    Rescue units, if I'm not mistaken, only works for neutral units. Player 0 in the editor is neutral by default, and it would thus work on units owned by that player. What uiasdnmb wrote works if the units belong to a non-neutral player - basically any human player or computer.

    Posted in: Triggers
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    Okay, I made it work. But in a rather crude way. One variable for the unit type of the unit, and three triggers. Edit: Both the region and the variable is called Spawn Me. Sorry for the confusion.

    Spawn Me = Tube <Game Link - Unit>
    
    Spawn Go
        Events
            Unit - Any Unit Enters Spawn Me
        Local Variables
        Conditions
        Actions
            Variable - Set Spawn Me = (Unit type of (Triggering unit))
    
    Spawn Stop
        Events
            Unit - Any Unit Leaves Spawn Me
        Local Variables
        Conditions
        Actions
            Variable - Set Spawn Me = Tube
    
    Spawning
        Events
            Timer - Every 1.0 seconds of Real Time
        Local Variables
        Conditions
            Spawn Me != Tube
        Actions
            Unit - Create 1 Spawn Me for player 1 at (Center of Spawn Here) using default facing (No Options)
    

    The Tube (it's a unit in the editor for some reason) is just a way of stopping the spawn if there's no unit in the region. These triggers will always spawn the last unit that entered the region, so you can place any number in the region and still just get one unit type spawning. If any of these unit leave, however, it'd stop spawning even if there are other units still in the region.

    For some reason I just can't reproduce stuff like "If player X has X units of unit type X in region X" from the classic SC editor. :<

    Posted in: Triggers
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    @zISilenced: Go

    It means SC2 can't find the Event Unit, or Triggering Unit, referred to in the trigger. Since the event is Every 1.0 Seconds, there is no Triggering Unit. An event like Unit Enters Region would let you refer to a Triggering Unit.

    I'm trying to work out how to do what you're after, hopefully I'll have something soon.

    Posted in: Triggers
  • 0

    posted a message on [Release / Update] Poker Defense - Full Deck

    Updated! Sorry all for releasing such a buggy version, but now everything's in order. Or should be, anyway. I can't find any more bugs but I'm sure someone else can.

    Hope you'll enjoy it!

    Edit: Balancing is hard. -.- Going to become easier to beat as I add the heroes, but it's already too easy. Hm... I wonder what would happen if I just doubled the enemy health...

    Posted in: Project Workplace
  • 0

    posted a message on [Release / Update] Poker Defense - Full Deck

    @BuuGhost: Go

    It's fixed now. I don't know how I broke it, but the last version (0.3) fixes it - you're no longer allied with the enemy. Sadly, the map still only works for 1 player (in player slot 1). This is my first map so the triggers are a bit messed up, but I'm making my way through them and I'll have it up and running tomorrow if not tonight. Sorry about all this.

    Edit: Well, at least I've learned that using comments is a great way of making heads or tails of what you've done. I have to go to bed now, but this will be fixed shortly.

    Posted in: Project Workplace
  • 0

    posted a message on [Release / Update] Poker Defense - Full Deck

    Sorry, been out for two days. Damn cold.

    @Conan55: Go

    Yes, I actually played the map today and it seems the lobby got screwed up. Player don't get the slots they're supposed to get, and I was even allied with the enemy units. Meh. I'll get right on that. Sorry for the inconvenience. (Hm... Saying that makes me feel rather important for some reason.)

    Edit: Managed to fix the lobby issue (and now I feel really stupid). Working on the "cards not showing"-thing. I got to start trying the map in another slot then player 1.

    Posted in: Project Workplace
  • 0

    posted a message on [Release / Update] Poker Defense - Full Deck

    @Clord: Go

    I always play like that, because of all the "let's spawn 10.000 units!"-kind of maps. But you're right, I'll upload some better quality screenshots ASAP.

    @Yaos01: Go

    I noticed that myself but I'm not sure why. It worked with the first version, it was in the 0.2 update that it vanished. I'll see if I can get it fixed today. Thanks for the heads up.

    @Skittles17: Go

    Thanks. I'm actually looking for someone to host my map on the non-EU servers, so more people can play it.

    Also, as mentioned, I did some bug fixes and released v0.2. I also significantly increased the enemy health - it should be better balanced and more challenging now (on the harder difficulty settings anyway).

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