Alright then, well I found out that for the automated refinery they called the actor "AutomatedRefineryKicker" which is a name for their CActorText, it's the actor used to create those little popup text things whenever something in the data editor uses them.
Well first thing you should do is created the Text Actor, a pretty simple process but how about we make one from scratch so you can get a feel for how actor events work like I did.
First go into the actors tab of the data editor and add a new object, make the actor object a "Text" actor and base it on "CActorText" if you have set the campaign dependencies you can just copy the data from "AutomatedRefineryTextKicker4" and save these next couple steps, but if you want to figure out how it's done from scratch for educational purposes then just keep following these steps.
Well with your Blank Text Actor, first thing your going to want to do is jump straight into the Event's field and setup the events. Start by adding an event by right clicking in the empty area.
For the message type (Msg) put "ActorCreation". What this means is when the actor is created, this is what this actor is going to do first, theres no set order though, everything with Actor Creation as the event will all happen at the same time unless instructed otherwise.
Now after you set the Msg for Actor Creation, thats all you need to do for the event, now below the event notice an Action, which is part of the event and what it does. Every event has 1 action, but you can adjust terms for these events, Terms are basically conditions if you would use triggers. So basically actor events function just like triggers, an event, then condition, then action.
For the action, set this to Msg Type "Timer Set" we don't need a term here.
Now theres 2 values here, these values control what the timer does and what it's called, set the duration to about 0.1, and then put the name as "StartMover".
Blizzard basically setup this for the automated refineries text tag to have this appear a tenth of a second after the resources were gained. As such this will control how early the actor decides to reveal itself, you can adjust as you wish.
Then create another Actor Creation Event by right clicking open space and add event. Make it basically exactly the same as the previous one, except set the name to Die and set the duration to how long you want the text to last for. By default you could set it at 2.
And then add another Actor Creation Event but make the action a SetOpacity. As you can guess this shows how transparent the text is or isn't, and probably controls the time at which it fades in or out, I haven't tested this but if you just want defaults, set the Opacity to 0 and the blend in duration to 2.
Now you make another event but this time set the Event's Msg type to "TimerExpired" which will, just like trigger events, fire off when a timer expires.
Now since we have 2 timers going at the same time, we gotta let the event know which timer were refering too, so right click the event and add a term.
for term type, choose TimerName, and then just type the name of the timer in the box below, if you forgot, we called it "StartMover".
Now that you have a term, this event will only fire it's action when that timer expires, and not the other one.
For the Action, put the Msg type to create, and for the name, click it, and click the bullet for actor, here you will select the actor for the text actors mover, this will control the actors ability to move up after it spawns. Since this was based off the Automated Refinery, you can just select the AutomatedRefineryTextMover, or you can type it in the box. If you do not have that mover then you probably don't have the dependencies for it, In which case you will have to make one. It is another actor, but I'll skip that one for now since you can just load the dependencies and learn how it's put together to make a copy for another time, but if you really just wanted to save time duplicating "AutomatedRefineryTextKicker4" is the fastest way.
If you decided to duplicate "AutomatedRefineryTextKicker4" then continue reading here.
Now that you have an actor for the text popup, you need to make your building in question call the actor to appear whenever you recieve income.
First go to the actor of the unit that will have the income text popup.
Your going to be amazed at how easy this is compared to making the actors themselves, all you need to do, is Create an Event, and set it's (Msg) type to Effect. Now for the source name, select the Effect that will be producing the resources every tick, then for the sub name, put start.
Now for the action, it's really simple, just select the Msg type "Create" and click the bullet for actor, and select that actor that we just created (or duplicated)
Your done, now the unit or whatever thats producing the income, will have a little text popping up out of it...
But were not done yet, i'm sure you'll notice that either nothing is showing up, or it's showing +4 gas each time, well this next part is nice and simple, go back to the duplicated Text actor (or manually created one) and just change the Text Field. You'll notice theres a +4 and an IMG-Path thing, the +4 is obviously just saying your getting +4 to something, and the IMG-Path is referencing the picture of gas. If you want this changed to minerals, just change the word gas to mineral in the path. If you want a different icon, look for the icon in question, just go to any unit actor, and look for a value with Icon in it, double click that, and click browse, it will show you the IMG path for every image there, you can use whatever you want.
There, after you've done that, it will have the text you properly wanted, I hope this is able to help some people.
Primarily, I hope this will help some people grasp the understanding of event's like I do now, because I know for a fact actors have been the biggest mystery to me when I first saw them, but once you learn this they become less foreign.
Hey I found an alternative, you don't even need the automated refinery for this, if you just want a periodic income with no cap, create a periodic behavior that calls an effect periodically.
For the effect, choose a ModifyPlayer effect and make it's effect to raise a resource by a certain value. It can be on any building, it won't matter if it's a refinery or not.
If you want a step by step process on making the little resource icon popping up I can show you, I just got it working myself. Really relieving to finally figure out how these annoying actors work at last.
I indeed found a work around for what I had intended, but as it turns out I had an unneeded step.
Unit's can only have 1 type of resource assigned to them at a time, but the thing is, you don't need to even harvest their resources. I just realized I could use a separate periodic behavior that triggers a MODIFY PLAYER effect that just add's the second resource. but before I was having minerals being harvested from a resource while replenishing it by the same amount that was being harvested, a completely unneeded step.
Gah, I should have just realized this from the start, it's just like working with triggers.
But that's just the problem, theres no value anywhere in the behaviors or the effect that mark whether or not it's gathering gas or minerals, it seems that value is entirely controlled by the unit that the behavior is associated with.
Hey, I'm playing around with the automated refineries and while figuring out how they worked I noticed that their entire design is just from extracting the resources from the unit that possess's them, but it doesn't really care which resource it gathers. This made it really easy for me to setup a custom auto refinery to gather minerals but the problem I have is.
I want my custom refinery to gather both Minerals and Gas, but also to gather them at different intervals.
Example being I want it to gather 10 minerals every tick and 1 gas every tick, but I can't seem to figure out how to make such a thing happen.
Anyone have any suggestions that only involve the data editor? I could just make a separate unit to handle the gas but I want to see if I can make just a single unit handle both of these incomes at once.
Again no triggers, I could do a trigger for this easily but I'm not at the trigger portion of my project yet, I'm saving triggers for things I ABSOLUTELY need triggers for.
@RuleSC2: Go
Alright then, well I found out that for the automated refinery they called the actor "AutomatedRefineryKicker" which is a name for their CActorText, it's the actor used to create those little popup text things whenever something in the data editor uses them.
Well first thing you should do is created the Text Actor, a pretty simple process but how about we make one from scratch so you can get a feel for how actor events work like I did.
First go into the actors tab of the data editor and add a new object, make the actor object a "Text" actor and base it on "CActorText" if you have set the campaign dependencies you can just copy the data from "AutomatedRefineryTextKicker4" and save these next couple steps, but if you want to figure out how it's done from scratch for educational purposes then just keep following these steps.
Well with your Blank Text Actor, first thing your going to want to do is jump straight into the Event's field and setup the events. Start by adding an event by right clicking in the empty area. For the message type (Msg) put "ActorCreation". What this means is when the actor is created, this is what this actor is going to do first, theres no set order though, everything with Actor Creation as the event will all happen at the same time unless instructed otherwise.
Now after you set the Msg for Actor Creation, thats all you need to do for the event, now below the event notice an Action, which is part of the event and what it does. Every event has 1 action, but you can adjust terms for these events, Terms are basically conditions if you would use triggers. So basically actor events function just like triggers, an event, then condition, then action. For the action, set this to Msg Type "Timer Set" we don't need a term here. Now theres 2 values here, these values control what the timer does and what it's called, set the duration to about 0.1, and then put the name as "StartMover". Blizzard basically setup this for the automated refineries text tag to have this appear a tenth of a second after the resources were gained. As such this will control how early the actor decides to reveal itself, you can adjust as you wish.
Then create another Actor Creation Event by right clicking open space and add event. Make it basically exactly the same as the previous one, except set the name to Die and set the duration to how long you want the text to last for. By default you could set it at 2.
And then add another Actor Creation Event but make the action a SetOpacity. As you can guess this shows how transparent the text is or isn't, and probably controls the time at which it fades in or out, I haven't tested this but if you just want defaults, set the Opacity to 0 and the blend in duration to 2.
Now you make another event but this time set the Event's Msg type to "TimerExpired" which will, just like trigger events, fire off when a timer expires.
Now since we have 2 timers going at the same time, we gotta let the event know which timer were refering too, so right click the event and add a term.
for term type, choose TimerName, and then just type the name of the timer in the box below, if you forgot, we called it "StartMover".
Now that you have a term, this event will only fire it's action when that timer expires, and not the other one.
For the Action, put the Msg type to create, and for the name, click it, and click the bullet for actor, here you will select the actor for the text actors mover, this will control the actors ability to move up after it spawns. Since this was based off the Automated Refinery, you can just select the AutomatedRefineryTextMover, or you can type it in the box. If you do not have that mover then you probably don't have the dependencies for it, In which case you will have to make one. It is another actor, but I'll skip that one for now since you can just load the dependencies and learn how it's put together to make a copy for another time, but if you really just wanted to save time duplicating "AutomatedRefineryTextKicker4" is the fastest way.
If you decided to duplicate "AutomatedRefineryTextKicker4" then continue reading here. Now that you have an actor for the text popup, you need to make your building in question call the actor to appear whenever you recieve income. First go to the actor of the unit that will have the income text popup. Your going to be amazed at how easy this is compared to making the actors themselves, all you need to do, is Create an Event, and set it's (Msg) type to Effect. Now for the source name, select the Effect that will be producing the resources every tick, then for the sub name, put start.
Now for the action, it's really simple, just select the Msg type "Create" and click the bullet for actor, and select that actor that we just created (or duplicated)
Your done, now the unit or whatever thats producing the income, will have a little text popping up out of it...
But were not done yet, i'm sure you'll notice that either nothing is showing up, or it's showing +4 gas each time, well this next part is nice and simple, go back to the duplicated Text actor (or manually created one) and just change the Text Field. You'll notice theres a +4 and an IMG-Path thing, the +4 is obviously just saying your getting +4 to something, and the IMG-Path is referencing the picture of gas. If you want this changed to minerals, just change the word gas to mineral in the path. If you want a different icon, look for the icon in question, just go to any unit actor, and look for a value with Icon in it, double click that, and click browse, it will show you the IMG path for every image there, you can use whatever you want.
There, after you've done that, it will have the text you properly wanted, I hope this is able to help some people. Primarily, I hope this will help some people grasp the understanding of event's like I do now, because I know for a fact actors have been the biggest mystery to me when I first saw them, but once you learn this they become less foreign.
@RuleSC2: Go
Hey I found an alternative, you don't even need the automated refinery for this, if you just want a periodic income with no cap, create a periodic behavior that calls an effect periodically.
For the effect, choose a ModifyPlayer effect and make it's effect to raise a resource by a certain value. It can be on any building, it won't matter if it's a refinery or not.
If you want a step by step process on making the little resource icon popping up I can show you, I just got it working myself. Really relieving to finally figure out how these annoying actors work at last.
Gah... I'm over complicating these things.
I indeed found a work around for what I had intended, but as it turns out I had an unneeded step.
Unit's can only have 1 type of resource assigned to them at a time, but the thing is, you don't need to even harvest their resources. I just realized I could use a separate periodic behavior that triggers a MODIFY PLAYER effect that just add's the second resource. but before I was having minerals being harvested from a resource while replenishing it by the same amount that was being harvested, a completely unneeded step.
Gah, I should have just realized this from the start, it's just like working with triggers.
@Molsterr: Go
But that's just the problem, theres no value anywhere in the behaviors or the effect that mark whether or not it's gathering gas or minerals, it seems that value is entirely controlled by the unit that the behavior is associated with.
Hey, I'm playing around with the automated refineries and while figuring out how they worked I noticed that their entire design is just from extracting the resources from the unit that possess's them, but it doesn't really care which resource it gathers. This made it really easy for me to setup a custom auto refinery to gather minerals but the problem I have is.
I want my custom refinery to gather both Minerals and Gas, but also to gather them at different intervals.
Example being I want it to gather 10 minerals every tick and 1 gas every tick, but I can't seem to figure out how to make such a thing happen.
Anyone have any suggestions that only involve the data editor? I could just make a separate unit to handle the gas but I want to see if I can make just a single unit handle both of these incomes at once.
Again no triggers, I could do a trigger for this easily but I'm not at the trigger portion of my project yet, I'm saving triggers for things I ABSOLUTELY need triggers for.
Thank you in advance.