yeah i try to make map and i dont know about anything to triggers, :D (how they work)
if u guys can tell how to i can make all this to work its then to ready :D
structure switch owner then to someone attack it to low or something like that.
income in 2 ways
1st, stuctures how i can make them to produce income
2nd, how i can set time to its come income about 20 cooldown at each player.
and that haze or what is that but u cannot see the full map if ur troops isnt there.
yeah i really tyed google all this but google dint want to tell me :(
The Event Any Unit is Attacked fires anytime a unit is attacked by a Unit. I don't know if certain abilities would bypass this or not.
The first condition checks to make sure that it's a building. If you use unique buildings, they have to have the structure attribute tag enabled.
The And makes sure it also checks for the second condition.
The second condition checks to see if it's life is below a certain percentage. This is found under the function Unit Property. I have it set to 33% as an example.
The first action changes the ownership. Triggering unit refers to the attacked unit. The owner of function calls a player from a unit, and finally the attacking unit function should call the unit that attacked the building. It appears greyed out, so it may not recognize the attacking unit properly.
The second action simply resets the units life to 100%. You may want to lower it to say... 50% for more realism, but if you don't change it at all, it will change the owner again as soon as someone else attacks it.
and that haze or what is that but u cannot see the full map if ur troops isnt there.
Under the terrain window, at the top will be a map drop down. Under Map Options, one of the tabs will have an option to change initial fog of war from grey to black.
I am very curious on how to make structure produce income just like automated gas refineries. I tried doing it through data but it's way to complicated. Perhaps there's an action of some sorts?
Well, since this question was asked in the triggers thread, I can give my two cents on how to do it with triggers. This won't show the gains like an automated refinery, but it will work (In theory)
Make a trigger go off every 20 game time seconds.
Then make an action to pick all players and do:
Modify (picked Player) (Minerals) (Add) (Number of (Unit Type) owned by (Picked Player))*(Production for "x")
If you only have one building type, then all you need to do is set the unit type to that building and replace Production for "x" with however many minerals you want the building to produce every 20 seconds.
If you want different building types (like a Level 1 Production building, level 2, etc.) then copy paste the modify action and change the unit type and multiplyer.
Yeah, the Fog of War question made me think he didn't even do a forum search, but I was just so happy that I had a working theory of how to make the trigger that I wanted to test it function wise and make it work. And any little break from all of my data editing is a nice change. I really need to start dipping into the xml view and start learning that side of things.
Knowing how to pick functions from a list and knowing how to write in code are worlds apart for me right now.
I am very curious on how to make structure produce income just like automated gas refineries. I tried doing it through data but it's way to complicated. Perhaps there's an action of some sorts?
Here's a map I barely started where pretty much all I did was make an income producing behavior, lol. It's called "Imposter - Vespene Generator" and "Imposter - Mineral Generator".
If people are interested maybe I could look back at how I did it and make a tutorial (shrugs).
hey i tryed to make this Events
Unit - Any Unit is attacked with Any Weapon
Local Variables
Conditions
((Unit type of (Triggering unit)) has Structure attribute) == True
And
Conditions
((Triggering unit) Life (Percent) (Current)) <= 33.0
Actions
Unit - Change ownership of (Triggering unit) to player (Owner of (Attacking Unit)) and Change Color
Unit - Set (Triggering unit) Life (Percent) to 100.0
but i get that in triggers :( yeah... :D what i did wrong
Is it not compiling the script or is it simply not working in game? And do you have more than one type of "tower" you're trying to take over or are they all the same unit type?
yeah i try to make map and i dont know about anything to triggers, :D (how they work) if u guys can tell how to i can make all this to work its then to ready :D
yeah i really tyed google all this but google dint want to tell me :(
ty if u helped me :D
@joppeownaaj: Go
The Event Any Unit is Attacked fires anytime a unit is attacked by a Unit. I don't know if certain abilities would bypass this or not.
The first condition checks to make sure that it's a building. If you use unique buildings, they have to have the structure attribute tag enabled.
The And makes sure it also checks for the second condition.
The second condition checks to see if it's life is below a certain percentage. This is found under the function Unit Property. I have it set to 33% as an example.
The first action changes the ownership. Triggering unit refers to the attacked unit. The owner of function calls a player from a unit, and finally the attacking unit function should call the unit that attacked the building. It appears greyed out, so it may not recognize the attacking unit properly.
The second action simply resets the units life to 100%. You may want to lower it to say... 50% for more realism, but if you don't change it at all, it will change the owner again as soon as someone else attacks it.
Under the terrain window, at the top will be a map drop down. Under Map Options, one of the tabs will have an option to change initial fog of war from grey to black.
I am very curious on how to make structure produce income just like automated gas refineries. I tried doing it through data but it's way to complicated. Perhaps there's an action of some sorts?
Have ya'lll searched the wiki?
@AlexanderNova: Go
Well, since this question was asked in the triggers thread, I can give my two cents on how to do it with triggers. This won't show the gains like an automated refinery, but it will work (In theory)
Make a trigger go off every 20 game time seconds.
Then make an action to pick all players and do:
Modify (picked Player) (Minerals) (Add) (Number of (Unit Type) owned by (Picked Player))*(Production for "x")
If you only have one building type, then all you need to do is set the unit type to that building and replace Production for "x" with however many minerals you want the building to produce every 20 seconds.
If you want different building types (like a Level 1 Production building, level 2, etc.) then copy paste the modify action and change the unit type and multiplyer.
Yeah, the Fog of War question made me think he didn't even do a forum search, but I was just so happy that I had a working theory of how to make the trigger that I wanted to test it function wise and make it work. And any little break from all of my data editing is a nice change. I really need to start dipping into the xml view and start learning that side of things.
Knowing how to pick functions from a list and knowing how to write in code are worlds apart for me right now.
Here's a map I barely started where pretty much all I did was make an income producing behavior, lol. It's called "Imposter - Vespene Generator" and "Imposter - Mineral Generator".
If people are interested maybe I could look back at how I did it and make a tutorial (shrugs).
@BigDonRob: Go
hey i tryed to make this Events Unit - Any Unit is attacked with Any Weapon Local Variables Conditions ((Unit type of (Triggering unit)) has Structure attribute) == True And Conditions ((Triggering unit) Life (Percent) (Current)) <= 33.0 Actions Unit - Change ownership of (Triggering unit) to player (Owner of (Attacking Unit)) and Change Color Unit - Set (Triggering unit) Life (Percent) to 100.0
but i get that in triggers :( yeah... :D what i did wrong
@joppeownaaj: Go
Is it not compiling the script or is it simply not working in game? And do you have more than one type of "tower" you're trying to take over or are they all the same unit type?
@BigDonRob: Go
yeah i try make barrack what is (city) in this gamemode.
Try that. It factors in abilities and effects, and it should bypass the (attacking unit) function.