Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
A system I've had lying on my computer for months (at least since 6 months) awaiting the completion of the mastermind tank model (created by misha) as a request by him to create a system to allow the mastermind tank to function like a proper mastermind tank from RA2 and is meant to be used with the mastermind tank model, but it not restricted to this.
Done in Gui for simplicity for people who don't understand JASS and out of laziness to not remake it.
I turned the test map into a minigame (for no real reason other than for the hell of it)
Setup
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
-------- Creates the hashtable --------
Hashtable - Create a hashtable
-------- Sets the variable to the hashtable --------
Set Mind_Control_Hash = (Last created hashtable)
-------- Damage for having more than max units controlled --------
-------- As a base --------
-------- for every other unit over the limit, 1 more damage will be added --------
Set Config[1] = 10.00
-------- Max number of units --------
-------- There should not be decimals used in this number. --------
Set Config[2] = 3.00
-------- Mind Control AOE --------
Set Config[3] = 600.00
Mind Control
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
-------- Picks all units which are currantly under control of a mastermind tank --------
Unit Group - Pick every unit in Mind_Controlled and do (Actions)
Loop - Actions
-------- Gets the picked unit --------
Set Temp_Unit = (Picked unit)
-------- Gets the picked unit --------
Set Temp_UnitID = (Key (Picked unit))
-------- Checks to see if the unit is alive and then begins actions depending on the result --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit is alive) Equal to True
Then - Actions
-------- Sets the variable to the location of the corresponding Mastermind Tank --------
Set Temp_Point[1] = (Position of (Load 2 of Temp_UnitID in Mind_Control_Hash))
-------- This is what creates the visible bond --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 7777 of Temp_UnitID from Mind_Control_Hash) Equal to 8
Then - Actions
-------- Above is an mui wait condition --------
-------- Resets the wait --------
Hashtable - Save 0 as 7777 of Temp_UnitID in Mind_Control_Hash
-------- Creates the dummy unit --------
Unit - Create 1 Attack dummy for (Owner of Temp_Unit) at Temp_Point[1] facing Default building facing degrees
-------- Makes the dummy unit temporary --------
Unit - Add a 0.80 second Generic expiration timer to (Last created unit)
-------- Orders the unit to attack, this creates the 'chain' --------
Unit - Order (Last created unit) to Attack Temp_Unit
Else - Actions
-------- Increases the wait time --------
Hashtable - Save ((Load 7777 of Temp_UnitID from (Last created hashtable)) + 1) as 7777 of Temp_UnitID in Mind_Control_Hash
-------- Decreases the amount of controlled units by 1 --------
Hashtable - Save ((Load 10 of Temp_UnitID from Mind_Control_Hash) - 1.00) as 10 of (Load 2 of Temp_UnitID from Mind_Control_Hash) in Mind_Control_Hash
-------- Removes the unit from the unit group --------
Unit Group - Remove Temp_Unit from Mind_Controlled
-------- Returns ownership to the original owner --------
Unit - Change ownership of Temp_Unit to (Load 1 of Temp_UnitID in Mind_Control_Hash) and Change color
-------- Picks all Mastermind Tanks --------
Unit Group - Pick every unit in Mastermind_Tanks and do (Actions)
Loop - Actions
-------- Gets the picked unit --------
Set Temp_Unit = (Picked unit)
-------- Gets the picked unit --------
Set Temp_UnitID = (Key (Picked unit))
-------- Checks wether or not the Mastermind Tank is overloaded --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of Temp_UnitID from Mind_Control_Hash) Greater than Config[2]
Then - Actions
-------- Uses an mui wait to create delays between damage --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 7778 of Temp_UnitID from Mind_Control_Hash) Equal to 33
Then - Actions
-------- Above is an mui wait condition --------
-------- Resets the wait --------
Hashtable - Save 0 as 7778 of Temp_UnitID in Mind_Control_Hash
-------- Damages the Mastermind Tank --------
Unit - Cause Temp_Unit to damage Temp_Unit, dealing ((Config[1] + ((Load 10 of Temp_UnitID from Mind_Control_Hash) - Config[2])) x 1.00) damage of attack type Spells and damage type Normal
-------- Causes the unit to use it's overload animation, if the unit doesn't have this animation, remove it --------
Animation - Play Temp_Unit's stand hit animation
Else - Actions
-------- Increases the wait time --------
Hashtable - Save ((Load 7778 of Temp_UnitID from Mind_Control_Hash) + 1) as 7778 of Temp_UnitID in Mind_Control_Hash
Else - Actions
-------- Checks wether or not the Mastermind Tank is under 4 controlled units --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of Temp_UnitID from Mind_Control_Hash) Less than or equal to Config[2]
Then - Actions
-------- Allows the warning to go off again when the mastermind overloads --------
Hashtable - Save 0.00 as 50 of Temp_UnitID in Mind_Control_Hash
Else - Actions
-------- Checks wether or not the Mastermind Tank is dead or not then runs actions depending on the result --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is dead) Equal to True
Then - Actions
-------- Checks to see if the following actions have been done before for this particular tank --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 20 of Temp_UnitID from Mind_Control_Hash) Equal to 0
Then - Actions
-------- Sets the value to 1 so that these actions are not run again for this partiular tank --------
Hashtable - Save 1 as 20 of Temp_UnitID in Mind_Control_Hash
-------- Sets the variable to the location of the tank --------
Set Temp_Point[2] = (Position of Temp_Unit)
-------- Plays a 'release' sound --------
Sound - Play HolyBolt <gen> at 100.00% volume, located at Temp_Point[2] with Z offset 0.00
-------- Plays the units death animation --------
Animation - Play Temp_Unit's death animation
-------- Removes th tank from the group so that the dead animation works properly --------
Unit Group - Remove Temp_Unit from Mastermind_Tanks
-------- Sets the Temp_Group to all masterminds --------
Set Temp_Group[1] = (Units in (Playable map area) matching (((Level of Mind Control for (Matching unit)) Greater than 0) and (((Matching unit) is alive) Equal to True)))
-------- Picks the units in the Temp_Group --------
Unit Group - Pick every unit in Temp_Group[1] and do (Actions)
Loop - Actions
-------- Gets the picked unit --------
Set Temp_Unit = (Picked unit)
-------- Gets the picked unit --------
Set Temp_UnitID = (Key (Picked unit))
-------- If the tank is not within the Mastermind group this will add it to it. --------
If ((Temp_Unit is in Mastermind_Tanks) Equal to False) then do (Unit Group - Add Temp_Unit to Mastermind_Tanks) else do (Do nothing)
-------- Sets the handle to the tank --------
Set Mastermind_Tank = (Picked unit)
-------- Sets the unit variable to the tank --------
Set Mind_Control_Tank_Unit = Temp_Unit
-------- Sets the variable to the location of the tank --------
Set Temp_Point[1] = (Position of Temp_Unit)
-------- Sets units which are allowed to be taken control of and adds them to the Temp Group --------
Set Temp_Group[2] = (Units within Config[3] of Temp_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A Hero) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner
V1.0:
- Initial upload
V1.10:
- Removed useless functions
- Used variables to set picked units
- Removed the aura buff on the map-specific ability
V1.20:
- Changed the variable type of Temp_UnitID
Give credits if you use this system with your map, enjoy.
Link to Mastermind Tank model: http://www.hiveworkshop.com/forums/models-530/ra2-yr-mastermind-tank-191501/
AoE mind control (takes control of enemy units within a given proximity, but units can then leave this proximity)
Controlling more than 3 will cause overload damage as like RA2
The mastermin dies -> units released
Unit dies -> one less controlled.
Thats all there is to it really.
14:50, 28th Jun 2011
Maker:
Last created hashtable:(Load 7777 of (Key Temp_UnitID) from (Last created hashtable)) Equal to 8
Temp_UnitID should be an integer.
Maker, v1.20, 14.07.2011
Changes made, approved.
I would be able to reduce the lag from the sfx, but I'd require the creation of a specific missile with Ribbon effects to create the tail to be able to do it, however sinse this is not available at the current time, it's unavoidable without making the effect look terrible, as for running over, that was a game mechanic more than an ability, and can be done using immoliation alone, thus I don't think it'd be appropriate to add.
The lag though is purely caused by the amount of sfx on my computer I do not notice the effect of it when I control 20-30 units with a single mastermind tank
I could have sworn that the mastermind was a tank with a giant brain on it... Though, I could be wrong. Also, if the sfx is lagging it just use lightning
It was created to fit the spec misha requested P=
it originally had Lightning sfx, but it didn't fit/misha didn't want it/at long ranges it came all over the place (if you stretch lightning effects you'll see what I mean)
Hmm maybe add an ability to free all units. It kinda sucks if you control 4 units and see your Mastermind die slowly without having a chance to do anything against it.
Hmm maybe add an ability to free all units. It kinda sucks if you control 4 units and see your Mastermind die slowly without having a chance to do anything against it.
In YR, Masterminds die when overloaded unless you send your units to be killed
EDIT: Mind removing the "mastermind presence" altogether? it lags and obstructs the vision of my model, lol ^^
EDIT2: if not, then at least remove the "aura"
fail ... 5/5 for this, i had same idea to do, and i was finishing it :d
EDIT: After long testing, map gets serious FPS Drop, and if anyone wants to make army of tanks, that would cause huge fps dropping, idea is great, but method isn't best, + bow doesn't works when tank or units are moving. But all in all gj again
"Setup" trigger should be a Map Initialization event.
Temp_Group - This shouldn't be an array but rather a single variable for each Temp_Group[1/2/3] ... or even better, skip the Temp_Group and use the custom script "set bj_wantDestroyGroup = true"
Nice i see it's nothing like it now, nice spell though it is exactly like the mastermind tank.
edit: i think i found a bug randomly a dummy will attack another mastermind without taking it over, also if i control 4 units force kill 1 the mastermind still takes damage every second or two, you might want to check this.
Upon uploading and approval of the system, neither of those bugs existed, I'd assume map corruption from being old, that or there's some really special cercumstances when that happens.
Excellently-made, and I love a good over-powered master race Red Alert 2 reference. Masterminds were one of my favorite units. One question; may I edit this for my personal uses? I would love to implement this somewhere cool, but need to modify a couple of things.
I, too, ran into the issue described by Dangles20; once my Mastermind goes above 3 Mind-Controlled Targets, it takes damage from that point on until it dies (i.e. even killing off the extra ones doesn't stop it). This would be more of a problem for me, but I personally won't be using that aspect of it (if I have permission to edit).
Also, I think I'm going to quote this thread and Request an SFX for it; just too good/lag-saving/important to go without.
Certainly, you have permission to edit so long as this is credited and linked (if the map resource is on another site), and the new version is not redistributed as a new resource - I believe getting an appropriate ribbon effect model was attempted before but nobody took it up, but yes I agree with you whole-heartedly about it being lag saving, though I myself due to this being old have forgotten how you control the projectile frequency and such, I believe it's an attack from a dummy unit - can't remember if I ever made that attack homing or if there was some reason why I didn't, goodluck eitherway.
Certainly, you have permission to edit so long as this is credited and linked (if the map resource is on another site), and the new version is not redistributed as a new resource - I believe getting an appropriate ribbon effect model was attempted before but nobody took it up, but yes I agree with you whole-heartedly about it being lag saving, though I myself due to this being old have forgotten how you control the projectile frequency and such, I believe it's an attack from a dummy unit - can't remember if I ever made that attack homing or if there was some reason why I didn't, goodluck eitherway.
I'll have to see about that Ribbon. And yes, it appears you just used a Dummy Attacker with uber-Attack-Speed and that purple-arrow model to make an connected line... Once I get the ribbon, it shouldn't be an issue to make the attack speed much lower, to match the Tank's speed.
Actually, the way I'll be using it, a lot of my problems are already solved; as a "Mastermind Ward" for a Trollish hero, it can't move (just the target can), and it can't die (Ultimate ability), so the Overload damage not going away isn't an issue.
I'll let you know how this pans out. Thanks again!
It would be useful if there was a maximum range and maximum number of units controlled (as in it can only be used on X units at a time) in addition to the max units before damage.
I am absolutely flabbergasted to realize my last post in this topic (& ostensibly the last time I thought about using this) was 4 years ago.
Here we are, then. I've finally (re)downloaded it, imported it into my map, did all the troubleshooting (it replaced all the instances of Dummy Attackers & Mind Control abilities with already-existing custom units/abilities in my map, lol)... And it works. It's great! I plan on doing the 'streamer missile' thing (though I'm still trying to decipher that section of the code, trying to make sure I don't break it; is there a reason the Dummy Attacker exists for 0.80 seconds?), but overall I'm pleased.
It would be useful if there was a maximum range and maximum number of units controlled (as in it can only be used on X units at a time) in addition to the max units before damage.
I guess I just assumed that's what the Config variable in the Setup trigger was for... Unfortunately it's not. I cannot figure out how to hard-limit the number of mind-controlled units; for the purpose I am working towards, a stationary but destructible (don't know why 4-years-ago-Kyrbi0 thought it wasn't; it should be tough but destructible (well, wait, it is an Ultimate, maybe that's why...)) Ward that should only be able to mind control a certain number of target enemy units.
Unfortunately as it is, this 'Mind Control Ward' will simply keep snapping up nearby enemies. Whether or not it can die is besides the point.
The code was original built to specification which didn't have a hard limit for the mind controlled unit count - only a limit by which controlling more would deal damage, you'd have to add your own configurable for it and then when the code -would- add a new target compare it with the current number and if it's reached the max, don't add it pretty much only requires adding the configurable and an if-then-else, or additional condition when adding the targets
The code was original built to specification which didn't have a hard limit for the mind controlled unit count - only a limit by which controlling more would deal damage, you'd have to add your own configurable for it and then when the code -would- add a new target compare it with the current number and if it's reached the max, don't add it pretty much only requires adding the configurable and an if-then-else, or additional condition when adding the targets
I'm gonna sit down for several minutes & try to parse this, but in the mean-time, I should ask the primary question: "How willing would you be to making those changes?" : )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.