Two questions:
1) Is it possible to set the "Tint Override" of an item via scripting?
2) When you have a conversation, is it possible to affect the actors via scripting (i.e. a script that runs during the converation tree?) If so, what tags do you use to get the relevant objects? It seems that the actors involved are copies of the actual creatures, so trying to edit the original creature by tag during a conversation does not update the actor being used in the conversation screen.
scripting with tints and conversations
Débuté par
nezroy
, juin 29 2010 06:41
#1
Posté 29 juin 2010 - 06:41
#2
Posté 30 juin 2010 - 10:55
1) Don't think you can, but you can set the material : you just have to define a new material type identical to an existing material except for the tint and it should do the trick.
#3
Posté 01 juillet 2010 - 08:15
Yeah that's what I do currently, I was just trying to figure out if there might be a simpler way that didn't involve duplicating a bazillion materials
Thanks though...
Still trying to figure how the heck to modify an actor during a conversation "cutscene", though... seems like that should be very doable if I could just get a handle on the right objects...
Still trying to figure how the heck to modify an actor during a conversation "cutscene", though... seems like that should be very doable if I could just get a handle on the right objects...
Modifié par nezroy, 01 juillet 2010 - 08:15 .
#4
Posté 01 juillet 2010 - 02:49
If your conversation line is an actual cutscene, you could just have two instances of the same actor and use the Change Visibility action to switch between the two actors.
Just copy and paste the actor (in the cutscene editor) to create a copy of it that will do all the same actions at the same time and in the same positions. Then duplicate the creature that actor is based on and modify his equipment, and then just change the 'source' creature of the copied actor to the new, modified creature.
I use this method in one of my cutscenes for when the player throws a dagger at someone. Right after the throw, I switch the actor that has two daggers equipped off and turn on the copy that only has one equipped, on the same keyframe. I do this during a camera switch so you can't tell the difference.
Just copy and paste the actor (in the cutscene editor) to create a copy of it that will do all the same actions at the same time and in the same positions. Then duplicate the creature that actor is based on and modify his equipment, and then just change the 'source' creature of the copied actor to the new, modified creature.
I use this method in one of my cutscenes for when the player throws a dagger at someone. Right after the throw, I switch the actor that has two daggers equipped off and turn on the copy that only has one equipped, on the same keyframe. I do this during a camera switch so you can't tell the difference.
#5
Posté 02 juillet 2010 - 04:19
I guess cutscene was really the wrong word (I forgot about the ability to integrate actual cutscenes with dialog lines).
I meant that in a regular conversation I'd like to be able to run a script in response to dialog that affects the on-screen actor that is speaking the lines. For instance, if I have a conversation stage with a camera and place setup to show the player talking, and I had a dialog option of "strip naked", how do I get a reference to the player "actor" object that is visible in the conversation to execute a strip naked script on it? Trying the obvious thing, getting an object by "player" tag, doesn't work. When the dialog ends the script will have changed the player in the game world, but the actor-copy in the conversation world is not affected. I'm assuming that, like cutscenes, the conversation actors are stand-in duplicates of the actual creatures that are created when the conversation begins, but I don't know how to get a reference to those actor-copies in a script.
I meant that in a regular conversation I'd like to be able to run a script in response to dialog that affects the on-screen actor that is speaking the lines. For instance, if I have a conversation stage with a camera and place setup to show the player talking, and I had a dialog option of "strip naked", how do I get a reference to the player "actor" object that is visible in the conversation to execute a strip naked script on it? Trying the obvious thing, getting an object by "player" tag, doesn't work. When the dialog ends the script will have changed the player in the game world, but the actor-copy in the conversation world is not affected. I'm assuming that, like cutscenes, the conversation actors are stand-in duplicates of the actual creatures that are created when the conversation begins, but I don't know how to get a reference to those actor-copies in a script.
Modifié par nezroy, 02 juillet 2010 - 04:20 .
#6
Posté 02 juillet 2010 - 04:36
My (limited) understanding of what's actually going on behind the scenes in a conversation is a little different from what you are describing, but it's effectively the same for your purposes. If you need to have a script affect an appearance during conversation, try executing the change on the end node of the conversation and then restart the conversation on a new branch. If this is too noticeable, you can cover it with a pair of fade-out and fade-in cutscenes on the last and first nodes of the two branches.
#7
Posté 02 juillet 2010 - 05:13
Craig Graff wrote...
If you need to have a script affect an appearance during conversation, try executing the change on the end node of the conversation and then restart the conversation on a new branch.
Thanks for the feedback. That is actually how I manage it currently and it works OK, but syncing up where to restart the conversation can be quite cumbersome. I was hoping there was an easier way to stay within the conversation tree, but it looks like I'll be stuck with checking a bunch of plot flags once again





Retour en haut






