I have an actor with the model swap action happening on Behavior.MyBehavior.On. This new model however needs to be offset in order to look right, so I'm trying to make a SOp (Local Offset) create itself on Behavior.MyBehavior.On. It has to be this particular model.
I've done this same thing for a Rocker by simply adding Create to event Behavior.MyBehavior.On. That worked perfectly for the Rocker, but for the Local Offset, it's not working at all, doing nothing. I have tested that my SOp works by having the main actor host it, but that's just a test to see that my SOp was working at a basic level. So the Rocker will create itself when you ask it to, but not the Local Offset?
I'm doing something wrong here.
I made an actor "Chest Vanish SOp" of type Site Operation (Local Offset) ... Parent CActor
Added event: Behavior.ChestVanish.On
Action set to: Create.
Finally, in game I get to the point where the behavior is added and works completely except for the missing local offset.
Ask if you need more details.
Edit: Okay, the Local Offset targets the wrong actor! It targets a model that shows on the unit instead of the unit itself. I discovered this by setting the Y offset to 10 where it became clear that it did work, but on the wrong actor. So what I've tried in order to fix this was setting Content to alias Unit in the create action. Don't ask me why I tried this, I'm clueless. It doesn't seem change anything when I link the unit actor to the SOp with hosting. Besides, seeing from how it worked with the Rocker, it shouldn't be necessary to link them. If I could only think of some good example to look at.
Edit 2: I'm guessing I must use some term to specify the target. I'm currently experimenting with that, but it doesn't seem to be so simple.
E: Nope, can't find anything that works.
Edit: No, I was wrong. I had accidentally linked the spell model to the SOp. I have corrected that, but it means that the SOp is not being created on anything... or is it?
I've attached a picture to get your attention and so you can see what I mean. I want that chest to be offset only AFTER it changes model so its base is always centered on the tile.
If I've confused you, please ask me to clarify anything. I really need this help.
So you want the model to move to a different position when a behaviour is on? Just make it an attachment to a barrel model that you change the scale of when the behaviour is on. Here is a demo where I do something similar.
An alternative is to have the Model actors which are the visuals being independent actors attached to a hidden Unit actor with the one being created and the other destroyed with the behaviour change.
Uhm, this is probably stupid, but I sometimes can't seem to save map attachments as anything but text documents full of cryptic characters.
I understand the alternative method, I just have to learn about attachments to know how to do it, but in the first method I don't know what you mean by a barrel model?
Anyway, I can try method 2 for now. At first I was moving units through triggers, but that seemed so silly to me so I decided to change most of the map to work through data, which is a huge challenge for me. Thanks a bunch for your help! :-)
Edit: It works! I would have used the Invisible model for the unit actor but the ability couldn't target it, so I used the closed treasure chest and Set Opacity [0,0] though that may seem a little clumpsy.
With the first method if you have a barrel attached to the main actor and the second model attached to the overhead attachment point of the barrel, you can adjust the distance between the two models by using the Set Scale event and by altering the blend in time you can even make the movement look smooth. This is a good method if you need to alter the offset during gameplay.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I have an actor with the model swap action happening on Behavior.MyBehavior.On. This new model however needs to be offset in order to look right, so I'm trying to make a SOp (Local Offset) create itself on Behavior.MyBehavior.On. It has to be this particular model.
I've done this same thing for a Rocker by simply adding Create to event Behavior.MyBehavior.On. That worked perfectly for the Rocker, but for the Local Offset, it's not working at all, doing nothing. I have tested that my SOp works by having the main actor host it, but that's just a test to see that my SOp was working at a basic level. So the Rocker will create itself when you ask it to, but not the Local Offset?
I'm doing something wrong here.
I made an actor "Chest Vanish SOp" of type Site Operation (Local Offset) ... Parent CActor
Added event: Behavior.ChestVanish.On
Action set to: Create.
Finally, in game I get to the point where the behavior is added and works completely except for the missing local offset.
Ask if you need more details.
Edit: Okay, the Local Offset targets the wrong actor! It targets a model that shows on the unit instead of the unit itself. I discovered this by setting the Y offset to 10 where it became clear that it did work, but on the wrong actor. So what I've tried in order to fix this was setting Content to alias Unit in the create action. Don't ask me why I tried this, I'm clueless.It doesn't seem change anything when I link the unit actor to the SOp with hosting. Besides, seeing from how it worked with the Rocker, it shouldn't be necessary to link them. If I could only think of some good example to look at.Edit 2: I'm guessing I must use some term to specify the target. I'm currently experimenting with that, but it doesn't seem to be so simple.
E: Nope, can't find anything that works.
Edit: No, I was wrong. I had accidentally linked the spell model to the SOp. I have corrected that, but it means that the SOp is not being created on anything... or is it?
I've attached a picture to get your attention and so you can see what I mean. I want that chest to be offset only AFTER it changes model so its base is always centered on the tile.
If I've confused you, please ask me to clarify anything. I really need this help.
So you want the model to move to a different position when a behaviour is on? Just make it an attachment to a barrel model that you change the scale of when the behaviour is on. Here is a demo where I do something similar.
An alternative is to have the Model actors which are the visuals being independent actors attached to a hidden Unit actor with the one being created and the other destroyed with the behaviour change.
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
Uhm, this is probably stupid, but I sometimes can't seem to save map attachments as anything but text documents full of cryptic characters.
I understand the alternative method, I just have to learn about attachments to know how to do it, but in the first method I don't know what you mean by a barrel model?
Anyway, I can try method 2 for now. At first I was moving units through triggers, but that seemed so silly to me so I decided to change most of the map to work through data, which is a huge challenge for me. Thanks a bunch for your help! :-)
Edit: It works! I would have used the Invisible model for the unit actor but the ability couldn't target it, so I used the closed treasure chest and Set Opacity [0,0] though that may seem a little clumpsy.
With the first method if you have a barrel attached to the main actor and the second model attached to the overhead attachment point of the barrel, you can adjust the distance between the two models by using the Set Scale event and by altering the blend in time you can even make the movement look smooth. This is a good method if you need to alter the offset during gameplay.
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