Home » MODDING HQ 1.13 » v1.13 Feature Requests » Request: light stick improvement
Request: light stick improvement[message #337802] Mon, 17 November 2014 21:46 Go to next message
Kirill_OverK

 
Messages:262
Registered:September 2010
light stick improvement

http://www.bladehq.com/images/knives/brand/glowstickgreen.jpg


So .. I think stick must give light when you just
use it, fracture it before throw...
(like in real life)

stick don't have timer or detonator to activate when fall..


=========
2 idea for AI -

when stick getting close to the enemy... - he did not just run away from the light - he take light-stick and throw back in random direction ...


(maybe he will hit place where is you team ...
may not ... random ..)


__
Re: Request: light stick improvement[message #337813] Tue, 18 November 2014 13:26 Go to previous messageGo to next message
Flugente

 
Messages:3533
Registered:April 2009
Location: Germany
In short: Thought about that before, this is trickier than it seems, but possible.

To anyone wishing to code this and looking for (helpful?) pointers:
  • Take a look at my flashlight code thingy, might be helpful.
  • When a flashlight is thrown, it spawns light and the object vanishes. You need to change this so that the object still exists (as long as the light lasts, I presume). You also need to tie the light id to the object. This requires a new member variable for the light ID on OBJECTTYPE. This will break savegame compatibility and map compatibility unless you adapt to that. Do that. Maintain map compatibility at all costs!
  • There are several ways to handle the object vanishing:
  • A) Set a timer on the stick (new variable, see above). If that hits 0, destroy object, whether it is in the sector inventory or someone's inventory. Also requires a new flag to mark that this thing has already been activated and cannot be activated again.
  • B) Create new object - activated light stick - that light stick turns into upon activation, and tie them together via buddyitem-tag in Items.xml. This needs a timer like in A.
  • C) Alternative to timers: reduce object status by 100/light duration every turn. Once this hits zero, destroy object and light it is tied too. Has to bonus/malus that light stick status determines the light duration this way - light sticks in better status will provide light longer.
  • Update the light like in the flashlight code - if someone picks that thing up, remove light source on the floor and have one at the mobile merc.
  • It would be reasonable to have the light first appear when the merc breaks the stick, which is immediately before throwing it. At that point, however, nothing has been activated in the code - but if you've gotten here, I'm sure you can figure that out on your own Wink
Note that my current assumption (without looking at the code) is that light IDs do not get resorted at any point. You also have to deal with the AI - you need routines for them to pick up such an object, but only if they can throw it away in the same turn, and to force the AI to indeed throw away such an object if they ever have it in their inventory (as this will be at least 2 separate AI decisions calls).


Re: Request: light stick improvement[message #337816] Tue, 18 November 2014 20:32 Go to previous messageGo to next message
Kirill_OverK

 
Messages:262
Registered:September 2010
also may be possible in future make real-time light every tile when
flashlight is fly to point ..

so like flash bullets right now in 1.13 but for flashlight ... it's will be 100% realistic like in real life ..


...

Re: Request: light stick improvement[message #337837] Wed, 19 November 2014 05:38 Go to previous messageGo to next message
Kirill_OverK

 
Messages:262
Registered:September 2010


==
so .. in real .. - brake, then shake it ... and only than in real
you can throw it ... -

http://www.youtube.com/watch?v=COou-L8cyPM



so ... in real you can easy detect youself to enemy before you throw stick
at night ...

or you need flash grenade with auto-activator\detonator ...

___
Re: Request: light stick improvement[message #337838] Wed, 19 November 2014 05:52 Go to previous messageGo to next message
Kirill_OverK

 
Messages:262
Registered:September 2010


===
other thing is flares .... -

http://www.youtube.com/watch?v=K5lrrBX0Y68


but too ... with activation in your hand ...
Re: Request: light stick improvement[message #337839] Wed, 19 November 2014 06:02 Go to previous messageGo to next message
sevenfm

 
Messages:2220
Registered:December 2012
Location: Russian Federation
Quote:
so ... in real you can easy detect youself to enemy before you throw stick
at night ...


Make a breaklight item that can be transformed to 'activated breaklight', which is a both regular breaklight and flashlight with a small light radius and default inseparable battery attachment with appropriate picture.


Re: Request: light stick improvement[message #337841] Wed, 19 November 2014 09:50 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3733
Registered:July 2009
Sevenfm

Make a breaklight item that can be transformed to 'activated breaklight', which is a both regular breaklight and flashlight with a small light radius and default inseparable battery attachment with appropriate picture.
[New mercs arrive in Drassen Airport, mid campaign]
Shadow: Hillman! Go to the quartermaster and get a box of chemlight batteries!


Re: Request: light stick improvement[message #337884] Thu, 20 November 2014 20:03 Go to previous messageGo to next message
Kirill_OverK

 
Messages:262
Registered:September 2010
also make possible to throw back activated smoke grenades ...

it's also will be cool when enemy get that and throw it to you ! Smile


https://www.youtube.com/watch?v=c4Ck2VuKrNc



also may be add some plume ... from rocket-l animation ...

Re: Request: light stick improvement[message #337885] Thu, 20 November 2014 20:14 Go to previous messageGo to next message
Kirill_OverK

 
Messages:262
Registered:September 2010

___
other thing if flares or smoke grenade will be as active object on map,

may it possible to destroy flare light by standard grenade ...


------
for smoke kill - use some vacuum grenade ... for smoke neutralization ...
Re: Request: light stick improvement[message #337891] Thu, 20 November 2014 20:29 Go to previous messageGo to next message
tais

 
Messages:674
Registered:February 2008
Location: NL
Yay glow stick!

http://www.youtube.com/watch?v=iRUSQm5ZskQ


Re: Request: light stick improvement[message #337893] Thu, 20 November 2014 20:34 Go to previous messageGo to next message
Kirill_OverK

 
Messages:262
Registered:September 2010
Tais
Yay glow stick!

http://www.youtube.com/watch?v=iRUSQm5ZskQ


Very Happy

glow stick launcher !

Smile
Re: Request: light stick improvement[message #337894] Thu, 20 November 2014 20:36 Go to previous message
Kirill_OverK

 
Messages:262
Registered:September 2010


yes ... good idea !!!

old sticks can blow in hand and make you clothing permanently visible for
enemy in night ...
Previous Topic: Proposal: Enhancements to Facilities
Next Topic: Request: fix big maps work lage than 360
Goto Forum:
  


Current Time: Thu Jul 09 20:31:46 EEST 2020

Total time taken to generate the page: 0.01230 seconds