| |
|
|
RE: Mehre Fragen zum Mappen!! |
|
Original von Sniperhanz
Worin liegt der unterschied zwischen Detail Brush und structurel Brush
wenn ich im editor einen Brush ziehe ist der immer in der caluk texture versehen dann texturier ich nur die Seitenen die man auch sieht
Ein structural brush hat (in Verbindung mit portal brushes) direkten Einfluss, was von deiner Map der PC des Spielers gerade berechnen muß. Structural brushes benutzt man eigentlich nur für z.B. Außenwände von Häusern (bei großen Gebäuden auch Innenwände) um die Map später in verschiedene Portalzellen zu unterteilen. Die ganzen Kleinigkeiten (Treppen, Fensterrahmen, Treppengeländer usw.) erstellt man aus detail brushes. Sie sind, wie der Name schon sagt, für die Details zuständig (structural brushes eben für die grobe Struktur).
Die Spawnflags sind nur Zusatzinformationen zu bestimmten Dingen.
Bei z.B. einem Trigger_damage kannst du ja im Entity-Editor über Kontrollkästchen festlegen, ob der Trigger z.B. nicht auf Pistolenkugeln, Melee-Attacke usw. reagieren soll, oder bei einem trigger_multiple, ob er z.B. im einer Sp-Map von den Gegnern den eigenen Kameraden oder dem Spieler selber ausgelöst werden darf oder nicht, oder bei einem Licht z.B. ob es ein primary_light sein soll oder nicht.
Die Zahl bei spawnflags ist nur die dezimale Darstellung des Binärwertes, der durch die Kontrollkästchen gesetzt wird.
__________________
Da die Lichtgeschwindigkeit höher ist als die Schallgeschwindigkeit,
hält man so manchen für einen hellen Kopf, bis man ihn reden hört.
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von OLD MAN WITH GUN: 04.01.2009 02:38.
|
|
|
|
|
Sniperhanz
Tele-Tubbie
Dabei seit: 26.04.2006
Beiträge: 129
|
|
Call of Duty 5: Update Zone File
From RGN Wiki
Jump to: navigation, search
Image:Warning.png You should update your zone file whenever you have to add new assets, or your previous map gave errors since assets were missing.
The Zones Files (Treyarch now has 2 files) are as follow:
C:\Program Files\Activision\Call of Duty - World at War\zone_source\mp_yourmapname.csv
and
C:\Program Files\Activision\Call of Duty - World at War\zone_source\localized_mp_yourmapname.csv
Those 2 files are normally created when using the 'CREATE MAP' button on the Launcher and after a compile:
Image:zone_file_1.png
Image:warning.png If you do not use the 'CREATE MAP' button on Launcher then when Compiling the Launcher should ask you to create the missing Zone Files. Sometimes it does not create the Localized_mp_yourmapname.csv and you will spawn inside your gun in that case!!
* A typical localized_mp_yourmapname.csv:
// NOTE: If you add a comment, put a space after the double forward slash or you will get issues
// This csv/ff is used so people with different language games can play together
ignore,code_post_gfx_mp
ignore,localized_code_post_gfx_mp
ignore,common_mp
ignore,localized_common_mp
include,mptypes_pacific
* A typical mp_yourmapname.csv:
// NOTE: If you add a comment, put a space after the double forward slash or you will get issues
col_map_mp,maps/mp/mp_example2.d3dbsp
rawfile,maps/mp/mp_example2.gsc
impactfx,mp_example2
sound,common,mp_example2,!all_mp
sound,generic,mp_example2,!all_mp
sound,voiceovers,mp_example2,!all_mp
sound,multiplayer,mp_example2,!all_mp
character,char_usa_raider_player_rifle
character,char_usa_raider_player_cqb
character,char_usa_raider_player_assault
character,char_usa_raider_player_lmg
character,char_usa_raider_player_smg
character,char_jap_impinf_player_smg
character,char_jap_impinf_player_rifle
character,char_jap_impinf_player_lmg
character,char_jap_impinf_player_cqb
character,char_jap_impinf_player_assault
Das meinst du mit Update von zonefile THX
Quelle:RGN
__________________ www.Custommaps.de /Mods/patches/Howtos/Maps
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von Sniperhanz: 04.01.2009 22:54.
|
|
|
|
|
| |
|
xdidi0
Weichei
Dabei seit: 14.03.2009
Beiträge: 3
|
|
Original von OLD MAN WITH GUN
Original von Sniperhanz
include,mptypes_pacific
Hast du dir dort auch die mptypes von Tally runtergeladen? Die hat Treyarch nämlich nicht mitgeliefert.
Findest du hier
ich habe mir die 2 sachen runtergeladen aber ich weis leider nicht was ich da jezt genau machen soll also wo das hin kommt und wie/wo ich das eintragen soll kan mir da bitte wer helfen
|
|
|
|
|
| |
| |
| |
|
Sniperhanz
Tele-Tubbie
Dabei seit: 26.04.2006
Beiträge: 129
|
|
******* Client script compile error *******
Error: unknown function: (file 'common_scripts/utility.gsc', line 736)
tokens = strtok( flags, " " );
*
************************************
dvar set cl_paused 0
dvar set long_blocking_call 0
dvar set sv_network_warning 0
dvar set cl_network_warning 0
dvar set loc_language 0
dvar set loc_forceEnglish 0
dvar set language english
dvar set com_errorTitle Error
dvar set com_errorMessage Client script compile error
unknown function
tokens = strtok( flags, " " );
(see console for details)
********************
ERROR: Client script compile error
unknown function
tokens = strtok( flags, " " );
(see console for details)
Hat sich erledigt!! lag an einen Fehler im Script mymap.csc clientsscript
Andere Frage ich möchte das der zombie _spawn nach den Blocker erst spawnt
welche einstellung muss ich machen???
wenn ich im script_model targetname zombie_spawner_init_new
Script_model :
"script_linkTo" "1"
"spawnflags" "1"
"targetname" "door1"
"script_firefx" "poltergeist"
"script_fxid" "large_ceiling_dust"
"script_noteworthy" "jiggle"
Script_struct:
"script_linkName" "1"
Trigger_use:
"targetname" "zombie_debris"
"zombie_cost" "500"
"target" "door1"
targetname zombie_spawner_init_new
eingebe und den mit den Zombie_spawn verbinde bekommme ich beim starten der map einen Fehler!!
******* script runtime error *******
undefined is not an array index: (file 'maps/_zombiemode_blockers.gsc', line 228)
if( !IsDefined( level.flag[self.script_flag] ) )
*
Error: called from:
(file 'maps/_zombiemode_blockers.gsc', line 39)
zombie_debris[i] thread debris_init();
*
Error: called from:
(file 'maps/_zombiemode_blockers.gsc', line 7)
init_blockers();
*
Error: called from:
(file 'maps/_zombiemode.gsc', line 39)
maps\_zombiemode_blockers::init();
*
Error: called from:
(file 'maps/nazi_zombie_lof.gsc', line 12)
maps\_zombiemode::main();
*
Error: started from:
(file 'maps/nazi_zombie_lof.gsc', line 4)
bitte sagt mir was ich tun kann
THX Hannes
Antwort
Ich habe anstelle des xmodels ein script_brush genommmen und eine tür erstellt dann die key/valve eingeben und sie es geht!!
__________________ www.Custommaps.de /Mods/patches/Howtos/Maps
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von Sniperhanz: 21.01.2009 01:48.
|
|
|
|
|
|
Stell mal bitte das Script _zombiemode_blockers.gsc hier rein, um dort nach dem Fehler zu Suchen.
ToM
__________________
|
|
|
|
|
Sniperhanz
Tele-Tubbie
Dabei seit: 26.04.2006
Beiträge: 129
|
|
800 paar zeilen wird lang ....
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:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
|
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
init()
{
init_blockers();
// level thread rebuild_barrier_think();
//////////////////////////////////////////
//designed by prod
//set_zombie_var( "rebuild_barrier_cap_per_round", 500 );
//////////////////////////////////////////
}
init_blockers()
{
// EXTERIOR BLOCKERS ----------------------------------------------------------------- //
level.exterior_goals = getstructarray( "exterior_goal", "targetname" );
for( i = 0; i < level.exterior_goals.size; i++ )
{
level.exterior_goals[i] thread blocker_init();[/i]
}
// DOORS ----------------------------------------------------------------------------- //
zombie_doors = GetEntArray( "zombie_door", "targetname" );
for( i = 0; i < zombie_doors.size; i++ )
{
zombie_doors[i] thread door_init();[/i]
}
// DEBRIS ---------------------------------------------------------------------------- //
zombie_debris = GetEntArray( "zombie_debris", "targetname" );
for( i = 0; i < zombie_debris.size; i++ )
{
zombie_debris[i] thread debris_init();[/i]
}
// Flag Blockers ---------------------------------------------------------------------- //
flag_blockers = GetEntArray( "flag_blocker", "targetname" );
for( i = 0; i < flag_blockers.size; i++ )
{
flag_blockers[i] thread flag_blocker();[/i]
}
}
//
// DOORS --------------------------------------------------------------------------------- //
//
door_init()
{
self.type = undefined;
// Figure out what kind of door we are
targets = GetEntArray( self.target, "targetname" );
if( targets.size == 1 )
{
door = targets[0];
if( IsDefined( door.script_angles ) )
{
self.type = "rotate";
}
else if( IsDefined( door.script_vector ) )
{
self.type = "move";
}
self.door = door;
}
else
{
if( IsDefined( self.script_noteworthy ) )
{
if( self.script_noteworthy == "bust_apart" )
{
self.pieces = targets;
}
}
}
AssertEx( IsDefined( self.type ), "You must determine how this door opens. Specify script_angles, script_vector, or a script_noteworthy... Door at: " + self.origin );
cost = 1000;
if( IsDefined( self.zombie_cost ) )
{
cost = self.zombie_cost;
}
self set_hint_string( self, "default_buy_door_" + cost );
self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();
self thread door_think();
}
door_think()
{
// maybe the door the should just bust open instead of slowly opening.
// maybe just destroy the door, could be two players from opposite sides..
// breaking into chunks seems best.
// or I cuold just give it no collision
while( 1 )
{
self waittill( "trigger", who );
if( !who UseButtonPressed() )
{
continue;
}
if( who in_revive_trigger() )
{
continue;
}
if( is_player_valid( who ) )
{
if( who.score >= self.zombie_cost )
{
// set the score
who maps\_zombiemode_score::minus_to_player_score( self.zombie_cost );
self.door connectpaths();
play_sound_at_pos( "purchase", self.door.origin );
if( self.type == "rotate" )
{
self.door NotSolid();
time = 1;
if( IsDefined( self.door.script_transition_time ) )
{
time = self.door.script_transition_time;
}
play_sound_at_pos( "door_rotate_open", self.door.origin );
self.door RotateTo( self.door.script_angles, time, 0, 0 );
self.door thread door_solid_thread();
}
else if( self.type == "move" )
{
self.door NotSolid();
time = 1;
if( IsDefined( self.door.script_transition_time ) )
{
time = self.door.script_transition_time;
}
play_sound_at_pos( "door_slide_open", self.door.origin );
self.door MoveTo( self.door.origin + self.door.script_vector, time, time * 0.25, time * 0.25 );
self.door thread door_solid_thread();
}
// door needs to target new spawners which will become part
// of the level enemy array
self.door add_new_zombie_spawners();
// get all trigs, we might want a trigger on both sides
// of some junk sometimes
all_trigs = getentarray( self.target, "target" );
for( i = 0; i < all_trigs.size; i++ )
{
all_trigs[i] delete();[/i]
}
break;
}
else // Not enough money
{
play_sound_at_pos( "no_purchase", self.door.origin );
}
}
}
}
door_solid_thread()
{
self waittill( "rotatedone" );
while( 1 )
{
players = get_players();
player_touching = false;
for( i = 0; i < players.size; i++ )
{
if( players[i] IsTouching( self ) )[/i]
{
player_touching = true;
break;
}
}
if( !player_touching )
{
self Solid();
return;
}
wait( 1 );
}
}
//
// DEBRIS ----------------------------------------------------------------------------------- //
//
debris_init()
{
cost = 1000;
if( IsDefined( self.zombie_cost ) )
{
cost = self.zombie_cost;
}
self set_hint_string( self, "default_buy_debris_" + cost );
self SetCursorHint( "HINT_NOICON" );
if( !IsDefined( level.flag[self.script_flag] ) )
{
flag_init( self.script_flag );
}
self UseTriggerRequireLookAt();
self thread debris_think();
}
debris_think()
{
while( 1 )
{
self waittill( "trigger", who );
if( !who UseButtonPressed() )
{
continue;
}
if( who in_revive_trigger() )
{
continue;
}
if( is_player_valid( who ) )
{
if( who.score >= self.zombie_cost )
{
// set the score
who maps\_zombiemode_score::minus_to_player_score( self.zombie_cost );
// delete the stuff
junk = getentarray( self.target, "targetname" );
if( IsDefined( self.script_flag ) )
{
flag_set( self.script_flag );
}
play_sound_at_pos( "purchase", self.origin );
move_ent = undefined;
clip = undefined;
for( i = 0; i < junk.size; i++ )
{
junk[i] connectpaths();[/i]
junk[i] add_new_zombie_spawners();[/i]
if( IsDefined( junk[i].script_noteworthy ) )[/i]
{
if( junk[i].script_noteworthy == "clip" )[/i]
{
clip = junk[i];[/i]
continue;
}
}
struct = undefined;
if( IsDefined( junk[i].script_linkTo ) )[/i]
{
struct = getstruct( junk[i].script_linkTo, "script_linkname" );[/i]
if( IsDefined( struct ) )
{
move_ent = junk[i];[/i]
junk[i] thread debris_move( struct );[/i]
}
else
{
junk[i] Delete();[/i]
}
}
else
{
junk[i] Delete();[/i]
}
}
// get all trigs, we might want a trigger on both sides
// of some junk sometimes
all_trigs = getentarray( self.target, "target" );
for( i = 0; i < all_trigs.size; i++ )
{
all_trigs[i] delete();[/i]
}
if( IsDefined( clip ) )
{
if( IsDefined( move_ent ) )
{
move_ent waittill( "movedone" );
}
clip Delete();
}
break;
}
else
{
play_sound_at_pos( "no_purchase", self.origin );
}
}
}
}
debris_move( struct )
{
self script_delay();
self play_sound_on_ent( "debris_move" );
if( IsDefined( self.script_firefx ) )
{
PlayFX( level._effect[self.script_firefx], self.origin );
}
// Do a little jiggle, then move.
if( IsDefined( self.script_noteworthy ) )
{
if( self.script_noteworthy == "jiggle" )
{
num = RandomIntRange( 3, 5 );
og_angles = self.angles;
for( i = 0; i < num; i++ )
{
angles = og_angles + ( -5 + RandomFloat( 10 ), -5 + RandomFloat( 10 ), -5 + RandomFloat( 10 ) );
time = RandomFloatRange( 0.1, 0.4 );
self Rotateto( angles, time );
wait( time - 0.05 );
}
}
}
time = 0.5;
if( IsDefined( self.script_transition_time ) )
{
time = self.script_transition_time;
}
self MoveTo( struct.origin, time, time * 0.5 );
self RotateTo( struct.angles, time * 0.75 );
self waittill( "movedone" );
self play_sound_on_entity ("couch_slam";);
self play_loopsound_on_ent( "debris_hover_loop" );
if( IsDefined( self.script_fxid ) )
{
PlayFX( level._effect[self.script_fxid], self.origin );
}
if( IsDefined( self.script_delete ) )
{
self Delete();
}
}
//
// BLOCKER -------------------------------------------------------------------------- //
//
blocker_init()
{
if( !IsDefined( self.target ) )
{
return;
}
targets = GetEntArray( self.target, "targetname" );
self.barrier_chunks = [];
for( j = 0; j < targets.size; j++ )
{
if( IsDefined( targets[j].script_noteworthy ) )
{
if( targets[j].script_noteworthy == "clip" )
{
self.clip = targets[j];
continue;
}
}
targets[j].destroyed = false;
targets[j].claimed = false;
self.barrier_chunks[self.barrier_chunks.size] = targets[j];
self blocker_attack_spots();
}
self.trigger_location = getstruct( self.target, "targetname" );
self thread blocker_think();
}
blocker_attack_spots()
{
// Get closest chunk
chunk = getClosest( self.origin, self.barrier_chunks );
dist = Distance2d( self.origin, chunk.origin ) - 36;
spots = [];
spots[0] = groundpos( self.origin + ( AnglesToForward( self.angles ) * dist ) + ( 0, 0, 60 ) );
spots[spots.size] = groundpos( spots[0] + ( AnglesToRight( self.angles ) * 28 ) + ( 0, 0, 60 ) );
spots[spots.size] = groundpos( spots[0] + ( AnglesToRight( self.angles ) * -28 ) + ( 0, 0, 60 ) );
taken = [];
for( i = 0; i < spots.size; i++ )
{
taken[i] = false;[/i]
}
self.attack_spots_taken = taken;
self.attack_spots = spots;
self thread debug_attack_spots_taken();
}
blocker_think()
{
while( 1 )
{
wait( 0.5 );
if( all_chunks_intact( self.barrier_chunks ) )
{
continue;
}
self blocker_trigger_think();
}
}
blocker_trigger_think()
{
// They don't cost, they now award the player the cost...
cost = 10;
if( IsDefined( self.zombie_cost ) )
{
cost = self.zombie_cost;
}
original_cost = cost;
radius = 96;
height = 96;
if( IsDefined( self.trigger_location ) )
{
trigger_location = self.trigger_location;
}
else
{
trigger_location = self;
}
if( IsDefined( trigger_location.radius ) )
{
radius = trigger_location.radius;
}
if( IsDefined( trigger_location.height ) )
{
height = trigger_location.height;
}
trigger_pos = groundpos( trigger_location.origin ) + ( 0, 0, 4 );
trigger = Spawn( "trigger_radius", trigger_pos, 0, radius, height );
/#
if( GetDvarInt( "zombie_debug" ) > 0 )
{
thread debug_blocker( trigger_pos, radius, height );
}
#/
// Rebuilding no longer costs us money... It's rewarded
//////////////////////////////////////////
//designed by prod; NO reward hint (See DT#36173)
trigger set_hint_string( self, "default_reward_barrier_piece" );
//trigger thread blocker_doubler_hint( "default_reward_barrier_piece_", original_cost );
//////////////////////////////////////////
doubler_status = level.zombie_vars["zombie_powerup_point_doubler_on"];
if( doubler_status )
{
cost = original_cost * 2;
}
trigger SetCursorHint( "HINT_NOICON" );
while( 1 )
{
trigger waittill( "trigger", player );
wait( 0.4 );
while( 1 )
{
if( !player IsTouching( trigger ) )
{
break;
}
if( !is_player_valid( player ) )
{
break;
}
if( player in_revive_trigger() )
{
break;
}
//DT# 37553
//COST NOTHING NOW, will GIVE you money, so this
//check is totally invalid
//if( ( player.score - cost ) < 0 )
//{
// play_sound_at_pos( "no_purchase", trigger.origin );
// break;
//}
if( !player UseButtonPressed() )
{
break;
}
if( doubler_status != level.zombie_vars["zombie_powerup_point_doubler_on"] )
{
doubler_status = level.zombie_vars["zombie_powerup_point_doubler_on"];
cost = original_cost;
if( level.zombie_vars["zombie_powerup_point_doubler_on"] )
{
cost = original_cost * 2;
}
}
// restore a random chunk
chunk = get_random_destroyed_chunk( self.barrier_chunks );
assert( chunk.destroyed == true );
chunk Show();
//TUEY Play the sounds
chunk play_sound_on_ent( "rebuild_barrier_piece" );
self thread replace_chunk( chunk );
if( IsDefined( self.clip ) )
{
self.clip enable_trigger();
self.clip DisconnectPaths();
}
if( !self script_delay() )
{
wait( 1 );
}
if( !is_player_valid( player ) )
{
break;
}
// set the score
player.rebuild_barrier_reward += cost;
if( player.rebuild_barrier_reward < level.zombie_vars["rebuild_barrier_cap_per_round"] )
{
player maps\_zombiemode_score::add_to_player_score( cost );
}
if( all_chunks_intact( self.barrier_chunks ) )
{
trigger Delete();
return;
}
}
}
}
blocker_doubler_hint( hint, original_cost )
{
self endon( "death" );
doubler_status = level.zombie_vars["zombie_powerup_point_doubler_on"];
while( 1 )
{
wait( 0.5 );
if( doubler_status != level.zombie_vars["zombie_powerup_point_doubler_on"] )
{
doubler_status = level.zombie_vars["zombie_powerup_point_doubler_on"];
cost = original_cost;
if( level.zombie_vars["zombie_powerup_point_doubler_on"] )
{
cost = original_cost * 2;
}
self set_hint_string( self, hint + cost );
}
}
}
rebuild_barrier_reward_reset()
{
self.rebuild_barrier_reward = 0;
}
remove_chunk( chunk, node )
{
chunk play_sound_on_ent( "break_barrier_piece" );
chunk NotSolid();
fx = "wood_chunk_destory";
if( IsDefined( self.script_fxid ) )
{
fx = self.script_fxid;
}
playfx( level._effect[fx], chunk.origin );
playfx( level._effect[fx], chunk.origin + ( randomint( 20 ), randomint( 20 ), randomint( 10 ) ) );
playfx( level._effect[fx], chunk.origin + ( randomint( 40 ), randomint( 40 ), randomint( 20 ) ) );
if( IsDefined( chunk.script_moveoverride ) && chunk.script_moveoverride )
{
chunk Hide();
}
else
{
if( !IsDefined( chunk.og_origin ) )
{
chunk.og_origin = chunk.origin;
}
// angles = node.angles +( 0, 180, 0 );
// force = AnglesToForward( angles + ( -60, 0, 0 ) ) * ( 200 + RandomInt( 100 ) );
// chunk PhysicsLaunch( chunk.origin, force );
ent = Spawn( "script_origin", chunk.origin );
ent.angles = node.angles +( 0, 180, 0 );
dist = 100 + RandomInt( 100 );
dest = ent.origin + ( AnglesToForward( ent.angles ) * dist );
trace = BulletTrace( dest + ( 0, 0, 16 ), dest + ( 0, 0, -200 ), false, undefined );
if( trace["fraction"] == 1 )
{
dest = dest + ( 0, 0, -200 );
}
else
{
dest = trace["position"];
}
// time = 1;
chunk LinkTo( ent );
time = ent fake_physicslaunch( dest, 200 + RandomInt( 100 ) );
// forward = AnglesToForward( ent.angles + ( -60, 0, 0 ) ) * power );
// ent MoveGravity( forward, time );
if( RandomInt( 100 ) > 40 )
{
ent RotatePitch( 180, time * 0.5 );
}
else
{
ent RotatePitch( 90, time, time * 0.5 );
}
wait( time );
chunk Hide();
wait( 1 );
ent Delete();
}
chunk.destroyed = true;
if( all_chunks_destroyed( node.barrier_chunks ) )
{
EarthQuake( randomfloatrange( 0.5, 0.8 ), 0.5, chunk.origin, 300 );
if( IsDefined( node.clip ) )
{
node.clip ConnectPaths();
wait( 0.05 );
node.clip disable_trigger();
}
else
{
for( i = 0; i < node.barrier_chunks.size; i++ )
{
node.barrier_chunks[i] ConnectPaths();[/i]
}
}
}
else
{
EarthQuake( RandomFloatRange( 0.1, 0.15 ), 0.2, chunk.origin, 200 );
}
}
replace_chunk( chunk )
{
if( IsDefined( chunk.og_origin ) )
{
time = 0.1 + RandomFloat( 0.2 );
chunk Show();
sound = "rebuild_barrier_hover";
if( IsDefined( chunk.script_presound ) )
{
sound = chunk.script_presound;
}
play_sound_at_pos( sound, chunk.origin );
only_z = ( chunk.origin[0], chunk.origin[1], chunk.og_origin[2] );
chunk MoveTo( only_z, time, 0, time * 0.25 );
chunk RotateTo( ( 0, 0, 0 ), time + 0.25 );
chunk waittill( "rotatedone" );
wait( 0.2 );
chunk MoveTo( chunk.og_origin, 0.15, 0.1 );
chunk waittill( "movedone" );
}
chunk.destroyed = false;
sound = "barrier_rebuild_slam";
if( IsDefined( self.script_ender ) )
{
sound = self.script_ender;
}
play_sound_at_pos( sound, chunk.origin );
chunk Solid();
fx = "wood_chunk_destory";
if( IsDefined( self.script_fxid ) )
{
fx = self.script_fxid;
}
playfx( level._effect[fx], chunk.origin );
playfx( level._effect[fx], chunk.origin +( randomint( 20 ), randomint( 20 ), randomint( 10 ) ) );
playfx( level._effect[fx], chunk.origin +( randomint( 40 ), randomint( 40 ), randomint( 20 ) ) );
if( !Isdefined( self.clip ) )
{
chunk Disconnectpaths();
}
}
add_new_zombie_spawners()
{
if( isdefined( self.target ) )
{
self.possible_spawners = getentarray( self.target, "targetname" );
}
if( isdefined( self.script_string ) )
{
spawners = getentarray( self.script_string, "targetname" );
self.possible_spawners = array_combine( self.possible_spawners, spawners );
}
if( !isdefined( self.possible_spawners ) )
{
return;
}
// add new check if they've been added already
zombies_to_add = self.possible_spawners;
for( i = 0; i < self.possible_spawners.size; i++ )
{
self.possible_spawners[i].locked_spawner = false;[/i]
add_spawner( self.possible_spawners[i] );[/i]
}
}
//
// Flag Blocker ----------------------------------------------------------------------------------- //
//
flag_blocker()
{
if( !IsDefined( self.script_flag_wait ) )
{
AssertMsg( "Flag Blocker at " + self.origin + " does not have a script_flag_wait key value pair" );
return;
}
if( !IsDefined( level.flag[self.script_flag_wait] ) )
{
flag_init( self.script_flag_wait );
}
type = "connectpaths";
if( IsDefined( self.script_noteworthy ) )
{
type = self.script_noteworthy;
}
flag_wait( self.script_flag_wait );
self script_delay();
if( type == "connectpaths" )
{
self ConnectPaths();
self disable_trigger();
return;
}
if( type == "disconnectpaths" )
{
self DisconnectPaths();
self disable_trigger();
return;
}
AssertMsg( "flag blocker at " + self.origin + ", the type \"" + type + "\" is not recognized" );
}
|
|
--- Edit by Nightwing: Habs mal als Code reingestellt ---
__________________ www.Custommaps.de /Mods/patches/Howtos/Maps
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von Nightwing: 08.01.2009 20:21.
|
|
|
|
|
|
|
Impressum ||Datenschutzerklärung
|