 |
|
It is currently Sat May 25, 2013 7:00 am
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 12 posts ] |
|
Is this possible, change texture trigger?
| Author |
Message |
|
Morpheus
X-51
Joined: Thu Jan 27, 2005 9:56 am Posts: 909 Location: A planet near mars
|
 Is this possible, change texture trigger?
I have been working on something and I was wondering if it would be possible to have a trigger that can change a texture on an NPC
Basically its something I'd like to do for my Star Trek mod but have not coded in a long time so don't know where to begin or if this doable or not. Any help would be appreciated.
An example would be in Star Trek Voyager, the doctor could change into emergency command hologram were his shirt was red, not blue, something on the lines of that I would like to do. When you trigger the trigger, choose whether or not to have a sound play (and choose what it is in properties), then change texture on NPC (or more than one texture like face and shirt or shirt and pants, basically any of the 6 or 7 textures of the NPC) choose whether or not an effect shows around the player (to look like something is happening to cause the NPC to change appearance). I don't want the NPC to have the texture just change straight as it might look odd to see NPC one way then instantly another, if looking right at them.
Would it also be possible to take these texture changes and change the textures on the NPCs carcass? If not, I could make the NPC invincible but may require the NPC not to be invincible but not got that far ahead to think what NPCs would require not or to be invincible.
_________________ My nature videos: http://www.youtube.com/user/DynamixWarePro My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
|
| Mon Oct 10, 2011 4:10 pm |
|
 |
|
DDL
Traditional Evil Scientist
Joined: Mon Oct 17, 2005 10:03 am Posts: 3641
|
 Re: Is this possible, change texture trigger?
Absolutely: after all, textureswaps are how NPC cloak works (that is, when it works: the conditions for NPC cloaking are pretty rarely encountered). This is a very very very rough and ready trigger that sort of probably does what you want (possibly maybe, almost certainly missing brackets and semicolons and possibly correct function declarations) So when triggered it swaps textures you predefine (in the trigger), then trigger it again to swap textures a second time, and trigger it a third time to reset textures back to normal. Hopefully it's pretty self explanatory, and I'm pretty sure you can work out how to make the actor in 'event' spawn a shockring or play a sound (look at deusexprojectile spawneffects() and the like for examples, if necessary). 
|
| Mon Oct 10, 2011 4:27 pm |
|
 |
|
DDL
Traditional Evil Scientist
Joined: Mon Oct 17, 2005 10:03 am Posts: 3641
|
 Re: Is this possible, change texture trigger?
As for having this propagate to the carcass, I'd think the easiest way would simply to make your NPCs have a custom spawncarcass() function that transfers textures across by default. That's what I did in the end.
|
| Mon Oct 10, 2011 4:31 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: Is this possible, change texture trigger?
That's awesome. I'm sure that will come in handy. I think I would have normally got around this by using the pawnappear trigger to change clothes on someone by switching the two out outside of player view. May still do that, but this looks like it will change textures on any actor. This would be useful if, like, you need a car to look burnt after a fireball blows through a garage or something. In fact, I might be able to use this to circumvent the texture blocks on current default Deus Ex classes, such as the leather furniture pieces that fail to take on a texture other than black leather.
So, awesome, thank you DDL.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Mon Oct 10, 2011 6:41 pm |
|
 |
|
Morpheus
X-51
Joined: Thu Jan 27, 2005 9:56 am Posts: 909 Location: A planet near mars
|
 Re: Is this possible, change texture trigger?
Thanks DDL, thats great. I already had code to get player to "change clothes" with using the clothes rack mesh as a item and when you "use" the clothes, the players texture changes, have to find code for that. Well there comes problems with that if the pawn isn't invincible, the pawn could have damage then you make a new one appear to replace old, which has a full health and possibly different weapons/items than you chose for the pawn in the map, also ammo amount would be different if it had and used weapons prior to being changed by new pawn.
_________________ My nature videos: http://www.youtube.com/user/DynamixWarePro My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
|
| Mon Oct 10, 2011 7:02 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: Is this possible, change texture trigger?
Yeah, I've already done this for a pawn that needed to go from being upstairs to downstairs, but the pawn could not be ordered or teleported to transport between the spots. So I had to create 2 of the same pawn, but I had to use 2 separate conversation bind names. So there is LeilaNassif and LeilaNassif2 or whatever, and that led to some confusing set backs. Worked out in the end.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Mon Oct 10, 2011 11:02 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: Is this possible, change texture trigger?
Question:
Can this change the player's texture, and regardless of whether it does, what is the tag name of the player class?
Is it my custom player class "AlexDenton" or is it "Player"?
-edit- also does this work on corpses?
-edit- come to think of it (man I wish I knew Unreal code), realizing textures can be changed like this, it doesn't sound impossible to set up some automatic method of immediately copying the texture properties of a dying NPC to the corpse that it spawns. Not to imply anything, but has anyone made something like this? Because I could theoretically use a dispatcher to trigger a corpse texture change per custom NPC. I don't understand why this wouldn't already be a default property of DX.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
Last edited by Neveos on Mon Nov 07, 2011 1:57 pm, edited 2 times in total.
|
| Mon Nov 07, 2011 1:35 pm |
|
 |
|
DDL
Traditional Evil Scientist
Joined: Mon Oct 17, 2005 10:03 am Posts: 3641
|
 Re: Is this possible, change texture trigger?
Works on all actors, so yes to both.
As for the player's tag..I actually don't know, since most player-affecting triggers simply use the fact that the player has triggered/touched them, and then use instigator or whatever.
Hrmm..try a variety of options?
|
| Mon Nov 07, 2011 1:49 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: Is this possible, change texture trigger?
For the record, to get a trigger to affect the player class, you have to clear the event property. It seems that blank references default to the player. Same with order triggers that do not specify an order's tag. GoingTo "None" will cause the NPC to go to the player. -edit- woops, nevermind. It seems that do this with this trigger will cause -all- actors to take on the chosen multiskins. "Player" "AlexDenton" and "AlexDentonPlayer" do not seem to work, so... I dunno. And for the record, the change in texture on the player will be reset once the player loads a new area.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Wed Dec 21, 2011 9:21 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: Is this possible, change texture trigger?
ok, yeah, so... I dunno, don't get too mad when you see TNM's textures being put to use, lol, THANK YOU. crediting you!!: but anyway here's a 'imagine yourself' fitting kiosk thing I'm working on right now. http://www.youtube.com/watch?v=HbalSyf5 ... e=youtu.be
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Tue Feb 21, 2012 6:34 am |
|
 |
|
Jonas
Off Topic Productions
Joined: Sat Apr 24, 2004 9:21 pm Posts: 13850 Location: Hafnia
|
 Re: Is this possible, change texture trigger?
That looks awesome. And yeah hey do whatever you want with our content, our license permits it 
_________________ Jonas Wæver
Chief Poking Manager of TNM
Random Outbursts of Creativity
|
| Tue Feb 21, 2012 11:58 am |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: Is this possible, change texture trigger?
DDL, may I ask: What do I put in the code to set the "skin" or "texture" field to "none" so that a class with "enum" "texture choices" does not override the new displaytex? IOW, if you can choose the skin from one of the fields in the class, it sets the "texture" field and this seems to trump the display skin.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Wed Mar 21, 2012 3:40 am |
|
|
|
Page 1 of 1
|
[ 12 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
 |