rujuro on 27/2/2005 at 23:27
So I have attached a light to a junk object, and garret can pick it up and carry it/throw it. When thrown it lights up the environment quite nicely, however while it is in Garret's possession it seems that it leaves the world, and the light turns off until it is dropped or thrown.
I was wondering if anyone can think of a way to link the light to Garret's position while he holds it, so you could potentially carry a torch though a dark environment. I'm trying to create an attachment link between the light and garret's hand bone when the object is frobbed, but so far this doesn't seem to be working. Anyone thiink this is possible? Or am I crazy.
Taff of the Taffers on 27/2/2005 at 23:33
I have no idea.
But kudos for trying to bring back the flare idea. :)
Tch on 27/2/2005 at 23:38
I never needed a flare in T3 -- If you have a fire arrow, all you have to do is prepare to fire it, and it lights up your area the same way a flare would. Then I hit the space bar to put it away. :)
rujuro on 27/2/2005 at 23:46
Yes, but you cannot move while the arrow is out. I have already made something that acts like a flare, and I'm sure it would be possible to make flares you keep in your inventory (based on the properties I've seen), but I would like the light source to move with Garret as long as he is carrying the object. I can think of some pretty great gameplay applications for this.
Actually borrows a little from Doom3 (don't kill me), but actually makes sense, since carrying a torch would make using a weapon or item very difficult.
jay pettitt on 27/2/2005 at 23:58
Do you get access to the weapon scripts in t3ed. If so, I'd check out the fire arrows.
edit - well look at me being slow typing person :rolleyes: -
rujuro on 28/2/2005 at 00:48
Well, I'm partly there, but am lacking too much in the "why it works department".
I have managed to alter the bow so that it is a light emitter at all times, pretty cool, as while you have the bow equipped it is like Garrett is carrying a lamp. However, my attempts to create a new weapon that emits light have encountered problems. If I make the dagger light emitting, for example, it does nothing in game, and when I make a new weapon called torch, it shows up fine in the inventory, but when I equip it the game crashes. Anyone have any more ideas on the subject? I'm going to keep hammering away.
Zillameth on 10/3/2005 at 00:56
Quote Posted by rujuro
So I have attached a light to a junk object, and garret can pick it up and carry it/throw it. When thrown it lights up the environment quite nicely, however while it is in Garret's possession it seems that it leaves the world, and the light turns off until it is dropped or thrown.
I was wondering if anyone can think of a way to link the light to Garret's position while he holds it, so you could potentially carry a torch though a dark environment. I'm trying to create an attachment link between the light and garret's hand bone when the object is frobbed, but so far this doesn't seem to be working. Anyone thiink this is possible? Or am I crazy.
I have found a partially working solution to this problem. It's not fully functional, but it's a good start.
1. Add Lighting properties to Garrett's archetype. This is neccessary, because we are literally going to turn Garrett into a lamp. It seems that properties cannot be added dynamically, when they are needed during mission. Therefore, we need to have them available on startup. Don't forget to add bLightOn and set it to False.
2. Prepare a light source actor. I chose an OilHandheldLamp, but I guess it can be a torch, too. Change its properties, so that it becomes moveable and can be picked up as junk.
3. Create a script:
Conditions:
- logical AND operator
- when I am frobbed by player
- Querry if [bLightOn] if [Equal To] [TRUE] on any linked object(s)
//When lamp or torch is extinguished, it shouldn't give light after being picked up by Garrett.
[MYSELF]
Actions:
- Set [Property] to [Value] on linked objects of [PLAYER]
// Use several instances of this action to set Garrett's Lighting properties to match those of your light source. It would be better to use an action that copies properties from one object to another, but I couldn't find anything like that.
- Set [bLightOn] to [TRUE] on linked objects of [PLAYER]
- Reset script contidions and actions
//Without this action script would only work once.
4. Create another script. This one is shorter, but more tricky, because there is apparently no condition that detects object being dropped by player (or maybe I just can't find it, which is quite possible). Fortunately, when object travels between world and inventory, there is a change in one of its properties, and that can be detected easily.
Conditions:
- On the event [bOutOfWorld] is [Equal To] [FALSE] on any linked objects [MYSELF]
// this condition fires only when bOutOfWorld CHANGES to False, which is exactly what we want. This property's value apparently changes to True on pickup, and to False on drop.
Actions:
- Set [bLightOn] to [FALSE] on linked objects of [PLAYER]
//This is sufficient. When lamp is off, it doesn't matter, what kind of light it gives, because it doesn't give any.
- Reset script conditions and actions
5. Add both scripts to the light source actor.
There are several drawbacks and todos. Garrett's model's hands are empty, which is particularly irritating in 3rd person mode. On the other hand, both Garrett's hands are full, but that's fairly reasonable (besides, he can drop that lamp anytime). Guards don't notice sudden rise of lighting level. And I don't know what would happen if player carried light to another map.
ccstudent2004 on 10/3/2005 at 01:53
Maybe you could link a torch to garrett like you can link a torch to a guard? I'll give it a play around after I get off work. Maybe you could also edit an actor that garrett can pick...for instance a box, and change the object to a torch and add lighting properties? It would make the object droppable etc. and would fill up Garrett's hands theoretically. Not sure if that is feasible or doable though.
dracflamloc on 10/3/2005 at 07:05
I tried attaching a torch but I couldnt get it to go, then again I dont know anything about UnrealEd so you may have better mileage