In my map there will be prisoners controlled by a neutral computer player. Whenever any players units comes in contact with a prisoner, that player gains control of it.
A player can bring a prisoner to a building. At the building the player can choose to permanently convert a prisoner into a marine, medic or ghost.
I need a push in the right direction, cause I have no idea where to start to get this to work.
Check out this demo map, basicly use a buff with a periodic search for just a single target that then converts the caster unit to the target player using a modified neural parasite like buff. As for the train to marine etc, just give it a hidden buff that enumerates the area for the building that a requirement uses for the Train type ability slots.
Everything is working fine, but the civilian seems to get converted every time an enemy unit gets within range. We want it to be a one time deal for that specific unit.
Each civilian should only be converted once, by the first player in range. Any idea how this can be done?
Just throw in a Remove Behavior effect so that on conversion it removes the converter buff. Also my map is for learning purposes and not copying, if you copy directly from it you will find it will not work as you want.
Just throw in a Remove Behavior effect so that on conversion it removes the converter buff. Also my map is for learning purposes and not copying, if you copy directly from it you will find it will not work as you want.
Where shall I add the Remove Behaviour effect? To the "test1 ownership buff". Effect: Final? Effect: Initial? I try to add it at lots of places, nothing works :(
"A player can bring a prisoner to a building. At the building the player can choose to permanently convert a prisoner into a marine, medic or ghost. "
Event
"any unit" changes ownership
Conditions
AND
"unit-type of triggering unit" = "prisoner"
"owner of triggering unit" = 0 (neutral)
Actions
Issue order to "triggering unit" - "smart command" to "closest unit to triggering unit"
Wait until "Distance between triggering unit and XXXXX" < "Y"
Replace "triggering unit" with "whatever unit you want"
...where XXXXX is a variable (or a function) defining which building is a prison that your player owns. It can be a little tricky, but try anything you can think of to be absolutely sure this refers to the building you bring the prisoners to. Something like "unit in region matching condition" is quite useful as it contains enough parameters to define almost any unit if it isn't stored in a variable already.
...and where Y is the radius around the prison position which will be used to detect a prisoner is close. 2 should be enough, make it 3 or maybe 4 just to be sure while testing.
...If you want to give the player the ability to choose which type of unit replaces the prisoner, include the Replace action in a Switch. You can add a few actions before that switch that will define a integer variable (by clicking a menu button for example, or picking a random number from 1 to 3). Depending on this value, the switch will replace the prisoner by the matching unit type defined in the switch (and you can also apply nice VFXs in the process, or do whatever you want to the prisoner like healing him or making him play an animation, playing an announcer voice or whatever... it's simple but it's a nice touch if you're into such details).
It's pretty basic but should work (I'm doing this by memory so maybe I made a few mistakes, but you'll figure it out), it is a little bit safer to store the prisoner unit in a variable as the first action though, instead of using "triggering unit" everywhere as a reference... In fact it's probably mandatory, or else "triggering unit" could refer to a non-existing unit by the time you'd reach the prison. Hope this helps.
Or use a Specialize ability on the building that uses a Search Area effect with an Enumerate Area validator that uses a Issue Order effect on one of them to use a slot of the Train ability on the prisoner unit. As the Train kills the using unit like the zerg larvae train it looks like one goes to the other.
Or use a Specialize ability on the building that uses a Search Area effect with an Enumerate Area validator that uses a Issue Order effect on one of them to use a slot of the Train ability on the prisoner unit. As the Train kills the using unit like the zerg larvae train it looks like one goes to the other.
What shall I link the issue order effect with? The unit, building or an other effect?
There will be a couple of "houses" players can bring their prisoners to and convert them into marines, firebats etc. Will this work everywhere for every player?
The Issue Order targets a prisoner targeted by the Search Area effect and orders it to use one of the slots of the hidden Train ability on the prisoner. It will work for every player as long as there is at least one prisoner within range of the building. The Specialize ability allows several slots of effects to be trained so is good for this kind of thing, you put that on the building. The Enumerate Area validator on the Search Area effects is just to prevent you using the ability if there is no prisoners nearby.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
The Issue Order targets a prisoner targeted by the Search Area effect and orders it to use one of the slots of the hidden Train ability on the prisoner. It will work for every player as long as there is at least one prisoner within range of the building. The Specialize ability allows several slots of effects to be trained so is good for this kind of thing, you put that on the building. The Enumerate Area validator on the Search Area effects is just to prevent you using the ability if there is no prisoners nearby.
The issue order shall be added to the Search Area effect?
Cause the search area effect, with the help of the validator, detects if there is a prisoner nearby. If there is a prisoner nearby, the Issue order effect effects the prisoner.
But there seems to be no way I can link Issue order and Search area effect together?
The units that the prisoner can be converted into (aka train) is added on the specialize ability?
The issue order shall be added to the Search Area effect?
Cause the search area effect, with the help of the validator, detects if there is a prisoner nearby. If there is a prisoner nearby, the Issue order effect effects the prisoner.
But there seems to be no way I can link Issue order and Search area effect together?
The units that the prisoner can be converted into (aka train) is added on the specialize ability?
What you say in the first two paragraphs is how it is meant to work.
You want the Search - Area - Effect field of the Search Area to use the Issue Order effect.
The units the prisoners are converted into are added to the Train ability.
You have the Train ability on the prisoners but do not link any buttons to the prisoner command card. This will mean they can only be trained using the Issue Order effect. The Specialize ability on the building uses the Search Area effect to find an individual prisoner and then order it to train.
Just throw in a Remove Behavior effect so that on conversion it removes the converter buff.
I notice that I have missed this thing in my map. When a neutral prisoner comes in contact with a player, that player gains permanent control of the prisoner. Right now a prisoner can be controlled back and forth between players as soon as they come in contact with it.
How do I get the remove behaviour effect to remove the behaviours from the prisoners after it has been converted one time? (So it can no longer be converted.)
Add a Remove Behavior effect to the Set effect (1test set) which removes the buff that applies the search (1test search buff). This way when it applies the ownership change it destroys the buff that allows further changes.
Also you will notice in the original state it only allows a change if there are no friendly units nearby to protect it.
Also you will notice in the original state it only allows a change if there are no friendly units nearby to protect it.
Oh, I was struggling hard to get this to work in my map. I thought it worked in your map ^^
I want a neutral unit (civilian) to be converted to the first player who first approaches it and then beloning to that player for the rest of the game. (Like neutral units in the WC3 editor, where a player could find neutral units and gain permanent control of them.)
What changes do I need to do to make this work? Can I make any changes to get this to work or do I have to start from scratch?
Because the current system is brilliant in a snatch and grab game. But that is not what I need. I need a system for neutral units that are spread out on my map. Players need to find them to gain permanent control of them.
Add a Remove Behavior effect to the Set effect (1test set) which removes the buff that applies the search (1test search buff). This way when it applies the ownership change it destroys the buff that allows further changes.
Or add a remove validator to the search buff of the Unit Compare Behavior Count type that looks for the conversion buff.
Why not do this, have a charge effect that you add to when a prisoner is brought in, then the charge effect is applied to the 'build/create unit' effect or behavior...
In my map there will be prisoners controlled by a neutral computer player. Whenever any players units comes in contact with a prisoner, that player gains control of it.
A player can bring a prisoner to a building. At the building the player can choose to permanently convert a prisoner into a marine, medic or ghost.
I need a push in the right direction, cause I have no idea where to start to get this to work.
Any suggestions how this can be done?
Check out this demo map, basicly use a buff with a periodic search for just a single target that then converts the caster unit to the target player using a modified neural parasite like buff. As for the train to marine etc, just give it a hidden buff that enumerates the area for the building that a requirement uses for the Train type ability slots.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Everything is working fine, but the civilian seems to get converted every time an enemy unit gets within range. We want it to be a one time deal for that specific unit.
Each civilian should only be converted once, by the first player in range. Any idea how this can be done?
Just throw in a Remove Behavior effect so that on conversion it removes the converter buff. Also my map is for learning purposes and not copying, if you copy directly from it you will find it will not work as you want.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Where shall I add the Remove Behaviour effect? To the "test1 ownership buff". Effect: Final? Effect: Initial? I try to add it at lots of places, nothing works :(
I would put it in 1test set. Still I advise you look at it and fully understand what is going on before using it.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
To convert the prisoners works fine now!
But how can this part be done?
"A player can bring a prisoner to a building. At the building the player can choose to permanently convert a prisoner into a marine, medic or ghost. "
Either with triggers or in data editor.
Anyone with any ideas?
Event
"any unit" changes ownership
Conditions
AND
Actions
Issue order to "triggering unit" - "smart command" to "closest unit to triggering unit"
Wait until "Distance between triggering unit and XXXXX" < "Y"
Replace "triggering unit" with "whatever unit you want"
...where XXXXX is a variable (or a function) defining which building is a prison that your player owns. It can be a little tricky, but try anything you can think of to be absolutely sure this refers to the building you bring the prisoners to. Something like "unit in region matching condition" is quite useful as it contains enough parameters to define almost any unit if it isn't stored in a variable already.
...and where Y is the radius around the prison position which will be used to detect a prisoner is close. 2 should be enough, make it 3 or maybe 4 just to be sure while testing.
...If you want to give the player the ability to choose which type of unit replaces the prisoner, include the Replace action in a Switch. You can add a few actions before that switch that will define a integer variable (by clicking a menu button for example, or picking a random number from 1 to 3). Depending on this value, the switch will replace the prisoner by the matching unit type defined in the switch (and you can also apply nice VFXs in the process, or do whatever you want to the prisoner like healing him or making him play an animation, playing an announcer voice or whatever... it's simple but it's a nice touch if you're into such details).
It's pretty basic but should work (I'm doing this by memory so maybe I made a few mistakes, but you'll figure it out), it is a little bit safer to store the prisoner unit in a variable as the first action though, instead of using "triggering unit" everywhere as a reference... In fact it's probably mandatory, or else "triggering unit" could refer to a non-existing unit by the time you'd reach the prison. Hope this helps.
Or use a Specialize ability on the building that uses a Search Area effect with an Enumerate Area validator that uses a Issue Order effect on one of them to use a slot of the Train ability on the prisoner unit. As the Train kills the using unit like the zerg larvae train it looks like one goes to the other.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
What shall I link the issue order effect with? The unit, building or an other effect?
There will be a couple of "houses" players can bring their prisoners to and convert them into marines, firebats etc. Will this work everywhere for every player?
"uses a Issue Order effect on one of them"
What do you mean by them?
The Issue Order targets a prisoner targeted by the Search Area effect and orders it to use one of the slots of the hidden Train ability on the prisoner. It will work for every player as long as there is at least one prisoner within range of the building. The Specialize ability allows several slots of effects to be trained so is good for this kind of thing, you put that on the building. The Enumerate Area validator on the Search Area effects is just to prevent you using the ability if there is no prisoners nearby.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
The issue order shall be added to the Search Area effect?
Cause the search area effect, with the help of the validator, detects if there is a prisoner nearby. If there is a prisoner nearby, the Issue order effect effects the prisoner.
But there seems to be no way I can link Issue order and Search area effect together?
The units that the prisoner can be converted into (aka train) is added on the specialize ability?
What you say in the first two paragraphs is how it is meant to work.
You want the Search - Area - Effect field of the Search Area to use the Issue Order effect.
The units the prisoners are converted into are added to the Train ability.
You have the Train ability on the prisoners but do not link any buttons to the prisoner command card. This will mean they can only be trained using the Issue Order effect. The Specialize ability on the building uses the Search Area effect to find an individual prisoner and then order it to train.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I notice that I have missed this thing in my map. When a neutral prisoner comes in contact with a player, that player gains permanent control of the prisoner. Right now a prisoner can be controlled back and forth between players as soon as they come in contact with it.
How do I get the remove behaviour effect to remove the behaviours from the prisoners after it has been converted one time? (So it can no longer be converted.)
Add a Remove Behavior effect to the Set effect (1test set) which removes the buff that applies the search (1test search buff). This way when it applies the ownership change it destroys the buff that allows further changes.
Also you will notice in the original state it only allows a change if there are no friendly units nearby to protect it.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Oh, I was struggling hard to get this to work in my map. I thought it worked in your map ^^
I want a neutral unit (civilian) to be converted to the first player who first approaches it and then beloning to that player for the rest of the game. (Like neutral units in the WC3 editor, where a player could find neutral units and gain permanent control of them.)
What changes do I need to do to make this work? Can I make any changes to get this to work or do I have to start from scratch?
Because the current system is brilliant in a snatch and grab game. But that is not what I need. I need a system for neutral units that are spread out on my map. Players need to find them to gain permanent control of them.
I just told you the single step needed.
Or add a remove validator to the search buff of the Unit Compare Behavior Count type that looks for the conversion buff.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Why not do this, have a charge effect that you add to when a prisoner is brought in, then the charge effect is applied to the 'build/create unit' effect or behavior...
Please give more details.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg