steinacker
Milupa-Fan
Dabei seit: 13.03.2008
Beiträge: 662
|
|
[Tutorial] Effekte & Sounds |
|
ich hab mich mal etwas mit den effekten (speziell feuer) und scripten usw. befasst
hier mal' screeny
in meiner mp_map.gsc hab ich zwei threads die ich aufrufe
Code angehängt. Klicke hier zum Ein-/Ausblenden
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
maps\mp\_load::main();
maps\mp\mp_moria_fx::main();
thread maps\createfx\mp_moria_fx::Add_Fire();
thread maps\createfx\mp_moria_sound::Add_Sound();
ambientPlay("ambient_moria");
game["allies"] = "sas";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";
setdvar( "r_specularcolorscale", "1" );
setdvar("r_glowbloomintensity0",".25");
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","1800");
} |
|
und diese feuereffekte hab ich jeweils in der mp_map_fx.gsc definiert, im ordner raw/maps/mp
Code angehängt. Klicke hier zum Ein-/Ausblenden
code: |
1:
2:
3:
4:
5:
6:
7:
8:
|
main()
{
//fire
level._effect["fire"] = loadfx ("fire/firelp_barrel_pm");
level._effect["fire2"] = loadfx ("fire/ground_fire_med_nosmoke");
} |
|
die eigentliche datei, die die effekte dann in der map platziert ist im ordner raw/maps/createfx
und heißt auch mp_map_fx.gsc
hier mal ein ausschnitt davon:
Code angehängt. Klicke hier zum Ein-/Ausblenden
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
|
Add_Fire()
{
////////////////////////////////////////////////////////////////Große Halle
////////////////////////////////////////////////////////////////1. Pfosten linke Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( -346, -800, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////2. Pfosten linke Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( -346, -400, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////3. Pfosten linke Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( -346, 0, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////4. Pfosten linke Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( -346, 400, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////5. Pfosten linke Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( -346, 800, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////1. Pfosten rechte Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( 370, -800, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////2. Pfosten rechte Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( 370, -400, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////3. Pfosten rechte Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( 370, 0, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////4. Pfosten rechte Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( 370, 400, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
////////////////////////////////////////////////////////////////5. Pfosten rechte Reihe
ent = maps\mp\_utility::createOneshotEffect( "fire" );
ent.v[ "origin" ] = ( 370, 800, 238 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire";
ent.v[ "delay" ] = -1;
/*
*/
///////////////////////////////////////////////////////////////Lava1
ent = maps\mp\_utility::createLoopEffect( "fire2" );
ent.v[ "origin" ] = ( 1680, 1728, -2064 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire2";
ent.v[ "delay" ] = 1;
///////////////////////////////////////////////////////////////Lava2
ent = maps\mp\_utility::createLoopEffect( "fire2" );
ent.v[ "origin" ] = ( 2592, 1728, -2064 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire2";
ent.v[ "delay" ] = 2;
///////////////////////////////////////////////////////////////Lava3
ent = maps\mp\_utility::createLoopEffect( "fire2" );
ent.v[ "origin" ] = ( 2592, 872, -2064 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire2";
ent.v[ "delay" ] = 3;
///////////////////////////////////////////////////////////////Lava4
ent = maps\mp\_utility::createLoopEffect( "fire2" );
ent.v[ "origin" ] = ( 1680, 872, -2064 );
ent.v[ "angles" ] = ( 0, 180, 0 );
ent.v[ "fxid" ] = "fire2";
ent.v[ "delay" ] = 4;
} |
|
da der effekt fire2 kein loopeffekt ist, hab ich hier die funktion createLoopEffect benutzt, damit dieser ständig abgespielt wird
dabei ist der wert delay entscheidend, in welchem abstand dies geschiet
hier mal noch'n screeny vom zweiten effekt
test
Sound einfügen
bei den fackeln hab ich noch nen feuersound (im spiel enthalten) mit eingefügt
nur weil der sound in der okinol-def in der datei soundaliases\multiplayer.csv etwas leise definiert ist
Code angehängt. Klicke hier zum Ein-/Ausblenden
code: |
1:
2:
3:
4:
|
fire_wood_small,1,fire/fire_woodtrash_small1v2res.wav,0.2,0.3,explosion,0.95,1.05,7,300,auto,,,rlooping,0.85,all_mp,,,,,,,,,,,,,
fire_wood_small,2,fire/fire_woodtrash_small2v2res.wav,0.2,0.3,explosion,0.95,1.05,7,300,auto,,,rlooping,0.85,all_mp,,,,,,,,,,,,,
|
|
hab ich mir den soundalias in meine mp_map.csv kopiert und angepasst
Code angehängt. Klicke hier zum Ein-/Ausblenden
code: |
1:
2:
3:
4:
5:
|
#fire,,,,,,,,,,,,,,,,,,,,,,,,,
fire_wood_small,1,fire/fire_woodtrash_small1v2res.wav,0.5,1.0,explosion,0.95,1.05,100,400,auto,,,rlooping,,all_mp,,,,,,,,,,,,,
fire_wood_small,2,fire/fire_woodtrash_small2v2res.wav,0.5,1.0,explosion,0.95,1.05,100,400,auto,,,rlooping,,all_mp,,,,,,,,,,,,,
|
|
und so sieht's in der mp_map_sound.gsc aus
Code angehängt. Klicke hier zum Ein-/Ausblenden
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
|
Add_Sound()
{
///////////////////////////////////////////////////// --------FireSounds------////////////
////////////////////////////////////////////////////////////////1. Pfosten linke Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( -346, -800, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////2. Pfosten linke Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( -346, -400, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////3. Pfosten linke Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( -346, 0, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////4. Pfosten linke Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( -346, 400, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////5. Pfosten linke Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( -346, 800, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////1. Pfosten rechte Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( 370, -800, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////2. Pfosten rechte Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( 370, -400, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////3. Pfosten rechte Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( 370, 0, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////4. Pfosten rechte Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( 370, 400, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
////////////////////////////////////////////////////////////////5. Pfosten rechte Reihe
ent = maps\mp\_createfx::createLoopSound();
ent.v[ "origin" ] = ( 370, 800, 238 );
ent.v[ "angles" ] = ( 0, 0, 0 );
ent.v[ "soundalias" ] = "fire_wood_small";
} |
|
ich hab jeweils die gleichen koordinaten benutzt wie beim effekt [origin] (x,y,z)
Anmerkung:
nur weiss ich (noch) nich in wie weit man das machen kann, bis ne fehlermeldung kommt
max_blabla exceeded
oder so in der art
oder in wie weit das dann den server in die knie zwingt, wenns zuviel wrid
__________________ Steinacker, Hans Adam - der letzte Scharfrichter von Bad Mergentheim
der mit der Schärfe eines Schwertes richtende
|
|
|
|
|
|
|
Impressum ||Datenschutzerklärung
|