Spotlights: Difference between revisions
Added links to tag-pages |
Silverwind (talk | contribs) mNo edit summary |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
== Spotlights in TS == | == Spotlights in TS == | ||
'' '''Note:''' This information applies only to Tiberian Sun or Yuri's Revenge when patched by the [[RockPatch:Status|Rock Patch v1.06]] or higher'' | '' '''Note:''' This information applies only to Tiberian Sun or Yuri's Revenge when patched by the [[RockPatch:Status|Rock Patch v1.06]] or higher'' or Ares | ||
Spotlights, a great visual effect, and simple to edit too. | Spotlights, a great visual effect, and simple to edit too. | ||
Line 13: | Line 13: | ||
SpotlightRadius= ? (undocumented tag) | SpotlightRadius= ? (undocumented tag) | ||
Now, many modders get confused by all those radii, angles and stuff. Well, it's easy to comprehend, if you know what an ellipse is. Let me quote: "An ellipse is the locus of points the sum of whose distances from two fixed points, called foci, is a constant."<br>Confused yet? :) | Now, many modders get confused by all those radii, angles and stuff. Well, it's easy to comprehend, if you know what an ellipse is. Let me quote: "An ellipse is the locus of points the sum of whose distances from two fixed points, called foci, is a constant."<br>Confused yet? :) [https://commons.wikimedia.org/wiki/File:Ellipse_Animation_Small.gif See image] | ||
Now that we know what an ellipse is, let's see how that relates to spotlights and what the controls do. | Now that we know what an ellipse is, let's see how that relates to spotlights and what the controls do. | ||
Line 21: | Line 19: | ||
If you place the spotlight tower in one focus, say f<sub>1</sub>, and rotate the axis so that axis AB matches the line connecting NE and SW corners of your screen, then the moving spotlight will draw a certain part of the ellipse on the ground. | If you place the spotlight tower in one focus, say f<sub>1</sub>, and rotate the axis so that axis AB matches the line connecting NE and SW corners of your screen, then the moving spotlight will draw a certain part of the ellipse on the ground. | ||
{{ | {{f|SpotlightSpeed|link}} - obvious, speed of the spotlight. | ||
{{ | {{f|SpotlightMovementRadius|link}} - the distance f<sub>1</sub>O (marked c) (in leptons). | ||
Assuming the light itself is at point A at this moment, | Assuming the light itself is at point A at this moment, | ||
{{ | {{f|SpotlightLocationRadius|link}} - the distance f<sub>1</sub>A (in leptons). | ||
{{ | {{f|SpotlightAcceleration|link}} - obvious, the (de-)acceleration of the light. | ||
{ | {{f|SpotlightAngle|link}} - the angle (in radians), which will be drawn before the light stops and draws the same angle in the reverse direction. | ||
{{ | {{f|SpotlightRadius|link}} - not sure, but it appears to control the width of the falling light beam (the blob on the ground remains unchanged, the part between the tower and the ground appeatrs to widen/thinnen according to this, btu the effect is incomplete and yields nothing useful whatsoever. | ||
The spotlight starts drawing from point B, and goes through C, A, D and back to B. Note, the spotlights which are preplaced on maps can be rotated to face another direction. Then the axis f<sub>1</sub>f<sub>2</sub> will also rotate to be in the smae line with AB. | The spotlight starts drawing from point B, and goes through C, A, D and back to B. Note, the spotlights which are preplaced on maps can be rotated to face another direction. Then the axis f<sub>1</sub>f<sub>2</sub> will also rotate to be in the smae line with AB. | ||
Line 46: | Line 44: | ||
=== Q: How do I make it sound an alarm when an enemy is spotted? === | === Q: How do I make it sound an alarm when an enemy is spotted? === | ||
A: You can't make this flawlessly. You can attach a dummy weapon which has a Report=<warning alarm sound> attached, but then the tower will keep firing at the target and ignore other possible enemies around. | A: You can't make this flawlessly. You can attach a dummy weapon which has a Report=<warning alarm sound> attached, but then the tower will keep firing at the target and ignore other possible enemies around. In {{yr}} (with RP), you can tackle that problem by using {{f|DistributedFire|yes|link}}. | ||
=== Q: How do I make the light follow an enemy unit? === | === Q: How do I make the light follow an enemy unit? === | ||
A: You have to set up the building and triggers on the map from the start. First, place the building (and power plants if its a powered structure) and in its properties set the behaviour of spotlight to 1 'rules.ini settings'. Then create a repeating trigger that has event 35 'Enemy in spotlight and action' 52 'Change light behaviour' that has its parameter set to 3. Attach this trigger to the spotlight building and in game it will follow any enemy units. | A: You have to set up the building and triggers on the map from the start. First, place the building (and power plants if its a powered structure) and in its properties set the behaviour of spotlight to 1 'rules.ini settings'. Then create a repeating trigger that has event 35 'Enemy in spotlight and action' 52 'Change light behaviour' that has its parameter set to 3. Attach this trigger to the spotlight building and in game it will follow any enemy units. | ||
[[Category:Tutorials | [[Category:TS Tutorials]] | ||
[[Category:RockPatch Features]] | [[Category:RockPatch Features]] |