Creating an actor when building?

X-maul

AKA: Demtrod
Reaction score
201
I want an actor to apear when my units are building - I want to have the unit being build apearing inside "Zerathul Void Prison" when being builded, and then disapear when finished.

What kind of actor should I use and what events?
 

Dave312

Censored for your safe viewing
Reaction score
269
Make your actor based off the Model Construction actor. You may want to have multiple copies of this actor, each with a different scale value for the different building sizes (eg. 2x2, 3x3, 4x4 etc)

Then on your Actor for the structure you want to the prison model to appear (eg pylon), add the following event:
Code:
UnitConstruction.<Your_Building>.Start
   Create <Your_Prison_Model_Actor>

I hope that makes sense. There might be a better way of doing it via model additions and such, but that would require extra thinking and I'm already half asleep at the moment anyway. What I posted above should work anyway.
 

X-maul

AKA: Demtrod
Reaction score
201
Hmm, for some reason, nothing happens - The actor events looks like this:
Code:
UnitConstruction.Firestarter.Finish
  Destroy
UnitConstruction.Firestarter.Cancel
  Destroy
ActorOrphan
  Destroy
UnitConstruction.Firestarter.Start
  Create FirestarterContruction
(FirestarterContruction is my actor)
I dont know if it has something to do with the other actor options, but I set the model to the right one, othervise I didnt change anything.
 

Dave312

Censored for your safe viewing
Reaction score
269
I actually mean to put the Start Construction event on the Firestarter unit, but that doesn't matter.

I tested it and found it wasn't working, but was able to get it working by basing the Construction actor off ModelAddition rather than Model Construction. You will need to add theses two event to your FirestarterConstruction actor though:
Code:
UnitConstruction.Firestarter.Finish
   Destroy
UnitConstruction.Firestarter.Cancel
   Destroy
 

X-maul

AKA: Demtrod
Reaction score
201
I actually mean to put the Start Construction event on the Firestarter unit, but that doesn't matter.

I tested it and found it wasn't working, but was able to get it working by basing the Construction actor off ModelAddition rather than Model Construction. You will need to add theses two event to your FirestarterConstruction actor though:
Code:
UnitConstruction.Firestarter.Finish
  Destroy
UnitConstruction.Firestarter.Cancel
  Destroy
heh, well it works now - partially - It does create the actor when I start constructing the unit, but it does not get destroyed when it's done? :rolleyes: I dont think it can be that it is not getting finished - the unit works when it's done.

I added the event in the unit actor, so it would create the actor when unitconstruction starts.
 

Dave312

Censored for your safe viewing
Reaction score
269
Did you add the two events from my last post to the FirestarterConstruction actor? They are designed to remove actor when construction finished. I had it working. Have you tried setting the source to Any for the events?
 

X-maul

AKA: Demtrod
Reaction score
201
Did you add the two events from my last post to the FirestarterConstruction actor? They are designed to remove actor when construction finished. I had it working. Have you tried setting the source to Any for the events?
Uhm, I do not know why, but it works if I set the source names to (any) - thank you Dave :) As usual you're a huge help :)
 

X-maul

AKA: Demtrod
Reaction score
201
Uhm, well I have a little problem here, the actor is scaling to fit the unit it gets attached to (which is not intended) - AND the units are all scaled 100% (the models are scaled to fit my needs instead of scaling the actor)

The actor got the Properties: Accepted Property Transfers + set to:
Cast Shadows, Cloak Effect, Creep Engulfment, Decal, Opacity, Physics State, Team Color, Time Scale, Visibility, Warp Group

How do I fix this?
 

Dave312

Censored for your safe viewing
Reaction score
269
Just to clear, that Properties: Accepted Property Transfers + property flags are from the addon model (the Void Prism actor) and not the Structure?

Is all the flags in the Properties: Inherited Properties + property unchecked?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top