Author |
Message |
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
a few questions (one on glows, two on lua)
Quick couple of questions here.
How do I attach a glow to a actor (preferably in ini code), and I read somewhere that there's a limit of one lua code per actor, is that right?
What I'm hoping to do is have a glow that's always on my actor, the actor doesn't move so hopefully it wont add tons of lag.
Ooh and before I forget is there a function for determining which actor is holding a device? I was thinking of making a script that makes it so a weapon can only be used by my actor. If an other actor trys, it would self gib and kill said actor too.
|
Sun May 09, 2010 3:52 am |
|
|
LowestFormOfWit
Joined: Mon Oct 06, 2008 2:04 am Posts: 1559
|
Re: a few questions (one on glows, two on lua)
Not sure what the best way to attach a permanent glow is since I honestly don't use glows enough.
However, as for the 'exclusive to one actor' script, use a Lua script that finds the nearest actor to your weapon, and if it's not your specified actor, set GetsHitByMOs = 0, rendering it unable to be picked up by anything that isn't your set actor.
|
Sun May 09, 2010 6:18 am |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: a few questions (one on glows, two on lua)
Thanks LFOW
And as for the glow problem I think I may have found a solution in the wiki, I will try it out now.
|
Sun May 09, 2010 6:42 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: a few questions (one on glows, two on lua)
For the one Lua code per actor thing, it doesn't really matter seeing as you can have the one Lua code reference more than one Lua code as well as be as big as you like. So you can essentially have as many Lua codes as you like as long as it's all referenced by the one .lua file.
|
Sun May 09, 2010 12:10 pm |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: a few questions (one on glows, two on lua)
The glow solution I was looking at didn't work, I tried a few last night.
Thanks Allstone, I may have to go the lua route if I cant find a ini solution for this. What I've done so far is tried adding it as a attached effect (borrowing code from muzzle flash) then I looked at emitters.
|
Sun May 09, 2010 4:57 pm |
|
|
Freeflow
Joined: Sun Oct 25, 2009 10:16 pm Posts: 110 Location: Western U.S.
|
Re: a few questions (one on glows, two on lua)
Take a look at the Deimos Federation soldiers. They have eye glow.
|
Mon May 10, 2010 10:15 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: a few questions (one on glows, two on lua)
Code: EffectAlwaysShows = 1 pop that right in the MOPixel Line or whatever the Glow is put on..
|
Tue May 11, 2010 5:15 am |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: a few questions (one on glows, two on lua)
I did try EffectAllwaysShow = 1 but I must have done something wrong I will check out that mod too thanks. (if you have the link that would be extra helpful). Code: AddEffect = Attachable PresetName = Vend Lights Mass = 0.0001 HitsMOs = 0 GetsHitByMOs = 0 SpriteFile = ContentFile FilePath = Scud.rte/Images/BoneWoundA.bmp // tried null.bmp too, just incase a image was required I tested it with this wound. FrameCount = 1 SpriteOffset = Vector X = 0 //-2 Y = 0 //-6 AtomGroup = AtomGroup AutoGenerate = 1 Material = Material CopyOf = Air Resolution = 2 Depth = 100 DeepGroup = AtomGroup AutoGenerate = 1 Material = Material CopyOf = Air Resolution = 3 Depth = 100 DeepCheck = 0 JointStrength = 10000 JointStiffness = 1
ScreenEffect = ContentFile FilePath = Scud.rte/Images/VendGlow.bmp EffectAlwaysShows = 1 // EffectStartTime = 0 // even tried these to see if it would show up at least for a little while // EffectStopTime = 2500000 // EffectStartStrength = 0.75 // EffectStopStrength = 0.3 DrawAfterParent = 1
|
Tue May 11, 2010 7:33 am |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: a few questions (one on glows, two on lua)
The EffectAlwaysShows = 1 needs another tab to it so it registers it for the glow
|
Tue May 11, 2010 9:37 am |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: a few questions (one on glows, two on lua)
OMG I knew it was going to be something simple and stupid on my part... thanks I will test that really soon I have to run to work now.
|
Tue May 11, 2010 5:54 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: a few questions (one on glows, two on lua)
I don't think you can attach working glows to anything except MOPixels, MOSParticles, and AEmitters. If you want an object that isn't in one of those groups to have a glow, you can either have an attached emitter that has a glow, or use Lua to position a MOpixel with a glow over the object at a desired position.
For the gun thing, if the actor was bought with it and GetsHitByMOs = 0 won't prevent them from using it, you hackily "attach" a script to the gun that keeps the actor from firing the gun if they are holding it, or it forces them to drop it.
|
Tue May 11, 2010 8:55 pm |
|
|
|