Better lighting
+2
TheGeneral
dewi316
6 posters
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 1 of 1
Re: Better lighting
Mdog wrote:something like this!
https://youtu.be/GcTuTlt_ABo
TJ actually helped out with this and has managed to refine it a bit better than the video. But this could work really well.
You have him to thank for the code, I only placed the markers on the map. Which tends to happen a lot.
MD, that looks pretty cool mate. Is there any chance of getting a look at the code you used to do it? I've found that even with my very basic knowledge of LUA, I'm able to read code and understand it. Like any language though, it's much easier to understand something than to put together your own sentences, but I'm still working on it. I know I've been quiet lately as work and family has taken priority a bit, but I've still got my campaign in mind and since it's based on a pilot's experiences, I'll be using the airfield alot. Also, if I can see the code I can try to modify it and apply it to a heli pad. Ideally, I'd like strobe lighting around a heli pad in a PB, but only visible through NVGs.
Cheers
RC
Guest- Guest
Re: Better lighting
Hi Rockcop,
below is an mssn file.
http://filebeam.com/9ddea646616a8d22f8a7c14399cf4d51
here is the code...
...feel free to ask questions.
below is an mssn file.
http://filebeam.com/9ddea646616a8d22f8a7c14399cf4d51
here is the code...
- Code:
function onMissionStart()
particle_zones_sets = {
["triggerzone"] = {"runlights",100,300},
["triggerzonei1"] = {"runlightsi1",100,300},
}
particle_setID = {}
particle_table = {}
end
function onEnter(zoneName, unitName)
if particle_zones_sets[zoneName] and OFP:isPrimaryPlayer(unitName) then
particle_setID[OFP:activateEntitySet(particle_zones_sets[zoneName][1])] = {zoneName,particle_zones_sets[zoneName][2],particle_zones_sets[zoneName][3]}
end
end
function onLeave(zoneName, unitName)
if particle_zones_sets[zoneName] and OFP:isPrimaryPlayer(unitName) then
for i,v in ipairs(particle_setID) do
-- OFP:displaySystemMessage(v[1])
if v[1] == zoneName then
OFP:destroyEntitySet(i)
particle_table[i] = nil
end
end
end
end
function runwayLights(index,set,loopcount)
if loopcount >= 0 then
loopcount = loopcount - 1
OFP:displaySystemMessage("lighting "..loopcount)
if index == #particle_table[set]then
OFP:stopParticleSystem(particle_table[set][index])
index = 0
end
indexi = index + 1
OFP:stopParticleSystem(particle_table[set][index])
if loopcount > 0 then
EDX:serialTimer("runwayLights",particle_setID[set][2],indexi,set,loopcount)
OFP:startParticleSystem(particle_table[set][indexi])
end
end
end
function onSpawnedReady( setName, setID, tableOfEntities, errorCode )
if particle_setID[setID] then
particle_table[setID] = tableOfEntities
EDX:serialTimer("runwayLights",particle_setID[setID][2] ,0,setID,particle_setID[setID][3])
end
end
...feel free to ask questions.
Last edited by tjdagger on Sun 10 Feb 2013, 12:52; edited 1 time in total
tjdagger- Admin
- Location : Silverdale, Queensland, Australia
Points : 107
Reputation : 7
Join date : 2012-12-17
Age : 48
Re: Better lighting
Tim I haven't posted it up because it still crashes when you re enter the zones I've been waiting to catch you on skype to tell you about it.
Re: Better lighting
Another note that we figured out was the player had to be looking in the direction for light effects to be seen. While this seems obvious the issue was discovered when using effects that SHOULD illuminate the surroundings around you from behind - much like lightning would.
The bigger mind bender is are shadows are being processed from the source ONLY then or always - consider a search party with flashlights in the woods or shipping warehouse.
The bigger mind bender is are shadows are being processed from the source ONLY then or always - consider a search party with flashlights in the woods or shipping warehouse.
John J. Stevens- Admin
- Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19
Re: Better lighting
When creating a mission can you change the time of day and if so how do you do it? I want to do a night mission:) ok sorted worked it out thanks
dewi316- Veteran
- Location : swansea
Points : 179
Reputation : 22
Join date : 2012-12-19
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|