Home   Help Search Login Register  

Author Topic: Light...  (Read 1650 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Light...
« on: 18 Jun 2005, 13:26:46 »
Is it possible to create light somewhere, without any addons, etc.?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Light...
« Reply #1 on: 18 Jun 2005, 13:31:38 »
No, I think you will always need an addon, even if it is only a config which is pbo'ed and placed in the addons folder.

But, I'm willing to be proved wrong   ;D


Planck
I know a little about a lot, and a lot about a little.

Serial Killer

  • Guest
Re:Light...
« Reply #2 on: 18 Jun 2005, 13:34:44 »
Well is it possible to create flare on the ground and keep it there?

(Just my idea ;D)
« Last Edit: 18 Jun 2005, 14:06:17 by Serial Killer »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Light...
« Reply #3 on: 18 Jun 2005, 14:08:59 »
I seem to recall that flares go out when they reach the ground, so, I would say no.

But, once again, I'm willing to be proved wrong.


Planck
I know a little about a lot, and a lot about a little.

DBR_ONIX

  • Guest
Re:Light...
« Reply #4 on: 18 Jun 2005, 14:10:33 »
Code: [Select]
_where=_this select 0
_i=0

start:
_flare = "Flare" Camcreate getpos _where

loop:
_flare setpos getpos _where
~0.2
_i=_i+1
?(_i>100): goto "start"
goto "loop"

Basicly creates a flare, setpos's it every 0.2 of a second, if it's been there for 0.2*100, make a new one (Play with this value, 100 gives the flare a life-time of 20 seconds, change it to the life of the a flare, so when it is about to burn out, a new flare it made)

called on object, [this] exec "script.sqs", such as a gamelogic
if you want the light at 2m,
Code: [Select]
this setpos [getpos this select 0, getpos this select 1, 2]; [this] exec "script.sqs"
:)
- Ben

Serial Killer

  • Guest
Re:Light...
« Reply #5 on: 18 Jun 2005, 14:14:33 »
Thanks! :)

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Light...
« Reply #6 on: 18 Jun 2005, 14:18:44 »
sorry to be the one to do it planck sir ;)

flares can be created and then passed to a loop which sets their velocity to 0. keeping them lit is the tricksy part. the loop needs to include a timer which creates another flare in the same place just as the previous flare goes out....

see attached.

edit - heh, beaten to it... ho hum :P
« Last Edit: 18 Jun 2005, 14:20:50 by bedges »

Serial Killer

  • Guest
Re:Light...
« Reply #7 on: 18 Jun 2005, 14:22:18 »
Well that script didn't work for me :-\ First I fixed it, because OFP messaged errors about that start and loop things, so my script looks like this now:

Code: [Select]
_where=_this select 0
_i=0

#start
_flare = "Flare" Camcreate getpos _where

#loop
_flare setpos getpos _where
~0.2
_i=_i+1
?(_i>100): goto "start"
goto "loop"

But it isn't still working.

EDIT: I'll try bedge's script first...
« Last Edit: 18 Jun 2005, 14:23:07 by Serial Killer »

Serial Killer

  • Guest
Re:Light...
« Reply #8 on: 18 Jun 2005, 14:53:01 »
Well that script was fine, but bad thing is that the flare suddenly falls on the ground and it's dark again :-\ I still would like to test DBR_ONIX's script.
Any way to fix it?

EDIT: Well it works when I place that flare on 100 alt. I'll ask here if I need more help with it...

EDIT: Well that flare stops lighting suddenly :-\
« Last Edit: 18 Jun 2005, 15:18:08 by Serial Killer »

Offline 456820

  • Contributing Member
  • **
Re:Light...
« Reply #9 on: 18 Jun 2005, 17:23:03 »
you can turn on light posts around you using the animate command i think (in com ref)
and also using fire's put this in its init field
this inflame true
thats all i know of if none of them are suitable for you im sorry

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Light...
« Reply #10 on: 18 Jun 2005, 17:32:02 »
the animate command is for doors. lampposts are controlled using the switchlight command.

@serial killer - the problem is that flares take a second or two to light up once created. if you can work out the timing for this, you can stay in the setvelocity loop for just long enough, and have a flare waiting in the wings to replace it.

Serial Killer

  • Guest
Re:Light...
« Reply #11 on: 18 Jun 2005, 18:25:46 »
Next two questions:

1. Is it possible to disable sound effects from campfire while it's flaming?
2. Is it possible to disable smoke effects from campfire while it's flaming?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Light...
« Reply #12 on: 18 Jun 2005, 18:35:45 »
most likely on both counts, and it would involve taking the model config to bits.... sort of out of my depth here ;)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Light...
« Reply #13 on: 18 Jun 2005, 19:18:38 »
Quote
1. Is it possible to disable sound effects from campfire while it's flaming?
2. Is it possible to disable smoke effects from campfire while it's flaming?

1.  Apart from switching off your speakers, the only way is to edit the game config.bin......not recommended.

2.  The only way is to edit the game config.bin......not recommended.

There is always the possibility of making a config addon though.


Planck
I know a little about a lot, and a lot about a little.