|
C2_Scientist
|
|
jaywalker
|
  
|
|
|
Reged: Tue Mar 26 2002
|
|
Posts: 1672
|
|
Loc: Finland
|
|
Re: "Advanced" map tricks galore (physics, modeling, misc)
[re: TTR]
Thu Mar 05 2009 11:46 AM
|
Edit
|
Reply
|
|
|
Spawning torch fires
If you have a map with torches placed on walls, and would like to light them up as you enter the area, use this trick. Create a tiny, invisible placeholder object for a fire, and name it as &TorchFire. Duplicate and place these where you would like the fires to appear. Then, create an empty model in PT2, name it as TorchEmpty, and save into your track's folder as ACT,DAT,MAT. Next, insert this code to the smashable specs in track's textfile:
code:
// NEXT SMASHABLE ITEM 0 // "Flags" &TorchFire // Name of the initial model replacemodel // Model change mode, replace TorchEmpty // New model 100 // Chance of fire/smoke (in %) 1 // Number of fires/smoke columns 0,0 // Min,Max smokiness (0=fire, 1=black smoke, 2=grey smoke, 3=white smoke) 1000 // Minimum force requirement for the removal/change 0 // Number of possible sound effects caused 0 // Number of shrapnel objects spawned 0 // Number of explosion groups none // Slick material to spawn on ground 0 // Number of blastwaves to cause, to activate noncars 0 // Number of blastwaves to cause, to activate other smashables 0 // "Extensions flags" 0 // Award the player with a powerup (data/powerups.txt, 14=mine) none // Award the player with credits/time/message 0 // "Number of runtime variable changes" 0 // "Reserved 1" 0 // "Reserved 2" 0 // "Reserved 3" 0 // "Reserved 4"
Now all that is left is to create some sort of a simple trigger (object or material) to inflict an invisible "blastwave", with a custom volume that covers all the tiny placeholders, and causes them to activate. Note that the "minimum force requirement" in the code above is set to "1000", so the force inflicted by the triggered blastwave should be at least equal to that or greater - otherwise, the placeholders won't be considered destroyed, and no fire will appear. If you wish, you may also add a small explosion using the "explosion groups" setting.
Of course, the flames may die on their own, over time.
====================================================================================================
Lightning bolts
Unfortunately, if you want the lightning bolts to spawn randomly, over a long time period, they will have to be inaudible. If that doesn't bother you, read on. First, create the frames for the lightning bolt animation. Now create a tiny, invisible placeholder cube, name it as "&Lightning", and place it at the center of your map, on the ground. Then open track's textfile, go to smashable specs, section, and use this code:
code:
// NEXT SMASHABLE ITEM 0 // "Flags" &Lightning // Name of the initial model remove // Model change mode, remove 1000 // Minimum force requirement for the removal/change 0 // Number of possible sound effects caused 0 // Number of shrapnel objects spawned 1 // Number of "explosion groups" 100,100 // min count, max count of lightning bolts 0,3600 // min start delay, max start delay in seconds 0,10,0 // offset (X,Y,Z) The centre of the bolts will be 10 units above the ground 0,100 // min X distance, max X distance 0,0 // min Y distance, max Y distance 0,100 // min Z distance, max Z distance 25,50 // min frame rate, max frame rate 50,75 // min scaling factor, max scaling factor (Big bangs or not?) randomrotate // rotate mode 10 // Number of frames in animation 100 // Opacity in % Bolt01 // Frame name 100 // Opacity in % Bolt02 // Frame name 100 // Opacity in % Bolt03 // Frame name 100 // Opacity in % Bolt04 // Frame name 100 // Opacity in % Bolt05 // Frame name 100 // Opacity in % Bolt06 // Frame name 100 // Opacity in % Bolt07 // Frame name 100 // Opacity in % Bolt08 // Frame name 100 // Opacity in % Bolt09 // Frame name 100 // Opacity in % Bolt10 // Frame name none // Slick material to spawn on ground 0 // Number of blastwaves to cause, to activate noncars 0 // Number of blastwaves to cause, to activate other smashables 0 // "Extensions flags" 0 // Award the player with a powerup (data/powerups.txt, 14=mine) none // Award the player with credits/time/message 0 // "Number of runtime variable changes" 0 // "Reserved 1" 0 // "Reserved 2" 0 // "Reserved 3" 0 // "Reserved 4"
Now again create a simple trigger smashable (object or texture) to destroy the invisible &Lightning-cube (minimum force required = 1000), and the (mute) thunderstorm should begin. Adjust the various values in the code to your liking, they surely aren't perfect at the moment, but should give a rough idea of what value ranges to aim for. For example, the frame rates should be very high, since a bolt hits quickly. The X and Z distances should be large, to make the random bolts hit over a large area. The large scaling factor ensures that the bolts will look massive. Etc.
It can surely be refined by others still, but this version will have to do meanwhile.
My C2 website , YouTube channel
Post Extras
|
|