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

Members Online

»
0 Active | 17 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

»
CoDUO Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Rotating FX (Lighthouse)
Versions: You must be logged in to view history.
Sgt_Skywalker shows you how to rotate fx

Sorry if you find errors or if my explanations sound strange. I'm not a native english speaker

Okay, we'll start...
Searching alot for some neat effects like dynamic lights is very frustrating if you map for CoD. The reason for this is: CoD does not support almost any dynamic effect as you know it from Quake 3. Many techniques for implementing effects look quite different. Unfortunately neither Infinity Ward nor Gray Matter present some detail documentation for the use of shaders, effects or any "CoD-specialities". Maybe one day we will get some more info from them *hint-hint* :casanova:
Therefor all the informations in this tutorial were found out by studying the pk3 files that came with the game.

Make a lighthouse:
First we open our map in Graydiant and create a script_model in our world. I use the original xmodel from the SP-map Sicily1. Its called "xmodel/o_br_prp_lhouse_lamp".
You could also create a script_brushmodel. The most important is next to open your entity editor (key "N") while your new script_model / script_brushmodel is still selected.
Add a key "targetname" and give it the value lighthouse_light. This targetname will reappear later in your script file. That's it for Radiant. Save your map and compile it.

For convenience reasons I always create a startup script (e.g. c:call of duty/uo/maps/mp/mymap.gsc) with the following content:

// Made by Sgt. Skywalker

// Copyright 2005

main() {

ambientPlay("ambient_mp_harbor");



game["allies"] = "american";

game["axis"] = "german";

game["attackers"] = "axis";

game["defenders"] = "allies";



game["american_soldiertype"] = "airborne";

game["american_soldiervariation"] = "normal";

game["german_soldiertype"] = "german_waffen";

game["german_soldiervariation"] = "normal";



mapsmp_load::main();

mapsmpmymap_fx::main(); //kick off fx script here

}

So I have a second script (e.g. c:call of duty/uo/maps/mp/mymap_fx.gsc) where all the interesting stuff happens:

// Made by Sgt. Skywalker

// Copyright 2005

main()

{

  level._effect["light_beam"] = loadfx ("fx/map_sicily1/v_light_lighthouse.efx");

// which effect will we use

  wait(2); // wait 2 seconds to get some cpu threads

  level thread lighthouse_light(); // call thread "lighthouse_light"

}



lighthouse_light() // the fx thread

{

  lighthouse_lights = getentarray("lighthouse_light","targetname");

// create an array of all script_models and script_brushmodels

// which targetname is lighthouse_light

  for ( i = 0; i < lighthouse_lights.size; i++ ) // loop the whole time

  {

    playfxontag( level._effect["light_beam"], lighthouse_lights[i], "tag_light" ); // play fx

    lighthouse_lights thread lighthouse_move(); // call thread lighthouse_light_move

    wait(0.2); // wait 0,2 seconds or it will look silly if 10 lighthouses rotate identically

  }

}



lighthouse_light_move() // move the fx

{

  while(1) // yet another loop

  {

    self rotateto((0,45,0),4,1,1); // rotate within 4 seconds by 45 degrees on y-axis

    self waittill("rotatedone"); // wait until the rotation is done

   self rotateto((0,-45,0),4,1,1); // Play it again, Sam

    self waittill("rotatedone"); // yet another waiting time

  }

}

Syntax of self rotateto((x,y,z),a,b,c):
x = rotate around x-axis
y = rotate around y-axis
z = rotate around z-axis
a = time in secs how long rotation will take
b = time in secs for accelleration
c = time in secs for decelleration

I hope you like it.
sincerely Sgt. Skywalker

Ingame it will look like this:
cod_leuchtturm.jpg

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

»