I have a boss who has an ability that targets players. The ability has some "aiming" time, and then a projectile fires at the target point. I have created a visual target warning for the players using Attach Model to Unit (trigger action) as the boss starts his "aiming". After that aiming period is over, I would like to freeze the target model's position, so that it stops following the player's unit. How can I get this effect?
So I've got a boss fight, added in a boss bar, and found out that although the numbers update properly when the boss's health reaches zero, the bar itself is not redrawn.
Is this just a fundamental obstacle in the editor or is there a workaround? (Other than the janky fix of setting the value to 1 and then back to 0 when the boss dies)
Thanks for the detailed and helpful response! I hate the data editor, but given how you described it that sounds like a very clean solution so I will go for it.
Edit: Worked like a charm, one minor thing though. I started by making the buff length 0.05 and it actually was too short (infinite teleport loop), so I knocked it up to 0.1 and it works fine. I have noticed that the editor seems to have problems with really short time windows (specifically durations less than 0.1 seconds), i.e. cannot make unit face angle instantly, cannot wait for very small amounts of time, etc.
-
And MaskedImpostor, that doesn't circumvent the issue at hand here. That was my initial implementation :P
I see that functions have an option to be made an operator, but I'm not really sure how to use this.
Has anyone had any success making custom operators?
If I wanted to create the classic unary increment operator, is this how I would go about it, or would that be something different? I'm getting very tired of doing Set Variable -> i = Arithmetic(i + 1) in GUI.
The functionality I am trying to create is simple - a 2-way teleport pad. Enter region A and you are teleported to B. Once you leave region B and re-enter, you are teleported back to region A. And the cycle continues ad infinitum.
My current approach uses 2 triggers, here is a rough outline:
Trigger1:Teleport(InitiallyON)Events:-UnitentersA-UnitentersBActions:-TurnTeleportOFF-Switch(triggeringregion)caseA: MovetriggeringunittoBcaseB: MovetriggeringunittoA// ~~ Problems unless I place a Wait here ~~-TurnTeleportEnableONTrigger2:TeleportEnable(InitiallyOFF)Events:-UnitexitsA-UnitexitsBActions:-TurnTeleportEnableOFF-TurnTeleportON
The issue is that even though I am turning TeleportEnable on after the move action (in theory), what's actually happening is that move action triggers the teleport enable. For example, lets say the unit enters A. That triggers Teleport and moves unit to B. Moving unit from A to B triggers TeleportEnable as the unit exits A. The unit enters B, triggering Teleport, and teleports back to A.
However, IF I place a wait in the commented line, everything works "fine," for 1 player anyway, with nothing else going on. But I easily see this bugging out with 10 players all teleporting around at the same time, and possible other waits that I need for the actual gameplay. I suppose I could use a periodic trigger or a timer to create a makeshift "safe" wait, but I'm really wondering if there's a clean way to implement this system, and what my actual problem is.
I have been getting this a lot as well randomly. It generally works if I wait a while and try later as the message suggests, however, it is very frustrating when I tell a friend I am going to logout quickly to publish and then they end up waiting for 20 minutes wondering where I am.
Ok thanks figured it out. The asset was the NexusWhat0 sound which is what I actually wanted to hear, was hearing something entirely different in the editor. Just doesn't make sense to me why the preview in the editor was not playing the right sound.
If anyone could quickly explain to me what sound assets are that would be cool, didn't find anything useful googling it.
I'm using the sound effect RejuvenateEnergySound in my map, when I previewed it in the editor it sounded cool, but in-game it sounds totally different - it's shorter and just lame. What's going on here? Same applies to the shield recharge sound.
(Posted in audio forum a while back and have gotten 0 response)
Using the play sound action (rather than the play sound at point action) should ensure that all players will hear this ability. In addition, since you are not messing with the data editor, you won't end up making a bunch of other sounds global accidentally at the same time. If you do this, you probably should get rid of the sound actor in the data editor so it doesn't double-play.
Its not about the total number of regions, but the number of shapes defining a region.
You say that as if I weren't clearly asking an entirely separate question; nonetheless, I will assume that you are saying I can have as many regions as I want in my map and nothing will break.
Note: For trigger B, the proper event is "Unit - Any unit is attacked."
I should also explain, a trigger is really a boolean function if you look at the script. It returns true if the conditions were true or it was told to ignore the conditions, otherwise it returns false. That being said, I still don't understand what he means by "If (Result of b trigger)."
I think his outline is a nice starting point to get you thinking in the right direction, but definitely not a fully functioning solution at this point.
(Literal means non-variable, this is because this is happening statically. I would recommend creating a constant string variable called BANK_NAME for your bank name, you will need it later also... Constants do count as literal values since the compiler inserts the literal value whenever it encounters a constant.Apparently although the editor lets you use a constant value in this field, I tested it out and it does NOT work! Use only a literal value here! You can still use your constant BANK_NAME everywhere else.
Use BANK_NAME for the string above if you created that constant. Bank[] should be an array of banks with size equal to number of players.
When you need to save a bank:
SetoptionSignatureforbank<bankvar>toEnable// optional step for securitySavebank<bankvar>
The editor gives you a "Bank is valid" function which checks for the signature, if you want to use the signature. Upon first loading the bank, you can check the validity and then clear the values if it is invalid.
Of course, the signature is just an algorithm, so people have figured out how to crack it. It will give you a small level of security, but will not deter those who are determined. For guaranteed security, you will need to implement your own encryption and decryption algorithms (recommended only once you are sure people are actually playing your map regularly)
0
Hi,
I have a boss who has an ability that targets players. The ability has some "aiming" time, and then a projectile fires at the target point. I have created a visual target warning for the players using Attach Model to Unit (trigger action) as the boss starts his "aiming". After that aiming period is over, I would like to freeze the target model's position, so that it stops following the player's unit. How can I get this effect?
0
So I've got a boss fight, added in a boss bar, and found out that although the numbers update properly when the boss's health reaches zero, the bar itself is not redrawn.
Is this just a fundamental obstacle in the editor or is there a workaround? (Other than the janky fix of setting the value to 1 and then back to 0 when the boss dies)
0
@Mille25: Go
Thanks for the detailed and helpful response! I hate the data editor, but given how you described it that sounds like a very clean solution so I will go for it.
Edit: Worked like a charm, one minor thing though. I started by making the buff length 0.05 and it actually was too short (infinite teleport loop), so I knocked it up to 0.1 and it works fine. I have noticed that the editor seems to have problems with really short time windows (specifically durations less than 0.1 seconds), i.e. cannot make unit face angle instantly, cannot wait for very small amounts of time, etc.
-
And MaskedImpostor, that doesn't circumvent the issue at hand here. That was my initial implementation :P
0
AHAH! This is the magic I have been looking for for so very long. (forum messed up my quote :( )
And thanks ScorpSCII, I actually never knew that function existed! Haha...
0
I see that functions have an option to be made an operator, but I'm not really sure how to use this.
Has anyone had any success making custom operators?
If I wanted to create the classic unary increment operator, is this how I would go about it, or would that be something different? I'm getting very tired of doing Set Variable -> i = Arithmetic(i + 1) in GUI.
0
The functionality I am trying to create is simple - a 2-way teleport pad. Enter region A and you are teleported to B. Once you leave region B and re-enter, you are teleported back to region A. And the cycle continues ad infinitum.
My current approach uses 2 triggers, here is a rough outline:
The issue is that even though I am turning TeleportEnable on after the move action (in theory), what's actually happening is that move action triggers the teleport enable. For example, lets say the unit enters A. That triggers Teleport and moves unit to B. Moving unit from A to B triggers TeleportEnable as the unit exits A. The unit enters B, triggering Teleport, and teleports back to A.
However, IF I place a wait in the commented line, everything works "fine," for 1 player anyway, with nothing else going on. But I easily see this bugging out with 10 players all teleporting around at the same time, and possible other waits that I need for the actual gameplay. I suppose I could use a periodic trigger or a timer to create a makeshift "safe" wait, but I'm really wondering if there's a clean way to implement this system, and what my actual problem is.
0
@T0ssWarr1or: Go
I have been getting this a lot as well randomly. It generally works if I wait a while and try later as the message suggests, however, it is very frustrating when I tell a friend I am going to logout quickly to publish and then they end up waiting for 20 minutes wondering where I am.
0
Title.
More discussion here: http://www.sc2mapster.com/forums/development/triggers/68129-regions-stop-working-after-merging-too-many-shapes/
0
Simple question but haven't found a way around this yet... I want to make some raised cliffs of any integer valued width, mainly 4/5/6/7.
0
@StealthToast: Go
Ok thanks figured it out. The asset was the NexusWhat0 sound which is what I actually wanted to hear, was hearing something entirely different in the editor. Just doesn't make sense to me why the preview in the editor was not playing the right sound.
If anyone could quickly explain to me what sound assets are that would be cool, didn't find anything useful googling it.
0
I'm using the sound effect RejuvenateEnergySound in my map, when I previewed it in the editor it sounded cool, but in-game it sounds totally different - it's shorter and just lame. What's going on here? Same applies to the shield recharge sound.
(Posted in audio forum a while back and have gotten 0 response)
0
I hate the data editor so much but I know you could do this in triggers.
Using the play sound action (rather than the play sound at point action) should ensure that all players will hear this ability. In addition, since you are not messing with the data editor, you won't end up making a bunch of other sounds global accidentally at the same time. If you do this, you probably should get rid of the sound actor in the data editor so it doesn't double-play.
0
You say that as if I weren't clearly asking an entirely separate question; nonetheless, I will assume that you are saying I can have as many regions as I want in my map and nothing will break.
0
Nvm, looks like SoulTaker drew up a nice outline.
Note: For trigger B, the proper event is "Unit - Any unit is attacked."
I should also explain, a trigger is really a boolean function if you look at the script. It returns true if the conditions were true or it was told to ignore the conditions, otherwise it returns false. That being said, I still don't understand what he means by "If (Result of b trigger)."
I think his outline is a nice starting point to get you thinking in the right direction, but definitely not a fully functioning solution at this point.
0
Quick rundown on steps to using a bank:
At map initialization:
(Literal means non-variable, this is because this is happening statically.
I would recommend creating a constant string variable called BANK_NAME for your bank name, you will need it later also... Constants do count as literal values since the compiler inserts the literal value whenever it encounters a constant.Apparently although the editor lets you use a constant value in this field, I tested it out and it does NOT work! Use only a literal value here! You can still use your constant BANK_NAME everywhere else.When you need to get a value from your bank:
Use BANK_NAME for the string above if you created that constant. Bank[] should be an array of banks with size equal to number of players.
When you need to save a bank:
The editor gives you a "Bank is valid" function which checks for the signature, if you want to use the signature. Upon first loading the bank, you can check the validity and then clear the values if it is invalid.
Of course, the signature is just an algorithm, so people have figured out how to crack it. It will give you a small level of security, but will not deter those who are determined. For guaranteed security, you will need to implement your own encryption and decryption algorithms (recommended only once you are sure people are actually playing your map regularly)