For my concept, i need buildings that generate minerals.
For example, in my map, i want pylons to generate minerals, like every 5 seconds, 5 minerals.
Optional, also a text popup of ´´+5´´ that hovers above it for a second, and then fades (like automated refineries)
If anybody knows how to make a building generate minerals, then please post a tutorial down here.
hmmm, im not that into the dataeditor, so i would use the trigger editor.
if u want to use triggers for that, u need a global variable for each player that stores the count of pylons (or whatever you use) and then a trigger that fires every x seconds and adds the amount of variables * minerals you want to get per building to the players minerals.
it should work but thers probably a better way via data editor.
you can check the automated refinerie how it works and copy/modify that, probably its a behavior, but i cant realy help you there, sry :/
Did you mean that you want structures to periodically give Minerals to the owning player?
Try this
Trigger:My Money Trigger
Event:
Time periodic 15 seconds real time
Conditions
(none)
Actions
Pick Unit in UnitGroup(Units matching conditions(structure) in region(playable map area)
Switch (Unit type of picked unit)
if "pylon"
give owner of picked unit 2 minerals
if "barracks"
give owner of picked unit 4 minerals
default
(nothing)
This may not be exactly how it will look that all off the top of my head but i use the same logic for awarding money back when people salvage buildings..
Basically, u need to add behavior, (cant say what type coz my editor's not english), on statistic tab change period, and at effects add periodic effect (you may also want to check Disable during costruction under Behavior/behavior/behavior flags).
Periodic effect should be based on ModifyPlayer or sth like that, under effect/resources choose amount u need.
Thanks, but for learning purposes i would like to create the behavior myself;
Which i think i have done.. But the problem is, when i try to add the behavior to the pylon, i cant find the behavior type in the list which i can select behaviors in.
1.When you're in the data editor at behaviors, right click on the list and "create new object". type behavior name ans suggest ID, then from Behavior type select Buff and hit OK.
2.Edit behavior you created by changing "Period" value on statistics tab (that's how often it'll generate minerals).
3.In data editor open Effects tab and create new object, name it suggest ID etc. and set effect type to Modify Player then OK.
4.Edit this effect by going to it's effect tab and changing resource values (how much resources it will generate per period).
5. Go back to the behavior tab in data editor, edit behavior you made in step 1 by going into it's effects tab and changing periodic effect into the one you made in step 3.
6. Go into pylon/building you need and add the behavior from step one.
I hope i made it a bit clearer how i made this. You may want to hide the behaviour/change icon/disable it under construction if you understand what you just did.
I just read this post and got exactly what I was looking for (search fuction worked!!).
Now to add the strawberry, do you know how to make it so that everytime mineral is generated by the unit, a small "+5" (or the established ammount) text in blue appears where the unit is standing (similar to how collecting actual minerals/gas works). Just makes things a lot nicer.
Its controlled by an actor named floating text that call upon another text actor that has the text (the icon is part of the text). You can look at automated refinery for an example, or pick up abilities of several pick up item in campaign
EDIT: Sorry to bump this old post but for those who are wondering how to disable the buff during construction you just have to go to Buff Flags and check the "Disable during construction", sadly I'm new at this and took me a bit to find out. Thanks for the helpful thread was exactly what I was looking for.
I actually started a new map since I messed around in the first one to much and came back to reread this post and saw the 4th post and felt like an idiot, then I saw your post as well, sorry for that and thanks for the responses.
How do i do this? so far i have not been able to figure out a way with triggers to pick units based on the type that they are. example all marines, or all firebats
make a variable and call it mineral unit and inside make it unit type and below that make it the unit you want to be generating minerals then make a trigger and call it minerals +5 then inside that do this:
Events: Every 5 seconds of [Real Time]
Conditions: put your mineral unit variable here and dont do anything else with it
Actions: Display [+5 with the teal color] for [All Players] as a [Chat] message
make a variable and call it mineral unit and inside make it unit type and below that make it the unit you want to be generating minerals then make a trigger and call it minerals +5 then inside that do this:
Events: Every 5 seconds of [Real Time] Conditions: put your mineral unit variable here and dont do anything else with it Actions: Display [+5 with the teal color] for [All Players] as a [Chat] message
Hi all,
For my concept, i need buildings that generate minerals.
For example, in my map, i want pylons to generate minerals, like every 5 seconds, 5 minerals. Optional, also a text popup of ´´+5´´ that hovers above it for a second, and then fades (like automated refineries)
If anybody knows how to make a building generate minerals, then please post a tutorial down here.
Thanks in advance! :D
Eijsvogel.
hmmm, im not that into the dataeditor, so i would use the trigger editor. if u want to use triggers for that, u need a global variable for each player that stores the count of pylons (or whatever you use) and then a trigger that fires every x seconds and adds the amount of variables * minerals you want to get per building to the players minerals.
it should work but thers probably a better way via data editor. you can check the automated refinerie how it works and copy/modify that, probably its a behavior, but i cant realy help you there, sry :/
@Eijsvogel: Go
Did you mean that you want structures to periodically give Minerals to the owning player?
Try this
This may not be exactly how it will look that all off the top of my head but i use the same logic for awarding money back when people salvage buildings..
@Eijsvogel: Go
I attached map with this done in data editor.
Basically, u need to add behavior, (cant say what type coz my editor's not english), on statistic tab change period, and at effects add periodic effect (you may also want to check Disable during costruction under Behavior/behavior/behavior flags).
Periodic effect should be based on ModifyPlayer or sth like that, under effect/resources choose amount u need.
wish i had english editor >.>
Thanks, but for learning purposes i would like to create the behavior myself;
Which i think i have done.. But the problem is, when i try to add the behavior to the pylon, i cant find the behavior type in the list which i can select behaviors in.
anybody knows the reason behind this?
Thanks!
That's what i meant by adding it - creating it.
1.When you're in the data editor at behaviors, right click on the list and "create new object". type behavior name ans suggest ID, then from Behavior type select Buff and hit OK.
2.Edit behavior you created by changing "Period" value on statistics tab (that's how often it'll generate minerals).
3.In data editor open Effects tab and create new object, name it suggest ID etc. and set effect type to Modify Player then OK.
4.Edit this effect by going to it's effect tab and changing resource values (how much resources it will generate per period).
5. Go back to the behavior tab in data editor, edit behavior you made in step 1 by going into it's effects tab and changing periodic effect into the one you made in step 3.
6. Go into pylon/building you need and add the behavior from step one.
I hope i made it a bit clearer how i made this. You may want to hide the behaviour/change icon/disable it under construction if you understand what you just did.
@uiasdnmb: Go
I just read this post and got exactly what I was looking for (search fuction worked!!).
Now to add the strawberry, do you know how to make it so that everytime mineral is generated by the unit, a small "+5" (or the established ammount) text in blue appears where the unit is standing (similar to how collecting actual minerals/gas works). Just makes things a lot nicer.
@gmgo: Go
Its controlled by an actor named floating text that call upon another text actor that has the text (the icon is part of the text). You can look at automated refinery for an example, or pick up abilities of several pick up item in campaign
EDIT: Sorry to bump this old post but for those who are wondering how to disable the buff during construction you just have to go to Buff Flags and check the "Disable during construction", sadly I'm new at this and took me a bit to find out. Thanks for the helpful thread was exactly what I was looking for.
@neverwin1011: Go
I actually started a new map since I messed around in the first one to much and came back to reread this post and saw the 4th post and felt like an idiot, then I saw your post as well, sorry for that and thanks for the responses.
Try the validator called IsNotConstructing in the disable field.
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
@Sofat: Go
reread the 4th post. check the "Disable during construction" flag
How do i do this? so far i have not been able to figure out a way with triggers to pick units based on the type that they are. example all marines, or all firebats
i know how to make the +5 thing show up first:
make a variable and call it mineral unit and inside make it unit type and below that make it the unit you want to be generating minerals then make a trigger and call it minerals +5 then inside that do this:
Events: Every 5 seconds of [Real Time] Conditions: put your mineral unit variable here and dont do anything else with it Actions: Display [+5 with the teal color] for [All Players] as a [Chat] message
and you are done hope this was correct
Or just use a buff that applies a periodic Modify Player effect with a Text type actor that has a mover.
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
wait this was incorrect i meant this:
in the events do this:
Events: Any unit constuction is [completed]
lol also in the actions put a 5 second wait thing in there [BEFORE!] the text message
AHHHHHH!!!! ok do this:
do the hole thing exept create the trigger and in the events make it every 5 seconds of real time]
actions run trigger [minerals 5+]
AND THEN DO ALL THE OTHER STUFF FOR THE OTHER TRIGGER I SAID TO DO IN MY LAST 2 POSTS FINALY I GOT THAT OVER WITH!!!