Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 66 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Animated Searchlights for SP
Versions: You must be logged in to view history.
Another great tutorial by Bodger2
My brother and I have created another global script for animated destroyable searchlights.This one is not like the lights in the Dam mission.That one goes out when the player get within a certain distance of the light.We have taken the original scripting from the Dam mission and modified it so that you can walk right up to it without it going out on you.And we made it destroyable to.It has sound and effects as well.And again you only need one line in your maps GSC file.

animsearchlight6ke.jpg

So on with the tutorial:

======== HOW TO CREATE ANIMATED DESTROYABLE SEARCHLIGHTS ========

Step 1: Create a SCRIPT MODEL spotlight

Right click in 2D view and select script >model
Choose xmodel/searchlight_large_on

Step 2: Create a TRIGGER DAMAGE

Create a brush around the spotlight part
Give it the trigger texture (or any texture)
With the brush selected right click in 2D view and select trigger >damage
Give it the following KEYS & VALUES

KEY: targetname VALUE: searchlight_trig_d (MUST BE THIS or searchlights.gsc will not work)

KEY: accumulate VALUE: 0.95 (this not manditory,it still works without it)
KEY: threshold VALUE: 20 (this not manditory,it still works without it)

You could also set some of the spawnflags so certain things won't cause it to trigger
But thats up to you

Step 3: Connect the TRIGGER DAMAGE to the SCRIPT MODEL searchlight

Select the trigger damage then select the searchlight and hit CTRL+K to connect them
You will see a line with arrows going from the trigger to the model

Step 4: Make some CLIP BRUSHS

Since script models are not solid in the game you need to put clip brushs around the model
In Pak5.pk3 there is a folder called COLLMAPS ,in there you will find collision maps for the misc models
Extract the searchlights coll map,and open it in radiant
And delete the misc model,you just want the brushs
Put the clip brushs in the same postion as the script model for the searchlight

Step 5: Adding to your maps .gsc file

EXAMPLE:

main()
{
maps\_load::main();//you must have this in your maps gsc file

maps\searchlights::main();

}
//END MAIN BODY


Step 6: Create (or add) to your maps .csv file

#-------------------------------------------------------------------------------------------

name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel
,type,probability,loop,masterslave,loadspec,subtitle

null,,null.wav,,,,,,,,,,,,,


#Searchlight
searchlight,,misc/searchlight.wav,0.75,,,,200,1650,voice,,,looping,,yourmapname
#---------------------------------------------------------------------------------------------

Step 7: Add SEARCHLIGHTS.GSC to the maps folder

Place searchlights.gsc in the same dir(folder) as your bsp and maps gsc files

===== AND THATS IT YOU HAVE ANIMATED DESTROYABLE SEARCHLIGHTS =====


Here is a link to download the test map,bsp,and searchlights.gsc
test_searchlights.zip

This tutorial is included in searchlights.gsc ,for easy viewing later.
I have also inclueded a prefab in the pk3 file,you just need to connect the trigger to the searchlight.

Hope you enjoy the new global script and prefab,

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»