| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267 |
- /*
- ** Command & Conquer Renegade(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /******************************************************************************
- *
- * FILE
- * Mission11.cpp
- *
- * DESCRIPTION
- * Mission 11 scripts
- *
- * PROGRAMMER
- * Design Team
- *
- * VERSION INFO
- * $Author: Joe_g $
- * $Revision: 108 $
- * $Modtime: 2/19/02 12:09p $
- * $Archive: /Commando/Code/Scripts/Mission11.cpp $
- *
- ******************************************************************************/
- #include "scripts.h"
- #include <string.h>
- #include "toolkit.h"
- #include "mission1.h"
- #include "mission11.h"
- /***********************************************************************************************************************
- Putting level specific character scripts here...sydney, petrova, havoc, etc...
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_VoltRifleGuy_Script_JDG, "")
- {
- bool player_has_volt_rifle;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( player_has_volt_rifle, 1 );
- }
- void Created( GameObject * obj )
- {
- player_has_volt_rifle = false;
- GameObject * voltPowerupMonitor = Commands->Find_Object ( 101883 );
- if (voltPowerupMonitor != NULL)
- {
- Commands->Send_Custom_Event ( obj, voltPowerupMonitor, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );//checking if player has volt rifle
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)//player has volt rifle--allow powerup drop
- {
- player_has_volt_rifle = true;
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (player_has_volt_rifle == true)
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- myPosition.Z += 0.75;
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", myPosition );
- }
- }
- };
- DECLARE_SCRIPT(M11_VoltRifle_Monitor_Script_JDG, "")
- {
- bool player_has_volt_rifle;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( player_has_volt_rifle, 1 );
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- player_has_volt_rifle = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)//player has picked up volt rifle
- {
- player_has_volt_rifle = true;
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)//volt guy is checking on rifle status
- {
- if (player_has_volt_rifle == true)
- {
- Commands->Send_Custom_Event ( obj, sender, 0, M01_START_ACTING_JDG, 0 );
- }
- else
- {
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_VoltRifle_Script_JDG, "")
- {
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if ( type == CUSTOM_EVENT_POWERUP_GRANTED )
- {
- Vector3 spawn_location01 (-2.44f, 6.189f, -38.536f);//these are in the barracks
- Vector3 spawn_location02 (-4.079f, 6.207f, -38.536f);
- Vector3 spawn_location03 (-5.857f, 6.199f, -38.536f);
- Vector3 spawn_location04 (-25.948f, 10.923f, -29.670f);//these are in seth's room
- Vector3 spawn_location05 (-24.676f, 13.208f, -29.855f);
- Vector3 spawn_location06 (-22.492f, 14.631f, -29.855f);
- Vector3 spawn_location07 (-19.753f, 14.540f, -29.855f);
- Vector3 spawn_location08 (-17.378f, 13.195f, -29.855f);
- Vector3 spawn_location09 (-17.567f, 11.051f, -29.658f);
- Vector3 spawn_location10 (20.696f, 1.720f, -29.855f);
- Vector3 spawn_location11 (20.648f, -0.227f, -29.855f);
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location01 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location02 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location03 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location04 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location05 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location06 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location07 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location08 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location09 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location10 );
- Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location11 );
- GameObject * voltPowerupMonitor = Commands->Find_Object ( 101883 );
- if (voltPowerupMonitor != NULL)
- {
- Commands->Send_Custom_Event ( obj, voltPowerupMonitor, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_KeyCard_01_Carrier_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- Commands->Send_Custom_Event ( obj, obj, M00_CUSTOM_POWERUP_GRANT_DISABLE, 0, 0 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Vector3 spawn_location = Commands->Get_Position (obj);
- spawn_location.Z = spawn_location.Z + 0.75f;
- GameObject * powerup = Commands->Create_Object ( "POW_VoltAutoRifle_Player", spawn_location );
- Commands->Attach_Script(powerup, "M11_VoltRifle_Script_JDG", "");
- }
- };
- /***********************************************************************************************************************
- Putting MISSION CONTROLLER here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_Mission_Controller_JDG, "")
- {
- int evaPingedSydneyConv;
- int missionIntroConv02;
- int missionIntroConv;
- int evaNukeConv;
- bool player_has_reached_musuem;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( evaPingedSydneyConv, 1 );
- SAVE_VARIABLE( missionIntroConv02, 2 );
- SAVE_VARIABLE( missionIntroConv, 3 );
- SAVE_VARIABLE( evaNukeConv, 4 );
- SAVE_VARIABLE( player_has_reached_musuem, 5 );
- }
- void Created( GameObject * obj )
- {
- player_has_reached_musuem = false;
- Commands->Show_Player_Map_Marker ( false );
- Commands->Reveal_Map ( );
- Commands->Enable_Hibernation( obj, false );
- Commands->Send_Custom_Event ( obj, obj, 0, M11_ATTACH_HAVOCS_SCRIPT_JDG, 0 );
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- switch (complete_reason)
- {
- case ACTION_COMPLETE_CONVERSATION_ENDED:
- {
- if (action_id == missionIntroConv) //introduce rescue sydney objective here
- {
- Commands->Send_Custom_Event( obj, obj, 0, M11_ADD_SECOND_OBJECTIVE_JDG, 0 );
- Commands->Send_Custom_Event( obj, obj, 0, M11_PLAY_SECOND_INTRO_CONVERSATION_JDG, 3 );
- }
- else if (action_id == missionIntroConv02) //introduce rescue sydney objective here
- {
- Commands->Send_Custom_Event( obj, obj, 0, M11_ADD_FIRST_OBJECTIVE_JDG, 0 );
- }
- else if (action_id == evaPingedSydneyConv)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M11_ADD_SECOND_OBJECTIVE_POG_JDG, 0 );
- }
- else if (action_id == evaNukeConv)
- {
- Commands->Add_Objective( M11_FIFTH_OBJECTIVE_JDG, OBJECTIVE_TYPE_PRIMARY, OBJECTIVE_STATUS_PENDING, IDS_Enc_ObjTitle_Primary_M11_05, NULL, IDS_Enc_Obj_Primary_M11_05 );
-
- GameObject * nukeSwitch = Commands->Find_Object ( M11_END_MISSION_SWITCH_JDG );
- if (nukeSwitch != NULL)
- {
- Commands->Set_Objective_Radar_Blip_Object( M11_FIFTH_OBJECTIVE_JDG, nukeSwitch );
- Commands->Set_Objective_HUD_Info( M11_FIFTH_OBJECTIVE_JDG, 94, "POG_M11_1_04.tga", IDS_POG_SABOTAGE );
- }
- else
- {
- Commands->Debug_Message ( "***************************M11 mission controller cannot find sydnee to ping her on radar--add forth objective\n" );
- }
- }
- }
- break;
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == CUSTOM_EVENT_SOUND_ENDED )
- {
- }
- else if (type == 0)
- {
- switch (param)
- {
- case M11_ATTACH_HAVOCS_SCRIPT_JDG:
- {
- if (STAR)
- {
- //Commands->Attach_Script(STAR, "M11_Havocs_Script_JDG", "");
- missionIntroConv = Commands->Create_Conversation( "M11_Level_Intro_Conversation", 100, 1000, false);
- Commands->Join_Conversation( NULL, missionIntroConv, false, false );
- Commands->Join_Conversation( STAR, missionIntroConv, false, false );
- //Commands->Join_Conversation( NULL, missionIntroConv, false, false );
- Commands->Start_Conversation( missionIntroConv, missionIntroConv );
- Commands->Monitor_Conversation (obj, missionIntroConv);
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M11_ATTACH_HAVOCS_SCRIPT_JDG, 1 );
- }
- }
- break;
- case M11_PLAY_SECOND_INTRO_CONVERSATION_JDG: //play locke-havoc-cabal conv
- {
- if (STAR)
- {
- missionIntroConv02 = Commands->Create_Conversation( "M11_Level_Intro_Conversation02", 100, 1000, false);
- Commands->Join_Conversation( NULL, missionIntroConv02, false, false );
- Commands->Join_Conversation( NULL, missionIntroConv02, false, false );
- //Commands->Join_Conversation( STAR, missionIntroConv02, false, false );
- Commands->Start_Conversation( missionIntroConv02, missionIntroConv02 );
- Commands->Monitor_Conversation (obj, missionIntroConv02);
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_FLOOR01_SECURITY_CONTROLLER_JDG), 0, M01_START_ACTING_JDG, 5 );
- }
- }
- break;
- case M11_END_MISSION_PASS_JDG: //end mission when all objectives have been met
- {
- Commands->Mission_Complete ( true );
- }
- break;
- case M11_END_MISSION_FAIL_JDG: //end mission when critical objective failed
- {
- Commands->Mission_Complete ( false );
- }
- break;
- case M11_ADD_FIRST_OBJECTIVE_JDG: //player's first objective is to get into lower levels
- {
- if (player_has_reached_musuem == false)
- {
- Commands->Add_Objective( M11_FIRST_OBJECTIVE_JDG, OBJECTIVE_TYPE_PRIMARY, OBJECTIVE_STATUS_PENDING, IDS_Enc_ObjTitle_Primary_M11_02, NULL, IDS_Enc_Obj_Primary_M11_02 );
- Vector3 musemLocation (2.072f, 16.705f, -24.531f);
- Commands->Set_Objective_HUD_Info_Position( M11_FIRST_OBJECTIVE_JDG, 91, "POG_M11_1_02.tga", IDS_POG_INFILTRATE, musemLocation );
- }
- }
- break;
- case M11_END_FIRST_OBJECTIVE_JDG: //player has reached museum area--clear first objective
- {
- player_has_reached_musuem = true;
- Commands->Set_Objective_Status( M11_FIRST_OBJECTIVE_JDG, OBJECTIVE_STATUS_ACCOMPLISHED );
- //Commands->Send_Custom_Event ( obj, obj, 0, M11_ADD_SECOND_OBJECTIVE_JDG, 5 );
- evaPingedSydneyConv = Commands->Create_Conversation( "M11_EVA_SydneyPinged_Conversation", 100, 1000, false);
- Commands->Join_Conversation( NULL, evaPingedSydneyConv, false, false );;
- Commands->Start_Conversation( evaPingedSydneyConv, evaPingedSydneyConv );
- Commands->Monitor_Conversation (obj, evaPingedSydneyConv);
- }
- break;//
- case M11_ADD_SECOND_OBJECTIVE_JDG: //player's second objective is to locate sydney mobius
- {
- Vector3 sydenysLocation (0.000f, 96.000f, -34.250f);
- //Commands->Add_Objective( M11_SECOND_OBJECTIVE_JDG, OBJECTIVE_TYPE_PRIMARY, OBJECTIVE_STATUS_PENDING, IDS_Enc_ObjTitle_Primary_M11_01 );
- Commands->Add_Objective( M11_SECOND_OBJECTIVE_JDG, OBJECTIVE_TYPE_PRIMARY, OBJECTIVE_STATUS_PENDING, IDS_Enc_ObjTitle_Primary_M11_01, NULL, IDS_Enc_Obj_Primary_M11_01 );
- Commands->Set_Objective_HUD_Info_Position( M11_SECOND_OBJECTIVE_JDG, -1, "POG_M11_1_01.tga", IDS_POG_RESCUE, sydenysLocation );
-
- }
- break;
- case M11_ADD_SECOND_OBJECTIVE_POG_JDG: //player's second objective is to locate sydney mobius
- {
- GameObject * sydney = Commands->Find_Object ( M11_SIMPLE_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL)
- {
- Vector3 sydenysLocation (0.000f, 96.000f, -34.250f);
- //Commands->Set_Objective_Radar_Blip_Object( M11_SECOND_OBJECTIVE_JDG, sydney );
- Commands->Set_Objective_HUD_Info_Position( M11_SECOND_OBJECTIVE_JDG, 90, "POG_M11_1_01.tga", IDS_POG_RESCUE, sydenysLocation );
- }
- else
- {
- Commands->Debug_Message ( "***************************M11 mission controller cannot find sydnee to ping her on radar--add second objective\n" );
- }
- }
- break;
- case M11_END_SECOND_OBJECTIVE_JDG: //player has reached Sydney's cell area--clear 2nd objective
- {
- Commands->Set_Objective_Status( M11_SECOND_OBJECTIVE_JDG, OBJECTIVE_STATUS_ACCOMPLISHED );
- Commands->Send_Custom_Event( obj, obj, 0, M11_ADD_FORTH_OBJECTIVE_JDG, 5 );
- //nukeIntroConv = Commands->Create_Conversation( "M11_EVA_Activate_Nuke_Conversation", 100, 1000, false);
- //Commands->Join_Conversation( NULL, nukeIntroConv, false, false );
- //Commands->Start_Conversation( nukeIntroConv, nukeIntroConv );
- //Commands->Monitor_Conversation (obj, nukeIntroConv);
- }
- break;
- case M11_ADD_THIRD_OBJECTIVE_JDG: //player's third objective is to acess the power core
- {
- Commands->Add_Objective( M11_THIRD_OBJECTIVE_JDG, OBJECTIVE_TYPE_PRIMARY, OBJECTIVE_STATUS_PENDING, IDS_Enc_ObjTitle_Primary_M11_03, NULL, IDS_Enc_Obj_Primary_M11_03 );
- GameObject * entryZone = Commands->Find_Object ( 100688 );
- if (entryZone != NULL)
- {
- Vector3 pogLocation = Commands->Get_Position ( entryZone );
- Commands->Set_Objective_Radar_Blip_Object( M11_THIRD_OBJECTIVE_JDG, entryZone );
- Commands->Set_Objective_HUD_Info_Position( M11_THIRD_OBJECTIVE_JDG, 91, "POG_M11_1_03.tga", IDS_POG_INFILTRATE, pogLocation );
- }
- }
- break;
- case M11_END_THIRD_OBJECTIVE_JDG: //player has reached power core--clear 3rd objective
- {
- Commands->Set_Objective_Status( M11_THIRD_OBJECTIVE_JDG, OBJECTIVE_STATUS_ACCOMPLISHED );
- GameObject * entryZone = Commands->Find_Object ( 100012 );
- if (entryZone != NULL)
- {
- Commands->Destroy_Object ( entryZone );//cleaning up this zone
- }
- }
- break;
- case M11_ADD_FORTH_OBJECTIVE_JDG: //player's forth objective is to PROTECT SYDNEY
- {
- Commands->Add_Objective( M11_FORTH_OBJECTIVE_JDG, OBJECTIVE_TYPE_PRIMARY, OBJECTIVE_STATUS_PENDING, IDS_Enc_ObjTitle_Primary_M11_04, NULL, IDS_Enc_Obj_Primary_M11_04 );
-
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL)
- {
- Commands->Set_Objective_Radar_Blip_Object( M11_FORTH_OBJECTIVE_JDG, sydney );
- Commands->Set_Objective_HUD_Info( M11_FORTH_OBJECTIVE_JDG, 93, "POG_M07_1_04.tga", IDS_POG_PROTECT );
- }
- else
- {
- Commands->Debug_Message ( "***************************M11 mission controller cannot find sydnee to ping her on radar--add forth objective\n" );
- }
- }
- break;
- case M11_END_FORTH_OBJECTIVE_JDG: //nuke switch has been poked--end protect sydney objective then end sabotage
- {
- Commands->Set_Objective_Status( M11_FORTH_OBJECTIVE_JDG, OBJECTIVE_STATUS_ACCOMPLISHED );
- Commands->Send_Custom_Event( obj, obj, 0, M11_END_FIFTH_OBJECTIVE_JDG, 3 );
- }
- break;
- case M11_ADD_FIFTH_OBJECTIVE_JDG: //player's fifth objective is to sabotage the nuclear missle
- {
- evaNukeConv = Commands->Create_Conversation( "M11_EVA_Activate_Nuke_Conversation", 100, 1000, false);
- Commands->Join_Conversation( NULL, evaNukeConv, false, false );;
- Commands->Start_Conversation( evaNukeConv, evaNukeConv );
- Commands->Monitor_Conversation (obj, evaNukeConv);
- }
- break;
- case M11_END_FIFTH_OBJECTIVE_JDG: //nuke switch has been poked--end protect sydney objective then end sabotage
- {
- Commands->Set_Objective_Status( M11_FIFTH_OBJECTIVE_JDG, OBJECTIVE_STATUS_ACCOMPLISHED );
- Commands->Send_Custom_Event( obj, obj, 0, M11_END_MISSION_PASS_JDG, 3 );
- }
- break;
- }
- }
- }
- };
- /***********************************************************************************************************************
- Putting scripts dealing with level 01 security turrets here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_Floor01_SecurityTurrets_Controller_JDG, "")
- {
- int deadTurrets;
- bool powerupsGranted;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( deadTurrets, 1 );
- SAVE_VARIABLE( powerupsGranted, 2 );
- }
- void Created( GameObject * obj )
- {
- powerupsGranted = false;
- deadTurrets = 0;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- //Commands->Create_Sound ( "M11_Cabal_InsectDetected", Vector3(0,0,0), obj );
- GameObject * turret01 = Commands->Find_Object (M11_FLOOR01_SECURITY_TURRET_01_JDG);
- GameObject * turret03 = Commands->Find_Object (M11_FLOOR01_SECURITY_TURRET_03_JDG);
- GameObject * turret05 = Commands->Find_Object (M11_FLOOR01_SECURITY_TURRET_05_JDG);
- GameObject * turret08 = Commands->Find_Object (M11_FLOOR01_SECURITY_TURRET_08_JDG);
- GameObject * turret10 = Commands->Find_Object (M11_FLOOR01_SECURITY_TURRET_10_JDG);
- GameObject * turret12 = Commands->Find_Object (M11_FLOOR01_SECURITY_TURRET_12_JDG);
- if (turret01 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret01, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret03 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret03, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret05 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret05, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret08 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret08, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret10 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret10, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret12 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret12, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (param == M01_YOUR_OPERATOR_IS_DEAD_JDG)//this is custom recieved when a turret gets destroyed
- {
- deadTurrets++;
- if (deadTurrets >= 6)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- else if (param == M01_SPAWNER_SPAWN_PLEASE_JDG && powerupsGranted == false)
- {
- powerupsGranted = true;
- Vector3 health100_spawnLocation (0.812f, 17.135f, 0.67f);
- Vector3 armor100_spawnLocation (-0.743f, 17.130f, 0.67f);
- Commands->Create_Object ( "POW_Health_100", health100_spawnLocation );
- Commands->Create_Object ( "POW_Armor_100", armor100_spawnLocation );
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_SecurityTurret_JDG, "")
- {
- bool active;
- int alarmSound;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( alarmSound, 1 );
- SAVE_VARIABLE( active, 2 );
- }
- void Created( GameObject * obj )
- {
- active = false;
- Vector3 myPosition = Commands->Get_Position ( obj );
-
- alarmSound = Commands->Create_Sound ( "SFX.Klaxon_Alert_01", myPosition, obj );
- Commands->Stop_Sound ( alarmSound, false );
- Commands->Send_Custom_Event( obj, obj, 0, M01_GOTO_IDLE_JDG, 1 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (active == true)
- {
- Commands->Stop_Sound ( alarmSound, true );
- Vector3 powerupSpawnLocation;
- Vector3 turret01_spawnLocation (19.065f, 22.042f, 0.67f);
- Vector3 turret03_spawnLocation (19, -3.620f, 0.67f);
- Vector3 turret05_spawnLocation (18.901f, -29.477f, 0.67f);
- Vector3 turret08_spawnLocation (-18.315f, -29.750f, 0.67f);
- Vector3 turret10_spawnLocation (-18.295f, -3.482f, 0.67f);
- Vector3 turret12_spawnLocation (-18.031f, 22.403f, 0.67f);
- int myID = Commands->Get_ID ( obj );
- if (myID == M11_FLOOR01_SECURITY_TURRET_01_JDG)
- {
- powerupSpawnLocation = turret01_spawnLocation;
- }
- else if (myID == M11_FLOOR01_SECURITY_TURRET_03_JDG)
- {
- powerupSpawnLocation = turret03_spawnLocation;
- }
- else if (myID == M11_FLOOR01_SECURITY_TURRET_05_JDG)
- {
- powerupSpawnLocation = turret05_spawnLocation;
- }
- else if (myID == M11_FLOOR01_SECURITY_TURRET_08_JDG)
- {
- powerupSpawnLocation = turret08_spawnLocation;
- }
- else if (myID == M11_FLOOR01_SECURITY_TURRET_10_JDG)
- {
- powerupSpawnLocation = turret10_spawnLocation;
- }
- else if (myID == M11_FLOOR01_SECURITY_TURRET_12_JDG)
- {
- powerupSpawnLocation = turret12_spawnLocation;
- }
-
- char *powerups[9] =
- {
- //this is a list of potential powerups to be dropped by destroyed security turrets
- "POW_Health_100",
- "POW_Armor_100",
- "POW_RocketLauncher_Player",
- "POW_SniperRifle_Player",
- "POW_TiberiumFlechetteGun_Player",
- "POW_LaserChaingun_Player",
- "POW_GrenadeLauncher_Player",
- "POW_LaserRifle_Player",
- "POW_TiberiumAutoRifle_Player",
- //more to be added later
-
- };
- int random = Commands->Get_Random_Int(0, 9);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_FLOOR01_SECURITY_CONTROLLER_JDG), 0, M01_YOUR_OPERATOR_IS_DEAD_JDG, 0 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- //int myID = Commands->Get_ID ( obj );
- /*if (obj && myID == M11_FLOOR01_SECURITY_TURRET_01_JDG || myID == M11_FLOOR01_SECURITY_TURRET_10_JDG)
- {
- Vector3 myTarget = Commands->Get_Position ( obj );
- myTarget.X += Commands->Get_Random ( -5, 5 );
- myTarget.Y += Commands->Get_Random ( -5, 5 );
- myTarget.Z += Commands->Get_Random ( -5, 0 );
- params.Set_Basic(this, 100, M01_START_ATTACKING_02_JDG);
- params.Set_Attack( myTarget, 100, 0, true );
- params.AttackCheckBlocked = false;
- Commands->Action_Attack( obj, params );
- float delayTimer = Commands->Get_Random ( 3, 5 );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- else */if (obj)
- {
- float myAccuracy = Commands->Get_Random ( 0, 1 );
- params.Set_Basic(this, 100, M01_START_ATTACKING_01_JDG);
- params.Set_Attack( STAR, 100, myAccuracy, true );
- Commands->Action_Attack( obj, params );
- }
- Commands->Start_Sound ( alarmSound );
- active = true;
- }
- else if (obj && param == M01_YOUR_OPERATOR_IS_DEAD_JDG)
- {
- active = false;
- Commands->Apply_Damage( obj, 10000, "BlamoKiller", NULL );
- }
- else if (obj && param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Vector3 myTarget = Commands->Get_Position ( obj );
- myTarget.X += Commands->Get_Random ( -5, 5 );
- myTarget.Y += Commands->Get_Random ( -5, 5 );
- myTarget.Z += Commands->Get_Random ( -5, 0 );
- params.Set_Basic(this, 100, M01_START_ATTACKING_02_JDG);
- params.Set_Attack( myTarget, 100, 0, true );
- params.AttackCheckBlocked = false;
- Commands->Action_Attack( obj, params );
- float delayTimer = Commands->Get_Random ( 1, 2 );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- }
- };
- /***********************************************************************************************************************
- Putting remaining scripts dealing with first few minutes of mision here--including C130 drop off stuff
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_FirstFloor_Stuff_Controller_JDG, "")//M11_FIRSTFLOOR_STUFF_CONTROLLER_JDG 100593
- {
- typedef enum {
- FIRST_FLOOR,
- SECOND_FLOOR
- } M11_Location;
- M11_Location playersPosition;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( playersPosition, 1 );
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- playersPosition = FIRST_FLOOR;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- if (playersPosition == FIRST_FLOOR)
- {
- playersPosition = SECOND_FLOOR;
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100569), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100570), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100571), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100572), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100573), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100574), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100575), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100576), 0, M01_GOTO_IDLE_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100568), 0, M01_GOTO_IDLE_JDG, 0 );//artillery controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100633), 0, M01_GOTO_IDLE_JDG, 0 );//ion cannon controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (101805), 0, M01_GOTO_IDLE_JDG, 0 );//obelisk explosion controller
- }
- }
- else if (param == M01_START_ACTING_JDG)
- {
- if (playersPosition == SECOND_FLOOR)
- {
- playersPosition = FIRST_FLOOR;
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100569), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100570), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100571), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100572), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100573), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100574), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100575), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100576), 0, M01_START_ACTING_JDG, 0 );//sound controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100568), 0, M01_START_ACTING_JDG, 0 );//artillery controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (100633), 0, M01_START_ACTING_JDG, 0 );//ion cannon controller
- Commands->Send_Custom_Event( obj, Commands->Find_Object (101805), 0, M01_START_ACTING_JDG, 0 );//obelisk explosion controller
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Turn_Off_FirstFloor_Stuff_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_FIRSTFLOOR_STUFF_CONTROLLER_JDG), 0, M01_GOTO_IDLE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Turn_On_FirstFloor_Stuff_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_FIRSTFLOOR_STUFF_CONTROLLER_JDG), 0, M01_START_ACTING_JDG, 0 );
- }
- }
- };
- Vector3 ionCannonlocations[10] = {
- Vector3 (35.916f, -74.797f, -0.115f),
- Vector3 (30.173f, -108.692f, 9.706f),
- Vector3 (16.727f, -88.545f, 1.839f),
- Vector3 (9.679f, -97.887f, 4.033f),
- Vector3 (2.377f, -74.329f, -0.097f),
- Vector3 (3.579f, -108.123f, 9.657f),
- Vector3 (-6.437f, -107.906f, 9.731f),
- Vector3 (-17.015f, -91.3109f, 3.493f),
- Vector3 (-31.627f, -87.764f, 6.168f),
- Vector3 (-22.152f, -73.552f, -0.079f),
- };
- DECLARE_SCRIPT(M11_ExternalIonCannon_Controller_JDG, "")//this guys id is 100633
- {
- /*int last;
- bool commandClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( last, 1 );
- SAVE_VARIABLE( commandClearance, 2 );
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 45, 60 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ATTACKING_01_JDG, delayTimer );
- last = 12;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- commandClearance = false;
- Commands->Enable_Hibernation( obj, true );
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- Commands->Enable_Hibernation( obj, false );
- float delayTimer = Commands->Get_Random ( 0, 5 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- else if (param == M01_START_ATTACKING_01_JDG)
- {
- if (commandClearance == true)
- {
- Vector3 speaker01position = Commands->Get_Position ( STAR );
- Vector3 speaker02position = Commands->Get_Position ( STAR );
- Vector3 speaker03position = Commands->Get_Position ( STAR );
- speaker01position.X += Commands->Get_Random(-10,10);
- speaker01position.Y += Commands->Get_Random(-10,10);
- speaker01position.Z += Commands->Get_Random(0,10);
- speaker02position.X += Commands->Get_Random(-10,10);
- speaker02position.Y += Commands->Get_Random(-10,10);
- speaker02position.Z += Commands->Get_Random(0,10);
- speaker03position.X += Commands->Get_Random(-10,10);
- speaker03position.Y += Commands->Get_Random(-10,10);
- speaker03position.Z += Commands->Get_Random(0,10);
- Commands->Create_Sound ( "M11DSGN_DSGN0095I1EVAC_SND", speaker01position, obj );
- Commands->Create_Sound ( "M11DSGN_DSGN0095I1EVAC_SND", speaker02position, obj );
- Commands->Create_Sound ( "M11DSGN_DSGN0095I1EVAC_SND", speaker03position, obj );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ATTACKING_02_JDG, delayTimer );
- }
- }
- else if (param == M01_START_ATTACKING_02_JDG)
- {
- if (commandClearance == true)
- {
- int random = Commands->Get_Random_Int(0, 10);
-
- while (random == last) {
- random = Commands->Get_Random_Int(0, 10);
- }
- last = random;
- GameObject *ionCannonGuy = Commands->Create_Object("GDI_MiniGunner_IonCannon_JDG", ionCannonlocations[random]);
- Commands->Attach_Script(ionCannonGuy, "M11_IonCannon_Guy_JDG", "");
- float delayTimer = Commands->Get_Random ( 60, 120 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ATTACKING_01_JDG, delayTimer );
- }
- }
- }*/
- };
- DECLARE_SCRIPT(M11_IonCannon_Guy_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- Vector3 myPosition = Commands->Get_Position ( obj );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_START_ACTING_JDG );
- params.Set_Attack( myPosition, 10, 0, true );
- params.AttackCheckBlocked = false;
- Commands->Action_Attack ( obj, params );
- }
- };
- DECLARE_SCRIPT(M11_ExternalSound_Controller_NodTanks_JDG, "")
- {
- bool commandClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( commandClearance, 1 );
- }
- void Created( GameObject * obj )
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- commandClearance = false;
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (commandClearance == true)
- {
- Vector3 soundLocation = Commands->Get_Position ( obj );
- soundLocation.X += Commands->Get_Random ( -10, 10 );
- soundLocation.Y += Commands->Get_Random ( -10, 10 );
- soundLocation.Z += Commands->Get_Random ( 0, 10 );
- Commands->Create_Sound ( "M11_Exterior_NODTank_Twiddler_JDG", soundLocation, obj );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- };
- DECLARE_SCRIPT(M11_ExternalSound_Controller_GDITanks_JDG, "")
- {
- bool commandClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( commandClearance, 1 );
- }
- void Created( GameObject * obj )
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- commandClearance = false;
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (commandClearance == true)
- {
- Vector3 soundLocation = Commands->Get_Position ( obj );
- soundLocation.X += Commands->Get_Random ( -10, 10 );
- soundLocation.Y += Commands->Get_Random ( -10, 10 );
- soundLocation.Z += Commands->Get_Random ( 0, 10 );
- Commands->Create_Sound ( "M11_Exterior_GDITank_Twiddler_JDG", soundLocation, obj );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- };
- DECLARE_SCRIPT(M11_ExternalSound_Controller_NodTroops_JDG, "")
- {
- bool commandClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( commandClearance, 1 );
- }
- void Created( GameObject * obj )
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- commandClearance = false;
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (commandClearance == true)
- {
- Vector3 soundLocation = Commands->Get_Position ( obj );
- soundLocation.X += Commands->Get_Random ( -10, 10 );
- soundLocation.Y += Commands->Get_Random ( -10, 10 );
- soundLocation.Z += Commands->Get_Random ( 0, 10 );
- Commands->Create_Sound ( "M11_Exterior_NODTroops_Twiddler_JDG", soundLocation, obj );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- };
- DECLARE_SCRIPT(M11_ExternalSound_Controller_GDITroops_JDG, "")
- {
- bool commandClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( commandClearance, 1 );
- }
- void Created( GameObject * obj )
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- commandClearance = false;
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (commandClearance == true)
- {
- Vector3 soundLocation = Commands->Get_Position ( obj );
- soundLocation.X += Commands->Get_Random ( -10, 10 );
- soundLocation.Y += Commands->Get_Random ( -10, 10 );
- soundLocation.Z += Commands->Get_Random ( 0, 10 );
- Commands->Create_Sound ( "M11_Exterior_GDITroops_Twiddler_JDG", soundLocation, obj );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- };
- Vector3 m11Artillerylocations[35] = {
- Vector3 (3.486f, -53.794f, 3.799f),
- Vector3 (-20.923f, -31.001f, 26.833f),
- Vector3 (-23.338f, 2.514f, 26.502f),
- Vector3 (-23.097f, 32.220f, 38.927f),
- Vector3 (-12.618f, -21.520f, 12.796f),
- Vector3 (-2.253f, 5.014f, 23.738f),
- Vector3 (7.692f, 7.967f, 19.242f),
- Vector3 (0.726f, 20.706f, 24.670f),
- Vector3 (-11.148f, 50.407f, 38.031f),
- Vector3 (4.330f, 49.481f, 48.165f),
- Vector3 (9.350f, 48.324f, 40.018f),
- Vector3 (20.210f, 45.413f, 32.186f),
- Vector3 (21.162f, 31.207f, 26.841f),
- Vector3 (21.673f, 1.765f, 36.254f),
- Vector3 (19.174f, -28.685f, 21.450f),
- Vector3 (4.334f, -16.692f, 0),
- Vector3 (-3.070f, -4.271f, 0),
- Vector3 (-0.372f, -5.744f, -18.765f),
- Vector3 (43.437f, -64.747f, 51.465f),
- Vector3 (54.511f, -32.046f, 59.763f),
- Vector3 (48.525f, -14.851f, 50.524f),
- Vector3 (47.396f, 4.976f, 54.233f),
- Vector3 (-47.600f, 19.498f, 48.110f),
- Vector3 (-51.750f, -1.745f, 54.846f),
- Vector3 (-47.856f, -25.844f, 45.516f),
- Vector3 (4.559f, -123.847f, 28.179f),
- Vector3 (11.093f, -125.641f, 37.388f),
- Vector3 (8.425f, -127.718f, 45.484f),
- Vector3 (-11.490f, -165.685f, 42.821f),
- Vector3 (-35.123f, -155.089f, 34.401f),
- Vector3 (29.645f, -165.685f, 42.816f),
- Vector3 (-1.107f, -163.946f, 19.644f),
- Vector3 (-21.683f, -141.336f, 19),
- Vector3 (42.883f, -165.685f, 26.360f),
- Vector3 (-24.331f, -107.697f, 15.882f),
- };
- DECLARE_SCRIPT(M11_ExternalArtillery_Controller_JDG, "")
- {
- Vector3 sound_location;
- int last;
- int bomb_sound;
- float delayTimerMin;
- float delayTimerMax;
- bool command_clearance;
- int bombcount;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sound_location, 1);
- SAVE_VARIABLE(last, 2);
- SAVE_VARIABLE(bomb_sound, 3);
- SAVE_VARIABLE(command_clearance, 4);
- SAVE_VARIABLE(delayTimerMin, 5);
- SAVE_VARIABLE(delayTimerMax, 6);
- SAVE_VARIABLE(bombcount, 7);
- }
- void Created( GameObject * obj )
- {
- last = 40;
- delayTimerMin = 0;
- delayTimerMax = 10;
- command_clearance = true;
- bombcount = 0;
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 2 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == CUSTOM_EVENT_SOUND_ENDED )
- {
- if (param == bomb_sound)
- {
- Vector3 explosion_location = sound_location;
-
- explosion_location.Z -= 10;
- Commands->Create_Explosion("Ground Explosions Twiddler", explosion_location);
- float delayTimer = Commands->Get_Random ( delayTimerMin, delayTimerMax );
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, delayTimer );
- }
- }
- switch (param)
- {
- case M01_PICK_A_NEW_LOCATION_JDG:
- {
- if (command_clearance == true && (bombcount < 10))
- {
- bombcount++;
- int random = int(Commands->Get_Random(0, 35-WWMATH_EPSILON));
- while (random == last)
- {
- random = int(Commands->Get_Random(0, 35-WWMATH_EPSILON));
- }
- last = random;
- sound_location = m11Artillerylocations[random];
- sound_location.Z += 5;
- bomb_sound = Commands->Create_Sound ( "Bomb_Falling_Sound_Twiddler", sound_location, obj );
- Commands->Monitor_Sound ( obj, bomb_sound );
- }
- }
- break;
- case M01_GOTO_IDLE_JDG:
- {
- command_clearance = false;
- }
- break;
- case M01_START_ACTING_JDG:
- {
- command_clearance = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 2 );
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_StealthSoldier01_JDG, "")
- {
- bool attackingPlayer;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( attackingPlayer, 1 );
- }
- void Created( GameObject * obj )
- {
- attackingPlayer = false;
- Commands->Enable_Stealth(obj, false);
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( Vector3(-6.242f, 28.340f, -10.015f), RUN, 0.25f);
-
- Commands->Action_Goto( obj, params );
- float delayTimer = Commands->Get_Random ( 1, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (obj)
- {
- Commands->Enable_Stealth(obj, true);
- }
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if (poker == STAR && attackingPlayer == false)
- {
- attackingPlayer = true;
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Movement( STAR, RUN, 10);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack (obj, params);
- }
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (damager == STAR && attackingPlayer == false)
- {
- attackingPlayer = true;
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Movement( STAR, RUN, 10);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack (obj, params);
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (action_id == M01_WALKING_WAYPATH_01_JDG && attackingPlayer == false)
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- Vector3 playersPosition = Commands->Get_Position ( STAR );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Face_Location( playersPosition, 1 );
- Commands->Action_Face_Location ( obj, params );
- }
-
- else if (action_id == M01_DOING_ANIMATION_01_JDG && attackingPlayer == false)
- {
- Vector3 playersPosition = Commands->Get_Position ( STAR );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Face_Location( playersPosition, 1 );
- Commands->Action_Face_Location ( obj, params );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (obj)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG && attackingPlayer == false)
- {
- attackingPlayer = true;
- Commands->Action_Reset ( obj, 100 );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( "CnC_Cloaking", myPosition, obj );
- Commands->Debug_Message ( "***************************m11 stealth guy 01 has received custom to attack player\n" );
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack (obj, params);
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_StealthSoldier02_JDG, "")
- {
- bool attackingPlayer;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( attackingPlayer, 1 );
- }
- void Created( GameObject * obj )
- {
- attackingPlayer = false;
- Commands->Enable_Stealth(obj, false);
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( Vector3(6.014f, 27.870f, -10.015f), RUN, 0.25f);
-
- Commands->Action_Goto( obj, params );
- float delayTimer = Commands->Get_Random ( 1, 3 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (obj)
- {
- Commands->Enable_Stealth(obj, true);
- }
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if (poker == STAR)
- {
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Movement( STAR, RUN, 10);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack (obj, params);
- }
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (damager == STAR)
- {
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Movement( STAR, RUN, 10);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack (obj, params);
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- Vector3 playersPosition = Commands->Get_Position ( STAR );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Face_Location( playersPosition, 1 );
- Commands->Action_Face_Location ( obj, params );
- }
- else if (action_id == M01_DOING_ANIMATION_01_JDG && attackingPlayer == false)
- {
- Vector3 playersPosition = Commands->Get_Position ( STAR );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Face_Location( playersPosition, 1 );
- Commands->Action_Face_Location ( obj, params );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (obj)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG && attackingPlayer == false)
- {
- attackingPlayer = true;
- Commands->Action_Reset ( obj, 100 );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( "CnC_Cloaking", myPosition, obj );
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Movement( STAR, RUN, 10);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack (obj, params);
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_FireGuy_JDG, "")
- {
- void Created( GameObject * obj )
- {
- float myHealth = Commands->Get_Health ( obj );
- float healthFudge = Commands->Get_Random ( 0.25f, 0.5f );
- myHealth = myHealth * healthFudge;
- Commands->Set_Health ( obj, myHealth );
- Commands->Apply_Damage( obj, 10, "Flamethrower", NULL );
- Commands->Enable_Hibernation( obj, false );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 1 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Commands->Apply_Damage( obj, 10, "Flamethrower", NULL );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 1 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_ChaseGuy_JDG, "")
- {
- void Created( GameObject * obj )
- {
- ActionParamsStruct params;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_GOING_TO_HAVOC_JDG );
- params.Set_Movement( STAR, RUN, 10);
- params.Set_Attack( STAR, 50, 1, true );
- Commands->Action_Attack (obj, params);
- }
- };
- DECLARE_SCRIPT(M11_C130_Dropoff_Controller_JDG, "")//M11_C130_DROPOFF_CONTROLLER_JDG 100221
- {
- int last;
- int active_unit_count;
- int dropoffcount;
- int dropoffMax;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(last, 1);
- SAVE_VARIABLE(active_unit_count, 2);
- SAVE_VARIABLE(dropoffcount, 3);
- SAVE_VARIABLE(dropoffMax, 4);
- }
-
- void Created(GameObject * obj)
- {
- Commands->Start_Timer(obj, this, 10.0f, 0);
- active_unit_count = 0;
- last = 20;
- dropoffcount = 0;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_SPAWNER_IS_DEAD_JDG)
- {
- active_unit_count--;
- float delayTimer = Commands->Get_Random ( 0, 30 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (obj && active_unit_count <= 1)
- {
- int easy = 0;
- int medium = 1;
- int currentDifficulty = Commands->Get_Difficulty_Level( );
- if (currentDifficulty == easy)
- {
- dropoffMax = M11_C130_EASY_SPAWN_CAP_JDG;
- }
- else if (currentDifficulty == medium)
- {
- dropoffMax = M11_C130_MEDIUM_SPAWN_CAP_JDG;
- }
- else
- {
- dropoffMax = M11_C130_HARD_SPAWN_CAP_JDG;
- }
- if (dropoffcount <= dropoffMax)
- {
- dropoffcount++;
- active_unit_count += 3;
- GameObject *controller = Commands->Create_Object("Invisible_Object", Vector3(0.2f, -25.5f, -10.0f));
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_C130Troopdrop.txt");
- Commands->Set_Facing ( controller, 90);
-
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_C130_Dropoff_Dude_JDG, "")//also have M01_Hunt_The_Player_JDG script attached to these guys
- {
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "S_a_Human.H_A_X5D_ParaT_1") == 0)
- {
- Commands->Attach_Script(obj, "M01_Hunt_The_Player_JDG","");
- }
- else if (stricmp(anim, "S_a_Human.H_A_X5D_ParaT_2") == 0)
- {
- Commands->Attach_Script(obj, "M01_Hunt_The_Player_JDG","");
- }
- else if (stricmp(anim, "S_a_Human.H_A_X5D_ParaT_3") == 0)
- {
- Commands->Attach_Script(obj, "M01_Hunt_The_Player_JDG","");
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_C130_DROPOFF_CONTROLLER_JDG ), 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- };
- /***********************************************************************************************************************
- Putting scripts dealing with the netrunner room here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_NetRunnerRoom_EntryZone_JDG, "")
- {
- bool entered;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(entered, 1);
- }
- void Created( GameObject * obj )
- {
- entered = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && entered == false)
- {
- entered = true;
- GameObject * exitZone = Commands->Find_Object ( 100228 );
- if (exitZone != NULL)
- {
- Commands->Send_Custom_Event ( obj, exitZone, 0, M01_START_ACTING_JDG, 0 );
- }
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- DECLARE_SCRIPT(M11_NetRunnerRoom_ExitZone_JDG, "")
- {
- bool okay_to_trigger;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(okay_to_trigger, 1);
- }
- void Created( GameObject * obj )
- {
- okay_to_trigger = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- okay_to_trigger = true;
- }
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && okay_to_trigger == true)
- {
- GameObject * stealthSoldier01 = Commands->Find_Object ( 100225 );
- GameObject * stealthSoldier02 = Commands->Find_Object ( 100227 );
- if (stealthSoldier01 != NULL)
- {
- float delayTimer01 = Commands->Get_Random ( 0, 1 );
- Commands->Send_Custom_Event ( obj, stealthSoldier01, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer01 );
- }
- if (stealthSoldier02 != NULL)
- {
- float delayTimer02 = Commands->Get_Random ( 0, 1 );
- Commands->Send_Custom_Event ( obj, stealthSoldier02, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer02 );
- }
- }
- }
- };
- /***********************************************************************************************************************
- Putting scripts dealing with the museum and the bar-area rooms here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_MuseumLevel_EntryZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * museumGuard01 = Commands->Find_Object ( M11_MUSEUM_GUARD_01_JDG );
- GameObject * museumGuard02 = Commands->Find_Object ( M11_MUSEUM_GUARD_02_JDG );
- GameObject * museumGuard03 = Commands->Find_Object ( M11_MUSEUM_GUARD_03_JDG );
- GameObject * museumGuard04 = Commands->Find_Object ( M11_MUSEUM_GUARD_04_JDG );
- GameObject * museumGuard05 = Commands->Find_Object ( M11_MUSEUM_GUARD_05_JDG );
- GameObject * museumGuard06 = Commands->Find_Object ( M11_MUSEUM_GUARD_06_JDG );
- if (museumGuard01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (museumGuard02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard02, 0, M01_START_ACTING_JDG, 0 );
- }
- if (museumGuard03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard03, 0, M01_START_ACTING_JDG, 0 );
- }
- if (museumGuard04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard04, 0, M01_START_ACTING_JDG, 0 );
- }
- if (museumGuard05 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard05, 0, M01_START_ACTING_JDG, 0 );
- }
- if (museumGuard06 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard06, 0, M01_START_ACTING_JDG, 0 );
- }
- GameObject * zone01 = Commands->Find_Object ( 100254 );
- GameObject * zone02 = Commands->Find_Object ( 100255 );
- if (zone01 != NULL)
- {
- Commands->Destroy_Object ( zone01 );
- }
- if (zone02 != NULL)
- {
- Commands->Destroy_Object ( zone02 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MuseumLevel_Spawner_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Start_Timer ( obj, this, 30, M01_GOTO_IDLE_JDG );
- }
- void Timer_Expired( GameObject * obj, int timer_id )
- {
- if (obj)
- {
- if (timer_id == M01_GOTO_IDLE_JDG)
- {
- Commands->Enable_Hibernation( obj, true );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MuseumLevel_Defender_Aggressive_JDG, "")
- {
- bool okay_to_spawn;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(okay_to_spawn, 1);
- }
- void Created( GameObject * obj )
- {
- okay_to_spawn = true;
- Commands->Innate_Disable(obj);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (okay_to_spawn == true)
- {
- GameObject * newGuy = Commands->Trigger_Spawner( M11_MUSEUM_SPAWNER_JDG );
- Commands->Attach_Script(newGuy, "M11_MuseumLevel_Spawner_JDG", "");
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- Commands->Set_Innate_Aggressiveness ( obj, 1 );
- Commands->Set_Innate_Take_Cover_Probability ( obj, 0 );
- }
- else if (param == M01_GOTO_IDLE_JDG)
- {
- okay_to_spawn = false;
- }
- }
- };
- DECLARE_SCRIPT(M11_MuseumLevel_Defender_Defensive_JDG, "")
- {
- bool okay_to_spawn;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(okay_to_spawn, 1);
- }
- void Created( GameObject * obj )
- {
- okay_to_spawn = true;
- Commands->Innate_Disable(obj);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (okay_to_spawn == true)
- {
- GameObject * newGuy = Commands->Trigger_Spawner( M11_MUSEUM_SPAWNER_JDG );
- Commands->Attach_Script(newGuy, "M11_MuseumLevel_Spawner_JDG", "");
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- Commands->Set_Innate_Aggressiveness ( obj, 1 );
- Commands->Set_Innate_Take_Cover_Probability ( obj, 1 );
- }
- else if (param == M01_GOTO_IDLE_JDG)
- {
- okay_to_spawn = false;
- }
- }
- };
- DECLARE_SCRIPT(M11_MuseumLevel_Disable_Spawners_Zone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * museumGuard01 = Commands->Find_Object ( M11_MUSEUM_GUARD_01_JDG );
- GameObject * museumGuard02 = Commands->Find_Object ( M11_MUSEUM_GUARD_02_JDG );
- GameObject * museumGuard03 = Commands->Find_Object ( M11_MUSEUM_GUARD_03_JDG );
- GameObject * museumGuard04 = Commands->Find_Object ( M11_MUSEUM_GUARD_04_JDG );
- GameObject * museumGuard05 = Commands->Find_Object ( M11_MUSEUM_GUARD_05_JDG );
- GameObject * museumGuard06 = Commands->Find_Object ( M11_MUSEUM_GUARD_06_JDG );
- if (museumGuard01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard01, 0, M01_GOTO_IDLE_JDG, 0 );
- }
- if (museumGuard02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard02, 0, M01_GOTO_IDLE_JDG, 0 );
- }
- if (museumGuard03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard03, 0, M01_GOTO_IDLE_JDG, 0 );
- }
- if (museumGuard04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard04, 0, M01_GOTO_IDLE_JDG, 0 );
- }
- if (museumGuard05 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard05, 0, M01_GOTO_IDLE_JDG, 0 );
- }
- if (museumGuard06 != NULL)
- {
- Commands->Send_Custom_Event ( obj, museumGuard06, 0, M01_GOTO_IDLE_JDG, 0 );
- }
- GameObject * zone01 = Commands->Find_Object ( 100324 );
- GameObject * zone02 = Commands->Find_Object ( 100325 );
- if (zone01 != NULL)
- {
- Commands->Destroy_Object ( zone01 );
- }
- if (zone02 != NULL)
- {
- Commands->Destroy_Object ( zone02 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_WetBar_NeighborRoom_EntryZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * controller = Commands->Find_Object ( M11_WETBAR_SPAWNER_CONTROLLER_JDG );
- if (controller != NULL)
- {
- Commands->Send_Custom_Event ( obj, controller, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_WetBar_NeighborRoom_SpawnerController_JDG, "")
- {
- int activeSoldiers;
- int spawn_01_ID;
- int spawn_02_ID;
- int spawn_03_ID;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(activeSoldiers, 1);
- SAVE_VARIABLE(spawn_01_ID, 2);
- SAVE_VARIABLE(spawn_02_ID, 3);
- SAVE_VARIABLE(spawn_03_ID, 4);
- }
- void Created( GameObject * obj )
- {
- activeSoldiers = 0;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_SPAWNER_SPAWN_PLEASE_JDG)
- {
- GameObject * spawnedGuy01 = Commands->Find_Object ( spawn_01_ID );
- GameObject * spawnedGuy02 = Commands->Find_Object ( spawn_02_ID );
- GameObject * spawnedGuy03 = Commands->Find_Object ( spawn_03_ID );
- if (spawnedGuy01 == NULL)
- {
- GameObject * spawnedGuy01 = Commands->Trigger_Spawner( M11_WETBAR_SPAWNER_01_JDG );
- spawn_01_ID = Commands->Get_ID ( spawnedGuy01 );
- }
- if (spawnedGuy02 == NULL)
- {
- GameObject * spawnedGuy02 = Commands->Trigger_Spawner( M11_WETBAR_SPAWNER_02_JDG );
- spawn_02_ID = Commands->Get_ID ( spawnedGuy02 );
- }
- if (spawnedGuy03 == NULL)
- {
- GameObject * spawnedGuy03 = Commands->Trigger_Spawner( M11_WETBAR_SPAWNER_03_JDG );
- spawn_03_ID = Commands->Get_ID ( spawnedGuy03 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_WetBar_MutantGuard_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_NOD );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Vector3 powerupSpawnLocation = Commands->Get_Position (obj);
- powerupSpawnLocation.Z += 0.75f;
- Commands->Create_Object ("POW_TiberiumAutoRifle_Player", powerupSpawnLocation );
- }
- };
- Vector3 m11WetBarSeachLocations[12] = {
- Vector3(-9.862f, -10.541f, -29.855f),
- Vector3(-0.757f, -12.594f, -29.855f),
- Vector3(9.187f, -12.521f, -29.855f),
- Vector3(8.002f, -2.370f, -29.855f),
- Vector3(0.163f, -2.219f, -29.855f),
- Vector3(-8.423f, -3.841f, -29.855f),
- Vector3(-9.398f, 5.363f, -29.855f),
- Vector3(0.583f, 10.380f, -29.855f),
- Vector3(9.479f, 4.651f, -29.855f),
- Vector3(12.758f, -1.367f, -24.531f),
- Vector3(-13.295f, -1.080f, -24.531f),
- Vector3(-2.069f, -15.477f, -24.531f),
- };
- DECLARE_SCRIPT(M11_WetBar_NeighborRoom_SpawnedDude_JDG, "")
- {
- int last;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(last, 1);
- }
- void Created( GameObject * obj )
- {
- last = 20;
- Commands->Set_Innate_Aggressiveness ( obj, 0.3f );
- Commands->Set_Innate_Take_Cover_Probability ( obj, 1 );
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 3 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- switch (param)
- {
- case M01_PICK_A_NEW_LOCATION_JDG:
- {
- int random = Commands->Get_Random_Int(0, 12);
-
- while (random == last) {
- random = Commands->Get_Random_Int(0, 12);
- }
- last = random;
- Vector3 NewGotoLocation = m11WetBarSeachLocations[random];
- ActionParamsStruct params;
- params.Set_Basic( this, INNATE_PRIORITY_BULLET_HEARD - 5, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( NewGotoLocation, WALK, 1, false );
- Commands->Action_Goto( obj, params );
- }
- break;
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- switch (complete_reason)
- {
- case ACTION_COMPLETE_NORMAL:
- {
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- char *animationName = M01_Choose_Search_Animation ( );
- params.Set_Basic( this, INNATE_PRIORITY_BULLET_HEARD - 5, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- }
- else if (action_id == M01_DOING_ANIMATION_01_JDG)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 0 );
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_GreenRoom_EntryZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * surpriseGuy01 = Commands->Create_Object ( "Nod_RocketSoldier_2SF_Chaingun", Vector3 (-10.408f, 32.538f, -29.855f) );
- Commands->Attach_Script(surpriseGuy01, "M11_GreenRoom_SurpriseGuy_JDG", "");
- GameObject * surpriseGuy02 = Commands->Create_Object ( "Nod_RocketSoldier_2SF_Chaingun", Vector3 (10.796f, 32.476f, -29.855f) );
- Commands->Attach_Script(surpriseGuy02, "M11_GreenRoom_SurpriseGuy_JDG", "");
- Commands->Destroy_Object (obj );//one-time event--cleaning up zone
- }
- }
- };
- DECLARE_SCRIPT(M11_GreenRoom_SurpriseGuy_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Grant_Key( obj, 2, true );
- Commands->Grant_Key( obj, 3, true );
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_WALKING_WAYPATH_02_JDG);
- params.Set_Movement(Vector3 (-0.471f, 23.168f, -29.855f), RUN, 2);
- Commands->Action_Goto(obj, params);
- }
- };
- /***********************************************************************************************************************
- Putting scripts dealing with war room encounters here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_WarRoom_EntryZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * engineer = Commands->Find_Object ( M11_WARROOM_ENGINEER_JDG );
- if (engineer != NULL)
- {
- Commands->Send_Custom_Event( obj, engineer, 0, M01_START_ACTING_JDG, 0 );
- }
- GameObject * turret01 = Commands->Find_Object (M11_WARROOM_SECURITY_TURRET_01_JDG);
- GameObject * turret02 = Commands->Find_Object (M11_WARROOM_SECURITY_TURRET_02_JDG);
- if (turret01 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret01, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret02 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event( obj, turret02, 0, M01_START_ACTING_JDG, delayTimer );
- }
- GameObject * zone01 = Commands->Find_Object ( 100628 );
- GameObject * zone02 = Commands->Find_Object ( 100629 );
- if (zone01 != NULL)
- {
- Commands->Destroy_Object ( zone01 );
- }
- if (zone02 != NULL)
- {
- Commands->Destroy_Object ( zone02 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_WarRoom_Engineer_JDG, "")//M11_WARROOM_ENGINEER_JDG 100353
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, INNATE_PRIORITY_GUNSHOT_HEARD-5, 100);
- params.Set_Animation ("H_A_CON2", true);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_WARROOM_SECURITY_CONTROLLER_JDG ), 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- };
- DECLARE_SCRIPT(M11_WarRoom_StationaryTech_JDG, "")
- {
- void Created( GameObject * obj )
- {
- ActionParamsStruct params;
- params.Set_Basic(this, INNATE_PRIORITY_GUNSHOT_HEARD-5, 100);
- params.Set_Animation ("H_A_CON2", true);
- Commands->Action_Play_Animation (obj, params);
- Commands->Set_Innate_Is_Stationary ( obj, true );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_WARROOM_SECURITY_CONTROLLER_JDG ), 0, M01_START_ACTING_JDG, 0 );
- }
- };
- DECLARE_SCRIPT(M11_WarRoom_SecurityTurret_JDG, "")
- {
- bool active;
- int alarmSound;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(active, 1);
- SAVE_VARIABLE(alarmSound, 2);
- }
- void Created( GameObject * obj )
- {
- active = false;
- Vector3 myPosition = Commands->Get_Position ( obj );
- alarmSound = Commands->Create_Sound ( "SFX.Klaxon_Alert_01", myPosition, obj );
- Commands->Stop_Sound ( alarmSound, false );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (active == true)
- {
- Commands->Stop_Sound ( alarmSound, true );
- Vector3 powerupSpawnLocation = Commands->Get_Position (obj);
- powerupSpawnLocation.Z = -34.539f;
- Commands->Create_Object ( "POW_RocketLauncher_Player", powerupSpawnLocation );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- if (obj)
- {
- active = true;
- Commands->Start_Sound ( alarmSound );
- float myAccuracy = Commands->Get_Random ( 0, 1 );
- params.Set_Basic(this, 100, M01_START_ATTACKING_01_JDG);
- params.Set_Attack( STAR, 100, myAccuracy, true );
- Commands->Action_Attack( obj, params );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_WarRoom_BattleController_JDG, "")//M11_WARROOM_SECURITY_CONTROLLER_JDG 100361
- {
- bool okay_to_spawn_warroom;
- bool okay_to_spawn_barracks;
- int active_soldier_count;
- int alarmSound;
- int spawnedSoldierCount;
- int maxSpawnedSoldierCount;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(okay_to_spawn_warroom, 1);
- SAVE_VARIABLE(okay_to_spawn_barracks, 2);
- SAVE_VARIABLE(active_soldier_count, 3);
- SAVE_VARIABLE(alarmSound, 4);
- SAVE_VARIABLE(spawnedSoldierCount, 5);
- SAVE_VARIABLE(maxSpawnedSoldierCount, 6);
- }
- void Created( GameObject * obj )
- {
- okay_to_spawn_warroom = false;
- okay_to_spawn_barracks = false;
- active_soldier_count = 4;
- spawnedSoldierCount = 0;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_SPAWNER_IS_DEAD_JDG)
- {
- active_soldier_count--;
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- else if (param == M01_START_ACTING_JDG)
- {
- okay_to_spawn_warroom = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- else if (param == M01_SPAWNER_SPAWN_PLEASE_JDG)
- {
- int currentDifficulty = Commands->Get_Difficulty_Level();;
- int hard = 2;
- int med = 1;
- if (currentDifficulty == hard)
- {
- maxSpawnedSoldierCount = 18;
- }
- else if (currentDifficulty == med)
- {
- maxSpawnedSoldierCount = 12;
- }
- else
- {
- maxSpawnedSoldierCount = 6;
- }
- if (spawnedSoldierCount < maxSpawnedSoldierCount)
- {
- if (active_soldier_count < 8)
- {
- if (okay_to_spawn_warroom == true)//M11_WARROOM_SECURITY_SPAWNER_02_JDG
- {
- active_soldier_count++;
- spawnedSoldierCount++;
- active_soldier_count++;
- spawnedSoldierCount++;
- GameObject * newGuy = Commands->Trigger_Spawner( M11_WARROOM_SECURITY_SPAWNER_JDG );
- Commands->Attach_Script(newGuy, "M11_WarRoom_SpawnedDude_JDG", "");
- GameObject * newGuy02 = Commands->Trigger_Spawner( M11_WARROOM_SECURITY_SPAWNER_02_JDG );
- Commands->Attach_Script(newGuy02, "M11_WarRoom_SpawnedDude_JDG", "");
- }
-
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 1 );
- }
- }
- }
-
- else if (param == M01_MODIFY_YOUR_ACTION_04_JDG)//player is leaving room--disable warroom spawn ability
- {
- okay_to_spawn_warroom = false;
- okay_to_spawn_barracks = true;
- }
- }
- };
- DECLARE_SCRIPT(M11_WarRoom_SpawnedDude_JDG, "")//M11_WARROOM_SECURITY_SPAWNER_JDG 100362
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_NOD );
- Commands->Enable_Hibernation( obj, false );
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_GOING_TO_HAVOC_JDG);
- params.Set_Movement( STAR, RUN, 10 );
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack ( obj, params );
- Commands->Send_Custom_Event( obj, obj, 0, M01_GOTO_IDLE_JDG, 60 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (obj && param == M01_GOTO_IDLE_JDG)
- {
- Commands->Enable_Hibernation( obj, true );
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_WARROOM_SECURITY_CONTROLLER_JDG ), 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- };
- DECLARE_SCRIPT(M11_WarRoom_ExitZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_WARROOM_SECURITY_CONTROLLER_JDG ), 0, M01_MODIFY_YOUR_ACTION_04_JDG, 0 );
- GameObject * zone01 = Commands->Find_Object ( 100363 );
- GameObject * zone02 = Commands->Find_Object ( 100364 );
- if (zone01 != NULL)
- {
- Commands->Destroy_Object ( zone01 );
- }
- if (zone02 != NULL)
- {
- Commands->Destroy_Object ( zone02 );
- }
- }
- }
- };
- /***********************************************************************************************************************
- Putting scripts dealing with the barracks/living quarters encounters here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_Barracks_SpawnerController_JDG, "")//M11_BARRACKS_SPAWNER_CONTROLLER_JDG 100430
- {
- int spawn_01_ID;
- int spawn_02_ID;
- int spawn_03_ID;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(spawn_01_ID, 1);
- SAVE_VARIABLE(spawn_02_ID, 2);
- SAVE_VARIABLE(spawn_03_ID, 3);
- }
- void Created( GameObject * obj )
- {
- spawn_01_ID = 0;
- spawn_02_ID = 0;
- spawn_03_ID = 0;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_SPAWNER_SPAWN_PLEASE_JDG)
- {
- GameObject * spawnedGuy01 = Commands->Find_Object ( spawn_01_ID );
- GameObject * spawnedGuy02 = Commands->Find_Object ( spawn_02_ID );
- GameObject * spawnedGuy03 = Commands->Find_Object ( spawn_03_ID );
- if (spawnedGuy01 == NULL)
- {
- GameObject * spawnedGuy01 = Commands->Trigger_Spawner( M11_BARRACKS_SPAWNER_01_JDG );
- Commands->Attach_Script(spawnedGuy01, "M11_Barracks_SpawnedDude_JDG", "");
- spawn_01_ID = Commands->Get_ID ( spawnedGuy01 );
- }
- if (spawnedGuy02 == NULL)
- {
- GameObject * spawnedGuy02 = Commands->Trigger_Spawner( M11_BARRACKS_SPAWNER_02_JDG );
- Commands->Attach_Script(spawnedGuy02, "M11_Barracks_SpawnedDude_JDG", "");
- spawn_02_ID = Commands->Get_ID ( spawnedGuy02 );
- }
- if (spawnedGuy03 == NULL)
- {
- GameObject * spawnedGuy03 = Commands->Trigger_Spawner( M11_BARRACKS_SPAWNER_03_JDG );
- Commands->Attach_Script(spawnedGuy03, "M11_Barracks_SpawnedDude_JDG", "");
- spawn_03_ID = Commands->Get_ID ( spawnedGuy03 );
- }
- }
- }
- };
- Vector3 m11BarracksSeachLocations[9] = {
- Vector3(-12.2f, 1.3f, -34.2f),
- Vector3(1.2f, -11.1f, -34.2f),
- Vector3(13.2f, 2.0f, -34.2f),
- Vector3(0.2f, -16.6f, -34.2f),
- Vector3(-9.8f, -9.0f, -38.2f),
- Vector3(-10, 2.5f, -38.2f),
- Vector3(0.7f, -11.0f, -38.2f),
- Vector3(10.8f, -8.9f, -38.2f),
- Vector3(10.4f, 2.4f, -38.2f),
- };
- DECLARE_SCRIPT(M11_Barracks_SpawnedDude_JDG, "")//
- {
- int last;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(last, 1);
- }
- void Created( GameObject * obj )
- {
- last = 20;
- Commands->Set_Innate_Aggressiveness ( obj, 1 );
- Commands->Set_Innate_Take_Cover_Probability ( obj, 0 );
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 3 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- switch (param)
- {
- case M01_PICK_A_NEW_LOCATION_JDG:
- {
- int random = Commands->Get_Random_Int(0, 9);
-
- while (random == last) {
- random = Commands->Get_Random_Int(0, 9);
- }
- last = random;
- Vector3 NewGotoLocation = m11BarracksSeachLocations[random];
- ActionParamsStruct params;
- params.Set_Basic( this, INNATE_PRIORITY_ENEMY_SEEN - 5, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( NewGotoLocation, RUN, 3, false );
- Commands->Action_Goto( obj, params );
- }
- break;
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- switch (complete_reason)
- {
- case ACTION_COMPLETE_NORMAL:
- {
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- char *animationName = M01_Choose_Search_Animation ( );
- params.Set_Basic( this, INNATE_PRIORITY_ENEMY_SEEN - 5, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- }
- else if (action_id == M01_DOING_ANIMATION_01_JDG)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 0 );
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T20_EntryZone_JDG, "")//100414 entry to mutant reject w/volt ammo
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_MUTANT_REJECT_JDG 100415
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * mutantReject = Commands->Find_Object ( M11_BARRACKS_MUTANT_REJECT_JDG );
- if (mutantReject != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantReject, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_MutantReject_JDG, "")//M11_BARRACKS_MUTANT_REJECT_JDG 100415
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- //this guys orders are to charge the player upon entry to this room
- Commands->Innate_Enable(obj);
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_GOING_TO_HAVOC_JDG);
- params.Set_Movement( STAR, RUN, 1 );
- params.Set_Attack( STAR, 1, 0, true );
- Commands->Action_Attack ( obj, params );
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T19_EntryZone_JDG, "")//100404 entry to scientist guy
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_SCIENTIST_JDG 100405
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * scientist = Commands->Find_Object ( M11_BARRACKS_SCIENTIST_JDG );
- if (scientist != NULL)
- {
- Commands->Send_Custom_Event ( obj, scientist, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_Scientist_JDG, "")//M11_BARRACKS_SCIENTIST_JDG 100405
- {
- int scientist_conv01;
- int scientist_conv02;
- int scientist_conv03;
- int scientist_conv04;
- bool deadYet;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(scientist_conv01, 1);
- SAVE_VARIABLE(scientist_conv02, 2);
- SAVE_VARIABLE(scientist_conv03, 3);
- SAVE_VARIABLE(scientist_conv04, 4);
- SAVE_VARIABLE(deadYet, 5);
- }
- void Created( GameObject * obj )
- {
- deadYet = false;
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("H_A_HOST_L2B", true);
- Commands->Action_Play_Animation (obj, params);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- deadYet = true;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == CUSTOM_EVENT_CONVERSATION_BEGAN || type == CUSTOM_EVENT_CONVERSATION_REMARK_STARTED || type == CUSTOM_EVENT_CONVERSATION_REMARK_ENDED)
- {
- }
- else if (param == M01_START_ACTING_JDG)
- {
- if (obj && STAR && deadYet == false)
- {
- scientist_conv01 = Commands->Create_Conversation( "M11_Barracks_M19_Conversation_01_JDG", 100, 30, true);
- Commands->Join_Conversation( obj, scientist_conv01, false, true, false );
- Commands->Join_Conversation( STAR, scientist_conv01, false, false, false );
- Commands->Start_Conversation( scientist_conv01, scientist_conv01 );
-
- Commands->Monitor_Conversation( obj, scientist_conv01 );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("H_A_HOST_L2B", true);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_CONVERSATION_ENDED)
- {
- if (action_id == scientist_conv01)
- {
- if (obj && STAR && deadYet == false)
- {
- scientist_conv02 = Commands->Create_Conversation( "M11_Barracks_M19_Conversation_02_JDG", 100, 30, true);
- Commands->Join_Conversation( obj, scientist_conv02, false, true, false );
- Commands->Join_Conversation( STAR, scientist_conv02, false, false, false );
- Commands->Start_Conversation( scientist_conv02, scientist_conv02 );
-
- Commands->Monitor_Conversation( obj, scientist_conv02 );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("H_A_HOST_L2B", true);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- else if (action_id == scientist_conv02)
- {
- if (obj && STAR && deadYet == false)
- {
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_02_JDG );//stand up hands over head
- params.Set_Animation ("H_A_HOST_L2C", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
-
- else if (action_id == scientist_conv03)
- {
- if (obj && STAR && deadYet == false)
- {
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_02_JDG);
- params.Set_Movement( Vector3 (14.045f, -8.178f, -38.236f), WALK, 1 );
- Commands->Action_Goto( obj, params );
- }
- }
- else if (action_id == scientist_conv04)
- {
- if (obj && STAR && deadYet == false)
- {
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_03_JDG);
- params.Set_Movement( Vector3 (0.115f, -10.796f, -34.233f), RUN, 1 );
- Commands->Action_Goto( obj, params );
- }
- }
- }
- else if (action_id == M01_DOING_ANIMATION_02_JDG)
- {
- if (obj && STAR && deadYet == false)
- {
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_03_JDG );//stand up loop--one time
- params.Set_Animation ("H_A_HOST_L1B", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- else if (action_id == M01_DOING_ANIMATION_03_JDG)
- {
- if (obj && STAR && deadYet == false)
- {
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_04_JDG );//stand up--put hands down
- params.Set_Animation ("H_A_HOST_L1C", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- else if (action_id == M01_DOING_ANIMATION_04_JDG)
- {
- if (obj && STAR && deadYet == false)
- {
- scientist_conv03 = Commands->Create_Conversation( "M11_Barracks_M19_Conversation_03_JDG", 100, 30, true);
- Commands->Join_Conversation( obj, scientist_conv03, false, true, true );
- Commands->Join_Conversation( STAR, scientist_conv03, false, false, false );
- Commands->Start_Conversation( scientist_conv03, scientist_conv03 );
-
- Commands->Monitor_Conversation( obj, scientist_conv03 );
- }
- }
- else if (action_id == M01_WALKING_WAYPATH_02_JDG)
- {
- if (obj && STAR && deadYet == false)
- {
- scientist_conv04 = Commands->Create_Conversation( "M11_Barracks_M19_Conversation_04_JDG", 100, 100, true);
- Commands->Join_Conversation( obj, scientist_conv04, false, true, true );
- Commands->Start_Conversation( scientist_conv04, scientist_conv04 );
-
- Commands->Monitor_Conversation( obj, scientist_conv04 );
- }
- }
- else if (action_id == M01_WALKING_WAYPATH_03_JDG)
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T18_EntryZone_JDG, "")//100401 this is room where black hand rags on tech
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_RAGSESSION_TECH_JDG 100402
- //M11_BARRACKS_RAGSESSION_BLACKHAND_JDG 100403
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * blackhand = Commands->Find_Object ( M11_BARRACKS_RAGSESSION_BLACKHAND_JDG );
- GameObject * tech = Commands->Find_Object ( M11_BARRACKS_RAGSESSION_TECH_JDG );
- if (blackhand != NULL)
- {
- Commands->Send_Custom_Event ( obj, blackhand, 0, M01_START_ACTING_JDG, 0 );
- }
- if (tech != NULL)
- {
- Commands->Send_Custom_Event ( obj, tech, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_TechnicianConversation_Blackhand_JDG, "")//M11_BARRACKS_RAGSESSION_BLACKHAND_JDG 100403
- {
- int rag_conv;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(rag_conv, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- GameObject * tech = Commands->Find_Object ( M11_BARRACKS_RAGSESSION_TECH_JDG );
- if (tech != NULL)
- {
- rag_conv = Commands->Create_Conversation( "M11_Barracks_M18_Conversation_JDG", 100, 50, true);
- Commands->Join_Conversation( obj, rag_conv, false, true, true );
- Commands->Join_Conversation( tech, rag_conv, false, true, true );
- Commands->Start_Conversation( rag_conv, rag_conv );
-
- Commands->Monitor_Conversation( obj, rag_conv );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_CONVERSATION_ENDED)
- {
- if (action_id == rag_conv)
- {
- GameObject * tech = Commands->Find_Object ( M11_BARRACKS_RAGSESSION_TECH_JDG );
- if (tech != NULL)
- {
- Commands->Send_Custom_Event ( obj, tech, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- params.Set_Basic(this, 60, M01_GOING_TO_HAVOC_JDG);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack ( obj, params );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_TechnicianConversation_Tech_JDG, "")//M11_BARRACKS_RAGSESSION_TECH_JDG 100402
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 60, M01_GOING_TO_HAVOC_JDG);
- params.Set_Attack( STAR, 10, 0, true );
- Commands->Action_Attack ( obj, params );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T14_EntryZone_JDG, "")//100399 this is the showers
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_STEALTHSOLDIER_JDG 100400
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * stealthSoldier = Commands->Find_Object ( M11_BARRACKS_STEALTHSOLDIER_JDG );
- if (stealthSoldier != NULL)
- {
- Commands->Send_Custom_Event ( obj, stealthSoldier, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_ShowerStealthSoldier_JDG, "")//M11_BARRACKS_STEALTHSOLDIER_JDG 100400
- {
- bool killedYet;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(killedYet, 1);
- }
- void Created( GameObject * obj )
- {
- killedYet = false;
- Commands->Enable_Stealth (obj, false);
- Commands->Set_Innate_Is_Stationary ( obj, true );
- Commands->Set_Loiters_Allowed(obj, false );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- killedYet = true;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG && killedYet == false)
- {
- int showerConv = Commands->Create_Conversation( "M11_Shower_StealthGuy_Conversation", 90, 30, true);
- Commands->Join_Conversation( obj, showerConv, false, true, true );
- Commands->Start_Conversation( showerConv, showerConv );
- Commands->Enable_Stealth (obj, true);
- Commands->Set_Innate_Is_Stationary ( obj, false );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T17_EntryZone_JDG, "")//100393 this is entrance to visceroid room
- {
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * visceroid = Commands->Find_Object ( 100394 );
- if (visceroid != NULL)
- {
- Commands->Send_Custom_Event ( obj, visceroid, 0, M01_START_ACTING_JDG, 1 );
- }
- GameObject * visceroid02 = Commands->Find_Object ( 101402 );
- if (visceroid02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, visceroid02, 0, M01_START_ACTING_JDG, 1 );
- }
- GameObject * visceroid03 = Commands->Find_Object ( 101403 );
- if (visceroid03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, visceroid03, 0, M01_START_ACTING_JDG, 1 );
- }
- GameObject * visceroid04 = Commands->Find_Object ( 101404 );
- if (visceroid04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, visceroid04, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T15_EntryZone_JDG, "")//this is a bedroom on left side 100377 2 nod soldiers talking about escaped mutants
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_MUTANTCONVERSATION_GUY01_JDG 100378
- //M11_BARRACKS_MUTANTCONVERSATION_GUY02_JDG 100379
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * conversationGuy01 = Commands->Find_Object ( M11_BARRACKS_MUTANTCONVERSATION_GUY01_JDG );
- GameObject * conversationGuy02 = Commands->Find_Object ( M11_BARRACKS_MUTANTCONVERSATION_GUY02_JDG );
- if (conversationGuy01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, conversationGuy01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (conversationGuy02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, conversationGuy02, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_MutantConversationGuy_01_JDG, "")//M11_BARRACKS_MUTANTCONVERSATION_GUY01_JDG 100378
- {
- bool killedYet;
- int mutant_conv;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(killedYet, 1);
- SAVE_VARIABLE(mutant_conv, 2);
- }
- void Created( GameObject * obj )
- {
- killedYet = false;
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == CUSTOM_EVENT_CONVERSATION_BEGAN || type == CUSTOM_EVENT_CONVERSATION_REMARK_STARTED || type == CUSTOM_EVENT_CONVERSATION_REMARK_ENDED)
- {
- }
- else if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- GameObject * conversationGuy02 = Commands->Find_Object ( M11_BARRACKS_MUTANTCONVERSATION_GUY02_JDG );
- if (obj && conversationGuy02 != NULL)
- {
- mutant_conv = Commands->Create_Conversation( "M11_Barracks_M15_Conversation_JDG", 100, 30, true);
- Commands->Join_Conversation( obj, mutant_conv, true, true, true );
- Commands->Join_Conversation( conversationGuy02, mutant_conv, true, true, true );
- Commands->Start_Conversation( mutant_conv, mutant_conv );
-
- Commands->Monitor_Conversation( obj, mutant_conv );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_CONVERSATION_ENDED)
- {
- if (action_id == mutant_conv)
- {
- GameObject * conversationGuy02 = Commands->Find_Object ( M11_BARRACKS_MUTANTCONVERSATION_GUY02_JDG );
- if (conversationGuy02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, conversationGuy02, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- Commands->Action_Reset ( obj, 100 );
- params.Set_Basic(this, 60, M01_GOING_TO_HAVOC_JDG);
- params.Set_Movement( STAR, RUN, 1, false );
- Commands->Action_Goto( obj, params );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_MutantConversationGuy_02_JDG, "")//M11_BARRACKS_MUTANTCONVERSATION_GUY02_JDG 100379
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Commands->Action_Reset ( obj, 100 );
- params.Set_Basic(this, 60, M01_GOING_TO_HAVOC_JDG);
- params.Set_Movement( STAR, RUN, 1, false );
- Commands->Action_Goto( obj, params );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T13_EntryZone_JDG, "")//this is entry into mutant/toilet bathroom 100376
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_TOILET_MUTANT_01_JDG 100374
- //M11_BARRACKS_TOILET_MUTANT_02_JDG 100375
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * mutant01 = Commands->Find_Object ( M11_BARRACKS_TOILET_MUTANT_01_JDG );
- GameObject * mutant02 = Commands->Find_Object ( M11_BARRACKS_TOILET_MUTANT_02_JDG );
- if (mutant01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutant01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (mutant02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutant02, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_ToiletMutant01_JDG, "")//this guys ID is M11_BARRACKS_TOILET_MUTANT_01_JDG 100374
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Loiters_Allowed( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("S_A_HUMAN.H_A_A0A0_L28B", true);
- Commands->Action_Play_Animation (obj, params);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
-
- float delayTimer = Commands->Get_Random ( 0, 1 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ("M11DSGN_DSGN0052I1MEIN_SND", myPosition, obj );
- float delayTimer = Commands->Get_Random ( 1, 3 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, delayTimer );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_02_JDG );
- params.Set_Animation ("S_A_HUMAN.H_A_A0A0_L28C", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_ToiletMutant02_JDG, "")//this guys ID is M11_BARRACKS_TOILET_MUTANT_02_JDG 100375
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Loiters_Allowed( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("S_A_HUMAN.H_A_A0A0_L28B", true);
- Commands->Action_Play_Animation (obj, params);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- float delayTimer = Commands->Get_Random ( 0, 1 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ("M11DSGN_DSGN0051I1MEIN_SND", myPosition, obj );
- float delayTimer = Commands->Get_Random ( 1, 3 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, delayTimer );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_02_JDG );
- params.Set_Animation ("S_A_HUMAN.H_A_A0A0_L28C", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_LivingQuarters_T16_EntryZone_JDG, "")//100385 this is where 2 mutants are attacking a blackhand guy
- {
- //THESE ARE THE DUDES YOU CONTROL
- //M11_BARRACKS_MUTANTUPRISING_BLACKHAND_JDG 100387
- //M11_BARRACKS_MUTANTUPRISING_MUTANT01_JDG 100388
- //M11_BARRACKS_MUTANTUPRISING_MUTANT02_JDG 100389
- bool firstEntry;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(firstEntry, 1);
- }
- void Created( GameObject * obj )
- {
- firstEntry = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (firstEntry == true)
- {
- firstEntry = false;
- GameObject * mutant01 = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_MUTANT01_JDG );
- GameObject * mutant02 = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_MUTANT02_JDG );
- GameObject * blackhand = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_BLACKHAND_JDG );
- if (mutant01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutant01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (mutant02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutant02, 0, M01_START_ACTING_JDG, 0 );
- }
- if (blackhand != NULL)
- {
- Commands->Send_Custom_Event ( obj, blackhand, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_BARRACKS_SPAWNER_CONTROLLER_JDG ), 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- };
- /***********************************************************************************************************************
- Putting main laboratory related scripts here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_Laboratory_EntryZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * mutant01 = Commands->Find_Object ( 100450 );
- GameObject * mutant02 = Commands->Find_Object ( 100451 );
- GameObject * scientist01 = Commands->Find_Object ( 100449 );
- GameObject * scientist02 = Commands->Find_Object ( 100958 );
- if (mutant01 != NULL)
- {
- Commands->Send_Custom_Event( obj, mutant01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (mutant02 != NULL)
- {
- Commands->Send_Custom_Event( obj, mutant02, 0, M01_START_ACTING_JDG, 0 );
- }
- if (scientist01 != NULL)
- {
- Commands->Send_Custom_Event( obj, scientist01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (scientist02 != NULL)
- {
- Commands->Send_Custom_Event( obj, scientist02, 0, M01_START_ACTING_JDG, 0 );
- }
- Commands->Destroy_Object (obj);//one time only zone--cleaning up
- }
- }
- };
-
- DECLARE_SCRIPT(M11_Mutant_TrajectoryBone_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation(obj, false );
- Commands->Set_Animation ( obj, "X11E_Trajectory.X11E_Trajectory", false, NULL, 0, 120 );
- }
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "X11E_Trajectory.X11E_Trajectory") == 0)
- {
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Mutant_ShatterGlass_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation(obj, false );
- Commands->Set_Animation ( obj, "X11E_Shatter.X11E_Shatter", false, NULL, 0, 120 );
- }
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "X11E_Shatter.X11E_Shatter") == 0)
- {
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Cryochamber_DestroyedSimple_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Set_Shield_Type ( obj, "Blamo" );
- Commands->Set_Animation_Frame ( obj, "DSP_CRYOBIGD.DSP_CRYOBIGD", 0 );
- Commands->Set_Health ( obj, 0.25f );
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- Commands->Set_Animation ( obj, "DSP_CRYOBIGD.DSP_CRYOBIGD", false, NULL, 0, 5 );
- Commands->Set_Health ( obj, 0.25f );
- }
- };
- /***********************************************************************************************************************
- Putting Mutant crypt related scripts here...turn on spawner--turn off spawners etc...
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_Turn_On_Mutant_Crypt_Spawners_Zone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- DECLARE_SCRIPT(M11_Mutant_Crypt_Spawners_Controller_JDG, "")//this guys ID is M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG 100013
- {
- int mutantSpawner01_guy_ID;
- int mutantSpawner02_guy_ID;
- int mutantSpawner03_guy_ID;
- int mutantSpawner04_guy_ID;
- int mutantSpawner05_guy_ID;
- int mutantSpawner06_guy_ID;
- bool okay_to_spawn;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(mutantSpawner01_guy_ID, 1);
- SAVE_VARIABLE(mutantSpawner02_guy_ID, 2);
- SAVE_VARIABLE(mutantSpawner03_guy_ID, 3);
- SAVE_VARIABLE(mutantSpawner04_guy_ID, 4);
- SAVE_VARIABLE(mutantSpawner05_guy_ID, 5);
- SAVE_VARIABLE(mutantSpawner06_guy_ID, 6);
- SAVE_VARIABLE(okay_to_spawn, 7);
- }
- void Created( GameObject * obj )
- {
- okay_to_spawn = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- switch (param)
- {
- case M01_SPAWNER_SPAWN_PLEASE_JDG: //M00_Select_Empty_Hands
- {
- okay_to_spawn = true;
- GameObject * mutantSpawner01_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_01_JDG );
- Commands->Attach_Script(mutantSpawner01_guy, "M11_MutantCrypt_Spawner02_Guy_JDG", "");
- mutantSpawner01_guy_ID = Commands->Get_ID ( mutantSpawner01_guy );
- Commands->Attach_Script(mutantSpawner01_guy, "M00_Select_Empty_Hands", "");
-
- GameObject * mutantSpawner02_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_02_JDG );
- Commands->Attach_Script(mutantSpawner02_guy, "M11_MutantCrypt_Spawner02_Guy_JDG", "");
- mutantSpawner02_guy_ID = Commands->Get_ID ( mutantSpawner02_guy );
- Commands->Attach_Script(mutantSpawner02_guy, "M00_Select_Empty_Hands", "");
- GameObject * mutantSpawner03_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_03_JDG );
- Commands->Attach_Script(mutantSpawner03_guy, "M11_MutantCrypt_Spawner03_Guy_JDG", "");
- mutantSpawner03_guy_ID = Commands->Get_ID ( mutantSpawner03_guy );
- Commands->Attach_Script(mutantSpawner03_guy, "M00_Select_Empty_Hands", "");
- GameObject * mutantSpawner04_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_04_JDG );
- Commands->Attach_Script(mutantSpawner04_guy, "M11_MutantCrypt_Spawner04_Guy_JDG", "");
- mutantSpawner04_guy_ID = Commands->Get_ID ( mutantSpawner04_guy );
- Commands->Attach_Script(mutantSpawner04_guy, "M00_Select_Empty_Hands", "");
- GameObject * mutantSpawner05_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_05_JDG );
- Commands->Attach_Script(mutantSpawner05_guy, "M11_MutantCrypt_Spawner05_Guy_JDG", "");
- mutantSpawner05_guy_ID = Commands->Get_ID ( mutantSpawner05_guy );
- Commands->Attach_Script(mutantSpawner05_guy, "M00_Select_Empty_Hands", "");
- GameObject * mutantSpawner06_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_06_JDG );
- Commands->Attach_Script(mutantSpawner06_guy, "M11_MutantCrypt_Spawner06_Guy_JDG", "");
- mutantSpawner06_guy_ID = Commands->Get_ID ( mutantSpawner06_guy );
- Commands->Attach_Script(mutantSpawner06_guy, "M00_Select_Empty_Hands", "");
- }
- break;
- case M01_QUIT_SPAWNING_PLEASE_JDG:
- {
- okay_to_spawn = false;
- }
- break;
- case M01_SPAWNER_IS_DEAD_JDG:
- {
- if (okay_to_spawn == true)
- {
- GameObject * mutantSpawner01_guy = Commands->Find_Object ( mutantSpawner01_guy_ID );
- GameObject * mutantSpawner02_guy = Commands->Find_Object ( mutantSpawner02_guy_ID );
- GameObject * mutantSpawner03_guy = Commands->Find_Object ( mutantSpawner03_guy_ID );
- GameObject * mutantSpawner04_guy = Commands->Find_Object ( mutantSpawner04_guy_ID );
- GameObject * mutantSpawner05_guy = Commands->Find_Object ( mutantSpawner05_guy_ID );
- GameObject * mutantSpawner06_guy = Commands->Find_Object ( mutantSpawner06_guy_ID );
- if (sender == mutantSpawner01_guy)
- {
- GameObject * newMutantSpawner01_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_01_JDG );
- Commands->Attach_Script(newMutantSpawner01_guy, "M11_MutantCrypt_Spawner02_Guy_JDG", "");
- mutantSpawner01_guy_ID = Commands->Get_ID ( newMutantSpawner01_guy );
- Commands->Attach_Script(mutantSpawner01_guy, "M00_Select_Empty_Hands", "");
- }
- else if (sender == mutantSpawner02_guy)
- {
- GameObject * newMutantSpawner02_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_02_JDG );
- Commands->Attach_Script(newMutantSpawner02_guy, "M11_MutantCrypt_Spawner02_Guy_JDG", "");
- mutantSpawner02_guy_ID = Commands->Get_ID ( newMutantSpawner02_guy );
- Commands->Attach_Script(mutantSpawner02_guy, "M00_Select_Empty_Hands", "");
- }
- else if (sender == mutantSpawner03_guy)
- {
- GameObject * newMutantSpawner03_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_03_JDG );
- Commands->Attach_Script(newMutantSpawner03_guy, "M11_MutantCrypt_Spawner03_Guy_JDG", "");
- mutantSpawner03_guy_ID = Commands->Get_ID ( newMutantSpawner03_guy );
- Commands->Attach_Script(mutantSpawner03_guy, "M00_Select_Empty_Hands", "");
- }
- else if (sender == mutantSpawner04_guy)
- {
- GameObject * newMutantSpawner04_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_04_JDG );
- Commands->Attach_Script(newMutantSpawner04_guy, "M11_MutantCrypt_Spawner04_Guy_JDG", "");
- mutantSpawner04_guy_ID = Commands->Get_ID ( newMutantSpawner04_guy );
- Commands->Attach_Script(mutantSpawner04_guy, "M00_Select_Empty_Hands", "");
- }
- else if (sender == mutantSpawner05_guy)
- {
- GameObject * newMutantSpawner05_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_05_JDG );
- Commands->Attach_Script(newMutantSpawner05_guy, "M11_MutantCrypt_Spawner05_Guy_JDG", "");
- mutantSpawner05_guy_ID = Commands->Get_ID ( newMutantSpawner05_guy );
- Commands->Attach_Script(mutantSpawner05_guy, "M00_Select_Empty_Hands", "");
- }
- else if (sender == mutantSpawner06_guy)
- {
- GameObject * newMutantSpawner06_guy = Commands->Trigger_Spawner( M11_MUTANT_CRYPT_SPAWNER_06_JDG );
- Commands->Attach_Script(newMutantSpawner06_guy, "M11_MutantCrypt_Spawner06_Guy_JDG", "");
- mutantSpawner06_guy_ID = Commands->Get_ID ( newMutantSpawner06_guy );
- Commands->Attach_Script(mutantSpawner06_guy, "M00_Select_Empty_Hands", "");
- }
- }
- }
- break;
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MutantCrypt_Spawner06_Guy_JDG, "")//this one has been fixed for wacky findpath bug
- {
- typedef enum {
- IDLE,
- ATTACKING,
- DEAD,
- } M11_Mutant_State;
- M11_Mutant_State myState;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myState, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Select_Weapon(obj, NULL );
- myState = IDLE;
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 0 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- myState = DEAD;
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (obj && enemy == STAR && myState == IDLE)//
- {
- myState = ATTACKING;
- char *soundName = M11_Choose_Mutant_Alerted_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- Commands->Create_Logical_Sound (obj, M11_MUTANT_IS_NEARBY_JDG, myPosition, 50 );
- }
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if ( sound.Type == M11_MUTANT_IS_NEARBY_JDG )
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- if (obj && myState == IDLE)
- {
- char *soundName = M11_Choose_Mutant_Idle_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- else if (obj && myState != DEAD)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 0, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (obj && param == M01_PICK_A_NEW_LOCATION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(66.505f, 47.147f, -62.686f), .1f, 1 );
- Commands->Action_Goto( obj, params );
- }
- else if (obj && param == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, 2, 1);
- Commands->Action_Goto ( obj, params );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (obj && action_id == M01_PICK_A_NEW_LOCATION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_WALKING_WAYPATH_01_JDG);
- params.Set_Movement( Vector3(0,0,0), .1f, 1 );
- int random = Commands->Get_Random_Int(0, 3);
- if (random == 0)
- {
- params.WaypathID = 100021;
- params.WaypointStartID = 100022;
- params.WaypointEndID = 100028;
- }
- else if (random == 1)
- {
- params.WaypathID = 100021;
- params.WaypointStartID = 100028;
- params.WaypointEndID = 100022;
- }
- else
- {
- params.WaypathID = 100030;
- params.WaypointStartID = 100031;
- params.WaypointEndID = 100040;
- }
- Commands->Action_Goto( obj, params );
- }
- else if (obj && action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- char *animationName = M01_Choose_Idle_Animation ( );
- params.Set_Basic( this, 60, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- }
- else if (obj && action_id == M01_DOING_ANIMATION_01_JDG)
- {
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(66.505f, 47.147f, -62.686f), .1f, 1 );
- Commands->Action_Goto( obj, params );
- }
- else if (obj && action_id == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- char *animationName = M11_Choose_Mutant_Attack_Animation ( );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- Commands->Apply_Damage( STAR, 5, "TiberiumRaw", obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MutantCrypt_Spawner05_Guy_JDG, "")
- {
- typedef enum {
- IDLE,
- ATTACKING,
- DEAD,
- } M11_Mutant_State;
- M11_Mutant_State myState;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myState, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Select_Weapon(obj, NULL );
- myState = IDLE;
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 0 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- myState = DEAD;
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (obj && enemy == STAR && myState == IDLE)//
- {
- myState = ATTACKING;
- char *soundName = M11_Choose_Mutant_Alerted_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- Commands->Create_Logical_Sound (obj, M11_MUTANT_IS_NEARBY_JDG, myPosition, 50 );
- }
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if ( sound.Type == M11_MUTANT_IS_NEARBY_JDG )
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- if (obj && myState == IDLE)
- {
- char *soundName = M11_Choose_Mutant_Idle_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- else if (obj && myState != DEAD)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 0, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (obj && param == M01_PICK_A_NEW_LOCATION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(27.367f, 18.382f, -63.748f), .1f, 1 );
- Commands->Action_Goto( obj, params );
- }
- else if (obj && param == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, 2, 1);
- Commands->Action_Goto ( obj, params );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (obj && action_id == M01_PICK_A_NEW_LOCATION_JDG)
- {
- params.Set_Basic(this, 80, M01_WALKING_WAYPATH_01_JDG);
- params.Set_Movement( Vector3(0,0,0), .1f, 1 );
- int random = Commands->Get_Random_Int(0, 4);
- if (random == 0)
- {
- params.WaypathID = 100041;
- params.WaypointStartID = 100042;
- params.WaypointEndID = 100049;
- }
- else if (random == 1)
- {
- params.WaypathID = 100041;
- params.WaypointStartID = 100049;
- params.WaypointEndID = 100042;
- }
- else if (random == 3)
- {
- params.WaypathID = 100051;
- params.WaypointStartID = 100052;
- params.WaypointEndID = 100061;
- }
- else
- {
- params.WaypathID = 100051;
- params.WaypointStartID = 100061;
- params.WaypointEndID = 100052;
- }
- Commands->Action_Goto( obj, params );
- }
- else if (obj && action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- char *animationName = M01_Choose_Idle_Animation ( );
- params.Set_Basic( this, 60, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- }
- else if (obj && action_id == M01_DOING_ANIMATION_01_JDG)
- {
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(27.367f, 18.382f, -63.748f), .1f, 1 );
- Commands->Action_Goto( obj, params );
- }
- else if (obj && action_id == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- char *animationName = M11_Choose_Mutant_Attack_Animation ( );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- Commands->Apply_Damage( STAR, 5, "TiberiumRaw", obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MutantCrypt_Spawner04_Guy_JDG, "")
- {
- typedef enum {
- IDLE,
- ATTACKING,
- DEAD,
- } M11_Mutant_State;
- M11_Mutant_State myState;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myState, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Select_Weapon(obj, NULL );
- myState = IDLE;
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(5.531f, -10.830f, -63.749f), .1f, 1 );
-
- Commands->Action_Goto( obj, params );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- myState = DEAD;
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (obj && enemy == STAR && myState == IDLE)//
- {
- myState = ATTACKING;
- char *soundName = M11_Choose_Mutant_Alerted_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- Commands->Create_Logical_Sound (obj, M11_MUTANT_IS_NEARBY_JDG, myPosition, 50 );
- }
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if ( sound.Type == M11_MUTANT_IS_NEARBY_JDG )
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- if (obj && myState == IDLE)
- {
- char *soundName = M11_Choose_Mutant_Idle_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- else if (obj && myState != DEAD)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 0, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (obj && param == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, 2, 1);
- Commands->Action_Goto ( obj, params );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (obj && action_id == M01_PICK_A_NEW_LOCATION_JDG)
- {
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(0,0,0), .1f, 1 );
- params.WaypathID = 100063;
-
- Commands->Action_Goto( obj, params );
- }
- else if (obj && action_id == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- char *animationName = M11_Choose_Mutant_Attack_Animation ( );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- Commands->Apply_Damage( STAR, 5, "TiberiumRaw", obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MutantCrypt_Spawner03_Guy_JDG, "")
- {
- typedef enum {
- IDLE,
- ATTACKING,
- DEAD,
- } M11_Mutant_State;
- M11_Mutant_State myState;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myState, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Select_Weapon(obj, NULL );
- myState = IDLE;
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_PICK_A_NEW_LOCATION_JDG, 0 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- myState = DEAD;
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (obj && enemy == STAR && myState == IDLE)//
- {
- myState = ATTACKING;
- char *soundName = M11_Choose_Mutant_Alerted_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- Commands->Create_Logical_Sound (obj, M11_MUTANT_IS_NEARBY_JDG, myPosition, 50 );
- }
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if ( sound.Type == M11_MUTANT_IS_NEARBY_JDG )
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- if (obj && myState == IDLE)
- {
- char *soundName = M11_Choose_Mutant_Idle_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- else if (obj && myState != DEAD)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 0, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (obj && param == M01_PICK_A_NEW_LOCATION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(-15.128f, 17.965f, -63.748f), .1f, 1 );
- Commands->Action_Goto( obj, params );
- }
- else if (obj && param == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, 2, 1);
- Commands->Action_Goto ( obj, params );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (obj && action_id == M01_PICK_A_NEW_LOCATION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_WALKING_WAYPATH_01_JDG);
- params.Set_Movement( Vector3(0,0,0), .1f, 1 );
- int random = Commands->Get_Random_Int(0, 4);
- if (random == 0)
- {
- params.WaypathID = 100076;
- params.WaypointStartID = 100077;
- params.WaypointEndID = 100085;
- }
- else if (random == 1)
- {
- params.WaypathID = 100087;
- params.WaypointStartID = 100088;
- params.WaypointEndID = 100096;
- }
- else if (random == 3)
- {
- params.WaypathID = 100076;
- params.WaypointStartID = 100085;
- params.WaypointEndID = 100077;
- }
- else
- {
- params.WaypathID = 100087;
- params.WaypointStartID = 100096;
- params.WaypointEndID = 100088;
- }
- Commands->Action_Goto( obj, params );
-
-
- }
- else if (obj && action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- char *animationName = M01_Choose_Idle_Animation ( );
- params.Set_Basic( this, 60, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- }
- else if (obj && action_id == M01_DOING_ANIMATION_01_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( Vector3(-15.128f, 17.965f, -63.748f), .1f, 1 );
- Commands->Action_Goto( obj, params );
- }
- else if (obj && action_id == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- char *animationName = M11_Choose_Mutant_Attack_Animation ( );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- Commands->Apply_Damage( STAR, 5, "TiberiumRaw", obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_MutantCrypt_Spawner02_Guy_JDG, "")//this script goes on mutant 1 and 2--just hunting player with this guy
- {
- typedef enum {
- IDLE,
- ATTACKING,
- DEAD,
- } M11_Mutant_State;
- M11_Mutant_State myState;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myState, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Select_Weapon(obj, NULL );
- myState = IDLE;
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- ActionParamsStruct params;
- params.Set_Basic(this, 80, M01_PICK_A_NEW_LOCATION_JDG);
- params.Set_Movement( STAR, .1f, 1 );
-
- Commands->Action_Goto( obj, params );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- myState = DEAD;
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (obj && enemy == STAR && myState == IDLE)//
- {
- myState = ATTACKING;
- char *soundName = M11_Choose_Mutant_Alerted_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- Commands->Create_Logical_Sound (obj, M11_MUTANT_IS_NEARBY_JDG, myPosition, 50 );
- }
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if ( sound.Type == M11_MUTANT_IS_NEARBY_JDG )
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- if (obj && myState == IDLE)
- {
- char *soundName = M11_Choose_Mutant_Idle_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 10, 20 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- else if (obj && myState != DEAD)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- float delayTimer = Commands->Get_Random ( 0, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (obj && param == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, 2, 1);
- Commands->Action_Goto ( obj, params );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (obj && action_id == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- char *animationName = M11_Choose_Mutant_Attack_Animation ( );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- Commands->Apply_Damage( STAR, 5, "TiberiumRaw", obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- }
- };
- /***********************************************************************************************************************
- Putting POWERCORE related scripts here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_PowerCore_WanderingMutant_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- GameObject * myTarget = Commands->Find_Closest_Soldier ( myPosition, 0, 50, true );
- if (myTarget != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 95, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( myTarget, RUN, .25f );
- Commands->Action_Goto( obj, params );
- }
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_WanderingMutantSpawner_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 30 );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_HUNT_THE_PLAYER_JDG );
- params.Set_Movement( STAR, 1.0f, 1.0f );
- Commands->Action_Goto( obj, params );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (obj && param == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, 1.0f, 1);
- Commands->Action_Goto ( obj, params );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- else if (obj && param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Commands->Enable_Hibernation( obj, true );
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (obj && action_id == M01_HUNT_THE_PLAYER_JDG)
- {
- if (STAR)
- {
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- char *animationName = M11_Choose_Mutant_Attack_Animation ( );
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation (animationName, false);
- Commands->Action_Play_Animation (obj, params);
- Commands->Apply_Damage( STAR, 5, "TiberiumRaw", obj );
- Commands->Send_Custom_Event( obj, obj, 0, M01_HUNT_THE_PLAYER_JDG, 1 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_StealthSoldier_Group2_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- Commands->Enable_Stealth(obj, true);
- Commands->Innate_Disable(obj);
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if (sound.Creator == STAR)
- {
- Commands->Set_Innate_Is_Stationary ( obj, false );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Vector3 powerupSpawnLocation = Commands->Get_Position (obj );
- powerupSpawnLocation.Z += 0.75f;
- char *powerups[2] =
- {
- //this is a list of potential powerups to be dropped by destroyed security turrets
- "POW_Health_100",
- "POW_Armor_100",
- };
- int random = Commands->Get_Random_Int(0, 2);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_StealthSoldier_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_HUNT_THE_PLAYER_JDG);
- params.Set_Movement(STAR, RUN, 10);
- Commands->Action_Goto ( obj, params );
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_Initial_StealthSoldier_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- Commands->Enable_Stealth(obj, false);
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (enemy == STAR)
- {
- Commands->Enable_Stealth(obj, true);
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( "CnC_Cloaking", myPosition, obj );
- Commands->Set_Innate_Is_Stationary ( obj, true );
- }
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_Powerup_Zone_JDG, "")//
- {
- bool spawnClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(spawnClearance, 1);
- }
- void Created( GameObject * obj )
- {
- spawnClearance = true;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && spawnClearance == true)
- {
- spawnClearance = false;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 15 );
-
- float delayTimer = Commands->Get_Random ( 0, 5 );
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, delayTimer );
-
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- spawnClearance = true;
- }
- else if (param == M01_SPAWNER_SPAWN_PLEASE_JDG)//give powerup
- {
- Vector3 powerupSpawnLocation (-5.568f, 57.285f, -38.736f);
- char *powerups[9] =
- {
- //this is a list of potential powerups to be dropped by destroyed security turrets
- "POW_Health_100",
- "POW_Armor_100",
- "POW_RocketLauncher_Player",
- "POW_SniperRifle_Player",
- "POW_TiberiumFlechetteGun_Player",
- "POW_LaserChaingun_Player",
- "POW_GrenadeLauncher_Player",
- "POW_LaserRifle_Player",
- "POW_TiberiumAutoRifle_Player",
- //more to be added later
-
- };
- int random = Commands->Get_Random_Int(0, 9);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_EntryZone_JDG, "")
- {
- //THESE ARE THE GUYS YOU CONTROL
- //M11_POWERCORE_INITAL_STEALTHGUY01_JDG 100536
- //M11_POWERCORE_INITAL_STEALTHGUY02_JDG 100537
- //M11_POWERCORE_INITAL_STEALTHGUY03_JDG 100538
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- //deleting the two "There's Sydney!" zones once entered into powercore
- GameObject * zone01 = Commands->Find_Object ( 101327 );
- GameObject * zone02 = Commands->Find_Object ( 101328 );
- if (zone01 != NULL)
- {
- Commands->Destroy_Object ( zone01 );
- }
- if (zone02 != NULL)
- {
- Commands->Destroy_Object ( zone02 );
- }
- GameObject * stealthGuy01 = Commands->Find_Object ( M11_POWERCORE_INITAL_STEALTHGUY01_JDG );
- GameObject * stealthGuy02 = Commands->Find_Object ( M11_POWERCORE_INITAL_STEALTHGUY02_JDG );
- GameObject * stealthGuy03 = Commands->Find_Object ( M11_POWERCORE_INITAL_STEALTHGUY03_JDG );
- GameObject * stealthGuy04 = Commands->Find_Object ( 100662 );
- GameObject * stealthGuy05 = Commands->Find_Object ( 100663 );
- GameObject * stealthGuy06 = Commands->Find_Object ( 100664 );
- GameObject * stealthGuy07 = Commands->Find_Object ( 100665 );
- GameObject * stealthGuy08 = Commands->Find_Object ( 100666 );
- GameObject * stealthGuy09 = Commands->Find_Object ( 100667 );
- if (stealthGuy01 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy02 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy02, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy03 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy03, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy04 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy04, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy05 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy05, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy06 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy06, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy07 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy07, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy08 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy08, 0, M01_START_ACTING_JDG, 0 );
- }
- if (stealthGuy09 != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthGuy09, 0, M01_START_ACTING_JDG, 0 );
- }
- Vector3 mutant01spot (6.339f, 64.212f, -52.114f);
- Vector3 mutant02spot (4.095f, 76.237f, -50.782f);
- Vector3 mutant03spot (-6.129f, 73.340f, -52.114f);
- GameObject * mutant01 = Commands->Create_Object ( "Mutant_0_Mutant", mutant01spot );
- Commands->Attach_Script(mutant01, "M11_PowerCore_WanderingMutant_JDG", "");
- GameObject * mutant02 = Commands->Create_Object ( "Mutant_0_Mutant", mutant02spot );
- Commands->Attach_Script(mutant02, "M11_PowerCore_WanderingMutant_JDG", "");
- GameObject * mutant03 = Commands->Create_Object ( "Mutant_0_Mutant", mutant03spot );
- Commands->Attach_Script(mutant03, "M11_PowerCore_WanderingMutant_JDG", "");
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- /***********************************************************************************************************************
- Putting SYNDEY Escort related stuff here
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_NukeSilo_Protector_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Set_Innate_Soldier_Home_Location ( obj, myPosition, 3 );
- }
- };
- /***********************************************************************************************************************
- Putting OBJECTIVE related stuff here--zones etc.
- ************************************************************************************************************************/
- DECLARE_SCRIPT(M11_End_First_Objective_Zone_JDG, "")//player has reached museum area--clear first objective
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_MISSION_CONTROLLER_JDG), 0, M11_END_FIRST_OBJECTIVE_JDG, 0 );//
- GameObject * cabalController = Commands->Find_Object (101204);
- if (cabalController != NULL)
- {
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Send_Custom_Event ( obj, cabalController, 0, M01_START_ACTING_JDG, delayTimer );
- }
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- DECLARE_SCRIPT(M11_Start_Third_Objective_Zone_JDG, "")//player's third objective is to acess the power core
- {
- int addThirdObjectiveConv;
- bool entered;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(addThirdObjectiveConv, 1);
- SAVE_VARIABLE(entered, 2);
- }
- void Created( GameObject * obj )
- {
- entered = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && entered == false)
- {
- entered = true;
- addThirdObjectiveConv = Commands->Create_Conversation( "M11_Add_Third_Objective_Conversation", 100, 1000, false);
- Commands->Join_Conversation( NULL, addThirdObjectiveConv, false, false );;
- Commands->Start_Conversation( addThirdObjectiveConv, addThirdObjectiveConv );
- Commands->Monitor_Conversation (obj, addThirdObjectiveConv);
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- switch (complete_reason)
- {
- case ACTION_COMPLETE_CONVERSATION_ENDED:
- {
- if (action_id == addThirdObjectiveConv) //introduce acess powercore objective here
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_MISSION_CONTROLLER_JDG), 0, M11_ADD_THIRD_OBJECTIVE_JDG, 0 );
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Start_Fifth_Objective_Zone_JDG, "")//player's fifth objective is to sabotage the nuke
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_MISSION_CONTROLLER_JDG), 0, M11_ADD_FIFTH_OBJECTIVE_JDG, 0 );
-
- GameObject * zoneOne = Commands->Find_Object ( 100105 );
- if (zoneOne != NULL)
- {
- Commands->Destroy_Object ( zoneOne );//one time only zone--cleaning up
- }
- GameObject * zoneTwo = Commands->Find_Object ( 100107 );
- if (zoneTwo != NULL)
- {
- Commands->Destroy_Object ( zoneTwo );//one time only zone--cleaning up
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_End_Mission_Switch_JDG, "")//this guys ID is M11_END_MISSION_SWITCH_JDG 100106
- {
- float myHealth;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myHealth, 1);
- }
- void Created( GameObject * obj )
- {
- myHealth = Commands->Get_Health ( obj );
- Commands->Set_Shield_Type (obj, "Blamo");
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Mission_Complete ( false );
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (obj)
- {
- Commands->Set_Health ( obj, myHealth );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Set_Animation ( obj, "DSP_MINICONSEL.DSP_MINICONSEL", false, NULL, 0, 13 );
- }
- }
- };
- DECLARE_SCRIPT(M11_KanesRoom_SecurityTurret_JDG, "")
- {
- int alarmSound;
- bool active;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(alarmSound, 1);
- SAVE_VARIABLE(active, 2);
- }
- void Created( GameObject * obj )
- {
- active = false;
- Vector3 myPosition = Commands->Get_Position ( obj );
-
- alarmSound = Commands->Create_Sound ( "SFX.Klaxon_Alert_01", myPosition, obj );
- Commands->Stop_Sound ( alarmSound, false );
- Commands->Send_Custom_Event( obj, obj, 0, M01_GOTO_IDLE_JDG, 1 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (active == true)
- {
- Commands->Stop_Sound ( alarmSound, true );
- Vector3 powerupSpawnLocation = Commands->Get_Position (obj);
- powerupSpawnLocation.Z = -28.705f;
-
- char *powerups[9] =
- {
- //this is a list of potential powerups to be dropped by destroyed security turrets
- "POW_Health_100",
- "POW_Armor_100",
- "POW_RocketLauncher_Player",
- "POW_SniperRifle_Player",
- "POW_TiberiumFlechetteGun_Player",
- "POW_LaserChaingun_Player",
- "POW_GrenadeLauncher_Player",
- "POW_LaserRifle_Player",
- "POW_TiberiumAutoRifle_Player",
- //more to be added later
-
- };
- int random = Commands->Get_Random_Int(0, 9);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_KANESROOM_SECURITY_CONTROLLER_JDG), 0, M01_YOUR_OPERATOR_IS_DEAD_JDG, 0 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- if (obj)
- {
- active = true;
- float myAccuracy = Commands->Get_Random ( 0, 1 );
- params.Set_Basic(this, 100, M01_START_ATTACKING_01_JDG);
- params.Set_Attack( STAR, 100, myAccuracy, true );
- Commands->Action_Attack( obj, params );
- Commands->Start_Sound ( alarmSound );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_KanesRoom_SecurityZone_JDG, "")//this guys ID is M11_KANESROOM_SECURITY_CONTROLLER_JDG 100351
- {
- bool entered;
- int deadTurrets;
- int deadCameras;
- bool powerupsGranted;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(entered, 1);
- SAVE_VARIABLE(deadTurrets, 2);
- SAVE_VARIABLE(deadCameras, 3);
- SAVE_VARIABLE(powerupsGranted, 4);
- }
- void Created( GameObject * obj )
- {
- entered = false;
- powerupsGranted = false;
- deadTurrets = 0;
- deadCameras = 0;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && entered == false)
- {
- entered = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- GameObject * turret01 = Commands->Find_Object (M11_KANESROOM_SECURITY_TURRET_01_JDG);
- GameObject * turret03 = Commands->Find_Object (M11_KANESROOM_SECURITY_TURRET_03_JDG);
- if (turret01 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 0, 2 );
- Commands->Send_Custom_Event( obj, turret01, 0, M01_START_ACTING_JDG, delayTimer );
- }
- if (turret03 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 0, 2 );
- Commands->Send_Custom_Event( obj, turret03, 0, M01_START_ACTING_JDG, delayTimer );
- }
- }
- else if (param == M01_YOUR_OPERATOR_IS_DEAD_JDG)//this is custom recieved when a turret gets destroyed
- {
- deadTurrets++;
- if (deadTurrets >= 2)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- else if (param == M01_SPAWNER_SPAWN_PLEASE_JDG && powerupsGranted == false)
- {
- powerupsGranted = true;
- Vector3 health100_spawnLocation (27.571f, 7.687f, -29.205f);
- Vector3 armor100_spawnLocation (18.841f, 7.694f, -29.205f);
- Commands->Create_Object ( "POW_Health_100", health100_spawnLocation );
- Commands->Create_Object ( "POW_Armor_100", armor100_spawnLocation );
- }
- }
- };
- DECLARE_SCRIPT(M00_MutantHeal_Script_JDG, "")
- {
- float myLastHealth;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(myLastHealth, 1);
- }
- void Created( GameObject * obj )
- {
- myLastHealth = Commands->Get_Health ( obj );
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (obj)
- {
- float myCurrentHealth = Commands->Get_Health ( obj );
- if (myCurrentHealth > myLastHealth)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation( "H_A_4243", false );
- Commands->Action_Play_Animation ( obj, params );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( "Mutant_Heal_Cry", myPosition, obj );
- }
- myLastHealth = myCurrentHealth;
- }
- }
- };
- DECLARE_SCRIPT(M11_Lab_Cryochamber_Switch01_JDG, "")
- {
- bool poked;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(poked, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 0 );//green
- poked = false;
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if ( poker == STAR && poked == false)
- {
- Commands->Enable_HUD_Pokable_Indicator ( obj, false );
- poked = true;
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- //Commands->Create_Sound ( "bombit1", Vector3 (0,0,0), obj );
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Laboratory_Scientist_JDG, "")
- {
- bool hiding;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(hiding, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- hiding = false;
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (obj)
- {
- if (damager == STAR)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- void Sound_Heard( GameObject * obj, const CombatSound & sound )
- {
- if (obj)
- {
- if (sound.Creator == STAR)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- void Enemy_Seen( GameObject * obj, GameObject * enemy )
- {
- if (obj)
- {
- if (enemy == STAR)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
-
- params.Set_Basic(this, 85, M01_START_ACTING_JDG);
- params.Set_Animation ("H_A_CON2", true);
- Commands->Action_Play_Animation (obj, params);
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG && hiding == false)
- {
- hiding = true;
- Commands->Action_Reset ( obj, 100 );
- int myIdNumber = Commands->Get_ID ( obj );
- if (myIdNumber == 100958)
- {
- params.Set_Basic(this, 100, M01_MODIFY_YOUR_ACTION_JDG);
- params.Set_Movement( Vector3 (-20.306f, 17.693f, -39.486f), RUN, 1 );
- Commands->Action_Goto (obj, params);
- }
- else if (myIdNumber == 100449)
- {
- params.Set_Basic(this, 100, M01_MODIFY_YOUR_ACTION_JDG);
- params.Set_Movement( Vector3 (-3.576f, 29.472f, -39.482f), RUN, 1 );
- Commands->Action_Goto (obj, params);
- }
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- if (action_id == M01_MODIFY_YOUR_ACTION_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_START_ACTING_JDG);
- params.Set_Animation ("H_A_A0C0", true);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- };
- DECLARE_SCRIPT(M11_Laboratory_Mutant_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Set_Innate_Soldier_Home_Location ( obj, myPosition, 10 );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- };
- DECLARE_SCRIPT(M11_Seths_Room_Conversation_Zone_JDG, "")//101103
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- int sethConv = Commands->Create_Conversation( "M11_Kane_Regarding_Seth_Conversation", 100, 1000, false);
- Commands->Join_Conversation( NULL, sethConv, false, false );
- Commands->Join_Conversation( STAR, sethConv, false, false );
- Commands->Start_Conversation( sethConv, sethConv );
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepellers_Controller_JDG, "")//M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG 101125
- {
- int spawned_units;
- int rope_A_id;
- int rope_B_id;
- Vector3 ropeA_v3;
- Vector3 ropeB_v3;
- bool rope_A_spawned;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(spawned_units, 1);
- SAVE_VARIABLE(rope_A_id, 2);
- SAVE_VARIABLE(rope_B_id, 3);
- SAVE_VARIABLE(ropeA_v3, 4);
- SAVE_VARIABLE(ropeB_v3, 5);
- SAVE_VARIABLE(rope_A_spawned, 6);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- rope_A_spawned = false;
- spawned_units = 0;
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 5 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, 15 );
- ropeA_v3.Set (-6.230f, 3.584f, 4.5f);
- ropeB_v3.Set (8.368f, -35.439f, 1);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- GameObject *controller = Commands->Create_Object("Invisible_Object", ropeB_v3);
- Commands->Set_Facing ( controller, -10 );
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_Repel_Part1b.txt");
- spawned_units++;
- }
- else if (param == M01_START_ACTING_JDG)
- {
- rope_A_spawned = true;
- GameObject *controller = Commands->Create_Object("Invisible_Object", ropeA_v3);
- Commands->Set_Facing ( controller, 75 );
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_Repel_Part1.txt");
- spawned_units++;
- }
- else if (param == M01_ROPE_IS_SENDING_ID_JDG)
- {
- rope_A_id = Commands->Get_ID ( sender );
- }
- else if (param == M01_WAYPATH_IS_SENDING_ID_JDG)//this is actually rope-b sending id
- {
- rope_B_id = Commands->Get_ID ( sender );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- GameObject * rope_A = Commands->Find_Object ( rope_A_id );
- if (rope_A != NULL)
- {
- GameObject *controller = Commands->Create_Object("Invisible_Object", ropeA_v3);
- Commands->Set_Facing ( controller, 75 );
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_Repel_Part2.txt");
- Commands->Set_Animation ( rope_A, "X11D_Rope.X11D_Rope_L", false);
- spawned_units++;
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_04_JDG, (95/30) );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_03_JDG)
- {
- GameObject * rope_B = Commands->Find_Object ( rope_B_id );
- if (rope_B != NULL)
- {
- GameObject *controller = Commands->Create_Object("Invisible_Object", ropeB_v3);
- Commands->Set_Facing ( controller, -10 );
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_Repel_Part2.txt");
- Commands->Set_Animation ( rope_B, "X11D_Rope.X11D_Rope_L", true);
- spawned_units++;
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_05_JDG, (95/30) );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_04_JDG)//set rope "A" to idle anim
- {
- GameObject * rope_A = Commands->Find_Object ( rope_A_id );
- if (rope_A != NULL)
- {
- Commands->Set_Animation ( rope_A, "X11D_Rope.X11D_Rope_Z", true);
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_05_JDG)//set rope "B" to idle anim
- {
- GameObject * rope_B = Commands->Find_Object ( rope_B_id );
- if (rope_B != NULL)
- {
- Commands->Set_Animation ( rope_B, "X11D_Rope.X11D_Rope_Z", true);
- }
- }
- else if (param == M01_IVE_BEEN_KILLED_JDG && spawned_units <= 8 )
- {
- int random = Commands->Get_Random_Int(0, 2);
- if (random == 0 && rope_A_spawned == true)
- {
- float delayTimer = Commands->Get_Random ( 5, 15 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, delayTimer );
- }
- else
- {
- float delayTimer = Commands->Get_Random ( 5, 15 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_03_JDG, delayTimer );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepellers_RopeA_JDG, "")
- {
- void Created( GameObject * obj ) //M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG
- {
- Commands->Enable_Hibernation( obj, false );
- GameObject * myController = Commands->Find_Object ( M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG );
- if (myController != NULL)
- {
- Commands->Send_Custom_Event ( obj, myController, 0, M01_ROPE_IS_SENDING_ID_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepellers_RopeB_JDG, "")
- {
- void Created( GameObject * obj ) //M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG
- {
- Commands->Enable_Hibernation( obj, false );
- GameObject * myController = Commands->Find_Object ( M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG );
- if (myController != NULL)
- {
- Commands->Send_Custom_Event ( obj, myController, 0, M01_WAYPATH_IS_SENDING_ID_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepeller_JDG, "")
- {
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "S_a_Human.H_a_X11D_repel") == 0)
- {
- Commands->Attach_Script(obj, "M01_Hunt_The_Player_JDG","");
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * myController = Commands->Find_Object ( M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG );
- if (myController != NULL)
- {
- Commands->Send_Custom_Event ( obj, myController, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Theres_Sydney_Zone_JDG, "")//101327 and 101328
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- int theresSydneyConversation = Commands->Create_Conversation( "M11_Theres_Sydney_Conversation", 100, 1000, false);
- Commands->Join_Conversation( STAR, theresSydneyConversation, false, false, false );
- Commands->Join_Conversation( NULL, theresSydneyConversation, false, false, false );
- Commands->Start_Conversation( theresSydneyConversation, theresSydneyConversation );
- GameObject * zone01 = Commands->Find_Object ( 101327 );
- GameObject * zone02 = Commands->Find_Object ( 101328 );
- if (zone01 != NULL)
- {
- Commands->Destroy_Object ( zone01 );
- }
- if (zone02 != NULL)
- {
- Commands->Destroy_Object ( zone02 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_End_Third_Objective_Zone_JDG, "")//this guys ID is 100012--using to stop mutant spawners and end objective 3
- {
- bool entered;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(entered, 1);
- }
- void Created( GameObject * obj )
- {
- entered = false;
- }
- void Entered( GameObject * obj, GameObject * enterer ) //
- {
- if (enterer == STAR && entered == false)
- {
- entered = true;
- int powerCoreEntry = Commands->Create_Conversation( "M11_PowerCore_Entry_Conversation", 100, 1000, false);
- Commands->Join_Conversation( NULL, powerCoreEntry, false, false, false );
- Commands->Start_Conversation( powerCoreEntry, powerCoreEntry );
- GameObject * mutantController = Commands->Find_Object ( M11_MUTANT_CRYPT_SPAWNER_CONTROLLER_JDG );
- if (mutantController != NULL)
- {
- Commands->Send_Custom_Event ( obj, mutantController, 0, M01_QUIT_SPAWNING_PLEASE_JDG, 0 );
- }
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_MISSION_CONTROLLER_JDG), 0, M11_END_THIRD_OBJECTIVE_JDG, 0 );
- //one time only zone--Destroying it in mission controller to avoid potential bugs
- }
- }
- };
- DECLARE_SCRIPT(M11_SecurityCamera_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Vector3 playersPosition = Commands->Get_Position ( STAR );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_START_ATTACKING_02_JDG );
- params.Set_Face_Location( playersPosition, 1 );
-
- Commands->Action_Face_Location ( obj, params );
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- switch (complete_reason)
- {
- case ACTION_COMPLETE_NORMAL:
- {
- if (action_id == M01_START_ATTACKING_02_JDG)
- {
- Vector3 playersPosition = Commands->Get_Position ( STAR );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_START_ATTACKING_02_JDG );
- params.Set_Face_Location( playersPosition, 1 );
-
- Commands->Action_Face_Location ( obj, params );
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Temple_Commander_JDG, "")//101250
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
- GameObject * hologram01 = Commands->Find_Object ( 100252 );
- if (hologram01 != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 80, M01_START_ATTACKING_01_JDG );
- params.Set_Attack( hologram01, 0, 0, true );
-
- Commands->Action_Attack ( obj, params );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)//conversation is over--goto innate
- {
- Commands->Action_Reset ( obj, 100 );
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * c130Controller = Commands->Find_Object ( M11_C130_DROPOFF_CONTROLLER_JDG );
- if (c130Controller != NULL)
- {
- Commands->Destroy_Object ( c130Controller );
- }
- GameObject * hologramController = Commands->Find_Object ( 101251 );
- if (hologramController != NULL)
- {
- Commands->Send_Custom_Event ( obj, hologramController, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Temple_Hologram_Controller_JDG, "")//101251
- {
- int kane01_ID;
- int kane02_ID;
- int kane_conversation01;
- int kane_conversation01b;
- int kane_conversation02;
- bool kane_conversation01_playing;
- bool kane_conversation02_playing;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(kane01_ID, 1);
- SAVE_VARIABLE(kane02_ID, 2);
- SAVE_VARIABLE(kane_conversation01, 3);
- SAVE_VARIABLE(kane_conversation01b, 4);
- SAVE_VARIABLE(kane_conversation02, 5);
- SAVE_VARIABLE(kane_conversation01_playing, 6);
- SAVE_VARIABLE(kane_conversation02_playing, 7);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- kane_conversation01_playing = false;
- kane_conversation02_playing = false;
- GameObject * hologram01 = Commands->Find_Object ( 100252 );
- if (hologram01 != NULL)
- {
- GameObject * commander = Commands->Find_Object ( 101250 );
- if (commander != NULL)
- {
- GameObject * kane01 = Commands->Create_Object_At_Bone ( hologram01, "Nod_Kane_HologramHead", "KANEBONE" );
- Commands->Disable_All_Collisions ( kane01 );
- Commands->Attach_To_Object_Bone( kane01, hologram01, "KANEBONE" );
- Commands->Set_Loiters_Allowed( kane01, false );
- Commands->Attach_Script(kane01, "M11_BattleStationAlpha_CommanderEncounter_KaneHead_JDG", "");
- kane01_ID = Commands->Get_ID ( kane01 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)//starting first kane-commander encounter
- {
- GameObject * kane01 = Commands->Find_Object ( kane01_ID );
- GameObject * commander = Commands->Find_Object ( 101250 );
- if (commander != NULL)
- {
- kane_conversation01 = Commands->Create_Conversation( "M11_Kane_and_Blackhand_Conversation_01", 100, 1000, true);
- Commands->Join_Conversation( kane01, kane_conversation01, false, true, true );
- Commands->Join_Conversation( commander, kane_conversation01, false, true, true );
- Commands->Start_Conversation( kane_conversation01, kane_conversation01 );
- Commands->Monitor_Conversation( obj, kane_conversation01 );
- kane_conversation01_playing = true;
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)//havoc has entered first zone--start first havoc conv
- {
- if (kane_conversation01_playing == true)
- {
- kane_conversation01_playing = false;
- Commands->Stop_Conversation( kane_conversation01 );
-
- GameObject * commander = Commands->Find_Object ( 101250 );
- if (commander != NULL)
- {
- Commands->Send_Custom_Event ( obj, commander, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- GameObject * kane01 = Commands->Find_Object ( kane01_ID );
- if (kane01 != NULL)
- {
- kane_conversation01b = Commands->Create_Conversation( "M11_Kane_and_Havoc_Conversation_01", 90, 30, true);
- Commands->Join_Conversation( kane01, kane_conversation01b, false, true, true );
- Commands->Join_Conversation( STAR, kane_conversation01b, false, false, false );
- Commands->Start_Conversation( kane_conversation01b, kane_conversation01b );
- Commands->Monitor_Conversation( obj, kane_conversation01b );
- kane_conversation02_playing = true;
- }
- }
- else if (kane_conversation01_playing == false)
- {
- GameObject * hologram01 = Commands->Find_Object ( 100252 );
- if (hologram01 != NULL)
- {
- GameObject * kane02 = Commands->Create_Object_At_Bone ( hologram01, "Nod_Kane_HologramHead", "KANEBONE" );
- Commands->Disable_All_Collisions ( kane02 );
- Commands->Attach_To_Object_Bone( kane02, hologram01, "KANEBONE" );
- Commands->Set_Loiters_Allowed( kane02, false );
- Commands->Attach_Script(kane02, "M11_BattleStationAlpha_HavocEncounter_KaneHead_JDG", "");
- kane02_ID = Commands->Get_ID ( kane02 );
- }
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_03_JDG && kane_conversation02_playing == false)//kane head01 is giving clearance to start havoc conv
- {
- kane_conversation02 = Commands->Create_Conversation( "M11_Kane_and_Havoc_Conversation_01", 90, 30, true);
- Commands->Join_Conversation( sender, kane_conversation02, false, true, true );
- Commands->Join_Conversation( STAR, kane_conversation02, false, false, false );
- Commands->Start_Conversation( kane_conversation02, kane_conversation02 );
- Commands->Monitor_Conversation( obj, kane_conversation02 );
- kane_conversation02_playing = true;
- }
- else if (param == M01_IVE_BEEN_KILLED_JDG)
- {
- GameObject * commander = Commands->Find_Object ( 101250 );
- if (sender == commander)
- {
- if (kane_conversation01_playing == true)
- {
- kane_conversation01_playing = false;
- Commands->Stop_Conversation( kane_conversation01 );
- GameObject * kane01 = Commands->Find_Object ( kane01_ID );
- if (kane01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, kane01, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- switch (complete_reason)
- {
- case ACTION_COMPLETE_CONVERSATION_ENDED:
- {
- if (action_id == kane_conversation01 && kane_conversation01_playing == true)
- {
- kane_conversation01_playing = false;
- GameObject * kane01 = Commands->Find_Object ( kane01_ID );
- if (kane01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, kane01, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- GameObject * commander = Commands->Find_Object ( 101250 );
- if (commander != NULL)
- {
- Commands->Send_Custom_Event ( obj, commander, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- else if (action_id == kane_conversation01b && kane_conversation02_playing == true)
- {
- kane_conversation02_playing = false;
- GameObject * kane01 = Commands->Find_Object ( kane01_ID );
- if (kane01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, kane01, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- else if (action_id == kane_conversation02 && kane_conversation02_playing == true)
- {
- kane_conversation02_playing = false;
- GameObject * kane02 = Commands->Find_Object ( kane02_ID );
- if (kane02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, kane02, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_BattleStationAlpha_CommanderEncounter_KaneHead_JDG, "")
- {
- void Created( GameObject * obj )
- {
- GameObject * hologramController = Commands->Find_Object ( 101251 );
- if (hologramController != NULL)
- {
- Commands->Send_Custom_Event ( obj, hologramController, 0, M01_MODIFY_YOUR_ACTION_JDG, 4 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)//conversation is over--go away
- {
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_BattleStationAlpha_HavocEncounter_KaneHead_JDG, "")
- {
- void Created( GameObject * obj )
- {
- GameObject * hologramController = Commands->Find_Object ( 101251 );
- if (hologramController != NULL)
- {
- Commands->Send_Custom_Event ( obj, hologramController, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 0 );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)//conversation is over--go away
- {
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Temple_Hologram_01_JDG, "")//100252
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Animation (obj, "DSP_HOLO_BIG.DSP_HOLO_BIG", true);
- }
- };
- DECLARE_SCRIPT(M11_SecondHolograph_EntryZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * hologramController = Commands->Find_Object ( 101251 );
- if (hologramController != NULL)
- {
- Commands->Send_Custom_Event ( obj, hologramController, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- }
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_InitialPatrol_Left01_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( Vector3(0,0,0), RUN, 0.25f);
- params.WaypathID = 100210;
- params.WaypointStartID = 100211;
- params.WaypointEndID = 100218;
- Commands->Action_Goto( obj, params );
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_02_JDG );
- params.Set_Movement( Vector3(-7.989f, 16.986f, -18), RUN, 0.25f);
- Commands->Action_Goto( obj, params );
- }
- else if (action_id == M01_WALKING_WAYPATH_02_JDG)
- {
- Commands->Enable_Hibernation( obj, true );
- Commands->Set_Innate_Is_Stationary (obj, true );
- }
- }
- };
- DECLARE_SCRIPT(M11_Floor01_InitialPatrol_Right01_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( Vector3(0,0,0), RUN, 0.25f);
- params.WaypathID = 100199;
- params.WaypointStartID = 100200;
- params.WaypointEndID = 100208;
- Commands->Action_Goto( obj, params );
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_02_JDG );
- params.Set_Movement( Vector3(1.354f, 15.273f, -18), RUN, 0.25f);
- Commands->Action_Goto( obj, params );
- }
- else if (action_id == M01_WALKING_WAYPATH_02_JDG)
- {
- Commands->Enable_Hibernation( obj, true );
- Commands->Set_Innate_Is_Stationary (obj, true );
- }
- }
- };
- DECLARE_SCRIPT(M11_KaneRoom_KaneEncounter_Zone_JDG, "")//
- {
- int kane_ID;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(kane_ID, 1);
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * holograph = Commands->Find_Object ( 101226 );
- if (holograph != NULL)
- {
- GameObject * kane = Commands->Create_Object_At_Bone ( holograph, "Nod_Kane_HologramHead_small", "KANEBONE" );
- Commands->Disable_All_Collisions ( kane );
- Commands->Attach_To_Object_Bone( kane, holograph, "KANEBONE" );
- Commands->Set_Loiters_Allowed( kane, false );
- Commands->Attach_Script(kane, "M11_KaneRoom_KaneEncounter_Kane_JDG", "");
- kane_ID = Commands->Get_ID ( kane );
- Commands->Destroy_Object ( obj );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_KaneRoom_KaneEncounter_Kane_JDG, "")//M11_KanesRoom_Kane_Conversation
- {
- int kane_conversation02;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(kane_conversation02, 1);
- }
- void Created( GameObject * obj )
- {
- if (STAR)
- {
- kane_conversation02 = Commands->Create_Conversation( "M11_KanesRoom_Kane_Conversation", 100, 1000, false);
- Commands->Join_Conversation( obj, kane_conversation02, false, true, true );
- Commands->Join_Conversation( STAR, kane_conversation02, false, false );
- Commands->Start_Conversation( kane_conversation02, kane_conversation02 );
- Commands->Monitor_Conversation( obj, kane_conversation02 );
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- switch (complete_reason)
- {
- case ACTION_COMPLETE_CONVERSATION_ENDED:
- {
- if (action_id == kane_conversation02)
- {
- Commands->Debug_Message ( "***************************kane conversation 02 is over--sending delete custom\n" );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, 2 );
- }
- }
- break;
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)//conversation is over--go away
- {
- Commands->Debug_Message ( "***************************delete custom received--kane should now vanish\n" );
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_KaneRoom_KaneEncounter_Hologram_JDG, "")//101226
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Animation (obj, "DSP_HOLO.DSP_HOLO", true);
- }
- };
- DECLARE_SCRIPT(M11_CABAL_Babble_Contoller_JDG, "")// 101204
- {
- int last;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(last, 1);
- }
- void Created( GameObject * obj )
- {
- last = 20;
- Commands->Enable_Hibernation( obj, false);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (obj && param == M01_START_ACTING_JDG)
- {
- Vector3 speaker01position = Commands->Get_Position ( STAR );
- Vector3 speaker02position = Commands->Get_Position ( STAR );
- Vector3 speaker03position = Commands->Get_Position ( STAR );
- speaker01position.X += Commands->Get_Random(-10,10);
- speaker01position.Y += Commands->Get_Random(-10,10);
- speaker01position.Z += Commands->Get_Random(0,10);
- speaker02position.X += Commands->Get_Random(-10,10);
- speaker02position.Y += Commands->Get_Random(-10,10);
- speaker02position.Z += Commands->Get_Random(0,10);
- speaker03position.X += Commands->Get_Random(-10,10);
- speaker03position.Y += Commands->Get_Random(-10,10);
- speaker03position.Z += Commands->Get_Random(0,10);
- Commands->Create_Sound ( "M11DSGN_DSGN0089I1EVAC_SND", speaker01position, obj );
- Commands->Create_Sound ( "M11DSGN_DSGN0089I1EVAC_SND", speaker02position, obj );
- Commands->Create_Sound ( "M11DSGN_DSGN0089I1EVAC_SND", speaker03position, obj );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 6 );
- }
- else if (obj && param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Vector3 speaker01position = Commands->Get_Position ( STAR );
- Vector3 speaker02position = Commands->Get_Position ( STAR );
- Vector3 speaker03position = Commands->Get_Position ( STAR );
- speaker01position.X += Commands->Get_Random(-10,10);
- speaker01position.Y += Commands->Get_Random(-10,10);
- speaker01position.Z += Commands->Get_Random(0,10);
- speaker02position.X += Commands->Get_Random(-10,10);
- speaker02position.Y += Commands->Get_Random(-10,10);
- speaker02position.Z += Commands->Get_Random(0,10);
- speaker03position.X += Commands->Get_Random(-10,10);
- speaker03position.Y += Commands->Get_Random(-10,10);
- speaker03position.Z += Commands->Get_Random(0,10);
- Commands->Create_Sound ( "M11DSGN_DSGN0097I1EVAC_SND", speaker01position, obj );
- Commands->Create_Sound ( "M11DSGN_DSGN0097I1EVAC_SND", speaker02position, obj );
- Commands->Create_Sound ( "M11DSGN_DSGN0097I1EVAC_SND", speaker03position, obj );
- float delayTimer = Commands->Get_Random ( 15, 60 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, delayTimer );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- Vector3 speaker01position = Commands->Get_Position ( STAR );
- Vector3 speaker02position = Commands->Get_Position ( STAR );
- Vector3 speaker03position = Commands->Get_Position ( STAR );
- speaker01position.X += Commands->Get_Random(-10,10);
- speaker01position.Y += Commands->Get_Random(-10,10);
- speaker01position.Z += Commands->Get_Random(0,10);
- speaker02position.X += Commands->Get_Random(-10,10);
- speaker02position.Y += Commands->Get_Random(-10,10);
- speaker02position.Z += Commands->Get_Random(0,10);
- speaker03position.X += Commands->Get_Random(-10,10);
- speaker03position.Y += Commands->Get_Random(-10,10);
- speaker03position.Z += Commands->Get_Random(0,10);
- char *cabalSounds[6] =
- {
- //this is a list of potential cabal sayings
- "M11DSGN_DSGN0088I1EVAC_SND",
- "M11DSGN_DSGN0090I1EVAC_SND",
- "M11DSGN_DSGN0091I1EVAC_SND",
- "M11DSGN_DSGN0092I1EVAC_SND",
- "M11DSGN_DSGN0094I1EVAC_SND",
- "M11DSGN_DSGN0096I1EVAC_SND",
- };
- int random = Commands->Get_Random_Int(0, 6);
- while (random == last)
- {
- random = Commands->Get_Random_Int(0, 6);
- }
- Commands->Create_Sound ( cabalSounds[random], speaker01position, obj );
- Commands->Create_Sound ( cabalSounds[random], speaker02position, obj );
- Commands->Create_Sound ( cabalSounds[random], speaker03position, obj );
- float delayTimer = Commands->Get_Random ( 15, 60 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, delayTimer );
- last = random;
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_AblesTomb_TalkZone_JDG, "")//M11_Ables_Tomb_Conversation
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- int able_conv = Commands->Create_Conversation( "M11_Ables_Tomb_Conversation", 100, 2000, false);
- Commands->Join_Conversation( NULL, able_conv, false, false, false );
- Commands->Join_Conversation( STAR, able_conv, false, false, false );
- Commands->Start_Conversation( able_conv, able_conv );
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_Visceroid_JDG, "")//100394 (for now)
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_START_ACTING_JDG );
- params.Set_Movement(STAR, RUN, 1);
- params.Set_Attack( STAR, 2, 0, true );
- params.AttackCheckBlocked = false;
- Commands->Action_Attack ( obj, params );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_Visceroid_KeyCarrier_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- Vector3 spawnLocation = Commands->Get_Position ( obj );
- spawnLocation.Z += 0.75f;
- Commands->Create_Object ( "Level_02_Keycard", spawnLocation );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_START_ACTING_JDG );
- params.Set_Movement(STAR, RUN, 1);
- params.Set_Attack( STAR, 2, 0, true );
- params.AttackCheckBlocked = false;
- Commands->Action_Attack ( obj, params );
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_Visceroid_Morpher_JDG, "")//
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation( "H_A_7002", true );
- Commands->Action_Play_Animation ( obj, params );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Object ( "Visceroid", myPosition );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0.5f );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Commands->Apply_Damage( obj, 10000, "TiberiumRaw", NULL );
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_Script_JDG, "")//Petrova's ID is M11_MUTANT_PETROVA_JDG 100690
- {
- enum LocationEnum {
- UNDEFINED_LOCATION = -1,
- SOUTH0,
- EAST0,
- WEST0,
- EAST1,
- NORTH1,
- WEST1,
- SOUTH2,
- EAST2,
- WEST2
- };
- enum WaypathEnum {
- INITIAL_TO_SOUTH0 = 300325,
- SOUTH0_TO_EAST0 = 300117,
- SOUTH0_TO_WEST0 = 300113,
- EAST0_TO_SOUTH0 = 300149,
- EAST0_TO_WEST0 = 300153,
- EAST0_TO_WEST1 = 300121,
- WEST0_TO_SOUTH0 = 300145,
- WEST0_TO_EAST0 = 300157,
- EAST1_TO_WEST1 = 300201,
- EAST1_TO_WEST2 = 300243,
- NORTH1_TO_WEST1 = 300238,
- WEST1_TO_EAST0 = 300125,
- WEST1_TO_NORTH1 = 300233,
- WEST1_TO_EAST1 = 300193,
- SOUTH2_TO_EAST2 = 300285,
- SOUTH2_TO_WEST2 = 300299,
- EAST2_TO_SOUTH2 = 300281,
- EAST2_TO_WEST2 = 300277,
- WEST2_TO_EAST1 = 300249,
- WEST2_TO_SOUTH2 = 300294,
- WEST2_TO_EAST2 = 300273
- };
- LocationEnum CurrentLocation;
- bool midtro01_over;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE (CurrentLocation, 1);
- SAVE_VARIABLE (midtro01_over, 2);
- }
- void Created (GameObject *obj)
- {
- Commands->Select_Weapon ( obj, NULL );
- midtro01_over = false;
- CurrentLocation = UNDEFINED_LOCATION;
- Commands->Innate_Disable (obj);
- Commands->Enable_Stealth (obj, false);
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation( "S_A_HUMAN.H_A_CON2", true );
- Commands->Action_Play_Animation ( obj, params );
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (midtro01_over == false)
- {
- float myMaxHealth = Commands->Get_Max_Health ( obj );
- float myMaxShield = Commands->Get_Max_Shield_Strength ( obj );
- Commands->Set_Health ( obj, myMaxHealth );
- Commands->Set_Shield_Strength ( obj, myMaxShield );
- GameObject * midtro01Controller = Commands->Find_Object ( 101449 );
- if (midtro01Controller != NULL)
- {
- Commands->Send_Custom_Event ( obj, midtro01Controller, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer ) //
- {
- Vector3 spawn_location (3.6f, 87.9f, -34.2f);
- spawn_location.Z = spawn_location.Z + 0.75f;
- GameObject * keycard = Commands->Create_Object ( "Level_03_Keycard", spawn_location );
- if (keycard != NULL)
- {
- Commands->Attach_Script(keycard, "M11_Level03Key_Script_JDG", "");
- }
- GameObject * tauntController = Commands->Find_Object ( 103797 );
- if (tauntController != NULL)
- {
- Commands->Send_Custom_Event ( obj, tauntController, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Destroy_Object ( stealthController );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- static LocationEnum _locations [][3][2] = {
-
- // Player level Player above Player below.
- {{EAST0 , WEST0}, {EAST0 , WEST0}, {EAST0, EAST0}}, // Destinations from SOUTH0.
- {{SOUTH0, WEST0}, {SOUTH0, WEST0}, {WEST1, WEST1}}, // Destinations from EAST0.
- {{SOUTH0, EAST0}, {SOUTH0, EAST0}, {EAST0, EAST0}}, // Destinations from WEST0.
-
- {{WEST1, WEST1}, {WEST1, WEST1}, {WEST2, WEST2}}, // Destinations from EAST1.
- {{WEST1, WEST1}, {WEST1, WEST1}, {WEST1, WEST1}}, // Destinations from NORTH1.
- {{EAST1, NORTH1}, {EAST0, EAST0}, {EAST1, EAST1}}, // Destinations from WEST1.
-
- {{EAST2, WEST2}, {WEST2, WEST2}, {EAST2, WEST2}}, // Destinations from SOUTH2.
- {{SOUTH2, WEST2}, {WEST2, WEST2}, {SOUTH2, WEST2}}, // Destinations from EAST2.
- {{SOUTH2, EAST2}, {EAST1, EAST1}, {SOUTH2, EAST2}}, // Destinations from WEST2.
- };
- static WaypathEnum _waypaths [][3][2] = {
-
- {{SOUTH0_TO_EAST0, SOUTH0_TO_WEST0}, {SOUTH0_TO_EAST0, SOUTH0_TO_WEST0}, {SOUTH0_TO_EAST0, SOUTH0_TO_EAST0}}, // Waypaths from SOUTH0.
- {{EAST0_TO_SOUTH0, EAST0_TO_WEST0} , {EAST0_TO_SOUTH0, EAST0_TO_WEST0} , {EAST0_TO_WEST1 , EAST0_TO_WEST1}}, // Waypaths from EAST0.
- {{WEST0_TO_SOUTH0, WEST0_TO_EAST0} , {WEST0_TO_SOUTH0, WEST0_TO_EAST0} , {WEST0_TO_EAST0 , WEST0_TO_EAST0}}, // Waypaths from WEST0.
-
- {{EAST1_TO_WEST1, EAST1_TO_WEST1} , {EAST1_TO_WEST1, EAST1_TO_WEST1} , {EAST1_TO_WEST2, EAST1_TO_WEST2}}, // Waypaths from EAST1.
- {{NORTH1_TO_WEST1, NORTH1_TO_WEST1}, {NORTH1_TO_WEST1, NORTH1_TO_WEST1}, {NORTH1_TO_WEST1, NORTH1_TO_WEST1}}, // Waypaths from NORTH1.
- {{WEST1_TO_EAST1, WEST1_TO_NORTH1}, {WEST1_TO_EAST0, WEST1_TO_EAST0}, {WEST1_TO_EAST1, WEST1_TO_EAST1}}, // Waypaths from WEST1.
- {{SOUTH2_TO_EAST2, SOUTH2_TO_WEST2}, {SOUTH2_TO_WEST2, SOUTH2_TO_WEST2}, {SOUTH2_TO_EAST2, SOUTH2_TO_WEST2}}, // Waypaths from SOUTH2.
- {{EAST2_TO_SOUTH2, EAST2_TO_WEST2} , {EAST2_TO_WEST2, EAST2_TO_WEST2} , {EAST2_TO_SOUTH2, EAST2_TO_WEST2}}, // Waypaths from EAST2.
- {{WEST2_TO_SOUTH2, WEST2_TO_EAST2} , {WEST2_TO_EAST1, WEST2_TO_EAST1} , {WEST2_TO_SOUTH2, WEST2_TO_EAST2}} // Waypaths from WEST2.
- };
- ActionParamsStruct params;
- if (type == 0)
- {
- switch (param)
- {
- case M11_PETROVA_START_ACTING_JDG:
- {
- GameObject * tauntController = Commands->Find_Object ( 103797 );
- if (tauntController != NULL)
- {
- Commands->Send_Custom_Event ( obj, tauntController, 0, M01_START_ACTING_JDG, 0 );
- }
- Vector3 myPosition = Commands->Get_Position ( obj );
- //Commands->Create_Logical_Sound (obj, M11_STEALTHS_START_ACTING_JDG, myPosition, 150 );
- midtro01_over = true;
- Commands->Enable_Stealth (obj, true);
- Commands->Select_Weapon ( obj, "Weapon_TiberiumAutoRifle_Ai" );
- const float priority = 100.0f;
- const float normalizedspeed = 2.0f; // Maximum speed.
- Commands->Debug_Message ( "***************************Petrova--received custom to start acting\n" );
- params.Set_Basic (this, priority, M11_PETROVA_PICK_NEW_LOCATION_JDG);
- params.Set_Movement (Vector3 (0.0f, 0.0f, 0.0f), normalizedspeed, 1.0f);
- params.WaypathID = INITIAL_TO_SOUTH0;
- Commands->Action_Goto (obj, params);
- CurrentLocation = SOUTH0;
- break;
- }
- case M11_PETROVA_PICK_NEW_LOCATION_JDG:
- {
- const float heightthreshold = 1.0f;
- const float priority = 100.0f;
-
- float heightdelta;
- unsigned heightselector;
- int binaryselector;
- heightdelta = Commands->Get_Position (STAR).Z - Commands->Get_Position (obj).Z;
- if (heightdelta < -heightthreshold) {
- heightselector = 2; // Player is below Petrova.
- } else {
- if (heightdelta > heightthreshold) {
- heightselector = 1; // Player is above Petrova.
- } else {
- heightselector = 0; // Player is level with Petrova.
- }
- }
- binaryselector = Commands->Get_Random_Int (0, 2);
- params.Set_Basic (this, priority, M11_PETROVA_PICK_NEW_LOCATION_JDG);
- params.Set_Movement (Vector3 (0.0f, 0.0f, 0.0f), RUN, 1.0f);
- params.WaypathID = _waypaths [CurrentLocation][heightselector][binaryselector];
- Commands->Action_Goto (obj, params);
- CurrentLocation = _locations [CurrentLocation][heightselector][binaryselector];
- break;
- }
- case M11_PETROVA_ATTACK_PLAYER_JDG:
- {
- const float priority = 100.0f;
- const float range = 300.0f;
- const float error = 0.0f;
- const float attackdelay = 0.25f;
- const float pickdelay = 0.25f;
-
- params.Set_Basic (this, priority, M11_PETROVA_ATTACK_PLAYER_JDG);
- params.Set_Attack (STAR, range, error, false);
- Commands->Action_Attack (obj, params);
- if (Commands->Is_Object_Visible (obj, STAR)) {
- Commands->Send_Custom_Event (obj, obj, 0, M11_PETROVA_ATTACK_PLAYER_JDG, attackdelay);
- } else {
- Commands->Send_Custom_Event (obj, obj, 0, M11_PETROVA_PICK_NEW_LOCATION_JDG, pickdelay);
- }
- break;
- }
- default:
- break;
- }
- }
- }
- void Action_Complete (GameObject *obj, int actionid, ActionCompleteReason completereason)
- {
- switch (completereason) {
- case ACTION_COMPLETE_NORMAL:
- {
- if (actionid == M11_PETROVA_PICK_NEW_LOCATION_JDG) {
-
- const float priority = 100.0f;
- const float turnduration = 1.0f;
- ActionParamsStruct params;
- params.Set_Basic (this, priority, M11_PETROVA_FACE_PLAYER_IML);
- params.Set_Face_Location (Commands->Get_Position (STAR), turnduration);
- Commands->Action_Face_Location (obj, params);
-
- } else {
- if (actionid == M11_PETROVA_FACE_PLAYER_IML) {
- Commands->Send_Custom_Event (obj, obj, 0, M11_PETROVA_ATTACK_PLAYER_JDG, 0.0f);
- }
- }
- break;
- }
-
- default:
- // Do nothing.
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Level03Key_Script_JDG, "")
- {
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if ( type == CUSTOM_EVENT_POWERUP_GRANTED )
- {
- GameObject * midtro01Controller = Commands->Find_Object ( 101449 );
- if (midtro01Controller != NULL)
- {
- Commands->Send_Custom_Event ( obj, midtro01Controller, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Okay_ToPlay_MidtroZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * midtro01Controller = Commands->Find_Object ( 101449 );
- if (midtro01Controller != NULL)
- {
- Commands->Send_Custom_Event ( obj, midtro01Controller, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- }
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Start_FirstMidtro_Zone_JDG, "")//101449
- {
- bool entered;
- bool command_clearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(entered, 1);
- SAVE_VARIABLE(command_clearance, 2);
- }
- void Created( GameObject * obj )
- {
- entered = false;
- command_clearance = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- if (entered == false && command_clearance == true)
- {
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == 0)//first midtro is over--set everyone back to visible
- {
- Commands->Set_Position ( STAR, Vector3(-2.124f, 84.915f, -34.233f) );
- Commands->Set_Facing ( STAR, 87 );
- Commands->Control_Enable ( STAR, true );
- Commands->Set_Is_Rendered( STAR, true );
- GameObject *petrova = Commands->Find_Object ( M11_MUTANT_PETROVA_JDG );
- if (petrova != NULL)
- {
- Commands->Set_Is_Rendered( petrova, true );
- Commands->Send_Custom_Event( obj, petrova, 0, M11_PETROVA_START_ACTING_JDG, 0 );
- }
-
- GameObject *mutant01 = Commands->Find_Object ( 101964 );
- GameObject *mutant02 = Commands->Find_Object ( 101997 );
- //GameObject *visceroid01 = Commands->Find_Object ( 101966 );
- //GameObject *visceroid02 = Commands->Find_Object ( 101996 );
- //GameObject *visceroid03 = Commands->Find_Object ( 101965 );
- if (mutant01 != NULL)
- {
- Commands->Send_Custom_Event( obj, mutant01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (mutant02 != NULL)
- {
- Commands->Send_Custom_Event( obj, mutant02, 0, M01_START_ACTING_JDG, 3 );
- }
- GameObject * visceroid01 = Commands->Find_Object (101995);
- GameObject * visceroid02 = Commands->Find_Object (101996);
- if (visceroid01 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid01, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- if (visceroid02 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid02, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- /*if (visceroid01 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid01, 0, M01_START_ACTING_JDG, 0 );
- }
- if (visceroid02 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid02, 0, M01_START_ACTING_JDG, 3 );
- }
- if (visceroid03 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid03, 0, M01_START_ACTING_JDG, 5 );
- }*/
- }
- else if (param == 1)//second midtro is over--set everyone back to visible
- {
- GameObject * simpleSydney = Commands->Find_Object (M11_SIMPLE_SYDNEY_MOBIUS_JDG);
- if (simpleSydney != NULL)
- {
- Vector3 sydnesLocation (0.084f, 91.860f, -34.233f);
- GameObject * realSydney = Commands->Find_Object (M11_REAL_SYDNEY_MOBIUS_JDG);
- if (realSydney != NULL)
- {
- Commands->Set_Shield_Strength ( realSydney, 100 );
- Commands->Set_Obj_Radar_Blip_Shape (realSydney, RADAR_BLIP_SHAPE_HUMAN );
- Commands->Set_Obj_Radar_Blip_Color ( realSydney, RADAR_BLIP_COLOR_GDI );
- Commands->Set_Is_Visible( realSydney, true );
- Commands->Set_Is_Rendered( realSydney, true );
- Commands->Set_Position ( realSydney, sydnesLocation );
- Commands->Send_Custom_Event( obj, realSydney, 0, M01_START_ACTING_JDG, 0.5f );
- }
- Commands->Destroy_Object ( simpleSydney );//get rid of simple version of Sydney
- }
- Commands->Set_Position ( STAR, Vector3(2.2f, 91.8f, -34.2f) );
- Commands->Set_Facing ( STAR, 127 );
- Commands->Control_Enable ( STAR, true );
- Commands->Set_Is_Rendered( STAR, true );
- }
- else if (param == M01_START_ACTING_JDG && entered == false && command_clearance == true)
- {
- entered = true;
- GameObject *petrova = Commands->Find_Object ( M11_MUTANT_PETROVA_JDG );
- if (petrova != NULL)
- {
- Commands->Set_Is_Rendered( petrova, false );
- }
- GameObject *controller = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(controller, "Test_Cinematic", "X11M_MIDTRO.txt");
- Commands->Control_Enable ( STAR, false );
- Commands->Set_Is_Rendered( STAR, false );
- Commands->Set_Position ( STAR, Vector3(-2.124f, 84.915f, -34.233f) );
- Commands->Set_Facing ( STAR, 87 );
- Commands->Static_Anim_Phys_Goto_Frame ( 1300001124, 6, "SHP_DOORP01.SHP_DOORP01" );
- Commands->Static_Anim_Phys_Goto_Frame ( 1300001123, 6, "SHP_DOORP01.SHP_DOORP01" );
- GameObject * visceroid01 = Commands->Find_Object (101995);
- GameObject * visceroid02 = Commands->Find_Object (101996);
- if (visceroid01 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid01, 0, M01_START_ACTING_JDG, 5 );
- }
- if (visceroid02 != NULL)
- {
- Commands->Send_Custom_Event( obj, visceroid02, 0, M01_START_ACTING_JDG, 5 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- Commands->Control_Enable ( STAR, false );
- Commands->Set_Is_Rendered( STAR, false );
- GameObject *controller = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(controller, "Test_Cinematic", "X11N_MIDTRO.txt");
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- command_clearance = true;
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_PowerCore_TriggerPetrova_EnterZone_JDG, "")
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR)
- {
- GameObject * petrova = Commands->Find_Object (M11_MUTANT_PETROVA_JDG);
- if (petrova != NULL)
- {
- Commands->Debug_Message ( "***************************M11-Petrova trigger zone sending custom to petrova--jdg\n" );
- Commands->Send_Custom_Event( obj, petrova, 0, M11_PETROVA_START_ACTING_JDG, 0 );
- Commands->Destroy_Object ( obj );//one time zone--cleaning up
- }
- else
- {
- Commands->Debug_Message ( "***************************M11-Petrova trigger zone cannot find petrova--jdg\n" );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_MutantUprising_BlackhandGuy_JDG, "")//M11_BARRACKS_MUTANTUPRISING_BLACKHAND_JDG 100387
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- GameObject * mutant01 = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_MUTANT01_JDG );
- if (mutant01 != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 45, M01_START_ATTACKING_01_JDG);
- params.Set_Attack( mutant01, 50, 0, true );
- params.AttackCrouched = true;
- Commands->Action_Attack ( obj, params );
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- switch (complete_reason)
- {
- case ACTION_COMPLETE_NORMAL:
- {
- if (action_id == M01_START_ATTACKING_01_JDG)
- {
- GameObject * mutant02 = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_MUTANT02_JDG );
- if (mutant02 != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 45, M01_START_ATTACKING_02_JDG);
- params.Set_Attack( mutant02, 50, 0, true );
- params.AttackCrouched = true;
- Commands->Action_Attack ( obj, params );
- }
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_MutantUprising_Mutant01_JDG, "")//M11_BARRACKS_MUTANTUPRISING_MUTANT01_JDG 100388
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- GameObject * blackhand = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_BLACKHAND_JDG );
- if (blackhand != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 45, M01_GOING_TO_HAVOC_JDG);
- params.Set_Movement( blackhand, RUN, 0.5f, false );
- params.Set_Attack( blackhand, 0.5f, 0, true );
- Commands->Action_Attack ( obj, params );
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Barracks_MutantUprising_Mutant02_JDG, "")//M11_BARRACKS_MUTANTUPRISING_MUTANT02_JDG 100389
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Innate_Enable(obj);
- GameObject * blackhand = Commands->Find_Object ( M11_BARRACKS_MUTANTUPRISING_BLACKHAND_JDG );
- if (blackhand != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 45, M01_GOING_TO_HAVOC_JDG);
- params.Set_Movement( blackhand, RUN, 0.5f, false );
- params.Set_Attack( blackhand, 0.5f, 0, true );
- Commands->Action_Attack ( obj, params );
- char *soundName = M11_Choose_Mutant_Attack_Sound ( );
- Vector3 myPosition = Commands->Get_Position ( obj );
- Commands->Create_Sound ( soundName, myPosition, obj );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Flyover_Contoller_JDG, "")
- {
- int last;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(last, 1);
- }
-
- void Created(GameObject * obj)
- {
- Commands->Start_Timer(obj, this, 5.0f, 0);
- last = 0;
- }
- void Timer_Expired(GameObject * obj, int timer_id)
- {
- if (last >= 4)
- {
- last = 0;
- }
- char *flyovers[4] =
- {
- //this is a low level traffic lane from nod comm to gdi ocean-- N->S
- "X11A_Flyover_01.txt",
- "X11A_Flyover_02.txt",
- "X11A_Flyover_03.txt",
- "X11A_Flyover_04.txt",
- };
- GameObject *controller = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
- Commands->Attach_Script(controller, "Test_Cinematic", flyovers[last]);
- Commands->Start_Timer(obj, this, 10, 5);
- last++;
-
- }
- };
- DECLARE_SCRIPT(M11_Cinematic_Havoc_Script_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Select_Weapon ( obj, NULL );
- }
- };
- DECLARE_SCRIPT(M11_Cinematic_Petrova_Script_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Stealth (obj, false);
- Commands->Select_Weapon ( obj, NULL );
- }
- };
- DECLARE_SCRIPT(M11_Sydney_SandM_Machine_Script_JDG, "")//157366
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Cinematic_Freeze( obj, false );
- Commands->Set_Animation ( obj, "DSP_TORTURE.DSP_TORTURE_01", true );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == 0)//DO FREE SYDNEY ANIM
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Enable_Cinematic_Freeze( obj, false );
- Commands->Set_Animation ( obj, "DSP_TORTURE.DSP_TORTURE_02", false );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_SandM_Chair_Script_JDG, "")//101606
- {
- void Created( GameObject * obj )
- {
- //Commands->Enable_Hibernation( obj, false );
- Commands->Enable_Cinematic_Freeze( obj, false );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == 0)//DO FREE SYDNEY ANIM
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Enable_Cinematic_Freeze( obj, false );
- Commands->Set_Animation ( obj, "DSP_TORTURE_TBL.DSP_TORTURE_T01", false );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_SandM_Wall_Script_JDG, "")//101607
- {
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == 0)//wall goes away
- {
- Commands->Destroy_Object ( obj );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_SandM_Sydney_Bone_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Cinematic_Freeze( obj, false );
- //Commands->Enable_Hibernation( obj, false );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)//play animation A
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Debug_Message ( "**********************Sydney bone custom received....going to anim A\n" );
- Commands->Set_Animation ( obj, "X11C_BN_Sydney.X11C_SYD_A", false);
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)//play animation B
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Debug_Message ( "**********************Sydney bone custom received....going to anim B\n" );
- Commands->Set_Animation ( obj, "X11C_BN_Sydney.X11C_SYD_B", false);
- }
- else if (param == M01_MODIFY_YOUR_ACTION_03_JDG)//play animation c
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Debug_Message ( "**********************Sydney bone custom received....going to anim C\n" );
- Commands->Set_Animation ( obj, "X11C_BN_Sydney.X11C_SYD_C", false);
- }
- else if (param == M01_MODIFY_YOUR_ACTION_04_JDG)//play animation d
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Debug_Message ( "**********************Sydney bone custom received....going to anim D\n" );
- Commands->Set_Animation ( obj, "X11C_BN_Sydney.X11C_SYD_D", false);
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_SimpleSydney_Script_JDG, "")//M11_SIMPLE_SYDNEY_MOBIUS_JDG 100697
- {
- int bone_id;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(bone_id, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Cinematic_Freeze( obj, false );
- GameObject * tortureMachine = Commands->Find_Object ( 157366 );
- if (tortureMachine != NULL)
- {
- Vector3 machinePosition = Commands->Get_Position ( tortureMachine );
- float machineFacing = Commands->Get_Facing ( tortureMachine );
- GameObject * troopbone = Commands->Create_Object("Invisible_Object", machinePosition );
- Commands->Set_Model ( troopbone, "X11C_BN_Sydney" );
- Commands->Set_Facing ( troopbone, machineFacing );
- Commands->Attach_Script(troopbone, "M11_Sydney_SandM_Sydney_Bone_JDG", "");
- bone_id = Commands->Get_ID ( troopbone );
- Commands->Attach_To_Object_Bone( obj, troopbone, "BN_SYDNEY" );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- Commands->Debug_Message ( "**********************bone created with ID....................%d\n", bone_id );
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == 0)//now do free sydney anim
- {
- GameObject * troopbone = Commands->Find_Object ( bone_id );
- if (troopbone != NULL)
- {
- Commands->Debug_Message ( "**********************Sydney anim D sending custom to bone\n" );
- Commands->Send_Custom_Event ( obj, troopbone, 0, M01_MODIFY_YOUR_ACTION_04_JDG, 0 );
- Commands->Set_Animation ( obj, "S_B_HUMAN.H_B_X11C_SYD_D", false);
- }
- else
- {
- Commands->Debug_Message ( "**********************Sydney anim D cannot find bone\n" );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)//play animation A
- {
- GameObject * troopbone = Commands->Find_Object ( bone_id );
- if (troopbone != NULL)
- {
- Commands->Debug_Message ( "**********************Sydney anim A sending custom to bone\n" );
- Commands->Send_Custom_Event ( obj, troopbone, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- Commands->Set_Animation ( obj, "S_B_HUMAN.H_B_X11C_SYD_A", false);
- }
- else
- {
- Commands->Debug_Message ( "**********************Sydney anim A cannot find bone\n" );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)//play animation B
- {
- GameObject * troopbone = Commands->Find_Object ( bone_id );
- if (troopbone != NULL)
- {
- Commands->Debug_Message ( "**********************Sydney anim B sending custom to bone\n" );
- Commands->Send_Custom_Event ( obj, troopbone, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- Commands->Set_Animation ( obj, "S_B_HUMAN.H_B_X11C_SYD_B", false);
- }
- else
- {
- Commands->Debug_Message ( "**********************Sydney anim B cannot find bone\n" );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_03_JDG)//play animation c
- {
- GameObject * troopbone = Commands->Find_Object ( bone_id );
- if (troopbone != NULL)
- {
- Commands->Debug_Message ( "**********************Sydney anim C sending custom to bone\n" );
- Commands->Send_Custom_Event ( obj, troopbone, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 0 );
- Commands->Set_Animation ( obj, "S_B_HUMAN.H_B_X11C_SYD_C", false);
- }
- else
- {
- Commands->Debug_Message ( "**********************Sydney anim C cannot find bone\n" );
- }
- }
- //else if (param == M01_MODIFY_YOUR_ACTION_04_JDG)//play animation d
- //{
-
- //}
- }
- }
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "S_B_HUMAN.H_B_X11C_SYD_A") == 0)
- {
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- }
- else if (stricmp(anim, "S_B_HUMAN.H_B_X11C_SYD_B") == 0)
- {
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 0 );
- }
- else if (stricmp(anim, "S_B_HUMAN.H_B_X11C_SYD_C") == 0)
- {
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (stricmp(anim, "S_B_HUMAN.H_B_X11C_SYD_D") == 0)
- {
- //Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- };
- Vector3 m11ObeliskExplosionLocs[13] = {
- Vector3 (-10.432f, -96.805f, 4.504f),
- Vector3 (-15.732f, -106.739f, 10.572f),
- Vector3 (0.665f, -105.108f, 8.224f),
- Vector3 (14.913f, -99.565f, 4.977f),
- Vector3 (33.114f, -103.768f, 7.549f),
- Vector3 (34.822f, -114.184f, 12.776f),
- Vector3 (24.790f, -116.226f, 13.617f),
- Vector3 (12.581f, -111.634f, 11.247f),
- Vector3 (-5.196f, -116.416f, 13.689f),
- Vector3 (-9.931f, -136.410f, 18.047f),
- Vector3 (8.336f, -122.921f, 21.475f),
- Vector3 (12.898f, -123.847f, 27.640f),
- Vector3 (6.441f, -125.543f, 36.824f),
- };
- DECLARE_SCRIPT(M11_ObeliskBattle_Contoller_JDG, "")//101805
- {
- int last;
- bool commandClearance;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( last, 1 );
- SAVE_VARIABLE( commandClearance, 2 );
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- commandClearance = true;
- float delayTimer = Commands->Get_Random ( 0, 5 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ATTACKING_01_JDG, delayTimer );
- last = 20;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_GOTO_IDLE_JDG)
- {
- commandClearance = false;
- Commands->Enable_Hibernation( obj, true );
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- Commands->Enable_Hibernation( obj, false );
- float delayTimer = Commands->Get_Random ( 0, 5 );
- Commands->Start_Timer(obj, this, delayTimer, 0);
- }
- else if (param == M01_START_ATTACKING_01_JDG)
- {
- if (commandClearance == true)
- {
- int random = Commands->Get_Random_Int(0, 13);
-
- while (random == last) {
- random = Commands->Get_Random_Int(0, 13);
- }
- last = random;
- Commands->Create_Explosion ( "Ground Explosions - Harmless", m11ObeliskExplosionLocs[random], NULL );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ATTACKING_01_JDG, delayTimer );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Cell_Mutant01_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Innate_Disable(obj);
- Commands->Set_Loiters_Allowed( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation( "S_A_HUMAN.H_A_7002", true );
- Commands->Action_Play_Animation ( obj, params );
- Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_NOD );
- Commands->Set_Obj_Radar_Blip_Color ( obj, RADAR_BLIP_COLOR_MUTANT );
- }
- };
- DECLARE_SCRIPT(M11_Cell_Mutant02_JDG, "")
- {
- void Created( GameObject * obj )
- {
- Commands->Set_Loiters_Allowed( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("H_A_A0A0_L28B", true);
- Commands->Action_Play_Animation (obj, params);
- Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_NOD );
- Commands->Set_Obj_Radar_Blip_Color ( obj, RADAR_BLIP_COLOR_MUTANT );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_02_JDG );
- params.Set_Animation ("H_A_A0A0_L28C", false);
- Commands->Action_Play_Animation (obj, params);
- //Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_MUTANT );
- //Commands->Set_Obj_Radar_Blip_Color ( obj, RADAR_BLIP_COLOR_MUTANT );
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (action_id == M01_DOING_ANIMATION_02_JDG)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_01_JDG);
- params.Set_Movement(Vector3 (0, 0, 0), RUN, 3);
- params.WaypathID = 104142;
- Commands->Action_Goto(obj, params);
- }
- else if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- GameObject * petrova = Commands->Find_Object ( M11_MUTANT_PETROVA_JDG );
- if (petrova != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_01_JDG);
- params.Set_Movement(petrova, RUN, 15);
- params.Set_Attack( petrova, 20, 0, true );
- Commands->Action_Attack(obj, params);
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Cell_Visceroid_JDG, "")
- {
- bool deadYet;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE( deadYet, 1 );
- }
- void Created( GameObject * obj )
- {
- deadYet = false;
- Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_NOD );
- Commands->Set_Obj_Radar_Blip_Color ( obj, RADAR_BLIP_COLOR_MUTANT );
- //Commands->Enable_Cinematic_Freeze( obj, false );
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- deadYet = true;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (param == M01_START_ACTING_JDG)
- {
- //Commands->Set_Player_Type ( obj, SCRIPT_PLAYERTYPE_MUTANT );
- //Commands->Set_Obj_Radar_Blip_Color ( obj, RADAR_BLIP_COLOR_MUTANT );
-
-
- int myId = Commands->Get_ID ( obj );
- if (myId == 101995 && deadYet == false)
- {
- Vector3 warpSpot (-4.544f, 86.890f, -34);
- Commands->Set_Position ( obj, warpSpot );
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_01_JDG);
- //params.Set_Movement(Vector3 (-10.635f, 68.057f, -34.233f), RUN, 1);
- //making first change here...run to walk
- Commands->Action_Goto(obj, params);
- params.Set_Movement(Vector3 (-10.635f, 68.057f, -34.233f), WALK, 1);
- }
- else if (myId == 101996 && deadYet == false)
- {
- //Vector3 warpSpot (-2.457f, 84, -34);
- //change 2 going here
- Vector3 warpSpot (-7.272f, 77.365f, -34);
- Commands->Set_Position ( obj, warpSpot );
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_01_JDG);
- //params.Set_Movement(Vector3 (10.745f, 66.866f, -34.233f), RUN, 1);
- //making first change here...run to walk
- params.Set_Movement(Vector3 (10.745f, 66.866f, -34.233f), WALK, 1);
- Commands->Action_Goto(obj, params);
- }
-
- Commands->Enable_Cinematic_Freeze( obj, true );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- GameObject * petrova = Commands->Find_Object ( M11_MUTANT_PETROVA_JDG );
- if (petrova != NULL)
- {
- ActionParamsStruct params;
- params.Set_Basic(this, 100, M01_WALKING_WAYPATH_01_JDG);
- params.Set_Movement(petrova, RUN, 4);
- params.Set_Attack( petrova, 10, 0, true );
- Commands->Action_Attack(obj, params);
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- if (complete_reason == ACTION_COMPLETE_NORMAL)
- {
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- Commands->Set_Innate_Is_Stationary ( obj, true );
-
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_PowerupDifficulty_Manager_JDG, "")
- {
- void Created( GameObject * obj )
- {
- int easy = 0;
- int medium = 1;
- int currentDifficulty = Commands->Get_Difficulty_Level( );
- if (currentDifficulty == easy)
- {
- Commands->Create_Object ( "POW_SniperRifle_Player", Vector3(17.778f, -41.716f, 0.000f) );
- Commands->Create_Object ( "POW_SniperRifle_Player", Vector3(-17.799f, -41.177f, 0.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-11.209f, -16.475f, 0.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(10.747f, -16.773f, 0.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-3.467f, -33.332f, -10.015f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(3.651f, -33.292f, -10.015f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(1.954f, 19.875f, -18.000f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-1.897f, 20.016f, -18.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(12.768f, 5.348f, -24.531f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-13.378f, 5.055f, -24.531f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(7.661f, -17.279f, -29.855f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-8.177f, -17.193f, -29.855f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(2.911f, -32.665f, -34.789f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-1.058f, -32.588f, -34.789f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-14.646f, 40.156f, 0.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(15.466f, 40.827f, 0.000f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(7.671f, 23.377f, 1.594f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-8.166f, 23.366f, 1.256f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(6.072f, 13.298f, -10.015f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-6.474f, 13.163f, -10.015f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-9.831f, -17.845f, -18.000f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(9.240f, -17.551f, -18.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-3.556f, 16.234f, -24.531f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(3.966f, 15.895f, -24.530f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-10.515f, 33.298f, -29.855f) );
- Commands->Create_Object ( "POW_SniperRifle_Player", Vector3(10.585f, 31.592f, -29.855f) );
- Commands->Create_Object ( "POW_MineRemote_Player", Vector3(1.538f, -15.786f, -29.855f) );
- Commands->Create_Object ( "POW_MineRemote_Player", Vector3(-0.604f, -15.760f, -29.855f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-13.821f, 8.995f, -34.233f) );
- //Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-13.821f, 8.995f, -34.233f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(14.085f, 9.259f, -34.233f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(19.320f, 17.879f, -39.484f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-19.301f, 17.910f, -39.484f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-12.110f, 54.177f, -39.486f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(11.853f, 54.077f, -39.486f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(96.844f, 51.430f, -62.686f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(94.033f, 43.255f, -62.686f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(27.027f, 60.014f, -55.106f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(14.259f, 58.072f, -53.022f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(3.860f, 98.276f, -34.233f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-3.987f, 97.681f, -34.233f) );
- Commands->Enable_Spawner( 102364, true );//lev 01 health
- Commands->Enable_Spawner( 102367, true );//lev 01 armor
- Commands->Enable_Spawner( 102370, true );//netrunner health
- Commands->Enable_Spawner( 102373, true );//netrunner armor
- Commands->Enable_Spawner( 102378, true );//wetbar armor
- Commands->Enable_Spawner( 102381, true );//wetbar health
- Commands->Enable_Spawner( 102384, true );//warroom armor
- Commands->Enable_Spawner( 102387, true );//warroom health
- Commands->Enable_Spawner( 102390, true );//mutant lab armor
- Commands->Enable_Spawner( 102393, true );//mutant lab health
- Commands->Enable_Spawner( 102396, true );//mutant crypt health01
- Commands->Enable_Spawner( 102399, true );//mutant crypt armor01
- Commands->Enable_Spawner( 102402, true );//mutant crypt health02
- Commands->Enable_Spawner( 102405, true );//mutant crypt health03
- Commands->Enable_Spawner( 102408, true );//mutant crypt armor02
- Commands->Enable_Spawner( 102411, true );//abel's tomb armor
- Commands->Enable_Spawner( 102414, true );//abel's tomb health
- Commands->Enable_Spawner( 102417, true );//powercore bottom health
- Commands->Enable_Spawner( 102420, true );//powercore bottom armor
- Commands->Enable_Spawner( 102423, true );//powercore top health
- Commands->Enable_Spawner( 102426, true );//powercore top armor
- Commands->Enable_Spawner( 102429, true );//powercore center health
- Commands->Enable_Spawner( 102432, true );//powercore center armor
- }
- else if (currentDifficulty == medium)
- {
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-14.646f, 40.156f, 0.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(15.466f, 40.827f, 0.000f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(7.671f, 23.377f, 1.594f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-8.166f, 23.366f, 1.256f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(6.072f, 13.298f, -10.015f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-6.474f, 13.163f, -10.015f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-9.831f, -17.845f, -18.000f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(9.240f, -17.551f, -18.000f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-3.556f, 16.234f, -24.531f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(3.966f, 15.895f, -24.530f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-10.515f, 33.298f, -29.855f) );
- Commands->Create_Object ( "POW_SniperRifle_Player", Vector3(10.585f, 31.592f, -29.855f) );
- Commands->Create_Object ( "POW_MineRemote_Player", Vector3(1.538f, -15.786f, -29.855f) );
- Commands->Create_Object ( "POW_MineRemote_Player", Vector3(-0.604f, -15.760f, -29.855f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-13.821f, 8.995f, -34.233f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(-13.821f, 8.995f, -34.233f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(14.085f, 9.259f, -34.233f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(19.320f, 17.879f, -39.484f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-19.301f, 17.910f, -39.484f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-12.110f, 54.177f, -39.486f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(11.853f, 54.077f, -39.486f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(96.844f, 51.430f, -62.686f) );
- Commands->Create_Object ( "POW_RocketLauncher_Player", Vector3(94.033f, 43.255f, -62.686f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(27.027f, 60.014f, -55.106f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(14.259f, 58.072f, -53.022f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(3.860f, 98.276f, -34.233f) );
- Commands->Create_Object ( "POW_LaserChaingun_Player", Vector3(-3.987f, 97.681f, -34.233f) );
- Commands->Enable_Spawner( 102360, true );//lev 01 health
- Commands->Enable_Spawner( 102366, true );//lev 01 armor
- Commands->Enable_Spawner( 102369, true );//netrunner health
- Commands->Enable_Spawner( 102372, true );//netrunner armor
- Commands->Enable_Spawner( 102377, true );//wetbar armor
- Commands->Enable_Spawner( 102380, true );//wetbar health
- Commands->Enable_Spawner( 102383, true );//warroom armor
- Commands->Enable_Spawner( 102386, true );//warroom health
- Commands->Enable_Spawner( 102389, true );//mutant lab armor
- Commands->Enable_Spawner( 102392, true );//mutant lab health
- Commands->Enable_Spawner( 102395, true );//mutant crypt health01
- Commands->Enable_Spawner( 102398, true );//mutant crypt armor01
- Commands->Enable_Spawner( 102401, true );//mutant crypt health02
- Commands->Enable_Spawner( 102404, true );//mutant crypt health03
- Commands->Enable_Spawner( 102407, true );//mutant crypt armor02
- Commands->Enable_Spawner( 102410, true );//abel's tomb armor
- Commands->Enable_Spawner( 102413, true );//abel's tomb health
- Commands->Enable_Spawner( 102416, true );//powercore bottom health
- Commands->Enable_Spawner( 102419, true );//powercore bottom armor
- Commands->Enable_Spawner( 102422, true );//powercore top health
- Commands->Enable_Spawner( 102425, true );//powercore top armor
- Commands->Enable_Spawner( 102428, true );//powercore center health
- Commands->Enable_Spawner( 102431, true );//powercore center armor
- }
- else
- {
- Commands->Enable_Spawner( 102359, true );//lev 01 health
- Commands->Enable_Spawner( 102365, true );//lev 01 armor
- Commands->Enable_Spawner( 102368, true );//netrunner health
- Commands->Enable_Spawner( 102371, true );//netrunner armor
- Commands->Enable_Spawner( 102376, true );//wetbar armor
- Commands->Enable_Spawner( 102379, true );//wetbar health
- Commands->Enable_Spawner( 102382, true );//warroom armor
- Commands->Enable_Spawner( 102385, true );//warroom health
- Commands->Enable_Spawner( 102388, true );//mutant lab armor
- Commands->Enable_Spawner( 102391, true );//mutant lab health
- Commands->Enable_Spawner( 102394, true );//mutant crypt health01
- Commands->Enable_Spawner( 102397, true );//mutant crypt armor01
- Commands->Enable_Spawner( 102400, true );//mutant crypt health02
- Commands->Enable_Spawner( 102403, true );//mutant crypt health03
- Commands->Enable_Spawner( 102406, true );//mutant crypt armor02
- Commands->Enable_Spawner( 102409, true );//abel's tomb armor
- Commands->Enable_Spawner( 102412, true );//abel's tomb health
- Commands->Enable_Spawner( 102415, true );//powercore bottom health
- Commands->Enable_Spawner( 102418, true );//powercore bottom armor
- Commands->Enable_Spawner( 102421, true );//powercore top health
- Commands->Enable_Spawner( 102424, true );//powercore top armor
- Commands->Enable_Spawner( 102427, true );//powercore center health
- Commands->Enable_Spawner( 102430, true );//powercore center armor
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_Taunt_Controller_JDG, "")//103797
- {
- bool commandClearance;
- bool PetrovaDead;
- int last;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(commandClearance, 1);
- SAVE_VARIABLE(PetrovaDead, 2);
- SAVE_VARIABLE(last, 2);
- }
- void Created( GameObject * obj )
- {
- commandClearance = false;
- PetrovaDead = false;
- last = 20;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_IVE_BEEN_KILLED_JDG)
- {
- PetrovaDead = true;
- }
- else if (param == M01_START_ACTING_JDG)
- {
- commandClearance = true;
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG && commandClearance == true && PetrovaDead == false)
- {
- char *taunt_sound[9] =
- {
- "M00MBPT_ATOC0001I1MBPT_SND",
- "M00MBPT_ATOS0001I1MBPT_SND",
- "M00MBPT_DECX0001I1MBPT_SND",
- "M00MBPT_TFEA0001I1MBPT_SND",
- "M00ASQR_KILL0018I1MBPT_SND",
- "M00GSEN_KIOV0004I1MBPT_SND",
- "M00GCTK_KIOV0004I1MBPT_SND",
- "M00GSRS_KITB0004I1MBPT_SND",
- "M00GSRS_KITB0004I1MBPT_SND",
- };
- int random = Commands->Get_Random_Int(0, 9);
-
- while (random == last) {
- random = Commands->Get_Random_Int(0, 9);
- }
- GameObject * petrova = Commands->Find_Object ( M11_MUTANT_PETROVA_JDG );
- if (petrova != NULL)
- {
- Vector3 petrovaLocation = Commands->Get_Position ( petrova );
- Commands->Create_Sound ( taunt_sound[random], petrovaLocation, petrova );
- float delayTimer = Commands->Get_Random ( 5, 10 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Lab_Cryochamber_Switch02_JDG, "")
- {
- bool poked;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(poked, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 0 );//green
- poked = false;
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if ( poker == STAR && poked == false)
- {
- Commands->Enable_HUD_Pokable_Indicator ( obj, false );
- poked = true;
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- //Commands->Create_Sound ( "bombit1", Vector3 (0,0,0), obj );
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- }
- }
- };
- Vector3 m11cryoChamberLocs[15] = {
- Vector3(-17.385f, 34.254f, -39.486f),
- Vector3(-17.373f, 40.853f, -39.486f),
- Vector3(-17.362f, 50.281f, -39.486f),
- Vector3(-17.377f, 56.349f, -39.486f),
- Vector3(-9.668f, 59.078f, -39.486f),
- Vector3(-7.215f, 54.836f, -39.486f),
- Vector3(-5.012f, 48.971f, -39.486f),
- Vector3(-5.669f, 44.153f, -39.486f),
- Vector3(4.735f, 30.950f, -39.486f),
- Vector3(6.117f, 43.680f, -39.486f),
- Vector3(5.037f, 49.157f, -39.486f),
- Vector3(5.849f, 52.512f, -39.486f),
- Vector3(8.617f, 57.247f, -39.486f),
- Vector3(17.392f, 55.537f, -39.486f),
- Vector3(17.386f, 44.152f, -39.486f),
- };
- float cryoChamberFacing[15] = {
- 90,
- 90,
- 90,
- 90,
- -60,
- -60,
- -90,
- -135,
- 40,
- 140,
- 90,
- 60,
- 60,
- -90,
- -90,
- };
- Vector3 destroyedCryoChamberLocs[3] = {
- Vector3(-4.544f, 30.811f, -39.486f),
- Vector3(17.399f, 50.261f, -39.486f),
- Vector3(17.400f, 38.322f, -39.486f),
- };
- float destroyedChamberFacing[3] = {
- -45,
- -90,
- -90,
- };
- DECLARE_SCRIPT(M11_Lab_Cryochamber_Controller_JDG, "")//100910 M11_LABORATORY_MUTANT_CONTROLLER_JDG
- {
- int cryoChamber_id[15];
- int simpleMutant_id[15];
- int activeUnitCount;
- int deadMutantCount;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(activeUnitCount, 1);
- SAVE_VARIABLE(deadMutantCount, 2);
- SAVE_VARIABLE(cryoChamber_id[0], 3);
- SAVE_VARIABLE(cryoChamber_id[1], 4);
- SAVE_VARIABLE(cryoChamber_id[2], 5);
- SAVE_VARIABLE(cryoChamber_id[3], 6);
- SAVE_VARIABLE(cryoChamber_id[4], 7);
- SAVE_VARIABLE(cryoChamber_id[5], 8);
- SAVE_VARIABLE(cryoChamber_id[6], 9);
- SAVE_VARIABLE(cryoChamber_id[7], 10);
- SAVE_VARIABLE(cryoChamber_id[8], 11);
- SAVE_VARIABLE(cryoChamber_id[9], 12);
- SAVE_VARIABLE(cryoChamber_id[10], 13);
- SAVE_VARIABLE(cryoChamber_id[11], 14);
- SAVE_VARIABLE(cryoChamber_id[12], 15);
- SAVE_VARIABLE(cryoChamber_id[13], 16);
- SAVE_VARIABLE(cryoChamber_id[14], 17);
- SAVE_VARIABLE(simpleMutant_id[0], 18);
- SAVE_VARIABLE(simpleMutant_id[1], 19);
- SAVE_VARIABLE(simpleMutant_id[2], 20);
- SAVE_VARIABLE(simpleMutant_id[3], 21);
- SAVE_VARIABLE(simpleMutant_id[4], 22);
- SAVE_VARIABLE(simpleMutant_id[5], 23);
- SAVE_VARIABLE(simpleMutant_id[6], 24);
- SAVE_VARIABLE(simpleMutant_id[7], 25);
- SAVE_VARIABLE(simpleMutant_id[8], 26);
- SAVE_VARIABLE(simpleMutant_id[9], 27);
- SAVE_VARIABLE(simpleMutant_id[10], 28);
- SAVE_VARIABLE(simpleMutant_id[11], 29);
- SAVE_VARIABLE(simpleMutant_id[12], 30);
- SAVE_VARIABLE(simpleMutant_id[13], 31);
- SAVE_VARIABLE(simpleMutant_id[14], 32);
- }
- void Created( GameObject * obj )
- {
- GameObject * cryoChamber_00 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[0] );
- Commands->Set_Facing ( cryoChamber_00, cryoChamberFacing[0] );
- cryoChamber_id[0] = Commands->Get_ID ( cryoChamber_00 );
- Commands->Attach_Script(cryoChamber_00, "M11_Cryochamber_Simple_JDG", "0");
- GameObject * cryoChamber_01 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[1] );
- Commands->Set_Facing ( cryoChamber_01, cryoChamberFacing[1] );
- cryoChamber_id[1] = Commands->Get_ID ( cryoChamber_01 );
- Commands->Attach_Script(cryoChamber_01, "M11_Cryochamber_Simple_JDG", "1");
- GameObject * cryoChamber_02 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[2] );
- Commands->Set_Facing ( cryoChamber_02, cryoChamberFacing[2] );
- cryoChamber_id[2] = Commands->Get_ID ( cryoChamber_02 );
- Commands->Attach_Script(cryoChamber_02, "M11_Cryochamber_Simple_JDG", "2");
- GameObject * cryoChamber_03 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[3] );
- Commands->Set_Facing ( cryoChamber_03, cryoChamberFacing[3] );
- cryoChamber_id[3] = Commands->Get_ID ( cryoChamber_03 );
- Commands->Attach_Script(cryoChamber_03, "M11_Cryochamber_Simple_JDG", "3");
- GameObject * cryoChamber_04 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[4] );
- Commands->Set_Facing ( cryoChamber_04, cryoChamberFacing[4] );
- cryoChamber_id[4] = Commands->Get_ID ( cryoChamber_04 );
- Commands->Attach_Script(cryoChamber_04, "M11_Cryochamber_Simple_JDG", "4");
- GameObject * cryoChamber_05 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[5] );
- Commands->Set_Facing ( cryoChamber_05, cryoChamberFacing[5] );
- cryoChamber_id[5] = Commands->Get_ID ( cryoChamber_05 );
- Commands->Attach_Script(cryoChamber_05, "M11_Cryochamber_Simple_JDG", "5");
- GameObject * cryoChamber_06 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[6] );
- Commands->Set_Facing ( cryoChamber_06, cryoChamberFacing[6] );
- cryoChamber_id[6] = Commands->Get_ID ( cryoChamber_06 );
- Commands->Attach_Script(cryoChamber_06, "M11_Cryochamber_Simple_JDG", "6");
- GameObject * cryoChamber_07 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[7] );
- Commands->Set_Facing ( cryoChamber_07, cryoChamberFacing[7] );
- cryoChamber_id[7] = Commands->Get_ID ( cryoChamber_07 );
- Commands->Attach_Script(cryoChamber_07, "M11_Cryochamber_Simple_JDG", "7");
- GameObject * cryoChamber_08 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[8] );
- Commands->Set_Facing ( cryoChamber_08, cryoChamberFacing[8] );
- cryoChamber_id[8] = Commands->Get_ID ( cryoChamber_08 );
- Commands->Attach_Script(cryoChamber_08, "M11_Cryochamber_Simple_JDG", "8");
- GameObject * cryoChamber_09 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[9] );
- Commands->Set_Facing ( cryoChamber_09, cryoChamberFacing[9] );
- cryoChamber_id[9] = Commands->Get_ID ( cryoChamber_09 );
- Commands->Attach_Script(cryoChamber_09, "M11_Cryochamber_Simple_JDG", "9");
- GameObject * cryoChamber_10 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[10] );
- Commands->Set_Facing ( cryoChamber_10, cryoChamberFacing[10] );
- cryoChamber_id[10] = Commands->Get_ID ( cryoChamber_10 );
- Commands->Attach_Script(cryoChamber_10, "M11_Cryochamber_Simple_JDG", "10");
- GameObject * cryoChamber_11 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[11] );
- Commands->Set_Facing ( cryoChamber_11, cryoChamberFacing[11] );
- cryoChamber_id[11] = Commands->Get_ID ( cryoChamber_11 );
- Commands->Attach_Script(cryoChamber_11, "M11_Cryochamber_Simple_JDG", "11");
- GameObject * cryoChamber_12 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[12] );
- Commands->Set_Facing ( cryoChamber_12, cryoChamberFacing[12] );
- cryoChamber_id[12] = Commands->Get_ID ( cryoChamber_12 );
- Commands->Attach_Script(cryoChamber_12, "M11_Cryochamber_Simple_JDG", "12");
- GameObject * cryoChamber_13 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[13] );
- Commands->Set_Facing ( cryoChamber_13, cryoChamberFacing[13] );
- cryoChamber_id[13] = Commands->Get_ID ( cryoChamber_13 );
- Commands->Attach_Script(cryoChamber_13, "M11_Cryochamber_Simple_JDG", "13");
- GameObject * cryoChamber_14 = Commands->Create_Object ( "Simple_Large_CryoChamber", m11cryoChamberLocs[14] );
- Commands->Set_Facing ( cryoChamber_14, cryoChamberFacing[14] );
- cryoChamber_id[14] = Commands->Get_ID ( cryoChamber_14 );
- Commands->Attach_Script(cryoChamber_14, "M11_Cryochamber_Simple_JDG", "14");
- GameObject * cryoTrajectory_00 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[0] );
- Commands->Set_Model ( cryoTrajectory_00, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_00, cryoChamberFacing[0] );
- GameObject * simpleMutant_00 = Commands->Create_Object_At_Bone ( cryoTrajectory_00, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_00, cryoTrajectory_00, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_00, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[0] = Commands->Get_ID ( simpleMutant_00 );
- if (cryoTrajectory_00 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_00 );
- }
- GameObject * cryoTrajectory_01 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[1] );
- Commands->Set_Model ( cryoTrajectory_01, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_01, cryoChamberFacing[1] );
- GameObject * simpleMutant_01 = Commands->Create_Object_At_Bone ( cryoTrajectory_01, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_01, cryoTrajectory_01, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_01, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[1] = Commands->Get_ID ( simpleMutant_01 );
- if (cryoTrajectory_01 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_01 );
- }
- GameObject * cryoTrajectory_02 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[2] );
- Commands->Set_Model ( cryoTrajectory_02, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_02, cryoChamberFacing[2] );
- GameObject * simpleMutant_02 = Commands->Create_Object_At_Bone ( cryoTrajectory_02, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_02, cryoTrajectory_02, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_02, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[2] = Commands->Get_ID ( simpleMutant_02 );
- if (cryoTrajectory_02 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_02 );
- }
- GameObject * cryoTrajectory_03 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[3] );
- Commands->Set_Model ( cryoTrajectory_03, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_03, cryoChamberFacing[3] );
- GameObject * simpleMutant_03 = Commands->Create_Object_At_Bone ( cryoTrajectory_03, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_03, cryoTrajectory_03, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_03, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[3] = Commands->Get_ID ( simpleMutant_03 );
- if (cryoTrajectory_03 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_03 );
- }
- GameObject * cryoTrajectory_04 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[4] );
- Commands->Set_Model ( cryoTrajectory_04, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_04, cryoChamberFacing[4] );
- GameObject * simpleMutant_04 = Commands->Create_Object_At_Bone ( cryoTrajectory_04, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_04, cryoTrajectory_04, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_04, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[4] = Commands->Get_ID ( simpleMutant_04 );
- if (cryoTrajectory_04 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_04 );
- }
- GameObject * cryoTrajectory_05 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[5] );
- Commands->Set_Model ( cryoTrajectory_05, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_05, cryoChamberFacing[5] );
- GameObject * simpleMutant_05 = Commands->Create_Object_At_Bone ( cryoTrajectory_05, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_05, cryoTrajectory_05, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_05, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[5] = Commands->Get_ID ( simpleMutant_05 );
- if (cryoTrajectory_05 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_05 );
- }
- GameObject * cryoTrajectory_06 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[6] );
- Commands->Set_Model ( cryoTrajectory_06, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_06, cryoChamberFacing[6] );
- GameObject * simpleMutant_06 = Commands->Create_Object_At_Bone ( cryoTrajectory_06, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_06, cryoTrajectory_06, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_06, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[6] = Commands->Get_ID ( simpleMutant_06 );
- if (cryoTrajectory_06 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_06 );
- }
- GameObject * cryoTrajectory_07 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[7] );
- Commands->Set_Model ( cryoTrajectory_07, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_07, cryoChamberFacing[7] );
- GameObject * simpleMutant_07 = Commands->Create_Object_At_Bone ( cryoTrajectory_07, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_07, cryoTrajectory_07, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_07, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[7] = Commands->Get_ID ( simpleMutant_07 );
- if (cryoTrajectory_07 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_07 );
- }
- GameObject * cryoTrajectory_08 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[8] );
- Commands->Set_Model ( cryoTrajectory_08, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_08, cryoChamberFacing[8] );
- GameObject * simpleMutant_08 = Commands->Create_Object_At_Bone ( cryoTrajectory_08, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_08, cryoTrajectory_08, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_08, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[8] = Commands->Get_ID ( simpleMutant_08 );
- if (cryoTrajectory_08 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_08 );
- }
- GameObject * cryoTrajectory_09 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[9] );
- Commands->Set_Model ( cryoTrajectory_09, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_09, cryoChamberFacing[9] );
- GameObject * simpleMutant_09 = Commands->Create_Object_At_Bone ( cryoTrajectory_09, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_09, cryoTrajectory_09, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_09, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[9] = Commands->Get_ID ( simpleMutant_09 );
- if (cryoTrajectory_09 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_09 );
- }
- GameObject * cryoTrajectory_10 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[10] );
- Commands->Set_Model ( cryoTrajectory_10, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_10, cryoChamberFacing[10] );
- GameObject * simpleMutant_10 = Commands->Create_Object_At_Bone ( cryoTrajectory_10, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_10, cryoTrajectory_10, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_10, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[10] = Commands->Get_ID ( simpleMutant_10 );
- if (cryoTrajectory_10 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_10 );
- }
- GameObject * cryoTrajectory_11 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[11] );
- Commands->Set_Model ( cryoTrajectory_11, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_11, cryoChamberFacing[11] );
- GameObject * simpleMutant_11 = Commands->Create_Object_At_Bone ( cryoTrajectory_11, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_11, cryoTrajectory_11, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_11, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[11] = Commands->Get_ID ( simpleMutant_11 );
- if (cryoTrajectory_11 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_11 );
- }
- GameObject * cryoTrajectory_12 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[12] );
- Commands->Set_Model ( cryoTrajectory_12, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_12, cryoChamberFacing[12] );
- GameObject * simpleMutant_12 = Commands->Create_Object_At_Bone ( cryoTrajectory_12, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_12, cryoTrajectory_12, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_12, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[12] = Commands->Get_ID ( simpleMutant_12 );
- if (cryoTrajectory_12 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_12 );
- }
- GameObject * cryoTrajectory_13 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[13] );
- Commands->Set_Model ( cryoTrajectory_13, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_13, cryoChamberFacing[13] );
- GameObject * simpleMutant_13 = Commands->Create_Object_At_Bone ( cryoTrajectory_13, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_13, cryoTrajectory_13, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_13, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[13] = Commands->Get_ID ( simpleMutant_13 );
- if (cryoTrajectory_13 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_13 );
- }
- GameObject * cryoTrajectory_14 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[14] );
- Commands->Set_Model ( cryoTrajectory_14, "X11E_Trajectory" );
- Commands->Set_Facing ( cryoTrajectory_14, cryoChamberFacing[14] );
- GameObject * simpleMutant_14 = Commands->Create_Object_At_Bone ( cryoTrajectory_14, "Mutant_2SF_Templar", "BN_Trajectory" );
- Commands->Attach_To_Object_Bone( simpleMutant_14, cryoTrajectory_14, "BN_Trajectory" );
- Commands->Attach_Script(simpleMutant_14, "M11_LabMutant_Simple_JDG", "");
- simpleMutant_id[14] = Commands->Get_ID ( simpleMutant_14 );
- if (cryoTrajectory_14 != NULL)
- {
- Commands->Destroy_Object ( cryoTrajectory_14 );
- }
- GameObject * destroyedCryoChamber_01 = Commands->Create_Object ( "Simple_Large_CryoChamber_Destroyed", destroyedCryoChamberLocs[0] );
- Commands->Set_Facing ( destroyedCryoChamber_01, destroyedChamberFacing[0] );
- Commands->Attach_Script(destroyedCryoChamber_01, "M11_Cryochamber_DestroyedSimple_JDG", "");
- GameObject * destroyedCryoChamber_02 = Commands->Create_Object ( "Simple_Large_CryoChamber_Destroyed", destroyedCryoChamberLocs[1] );
- Commands->Set_Facing ( destroyedCryoChamber_02, destroyedChamberFacing[1] );
- Commands->Attach_Script(destroyedCryoChamber_02, "M11_Cryochamber_DestroyedSimple_JDG", "");
- GameObject * destroyedCryoChamber_03 = Commands->Create_Object ( "Simple_Large_CryoChamber_Destroyed", destroyedCryoChamberLocs[2] );
- Commands->Set_Facing ( destroyedCryoChamber_03, destroyedChamberFacing[2] );
- Commands->Attach_Script(destroyedCryoChamber_03, "M11_Cryochamber_DestroyedSimple_JDG", "");
- activeUnitCount = 3;
- deadMutantCount = 0;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == M01_IVE_BEEN_KILLED_JDG)//a chamber has been destroyed--kill the hibernating mutant
- {
- if (param == 0)//cryo chamber 00 is destroyed
- {
- GameObject * cryoTrajectory_00 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[0] );
- Commands->Set_Model ( cryoTrajectory_00, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_00, "M11_Mutant_TrajectoryBone_JDG", "");//"Mutant_2SF_Templar"
- Commands->Set_Facing ( cryoTrajectory_00, cryoChamberFacing[0] );
- if (cryoTrajectory_00 != NULL)
- {
- GameObject * simpleMutant_00 = Commands->Find_Object ( simpleMutant_id[0] );
- if (simpleMutant_00 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_00, cryoTrajectory_00, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_00, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 1)//cryo chamber 01 is destroyed
- {
- GameObject * cryoTrajectory_01 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[1] );
- Commands->Set_Model ( cryoTrajectory_01, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_01, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_01, cryoChamberFacing[1] );
- if (cryoTrajectory_01 != NULL)
- {
- GameObject * simpleMutant_01 = Commands->Find_Object ( simpleMutant_id[1] );
- if (simpleMutant_01 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_01, cryoTrajectory_01, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_01, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 2)//cryo chamber 02 is destroyed
- {
- GameObject * cryoTrajectory_02 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[2] );
- Commands->Set_Model ( cryoTrajectory_02, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_02, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_02, cryoChamberFacing[2] );
- if (cryoTrajectory_02 != NULL)
- {
- GameObject * simpleMutant_02 = Commands->Find_Object ( simpleMutant_id[2] );
- if (simpleMutant_02 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_02, cryoTrajectory_02, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_02, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 3)//cryo chamber 03 is destroyed
- {
- GameObject * cryoTrajectory_03 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[3] );
- Commands->Set_Model ( cryoTrajectory_03, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_03, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_03, cryoChamberFacing[3] );
- if (cryoTrajectory_03 != NULL)
- {
- GameObject * simpleMutant_03 = Commands->Find_Object ( simpleMutant_id[3] );
- if (simpleMutant_03 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_03, cryoTrajectory_03, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_03, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 4)//cryo chamber 04 is destroyed
- {
- GameObject * cryoTrajectory_04 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[4] );
- Commands->Set_Model ( cryoTrajectory_04, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_04, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_04, cryoChamberFacing[4] );
- if (cryoTrajectory_04 != NULL)
- {
- GameObject * simpleMutant_04 = Commands->Find_Object ( simpleMutant_id[4] );
- if (simpleMutant_04 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_04, cryoTrajectory_04, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_04, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 5)//cryo chamber 05 is destroyed
- {
- GameObject * cryoTrajectory_05 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[5] );
- Commands->Set_Model ( cryoTrajectory_05, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_05, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_05, cryoChamberFacing[5] );
- if (cryoTrajectory_05 != NULL)
- {
- GameObject * simpleMutant_05 = Commands->Find_Object ( simpleMutant_id[5] );
- if (simpleMutant_05 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_05, cryoTrajectory_05, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_05, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 6)//cryo chamber 06 is destroyed
- {
- GameObject * cryoTrajectory_06 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[6] );
- Commands->Set_Model ( cryoTrajectory_06, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_06, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_06, cryoChamberFacing[6] );
- if (cryoTrajectory_06 != NULL)
- {
- GameObject * simpleMutant_06 = Commands->Find_Object ( simpleMutant_id[6] );
- if (simpleMutant_06 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_06, cryoTrajectory_06, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_06, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 7)//cryo chamber 07 is destroyed
- {
- GameObject * cryoTrajectory_07 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[7] );
- Commands->Set_Model ( cryoTrajectory_07, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_07, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_07, cryoChamberFacing[7] );
- if (cryoTrajectory_07 != NULL)
- {
- GameObject * simpleMutant_07 = Commands->Find_Object ( simpleMutant_id[7] );
- if (simpleMutant_07 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_07, cryoTrajectory_07, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_07, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 8)//cryo chamber 08 is destroyed
- {
- GameObject * cryoTrajectory_08 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[8] );
- Commands->Set_Model ( cryoTrajectory_08, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_08, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_08, cryoChamberFacing[8] );
- if (cryoTrajectory_08 != NULL)
- {
- GameObject * simpleMutant_08 = Commands->Find_Object ( simpleMutant_id[8] );
- if (simpleMutant_08 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_08, cryoTrajectory_08, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_08, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 9)//cryo chamber 09 is destroyed
- {
- GameObject * cryoTrajectory_09 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[9] );
- Commands->Set_Model ( cryoTrajectory_09, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_09, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_09, cryoChamberFacing[9] );
- if (cryoTrajectory_09 != NULL)
- {
- GameObject * simpleMutant_09 = Commands->Find_Object ( simpleMutant_id[9] );
- if (simpleMutant_09 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_09, cryoTrajectory_09, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_09, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 10)//cryo chamber 10 is destroyed
- {
- GameObject * cryoTrajectory_10 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[10] );
- Commands->Set_Model ( cryoTrajectory_10, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_10, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_10, cryoChamberFacing[10] );
- if (cryoTrajectory_10 != NULL)
- {
- GameObject * simpleMutant_10 = Commands->Find_Object ( simpleMutant_id[10] );
- if (simpleMutant_10 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_10, cryoTrajectory_10, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_10, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 11)//cryo chamber 11 is destroyed
- {
- GameObject * cryoTrajectory_11 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[11] );
- Commands->Set_Model ( cryoTrajectory_11, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_11, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_11, cryoChamberFacing[11] );
- if (cryoTrajectory_11 != NULL)
- {
- GameObject * simpleMutant_11 = Commands->Find_Object ( simpleMutant_id[11] );
- if (simpleMutant_11 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_11, cryoTrajectory_11, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_11, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 12)//cryo chamber 12 is destroyed
- {
- GameObject * cryoTrajectory_12 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[12] );
- Commands->Set_Model ( cryoTrajectory_12, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_12, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_12, cryoChamberFacing[12] );
- if (cryoTrajectory_12 != NULL)
- {
- GameObject * simpleMutant_12 = Commands->Find_Object ( simpleMutant_id[12] );
- if (simpleMutant_12 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_12, cryoTrajectory_12, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_12, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 13)//cryo chamber 13 is destroyed
- {
- GameObject * cryoTrajectory_13 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[13] );
- Commands->Set_Model ( cryoTrajectory_13, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_13, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_13, cryoChamberFacing[13] );
- if (cryoTrajectory_13 != NULL)
- {
- GameObject * simpleMutant_13 = Commands->Find_Object ( simpleMutant_id[13] );
- if (simpleMutant_13 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_13, cryoTrajectory_13, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_13, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- else if (param == 14)//cryo chamber 14 is destroyed
- {
- GameObject * cryoTrajectory_14 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[14] );
- Commands->Set_Model ( cryoTrajectory_14, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_14, "M11_Mutant_TrajectoryBone_JDG", "");
- Commands->Set_Facing ( cryoTrajectory_14, cryoChamberFacing[14] );
- if (cryoTrajectory_14 != NULL)
- {
- GameObject * simpleMutant_14 = Commands->Find_Object ( simpleMutant_id[14] );
- if (simpleMutant_14 != NULL)
- {
- Commands->Attach_To_Object_Bone( simpleMutant_14, cryoTrajectory_14, "BN_Trajectory" );
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, simpleMutant_14, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- }
- }
- else if (type == 0)
- {
- if (param == M01_SPAWNER_IS_DEAD_JDG)
- {
- activeUnitCount--;
- deadMutantCount++;
- Commands->Send_Custom_Event ( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- else if (param == M01_SPAWNER_SPAWN_PLEASE_JDG)
- {
- if (activeUnitCount <= 6 && deadMutantCount < 15)
- {
- int random = Commands->Get_Random_Int(0, 15);
- GameObject * mutant = Commands->Find_Object ( simpleMutant_id[random] );
- GameObject * cryoChamber = Commands->Find_Object ( cryoChamber_id[random] );
- if (mutant == NULL)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- else
- {
- simpleMutant_id[random] = 0;
- Commands->Send_Custom_Event( obj, mutant, M01_SPAWNER_SPAWN_PLEASE_JDG, random, 0 );
- Commands->Send_Custom_Event( obj, cryoChamber, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 1 );
- activeUnitCount++;
- }
- if (activeUnitCount <= 3)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_SPAWNER_SPAWN_PLEASE_JDG, 0 );
- }
- }
- else
- {
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)//switch 01 has been pushed--kill all related chambers
- {
- GameObject * cryoChamber_00 = Commands->Find_Object ( cryoChamber_id[0] );
- GameObject * cryoChamber_01 = Commands->Find_Object ( cryoChamber_id[1] );
- GameObject * cryoChamber_02 = Commands->Find_Object ( cryoChamber_id[2] );
- GameObject * cryoChamber_03 = Commands->Find_Object ( cryoChamber_id[3] );
- GameObject * cryoChamber_04 = Commands->Find_Object ( cryoChamber_id[4] );
- GameObject * cryoChamber_05 = Commands->Find_Object ( cryoChamber_id[5] );
- GameObject * cryoChamber_06 = Commands->Find_Object ( cryoChamber_id[6] );
- GameObject * cryoChamber_07 = Commands->Find_Object ( cryoChamber_id[7] );
- if (cryoChamber_00 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_00, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_01 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_01, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_02 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_02, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_03 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_03, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_04 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_04, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_05 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_05, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_06 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_06, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_07 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_07, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)//switch 02 has been pushed--kill all related chambers
- {
- GameObject * cryoChamber_08 = Commands->Find_Object ( cryoChamber_id[8] );
- GameObject * cryoChamber_09 = Commands->Find_Object ( cryoChamber_id[9] );
- GameObject * cryoChamber_10 = Commands->Find_Object ( cryoChamber_id[10] );
- GameObject * cryoChamber_11 = Commands->Find_Object ( cryoChamber_id[11] );
- GameObject * cryoChamber_12 = Commands->Find_Object ( cryoChamber_id[12] );
- GameObject * cryoChamber_13 = Commands->Find_Object ( cryoChamber_id[13] );
- GameObject * cryoChamber_14 = Commands->Find_Object ( cryoChamber_id[14] );
- if (cryoChamber_08 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_08, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_09 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_09, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_10 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_10, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_11 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_11, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_12 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_12, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_13 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_13, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- if (cryoChamber_14 != NULL)
- {
- float delayTimer = Commands->Get_Random ( 1, 3);
- Commands->Send_Custom_Event( obj, cryoChamber_14, 0, M01_MODIFY_YOUR_ACTION_JDG, delayTimer );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Cryochamber_Simple_JDG, "chamber_number:int")
- {
- int my_number;
- bool destroyed;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(my_number, 1);
- SAVE_VARIABLE(destroyed, 2);
- }
- void Created( GameObject * obj )
- {
- my_number = Get_Int_Parameter("chamber_number");
- destroyed = false;
- Commands->Set_Animation_Frame ( obj, "DSP_CRYOBIG2.DSP_CRYOBIG2", 0 );
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)//M01_SPAWNER_SPAWN_PLEASE_JDG
- {
- if (obj && destroyed == false)
- {
- destroyed = true;
- Vector3 myPosition = Commands->Get_Position ( obj );
- float myFacing = Commands->Get_Facing ( obj );
- Commands->Create_Explosion ( "Explosion_Barrel_Toxic", myPosition, NULL );
- Commands->Set_Animation ( obj, "DSP_CRYOBIG2.DSP_CRYOBIG2", false, NULL, 0, 15 );
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), M01_IVE_BEEN_KILLED_JDG, my_number, 0 );
- Commands->Set_Health ( obj, 1 );
- GameObject * destroyedCryoChamber = Commands->Create_Object ( "Simple_Large_CryoChamber_Destroyed", myPosition );
- Commands->Set_Facing ( destroyedCryoChamber, myFacing );
- Commands->Attach_Script(destroyedCryoChamber, "M11_Cryochamber_DestroyedSimple_JDG", "");
- Commands->Destroy_Object ( obj );
- }
- }
- else if (param == M01_SPAWNER_SPAWN_PLEASE_JDG)//
- {
- Vector3 myPosition = Commands->Get_Position ( obj );
- float myFacing = Commands->Get_Facing ( obj );
- GameObject * glass = Commands->Create_Object("Invisible_Object", myPosition );
- Commands->Set_Model ( glass, "X11E_Shatter" );
- Commands->Attach_Script(glass, "M11_Mutant_ShatterGlass_JDG", "");
- Commands->Set_Facing ( glass, myFacing );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 1 );
- }
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- float myCurrentHealth = Commands->Get_Health ( obj );
- float myMaxHeatlh = Commands->Get_Max_Health ( obj );
- float myHealthPercentage = (myCurrentHealth/myMaxHeatlh) * 100;
- if (myHealthPercentage > 25 && destroyed == false)
- {
- Commands->Set_Animation ( obj, "DSP_CRYOBIG2.DSP_CRYOBIG2", false, NULL, 0, 9 );
- }
- else if (destroyed == true)
- {
- Commands->Set_Animation ( obj, "DSP_CRYOBIG2.DSP_CRYOBIG2", false, NULL, 12, 15 );
- Commands->Set_Health ( obj, 1 );
- }
- else if (destroyed == false)
- {
- destroyed = true;
- Vector3 myPosition = Commands->Get_Position ( obj );
- float myFacing = Commands->Get_Facing ( obj );
- Commands->Create_Explosion ( "Explosion_Barrel_Toxic", myPosition, NULL );
- Commands->Set_Animation ( obj, "DSP_CRYOBIG2.DSP_CRYOBIG2", false, NULL, 0, 15 );
- Commands->Send_Custom_Event ( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), M01_IVE_BEEN_KILLED_JDG, my_number, 0 );
- Commands->Set_Health ( obj, 1 );
- GameObject * destroyedCryoChamber = Commands->Create_Object ( "Simple_Large_CryoChamber_Destroyed", myPosition );
- Commands->Set_Facing ( destroyedCryoChamber, myFacing );
- Commands->Attach_Script(destroyedCryoChamber, "M11_Cryochamber_DestroyedSimple_JDG", "");
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_LabMutant_Simple_JDG, "")
- {
- bool freed;
- bool sabotaged;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(freed, 1);
- SAVE_VARIABLE(sabotaged, 2);
- }
- void Created( GameObject * obj )
- {
- sabotaged = false;
- freed = false;
- Commands->Innate_Disable(obj);
- Commands->Set_Loiters_Allowed( obj, false );
- Commands->Select_Weapon ( obj, NULL );
- Commands->Set_Animation_Frame ( obj, "S_A_HUMAN.H_A_822A", 15 );
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- {
- if (freed != true)
- {
- float myMaxHealth = Commands->Get_Max_Health ( obj );
- float myMaxShield = Commands->Get_Max_Shield_Strength ( obj );
- Commands->Set_Health ( obj, myMaxHealth );
- Commands->Set_Shield_Strength ( obj, myMaxShield );
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- if (sabotaged == false)
- {
- if (freed == true)
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object ( M11_LABORATORY_MUTANT_CONTROLLER_JDG ), 0, M01_SPAWNER_IS_DEAD_JDG, 0 );
- }
- Vector3 powerupSpawnLocation = Commands->Get_Position (obj );
- powerupSpawnLocation.Z += 0.75f;
- int easy = 0;
- int medium = 1;
- int currentDifficulty = Commands->Get_Difficulty_Level( );
- if (currentDifficulty == easy)
- {
- char *powerups[2] =
- {
- //this is a list of potential powerups to be dropped by lab mutants
- "POW_Health_100",
- "POW_Armor_100",
- };
- int random = Commands->Get_Random_Int(0, 2);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- else if (currentDifficulty == medium)
- {
- char *powerups[2] =
- {
- //this is a list of potential powerups to be dropped by lab mutants
- "POW_Health_050",
- "POW_Armor_050",
- };
- int random = Commands->Get_Random_Int(0, 2);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- else
- {
- char *powerups[2] =
- {
- //this is a list of potential powerups to be dropped by lab mutants
- "POW_Health_025",
- "POW_Armor_025",
- };
- int random = Commands->Get_Random_Int(0, 2);
- Commands->Create_Object ( powerups[random], powerupSpawnLocation );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == M01_SPAWNER_SPAWN_PLEASE_JDG)//you are being requested to come out and play--break out
- {
- Commands->Enable_Hibernation(obj, false );
- GameObject * cryoTrajectory_00 = Commands->Create_Object("Invisible_Object", m11cryoChamberLocs[param] );
- Commands->Set_Model ( cryoTrajectory_00, "X11E_Trajectory" );
- Commands->Attach_Script(cryoTrajectory_00, "M11_Mutant_TrajectoryBone_JDG", "");//"Mutant_2SF_Templar"
- Commands->Set_Facing ( cryoTrajectory_00, cryoChamberFacing[param] );
- if (cryoTrajectory_00 != NULL)
- {
- if (obj)
- {
- Commands->Attach_To_Object_Bone( obj, cryoTrajectory_00, "BN_Trajectory" );
- Commands->Set_Animation ( obj, "S_C_Human.H_C_X11E_Escape", false, NULL, 0, 120 );
- freed = true;
- }
- }
- }
- else if (type == 0)
- {
- if (param == M01_IVE_BEEN_KILLED_JDG)//your chambers been destroyed--die please
- {
- sabotaged = true;
- freed = true;
- //Commands->Apply_Damage( obj, 10000, "BlamoKiller", NULL );
- Commands->Set_Animation ( obj, "S_C_Human.H_C_Tubedie", false, NULL, 0, 22 );
- }
- }
- }
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "S_C_Human.H_C_X11E_Escape") == 0)
- {
- Commands->Enable_Hibernation(obj, true );
- Commands->Select_Weapon ( obj, "Weapon_TiberiumAutoRifle_Ai" );
- Commands->Innate_Enable(obj);
- ActionParamsStruct params;
- params.Set_Basic( this, 85, M01_HUNT_THE_PLAYER_JDG );
- params.Set_Movement( STAR, RUN, 1 );
- params.Set_Attack( STAR, 15, 2, true );
- Commands->Action_Attack ( obj, params );
- }
- else if (stricmp(anim, "S_C_Human.H_C_Tubedie") == 0)
- {
- Commands->Destroy_Object ( obj );
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorController_JDG, "")//100698
- {
- void Created( GameObject * obj )
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_01_JDG , 45, "MISS_ELEV1.MISS_ELEV1" );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_02_JDG , 45, "MISS_ELEV2.MISS_ELEV2" );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_03_JDG , 45, "MISS_ELEV3.MISS_ELEV3" );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_04_JDG , 45, "MISS_ELEV4.MISS_ELEV4" );
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone01_JDG, "")//100699
- {
- bool sydeyIsInTheZone;
- bool havocIsInTheZone;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydeyIsInTheZone, 1);
- SAVE_VARIABLE(havocIsInTheZone, 2);
- }
- void Created( GameObject * obj )
- {
- sydeyIsInTheZone = false;
- havocIsInTheZone = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- sydeyIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (enterer == STAR)
- {
- havocIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- void Exited( GameObject * obj, GameObject * exiter )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (exiter == sydney)
- {
- sydeyIsInTheZone = false;
- }
- else if (exiter == STAR)
- {
- havocIsInTheZone = false;
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- if ((sydeyIsInTheZone == true) && (havocIsInTheZone == true))
- {
- Vector3 myPosition = Commands->Get_Position ( STAR );
- Commands->Create_Sound ( "Air_Compressor_01", myPosition, obj );
- Commands->Create_Sound ( "Metal_Thunk_03", myPosition, obj );
- Commands->Shake_Camera( myPosition, 25, 0.25f, 0.5f );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0.25f );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 2 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_04_JDG , 0, "MISS_ELEV4.MISS_ELEV4" );
- Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone02_JDG, "")//100700
- {
- bool sydeyIsInTheZone;
- bool havocIsInTheZone;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydeyIsInTheZone, 1);
- SAVE_VARIABLE(havocIsInTheZone, 2);
- }
- void Created( GameObject * obj )
- {
- sydeyIsInTheZone = false;
- havocIsInTheZone = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- sydeyIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (enterer == STAR)
- {
- havocIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- void Exited( GameObject * obj, GameObject * exiter )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (exiter == sydney)
- {
- sydeyIsInTheZone = false;
- }
- else if (exiter == STAR)
- {
- havocIsInTheZone = false;
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- if ((sydeyIsInTheZone == true) && (havocIsInTheZone == true))
- {
- Vector3 myPosition = Commands->Get_Position ( STAR );
- Commands->Create_Sound ( "Air_Compressor_01", myPosition, obj );
- Commands->Create_Sound ( "Metal_Thunk_03", myPosition, obj );
- Commands->Shake_Camera( myPosition, 25, 0.25f, 0.5f );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0.25f );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 2 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_03_JDG , 0, "MISS_ELEV3.MISS_ELEV3" );
- Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone03_JDG, "")//100701
- {
- bool sydeyIsInTheZone;
- bool havocIsInTheZone;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydeyIsInTheZone, 1);
- SAVE_VARIABLE(havocIsInTheZone, 2);
- }
- void Created( GameObject * obj )
- {
- sydeyIsInTheZone = false;
- havocIsInTheZone = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- sydeyIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (enterer == STAR)
- {
- havocIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- void Exited( GameObject * obj, GameObject * exiter )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (exiter == sydney)
- {
- sydeyIsInTheZone = false;
- }
- else if (exiter == STAR)
- {
- havocIsInTheZone = false;
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- if ((sydeyIsInTheZone == true) && (havocIsInTheZone == true))
- {
- Vector3 myPosition = Commands->Get_Position ( STAR );
- Commands->Create_Sound ( "Air_Compressor_01", myPosition, obj );
- Commands->Create_Sound ( "Metal_Thunk_03", myPosition, obj );
- Commands->Shake_Camera( myPosition, 25, 0.25f, 0.5f );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0.25f );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 2 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_02_JDG , 0, "MISS_ELEV2.MISS_ELEV2" );
- Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone04_JDG, "")//100702
- {
- bool sydeyIsInTheZone;
- bool havocIsInTheZone;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydeyIsInTheZone, 1);
- SAVE_VARIABLE(havocIsInTheZone, 2);
- }
- void Created( GameObject * obj )
- {
- sydeyIsInTheZone = false;
- havocIsInTheZone = false;
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- sydeyIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else if (enterer == STAR)
- {
- havocIsInTheZone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- void Exited( GameObject * obj, GameObject * exiter )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (exiter == sydney)
- {
- sydeyIsInTheZone = false;
- }
- else if (exiter == STAR)
- {
- havocIsInTheZone = false;
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- if ((sydeyIsInTheZone == true) && (havocIsInTheZone == true))
- {
- Vector3 myPosition = Commands->Get_Position ( STAR );
- Commands->Create_Sound ( "Air_Compressor_01", myPosition, obj );
- Commands->Create_Sound ( "Metal_Thunk_03", myPosition, obj );
- Commands->Shake_Camera( myPosition, 25, 0.25f, 0.5f );
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0.25f );
- }
- else
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 2 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_01_JDG , 0, "MISS_ELEV1.MISS_ELEV1" );
- Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_Rally_Zone_01_JDG, "")
- {
- bool sydneyInPosition;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydneyInPosition, 1);
- }
- void Created( GameObject * obj )
- {
- sydneyInPosition = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- sydneyInPosition = true;
- }
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && sydneyInPosition == true)
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL )
- {
- Commands->Send_Custom_Event( obj, sydney, 0, M01_WALKING_WAYPATH_02_JDG, 0 );
- }
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_Rally_Zone_02_JDG, "")
- {
- bool sydneyInPosition;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydneyInPosition, 1);
- }
- void Created( GameObject * obj )
- {
- sydneyInPosition = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- sydneyInPosition = true;
- }
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && sydneyInPosition == true)
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL )
- {
- Commands->Send_Custom_Event( obj, sydney, 0, M01_WALKING_WAYPATH_03_JDG, 0 );
- }
- Commands->Destroy_Object ( obj );//one time only zone--cleaning up
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_Rally_Zone_03_JDG, "")
- {
- bool sydneyInPosition;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydneyInPosition, 1);
- }
- void Created( GameObject * obj )
- {
- sydneyInPosition = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- sydneyInPosition = true;
- }
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && sydneyInPosition == true)
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL )
- {
- Commands->Send_Custom_Event( obj, sydney, 0, M01_WALKING_WAYPATH_05_JDG, 0 );
- }
- GameObject * zoneOne = Commands->Find_Object ( 100133 );
- if (zoneOne != NULL)
- {
- Commands->Destroy_Object ( zoneOne );//one time only zone--cleaning up
- }
- GameObject * zoneTwo = Commands->Find_Object ( 100134 );
- if (zoneTwo != NULL)
- {
- Commands->Destroy_Object ( zoneTwo );//one time only zone--cleaning up
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_Rally_Zone_03b_JDG, "")
- {
- bool sydneyInPosition;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydneyInPosition, 1);
- }
- void Created( GameObject * obj )
- {
- sydneyInPosition = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- sydneyInPosition = true;
- }
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- if (enterer == STAR && sydneyInPosition == true)
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL )
- {
- Commands->Send_Custom_Event( obj, sydney, 0, M01_WALKING_WAYPATH_07_JDG, 0 );
- }
- GameObject * zoneOne = Commands->Find_Object ( 100133 );
- if (zoneOne != NULL)
- {
- Commands->Destroy_Object ( zoneOne );//one time only zone--cleaning up
- }
- GameObject * zoneTwo = Commands->Find_Object ( 100134 );
- if (zoneTwo != NULL)
- {
- Commands->Destroy_Object ( zoneTwo );//one time only zone--cleaning up
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Controller_JDG, "")//106230
- {//M11_PETROVA_STEALTHSPAWNER_01_JDG
- int initialSteatlthGuy01_id;
- int initialSteatlthGuy02_id;
- int initialSteatlthGuy03_id;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(initialSteatlthGuy01_id, 1);
- SAVE_VARIABLE(initialSteatlthGuy02_id, 2);
- SAVE_VARIABLE(initialSteatlthGuy03_id, 3);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == 0)//text file is telling you to spawn initial guys
- {
- GameObject * initialSteatlthGuy01 = Commands->Trigger_Spawner( M11_PETROVA_STEALTHSPAWNER_01_JDG );
- Commands->Attach_Script(initialSteatlthGuy01, "M11_Petrova_StealthSoldier_Initial01_JDG", "");
- initialSteatlthGuy01_id = Commands->Get_ID ( initialSteatlthGuy01 );
- GameObject * initialSteatlthGuy02 = Commands->Trigger_Spawner( M11_PETROVA_STEALTHSPAWNER_02_JDG );
- Commands->Attach_Script(initialSteatlthGuy02, "M11_Petrova_StealthSoldier_Initial02_JDG", "");
- initialSteatlthGuy02_id = Commands->Get_ID ( initialSteatlthGuy02 );
- GameObject * initialSteatlthGuy03 = Commands->Trigger_Spawner( M11_PETROVA_STEALTHSPAWNER_03_JDG );
- Commands->Attach_Script(initialSteatlthGuy03, "M11_Petrova_StealthSoldier_Initial03_JDG", "");
- initialSteatlthGuy03_id = Commands->Get_ID ( initialSteatlthGuy03 );
- }
- else if (param == 1)
- {
- GameObject * initialSteatlthGuy01 = Commands->Find_Object ( initialSteatlthGuy01_id );
- if (initialSteatlthGuy01 != NULL)
- {
- Commands->Send_Custom_Event( obj, initialSteatlthGuy01, 0, M01_START_ACTING_JDG, 0 );
- }
- GameObject * initialSteatlthGuy02 = Commands->Find_Object ( initialSteatlthGuy02_id );
- if (initialSteatlthGuy02 != NULL)
- {
- Commands->Send_Custom_Event( obj, initialSteatlthGuy02, 0, M01_START_ACTING_JDG, 0 );
- }
- GameObject * initialSteatlthGuy03 = Commands->Find_Object ( initialSteatlthGuy03_id );
- if (initialSteatlthGuy03 != NULL)
- {
- Commands->Send_Custom_Event( obj, initialSteatlthGuy03, 0, M01_START_ACTING_JDG, 0 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)//trigger spawner 01
- {
- GameObject * newSteatlthGuy = Commands->Trigger_Spawner( M11_PETROVA_STEALTHSPAWNER_01_JDG );
- Commands->Attach_Script(newSteatlthGuy, "M11_Petrova_StealthSoldier_Reinforcement01_JDG", "");
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)//trigger spawner 02
- {
- GameObject * newSteatlthGuy = Commands->Trigger_Spawner( M11_PETROVA_STEALTHSPAWNER_02_JDG );
- Commands->Attach_Script(newSteatlthGuy, "M11_Petrova_StealthSoldier_Reinforcement02_JDG", "");
- }
- else if (param == M01_MODIFY_YOUR_ACTION_03_JDG)//trigger spawner 02
- {
- GameObject * newSteatlthGuy = Commands->Trigger_Spawner( M11_PETROVA_STEALTHSPAWNER_03_JDG );
- Commands->Attach_Script(newSteatlthGuy, "M11_Petrova_StealthSoldier_Reinforcement03_JDG", "");
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Initial01_JDG, "")//M11_PETROVA_STEALTHSPAWNER_01_JDG
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Cinematic_Freeze( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 0, 0, true);
- Commands->Action_Attack (obj, params);
- }//
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- params.Set_Basic( this, 45, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 20, 0, true);
- Commands->Action_Attack (obj, params);
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthController, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Initial02_JDG, "")//M11_PETROVA_STEALTHSPAWNER_02_JDG
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Cinematic_Freeze( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 0, 0, true);
- Commands->Action_Attack (obj, params);
- }//
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- params.Set_Basic( this, 45, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 20, 0, true);
- Commands->Action_Attack (obj, params);
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthController, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Initial03_JDG, "")//M11_PETROVA_STEALTHSPAWNER_03_JDG
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Cinematic_Freeze( obj, false );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 0, 0, true);
- Commands->Action_Attack (obj, params);
- }//
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)
- {
- Commands->Action_Reset ( obj, 100 );
- ActionParamsStruct params;
- params.Set_Basic( this, 45, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 20, 0, true);
- Commands->Action_Attack (obj, params);
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthController, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Reinforcement01_JDG, "")//M11_PETROVA_STEALTHSPAWNER_01_JDG
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Grant_Key( obj, 3, true );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Movement( STAR, RUN, 10 );
- params.Set_Attack (STAR, 20, 0, true);
- Commands->Action_Attack (obj, params);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthController, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Reinforcement02_JDG, "")//M11_PETROVA_STEALTHSPAWNER_02_JDG
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Grant_Key( obj, 3, true );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Movement( STAR, RUN, 10 );
- params.Set_Attack (STAR, 20, 0, true);
- Commands->Action_Attack (obj, params);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthController, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Petrova_StealthSoldier_Reinforcement03_JDG, "")//M11_PETROVA_STEALTHSPAWNER_03_JDG
- {
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- Commands->Grant_Key( obj, 3, true );
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Movement( STAR, RUN, 10 );
- params.Set_Attack (STAR, 20, 0, true);
- Commands->Action_Attack (obj, params);
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * stealthController = Commands->Find_Object ( 106230 );
- if (stealthController != NULL)
- {
- Commands->Send_Custom_Event( obj, stealthController, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Sydney_Script_JDG, "")//M11_REAL_SYDNEY_MOBIUS_JDG 100644
- {
- typedef enum {
- IDLE,
- GOING_TO_RALLY_POINT01,
- GOING_TO_RALLY_POINT02,
- GOING_TO_RALLY_POINT03,
- GOING_TO_ELEVATOR01,
- GOING_TO_ELEVATOR02,
- GOING_TO_ELEVATOR03,
- GOING_TO_ELEVATOR04,
- GOING_TO_MISSILE_SWITCH,
-
- } M11_Location;
- M11_Location sydneys_location;
- int sydney_conv01;
- int sydney_damaged_conv01;
- int sydney_damaged_conv02;
- int sydney_damaged_conv03;
- int missionEndConv;
- bool first_time_damaged;
- bool second_time_damaged;
- bool third_time_damaged;
- bool killedYet;
- bool sydney_damaged_conv01_playing;
- bool sydney_damaged_conv02_playing;
- bool sydney_damaged_conv03_playing;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydneys_location, 1);
- SAVE_VARIABLE(sydney_conv01, 2);
- SAVE_VARIABLE(sydney_damaged_conv01, 3);
- SAVE_VARIABLE(sydney_damaged_conv02, 4);
- SAVE_VARIABLE(sydney_damaged_conv03, 5);
- SAVE_VARIABLE(missionEndConv, 6);
- SAVE_VARIABLE(first_time_damaged, 7);
- SAVE_VARIABLE(second_time_damaged, 8);
- SAVE_VARIABLE(third_time_damaged, 9);
- SAVE_VARIABLE(killedYet, 10);
- SAVE_VARIABLE(sydney_damaged_conv01_playing, 11);
- SAVE_VARIABLE(sydney_damaged_conv02_playing, 12);
- SAVE_VARIABLE(sydney_damaged_conv03_playing, 13);
- }
- void Created( GameObject * obj )
- {
- Commands->Set_Shield_Type ( obj, "Blamo" );
- sydneys_location = IDLE;
- Commands->Innate_Disable(obj);
- Commands->Set_Obj_Radar_Blip_Shape (obj, RADAR_BLIP_SHAPE_NONE );
- Commands->Set_Is_Visible( obj, false );
- Commands->Set_Is_Rendered( obj, false );
- Commands->Grant_Key( obj, 1, true );
- Commands->Grant_Key( obj, 2, true );
- Commands->Grant_Key( obj, 3, true );
- first_time_damaged = true;
- second_time_damaged = false;
- third_time_damaged = false;
- killedYet = false;
- sydney_damaged_conv01_playing = false;
- sydney_damaged_conv02_playing = false;
- sydney_damaged_conv03_playing = false;
- }
- void Damaged( GameObject * obj, GameObject * damager, float amount )
- { //M11_Sydney_Damaged_Conversation_01
- //M11_Sydney_Damaged_Conversation_02
- //M11_Sydney_Damaged_Conversation_03
- if (obj && killedYet == false)
- {
- if (first_time_damaged == true)
- {
- Commands->Set_HUD_Help_Text ( IDS_M11DSGN_DSGN1007I1DSGN_TXT, TEXT_COLOR_OBJECTIVE_PRIMARY );
- first_time_damaged = false;
- sydney_damaged_conv01 = Commands->Create_Conversation( "M11_Sydney_Damaged_Conversation_01", 90, 1000, true);
- Commands->Join_Conversation( obj, sydney_damaged_conv01, false, true, true );
- Commands->Start_Conversation( sydney_damaged_conv01, sydney_damaged_conv01 );
- Commands->Monitor_Conversation( obj, sydney_damaged_conv01 );
- sydney_damaged_conv01_playing = true;
- }
- else if (second_time_damaged == true)
- {
- Commands->Set_HUD_Help_Text ( IDS_M11DSGN_DSGN1007I1DSGN_TXT, TEXT_COLOR_OBJECTIVE_PRIMARY );
- second_time_damaged = false;
- sydney_damaged_conv02 = Commands->Create_Conversation( "M11_Sydney_Damaged_Conversation_02", 90, 1000, true);
- Commands->Join_Conversation( NULL, sydney_damaged_conv02, false, false, false );
- Commands->Start_Conversation( sydney_damaged_conv02, sydney_damaged_conv02 );
- Commands->Monitor_Conversation( obj, sydney_damaged_conv02 );
- sydney_damaged_conv02_playing = true;
- }
- else if (third_time_damaged == true)
- {
- Commands->Set_HUD_Help_Text ( IDS_M11DSGN_DSGN1007I1DSGN_TXT, TEXT_COLOR_OBJECTIVE_PRIMARY );
- third_time_damaged = false;
- sydney_damaged_conv03 = Commands->Create_Conversation( "M11_Sydney_Damaged_Conversation_03", 90, 1000, true);
- Commands->Join_Conversation( NULL, sydney_damaged_conv03, false, false, false );
- Commands->Start_Conversation( sydney_damaged_conv03, sydney_damaged_conv03 );
- Commands->Monitor_Conversation( obj, sydney_damaged_conv03 );
- sydney_damaged_conv03_playing = true;
- }
- }
- }
- void Killed( GameObject * obj, GameObject * killer ) //M11_Sydney_Dead_Conversation_01 and/or M11_Sydney_Dead_Conversation_02
- {
- Commands->Set_HUD_Help_Text ( IDS_M11DSGN_DSGN1008I1DSGN_TXT, TEXT_COLOR_OBJECTIVE_PRIMARY );
- killedYet = true;
- if (sydney_damaged_conv01_playing == true)
- {
- Commands->Stop_Conversation(sydney_damaged_conv01);
- }
- else if (sydney_damaged_conv02_playing == true)
- {
- Commands->Stop_Conversation(sydney_damaged_conv02);
- }
- else if (sydney_damaged_conv03_playing == true)
- {
- Commands->Stop_Conversation(sydney_damaged_conv03);
- }
- int random = Commands->Get_Random_Int(0, 2);
- if (random == 0)
- {
- Commands->Create_2D_Sound ( "M11DSGN_DSGN0086I1GBRS_SND" );
- }
- else
- {
- Commands->Create_2D_Sound ( "M11DSGN_DSGN0022I1EVAG_SND" );
- }
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_MISSION_CONTROLLER_JDG), 0, M11_END_MISSION_FAIL_JDG, 5 );
-
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- ActionParamsStruct params;
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)//start initial conversation
- {
- if (obj && STAR)
- {
- Commands->Set_Shield_Type ( obj, "ShieldKevlar" );
- Commands->Set_Obj_Radar_Blip_Color ( obj, RADAR_BLIP_COLOR_GDI );
- //Commands->Innate_Enable(obj);
- sydney_conv01 = Commands->Create_Conversation( "M11_Initial_Sydney_Conversation_JDG", 100, 1000, false);
- Commands->Join_Conversation( obj, sydney_conv01, false, true, true );
- Commands->Join_Conversation( STAR, sydney_conv01, false, false, false );
- Commands->Join_Conversation( NULL, sydney_conv01, false, false, false );
- Commands->Start_Conversation( sydney_conv01, sydney_conv01 );
- Commands->Monitor_Conversation( obj, sydney_conv01 );
- Vector3 siloProtector01_spot (-6.307f, 39.101f, 0);
- Vector3 siloProtector02_spot (-7.002f, 38.229f, -10.015f);
- Vector3 siloProtector03_spot (-6.596f, 38.117f, -10.015f);
- Vector3 siloProtector05_spot (7.324f, 38.026f, -18);
- Vector3 siloProtector07_spot (7.1f, 37.690f, -29.854f);
- Vector3 siloProtector08_spot (-0.197f, 44.313f, -29.854f);
- Vector3 siloProtector09_spot (-1.203f, 31.698f, -39.486f);
- GameObject * siloProtector01 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector01_spot );
- GameObject * siloProtector02 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector02_spot );
- GameObject * siloProtector03 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector03_spot );
- GameObject * siloProtector05 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector05_spot );
- GameObject * siloProtector07 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector07_spot );
- GameObject * siloProtector08 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector08_spot );
- GameObject * siloProtector09 = Commands->Create_Object ( "Nod_FlameThrower_2SF", siloProtector09_spot );
- Commands->Attach_Script(siloProtector01, "M11_NukeSilo_Protector_JDG", "");
- Commands->Attach_Script(siloProtector02, "M11_NukeSilo_Protector_JDG", "");
- Commands->Attach_Script(siloProtector03, "M11_NukeSilo_Protector_JDG", "");
- Commands->Attach_Script(siloProtector05, "M11_NukeSilo_Protector_JDG", "");
- Commands->Attach_Script(siloProtector07, "M11_NukeSilo_Protector_JDG", "");
- Commands->Attach_Script(siloProtector08, "M11_NukeSilo_Protector_JDG", "");
- Commands->Attach_Script(siloProtector09, "M11_NukeSilo_Protector_JDG", "");
- Vector3 labProtector01_spot (-0.722f, 20.642f, -34.233f);
- Vector3 labProtector02_spot (9.455f, 28.227f, -39.486f);
- Commands->Create_Object ( "Nod_FlameThrower_2SF", labProtector01_spot );
- Commands->Create_Object ( "Nod_FlameThrower_2SF", labProtector02_spot );
- }
- }
- else if (param == M01_WALKING_WAYPATH_02_JDG)
- {
- Commands->Set_Innate_Is_Stationary ( obj, false );
- int sydney_letsgo_conv = Commands->Create_Conversation( "M11_Sydney_WatchMyBack_Conversation", 100, 1000, false);
- Commands->Join_Conversation( obj, sydney_letsgo_conv, false, true, true );
- Commands->Start_Conversation( sydney_letsgo_conv, sydney_letsgo_conv );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_02_JDG );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.5f );
- int random = Commands->Get_Random_Int(0, 2);
- if (random == 0)
- {
- params.WaypathID = 100110;
- params.WaypointStartID = 100111;
- params.WaypointEndID = 100119;
-
- }
- else
- {
- params.WaypathID = 100121;
- params.WaypointStartID = 100122;
- params.WaypointEndID = 100130;
- }
- Commands->Action_Goto(obj, params);
- }
- else if (param == M01_WALKING_WAYPATH_03_JDG)
- {
- Commands->Set_Innate_Is_Stationary ( obj, false );
- int random = Commands->Get_Random_Int(0, 2);
- if (random == 0)
- {
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_03_JDG );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.5f );
- params.WaypathID = 100135;
- params.WaypointStartID = 100136;
- params.WaypointEndID = 100149;
-
- }
- else
- {
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_04_JDG );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.5f );
- params.WaypathID = 100151;
- params.WaypointStartID = 100152;
- params.WaypointEndID = 100162;
- }
- Commands->Action_Goto(obj, params);
- }
- else if (param == M01_WALKING_WAYPATH_05_JDG)//now goto first silo elevator platform
- {
- sydneys_location = GOING_TO_ELEVATOR01;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- Commands->Debug_Message ( "***************************SYDNEY has received command to goto first elevator lift\n" );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_05_JDG );
- //params.Set_Movement( Vector3 (3.342f, 43.458f, -39.462f), RUN, 0.25f );
- params.Set_Movement( Vector3 (0,0,0), WALK, 0.25f );
- params.WaypathID = 105199;
- Commands->Action_Goto(obj, params);
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevatorController = Commands->Find_Object ( M11_MISSILE_LIFT_CONTROLLER_JDG );
- if (elevatorController != NULL)
- {
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (param == M01_WALKING_WAYPATH_07_JDG)//now goto first silo elevator platform
- {
- sydneys_location = GOING_TO_ELEVATOR01;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- Commands->Debug_Message ( "***************************SYDNEY has received command to goto first elevator lift\n" );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_05_JDG );
- //params.Set_Movement( Vector3 (3.342f, 43.458f, -39.462f), RUN, 0.25f );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.25f );
- params.WaypathID = 105205;
- Commands->Action_Goto(obj, params);
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- //Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_04_JDG , 45, "MISS_ELEV4.MISS_ELEV4" );
- //Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_03_JDG , 45, "MISS_ELEV3.MISS_ELEV3" );
- //Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_02_JDG , 45, "MISS_ELEV2.MISS_ELEV2" );
- //Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_01_JDG , 45, "MISS_ELEV1.MISS_ELEV1" );
- GameObject * elevatorController = Commands->Find_Object ( M11_MISSILE_LIFT_CONTROLLER_JDG );
- if (elevatorController != NULL)
- {
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- Commands->Send_Custom_Event ( obj, elevatorController, 1, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_JDG)//sydney on level 2--goto next elevator
- {
- sydneys_location = GOING_TO_ELEVATOR02;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_05_JDG );
- //params.Set_Movement( Vector3 (-4.767f, 42.337f, -29.854f), RUN, 0.5f );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.25f );
- params.WaypathID = 104839;
- Commands->Action_Goto(obj, params);
- //GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- //if (elevatorDisabler != NULL)
- //{
- // Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- //}
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)//sydney on level 3--goto next elevator
- {
- sydneys_location = GOING_TO_ELEVATOR03;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_05_JDG );
- //params.Set_Movement( Vector3 (-4.632f, 33.498f, -18), RUN, 0.5f );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.25f );
- params.WaypathID = 104845;
- Commands->Action_Goto(obj, params);
- GameObject * ropeController = Commands->Find_Object ( 106908 );
- if (ropeController != NULL)
- {
- Commands->Send_Custom_Event ( obj, ropeController, 0, M01_START_ACTING_JDG, 3 );
- }
- //GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- //if (elevatorDisabler != NULL)
- //{
- // Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- //}
- }
- else if (param == M01_MODIFY_YOUR_ACTION_03_JDG)//sydney on level 4--goto next elevator
- {
- sydneys_location = GOING_TO_ELEVATOR04;
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_05_JDG );
- //params.Set_Movement( Vector3 (4.042f, 32.885f, -10.015f), RUN, 0.5f );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.25f );
- params.WaypathID = 104850;
- Commands->Action_Goto(obj, params);
- //GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- //if (elevatorDisabler != NULL)
- //{
- // Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- //}
- }
- else if (param == M01_MODIFY_YOUR_ACTION_04_JDG)//sydney on top level 4--goto nuke switch
- {
- sydneys_location = GOING_TO_MISSILE_SWITCH;
- GameObject * nukeSwitch = Commands->Find_Object ( M11_END_MISSION_SWITCH_JDG );
- if (nukeSwitch != NULL)
- {
- Vector3 nukePosition (-0.113f, 29.391f, 0.046f);
- Commands->Set_Innate_Is_Stationary ( obj, false );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_06_JDG );
- params.Set_Movement( nukePosition, RUN, 0.25f );
- Commands->Action_Goto(obj, params);
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_05_JDG)//sydney should now be facing nuke console--play anim
- {
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Animation ("S_A_HUMAN.H_A_CON2", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- }
- void Action_Complete( GameObject * obj, int action_id, ActionCompleteReason complete_reason )
- {
- ActionParamsStruct params;
- switch (complete_reason)
- {
- case ACTION_COMPLETE_CONVERSATION_ENDED:
- {
- if (action_id == sydney_conv01)
- {
- Commands->Set_Innate_Is_Stationary (obj, false);
- Commands->Grant_Key( obj, 1, true );
- Commands->Grant_Key( obj, 2, true );
- Commands->Grant_Key( obj, 3, true );
- Commands->Grant_Key( obj, 4, true );
- Commands->Debug_Message ( "***************************initial SYDNEY conversation is over--going to zone 01\n" );
- params.Set_Basic( this, 100, M01_WALKING_WAYPATH_01_JDG );
- params.Set_Movement( Vector3 (0,0,0), RUN, 0.5f );
- params.WaypathID = 100541;
- params.WaypointStartID = 100542;
- params.WaypointEndID = 100544;
- Commands->Action_Goto(obj, params);
- GameObject * objectiveController = Commands->Find_Object ( M11_MISSION_CONTROLLER_JDG );
- if (objectiveController != NULL)
- {
- Commands->Send_Custom_Event( obj, objectiveController, 0, M11_END_SECOND_OBJECTIVE_JDG, 0 );
- }
- }
- else if (action_id == sydney_damaged_conv01)
- {
- second_time_damaged = true;
- sydney_damaged_conv01_playing = false;
- }
- else if (action_id == sydney_damaged_conv02)
- {
- third_time_damaged = true;
- sydney_damaged_conv02_playing = false;
- }
- else if (action_id == sydney_damaged_conv03) //missionEndConv
- {
- third_time_damaged = true;
- sydney_damaged_conv03_playing = false;
- }
- else if (action_id == missionEndConv)
- {
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_02_JDG );
- params.Set_Animation ("S_A_HUMAN.H_A_CON2", false);
- Commands->Action_Play_Animation (obj, params);
- }
- }
- break;
- case ACTION_COMPLETE_PATH_BAD_START:
- {
- if (sydneys_location == GOING_TO_ELEVATOR01)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_WALKING_WAYPATH_05_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR02)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR03)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR04)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_MISSILE_SWITCH)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_04_JDG, 1 );
- }
- }
- break;
- case ACTION_COMPLETE_PATH_BAD_DEST:
- {
- if (sydneys_location == GOING_TO_ELEVATOR01)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_WALKING_WAYPATH_05_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR02)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR03)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR04)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_MISSILE_SWITCH)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_04_JDG, 1 );
- }
- }
- break;
- case ACTION_COMPLETE_MOVE_NO_PROGRESS_MADE:
- {
- if (sydneys_location == GOING_TO_ELEVATOR01)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_WALKING_WAYPATH_05_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR02)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR03)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_ELEVATOR04)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 1 );
- }
- else if (sydneys_location == GOING_TO_MISSILE_SWITCH)
- {
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_04_JDG, 1 );
- }
- }
- break;
- case ACTION_COMPLETE_NORMAL:
- {
- if (action_id == M01_WALKING_WAYPATH_01_JDG)
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- GameObject * rallyZone01 = Commands->Find_Object ( M11_SYDNEY_RALLY_ZONE_01_JDG );
- if (rallyZone01 != NULL)
- {
- Commands->Send_Custom_Event( obj, rallyZone01, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else
- {
- Commands->Debug_Message ( "**********************SYDNEY--cannot find rally zone 01\n" );
- }
- }
- else if (action_id == M01_WALKING_WAYPATH_02_JDG)
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- GameObject * rallyZone02 = Commands->Find_Object ( M11_SYDNEY_RALLY_ZONE_02_JDG );
- if (rallyZone02 != NULL)
- {
- Commands->Send_Custom_Event( obj, rallyZone02, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else
- {
- Commands->Debug_Message ( "**********************SYDNEY--cannot find rally zone 02\n" );
- }
-
- GameObject * objectiveController = Commands->Find_Object ( M11_MISSION_CONTROLLER_JDG );
- if (objectiveController != NULL)
- {
- Commands->Send_Custom_Event( obj, objectiveController, 0, M11_ADD_FIFTH_OBJECTIVE_JDG, 0 );
- }
- }
- else if (action_id == M01_WALKING_WAYPATH_03_JDG)
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- GameObject * rallyZone03 = Commands->Find_Object ( M11_SYDNEY_RALLY_ZONE_03A_JDG );
- if (rallyZone03 != NULL)
- {
- Commands->Send_Custom_Event( obj, rallyZone03, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else
- {
- Commands->Debug_Message ( "**********************SYDNEY--cannot find rally zone 03a\n" );
- }
- }
- else if (action_id == M01_WALKING_WAYPATH_04_JDG)
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- GameObject * rallyZone03 = Commands->Find_Object ( M11_SYDNEY_RALLY_ZONE_03B_JDG );
- if (rallyZone03 != NULL)
- {
- Commands->Send_Custom_Event( obj, rallyZone03, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- else
- {
- Commands->Debug_Message ( "**********************SYDNEY--cannot find rally zone 03b\n" );
- }
- }
- else if (action_id == M01_WALKING_WAYPATH_05_JDG)//sydneys at first elevator--goto stationary for now
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_START_ACTING_JDG, 0 );
- }
-
- }
- else if (action_id == M01_WALKING_WAYPATH_06_JDG)//sydneys at missile switch-play animation
- {
- GameObject * nukeconsole = Commands->Find_Object ( 100106 );
- if (nukeconsole != NULL)
- {
- Commands->Set_Innate_Is_Stationary (obj, true);
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (nukeconsole, 0, 0, true);
- Commands->Action_Attack (obj, params);
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_05_JDG, 1 );
- }
-
- }
- else if (action_id == M01_DOING_ANIMATION_01_JDG)//play end mission conversation
- {
- GameObject * nukeconsole = Commands->Find_Object ( 100106 );
- if (nukeconsole != NULL)
- {
- Commands->Send_Custom_Event( obj, nukeconsole, 0, M01_START_ACTING_JDG, 0 );
- }
- missionEndConv = Commands->Create_Conversation( "M11_End_Mission_Conversation", 100, 1000, false);
- Commands->Join_Conversation( STAR, missionEndConv, false, false );
- Commands->Join_Conversation( obj, missionEndConv, false, false, true );
- Commands->Start_Conversation( missionEndConv, missionEndConv );
- Commands->Monitor_Conversation (obj, missionEndConv);
- }
- else if (action_id == M01_DOING_ANIMATION_02_JDG)//end mission--success
- {
- Commands->Send_Custom_Event( obj, Commands->Find_Object (M11_MISSION_CONTROLLER_JDG), 0, M11_END_MISSION_PASS_JDG, 0 );
- }
- }
- break;
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorDeactivator_JDG, "")//105192
- {
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M11_START_ACTING_JDG)//allow switch usage
- {
- GameObject * elevator01_switch01 = Commands->Find_Object ( 101689 );
- if (elevator01_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch01, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator01_switch02 = Commands->Find_Object ( 101651 );
- if (elevator01_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch02, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator01_switch03 = Commands->Find_Object ( 101690 );
- if (elevator01_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch03, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator01_switch04 = Commands->Find_Object ( 101691 );
- if (elevator01_switch04 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch04, 0, M11_START_ACTING_JDG, 0 );
- }
- //101692 101693 101694 101695
- GameObject * elevator02_switch01 = Commands->Find_Object ( 101692 );
- if (elevator02_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch01, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator02_switch02 = Commands->Find_Object ( 101693 );
- if (elevator02_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch02, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator02_switch03 = Commands->Find_Object ( 101694 );
- if (elevator02_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch03, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator02_switch04 = Commands->Find_Object ( 101695 );
- if (elevator02_switch04 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch04, 0, M11_START_ACTING_JDG, 0 );
- }
- //101717 101718 101719 101720
- GameObject * elevator03_switch01 = Commands->Find_Object ( 101717 );
- if (elevator03_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch01, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator03_switch02 = Commands->Find_Object ( 101718 );
- if (elevator03_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch02, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator03_switch03 = Commands->Find_Object ( 101719 );
- if (elevator03_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch03, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator03_switch04 = Commands->Find_Object ( 101720 );
- if (elevator03_switch04 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch04, 0, M11_START_ACTING_JDG, 0 );
- }
- //101721 101722 101723
- GameObject * elevator04_switch01 = Commands->Find_Object ( 101721 );
- if (elevator04_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator04_switch01, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator04_switch02 = Commands->Find_Object ( 101722 );
- if (elevator04_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator04_switch02, 0, M11_START_ACTING_JDG, 0 );
- }
- GameObject * elevator04_switch03 = Commands->Find_Object ( 101723 );
- if (elevator04_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator04_switch03, 0, M11_START_ACTING_JDG, 0 );
- }
- }
- if (param == M11_GOTO_IDLE_JDG)//disallow switch usage
- {
- GameObject * elevator01_switch01 = Commands->Find_Object ( 101689 );
- if (elevator01_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch01, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator01_switch02 = Commands->Find_Object ( 101651 );
- if (elevator01_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch02, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator01_switch03 = Commands->Find_Object ( 101690 );
- if (elevator01_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch03, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator01_switch04 = Commands->Find_Object ( 101691 );
- if (elevator01_switch04 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator01_switch04, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- //101692 101693 101694 101695
- GameObject * elevator02_switch01 = Commands->Find_Object ( 101692 );
- if (elevator02_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch01, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator02_switch02 = Commands->Find_Object ( 101693 );
- if (elevator02_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch02, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator02_switch03 = Commands->Find_Object ( 101694 );
- if (elevator02_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch03, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator02_switch04 = Commands->Find_Object ( 101695 );
- if (elevator02_switch04 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator02_switch04, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- //101717 101718 101719 101720
- GameObject * elevator03_switch01 = Commands->Find_Object ( 101717 );
- if (elevator03_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch01, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator03_switch02 = Commands->Find_Object ( 101718 );
- if (elevator03_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch02, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator03_switch03 = Commands->Find_Object ( 101719 );
- if (elevator03_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch03, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator03_switch04 = Commands->Find_Object ( 101720 );
- if (elevator03_switch04 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator03_switch04, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- //101721 101722 101723
- GameObject * elevator04_switch01 = Commands->Find_Object ( 101721 );
- if (elevator04_switch01 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator04_switch01, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator04_switch02 = Commands->Find_Object ( 101722 );
- if (elevator04_switch02 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator04_switch02, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * elevator04_switch03 = Commands->Find_Object ( 101723 );
- if (elevator04_switch03 != NULL)
- {
- Commands->Send_Custom_Event( obj, elevator04_switch03, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone01_Top_JDG, "")//100705
- {
- bool sydney_in_zone;
- bool havoc_in_zone;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydney_in_zone, 1);
- SAVE_VARIABLE(havoc_in_zone, 2);
- }
- void Created( GameObject * obj )
- {
- sydney_in_zone = false;
- havoc_in_zone = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_MODIFY_YOUR_ACTION_JDG)
- {
- if (sydney_in_zone == true && havoc_in_zone == true)
- {
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (sydney != NULL )
- {
- Commands->Send_Custom_Event( obj, sydney, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- }
- }
- }
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- sydney_in_zone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0);
-
- }
- else if (enterer == STAR)
- {
- havoc_in_zone = true;
- Commands->Send_Custom_Event( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone02_Top_JDG, "")//100707
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- if (sydney != NULL )
- {
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- Commands->Send_Custom_Event( obj, sydney, 0, M01_MODIFY_YOUR_ACTION_02_JDG, 0.25f );
- //Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone03_Top_JDG, "")//100710
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- if (sydney != NULL )
- {
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- Commands->Send_Custom_Event( obj, sydney, 0, M01_MODIFY_YOUR_ACTION_03_JDG, 0.25f );
- //Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Silo_ElevatorZone04_Top_JDG, "")//100712
- {
- void Entered( GameObject * obj, GameObject * enterer )
- {
- GameObject * sydney = Commands->Find_Object ( M11_REAL_SYDNEY_MOBIUS_JDG );
- if (enterer == sydney)
- {
- if (sydney != NULL )
- {
- GameObject * elevatorDisabler = Commands->Find_Object ( 105192 );
- if (elevatorDisabler != NULL)
- {
- Commands->Send_Custom_Event( obj, elevatorDisabler, 0, M11_GOTO_IDLE_JDG, 0 );
- }
- Commands->Send_Custom_Event( obj, sydney, 0, M01_MODIFY_YOUR_ACTION_04_JDG, 0.25f );
- //Commands->Destroy_Object ( obj );//your job is over--clean up
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_ForthFloor_Elevator_Switch_Script_JDG, "")//101689 101651 101690 101691
- {
- bool sydney_in_motion;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydney_in_motion, 1);
- }
- void Created( GameObject * obj )
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if (poker == STAR && sydney_in_motion == false)
- {
- GameObject * elevatorController = Commands->Find_Object ( M11_MISSILE_LIFT_CONTROLLER_JDG );
- if (elevatorController != NULL)
- {
- Commands->Send_Custom_Event ( obj, elevatorController, 0, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG)
- {
- if (type == 0)//elevator is moving--flash lights
- {
- Commands->Set_Animation ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", true);
- }
- else if (type == 1)//elevator is at top--goto green
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 0 );//green
- }
- else if (type == 2)//elevator is at bottom--goto red
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- }
- else if (type == 0)
- {
- if (param == M11_GOTO_IDLE_JDG)
- {
- sydney_in_motion = true;
- Commands->Enable_HUD_Pokable_Indicator ( obj, false );
- Commands->Send_Custom_Event( obj, obj, 0, M11_START_ACTING_JDG, 8 );
- }
- else if (param == M11_START_ACTING_JDG)
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_ThirdFloor_Elevator_Switch_Script_JDG, "")//101692 101693 101694 101695
- {
- bool sydney_in_motion;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydney_in_motion, 1);
- }
- void Created( GameObject * obj )
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if (poker == STAR && sydney_in_motion == false)
- {
- GameObject * elevatorController = Commands->Find_Object ( M11_MISSILE_LIFT_CONTROLLER_JDG );
- if (elevatorController != NULL)
- {
- Commands->Send_Custom_Event ( obj, elevatorController, 0, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG)
- {
- if (type == 0)//elevator is moving--flash lights
- {
- Commands->Set_Animation ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", true);
- }
- else if (type == 1)//elevator is at top--goto green
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 0 );//green
- }
- else if (type == 2)//elevator is at bottom--goto red
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- }
- else if (type == 0)
- {
- if (param == M11_GOTO_IDLE_JDG)
- {
- sydney_in_motion = true;
- Commands->Enable_HUD_Pokable_Indicator ( obj, false );
- Commands->Send_Custom_Event( obj, obj, 0, M11_START_ACTING_JDG, 8 );
- }
- else if (param == M11_START_ACTING_JDG)
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_SecondFloor_Elevator_Switch_Script_JDG, "")//101717 101718 101719 101720
- {
- bool sydney_in_motion;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(sydney_in_motion, 1);
- }
- void Created( GameObject * obj )
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if (poker == STAR && sydney_in_motion == false)
- {
- GameObject * elevatorController = Commands->Find_Object ( M11_MISSILE_LIFT_CONTROLLER_JDG );
- if (elevatorController != NULL)
- {
- Commands->Send_Custom_Event ( obj, elevatorController, 0, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG)
- {
- if (type == 0)//elevator is moving--flash lights
- {
- Commands->Set_Animation ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", true);
- }
- else if (type == 1)//elevator is at top--goto green
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 0 );//green
- }
- else if (type == 2)//elevator is at bottom--goto red
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- }
- else if (type == 0)
- {
- if (param == M11_GOTO_IDLE_JDG)
- {
- sydney_in_motion = true;
- Commands->Enable_HUD_Pokable_Indicator ( obj, false );
- Commands->Send_Custom_Event( obj, obj, 0, M11_START_ACTING_JDG, 8 );
- }
- else if (param == M11_START_ACTING_JDG)
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_FirstFloor_Elevator_Switch_Script_JDG, "")//101721 101722 101723
- {
- bool sydney_in_motion;
- REGISTER_VARIABLES()
- {
- sydney_in_motion = false;
- SAVE_VARIABLE(sydney_in_motion, 1);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- void Poked( GameObject * obj, GameObject * poker )
- {
- if (poker == STAR && sydney_in_motion == false)
- {
- GameObject * elevatorController = Commands->Find_Object ( M11_MISSILE_LIFT_CONTROLLER_JDG );
- if (elevatorController != NULL)
- {
- Commands->Send_Custom_Event ( obj, elevatorController, 0, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (param == M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG)
- {
- if (type == 0)//elevator is moving--flash lights
- {
- Commands->Set_Animation ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", true);
- }
- else if (type == 1)//elevator is at top--goto green
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 0 );//green
- }
- else if (type == 2)//elevator is at bottom--goto red
- {
- Commands->Set_Animation_Frame ( obj, "DSP_DOORSWITCH.DSP_DOORSWITCH", 1 );//red
- }
- }
- else if (type == 0)
- {
- if (param == M11_GOTO_IDLE_JDG)
- {
- sydney_in_motion = true;
- Commands->Enable_HUD_Pokable_Indicator ( obj, false );
- Commands->Send_Custom_Event( obj, obj, 0, M11_START_ACTING_JDG, 8 );
- }
- else if (param == M11_START_ACTING_JDG)
- {
- sydney_in_motion = false;
- Commands->Enable_HUD_Pokable_Indicator ( obj, true );
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_Elevator_Switch_MasterControllerScript_JDG, "")//101673
- {
- bool level4_lift_down;
- bool level4_lift_up;
- bool level4_lift_moving;
- bool level3_lift_down;
- bool level3_lift_up;
- bool level3_lift_moving;
- bool level2_lift_down;
- bool level2_lift_up;
- bool level2_lift_moving;
- bool level1_lift_down;
- bool level1_lift_up;
- bool level1_lift_moving;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(level4_lift_down, 1);
- SAVE_VARIABLE(level4_lift_up, 2);
- SAVE_VARIABLE(level4_lift_moving, 3);
- SAVE_VARIABLE(level3_lift_down, 4);
- SAVE_VARIABLE(level3_lift_up, 5);
- SAVE_VARIABLE(level3_lift_moving, 6);
- SAVE_VARIABLE(level2_lift_down, 7);
- SAVE_VARIABLE(level2_lift_up, 8);
- SAVE_VARIABLE(level2_lift_moving, 9);
- SAVE_VARIABLE(level1_lift_down, 10);
- SAVE_VARIABLE(level1_lift_up, 11);
- SAVE_VARIABLE(level1_lift_moving, 12);
- }
- void Created( GameObject * obj )
- {
- level4_lift_down = true;
- level4_lift_up = false;
- level4_lift_moving = false;
- level3_lift_down = true;
- level3_lift_up = false;
- level3_lift_moving = false;
- level2_lift_down = true;
- level2_lift_up = false;
- level2_lift_moving = false;
- level1_lift_down = true;
- level1_lift_up = false;
- level1_lift_moving = false;
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 1)
- {
- if (param == M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG)//sydney is coming...force elevator down
- {
- level4_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_04_JDG , 45, "MISS_ELEV4.MISS_ELEV4" );
- level4_lift_down = true;
- }
- else if (param == M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG)//sydney is coming...force elevator down
- {
- level3_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_03_JDG , 45, "MISS_ELEV3.MISS_ELEV3" );
- level3_lift_down = true;
- }
- else if (param == M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG)//sydney is coming...force elevator down
- {
- level2_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_02_JDG , 45, "MISS_ELEV2.MISS_ELEV2" );
- level2_lift_down = true;
- }
- else if (param == M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG)//sydney is coming...force elevator down
- {
- level1_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG );
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_01_JDG , 45, "MISS_ELEV1.MISS_ELEV1" );
- level1_lift_down = true;
- }
- }
- else if (type == 0)
- {
- if (param == M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG && level4_lift_moving == false)
- {
- level4_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG );
- if (level4_lift_down == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_04_JDG , 0, "MISS_ELEV4.MISS_ELEV4" );
- }
- else if (level4_lift_up == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_04_JDG , 45, "MISS_ELEV4.MISS_ELEV4" );
- }//101689 101651 101690 101691
- GameObject * lev4switch01 = Commands->Find_Object ( 101689 );
- GameObject * lev4switch02 = Commands->Find_Object ( 101651 );
- GameObject * lev4switch03 = Commands->Find_Object ( 101690 );
- GameObject * lev4switch04 = Commands->Find_Object ( 101691 );
- if (lev4switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch01, 0, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch02, 0, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch03, 0, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch04, 0, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (param == M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG && level3_lift_moving == false)
- {
- level3_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG );
- if (level3_lift_down == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_03_JDG , 0, "MISS_ELEV3.MISS_ELEV3" );
- }
- else if (level3_lift_up == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_03_JDG , 45, "MISS_ELEV3.MISS_ELEV3" );
- }//101692 101693 101694 101695
- GameObject * lev3switch01 = Commands->Find_Object ( 101692 );
- GameObject * lev3switch02 = Commands->Find_Object ( 101693 );
- GameObject * lev3switch03 = Commands->Find_Object ( 101694 );
- GameObject * lev3switch04 = Commands->Find_Object ( 101695 );
- if (lev3switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch01, 0, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch02, 0, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch03, 0, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch04, 0, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (param == M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG && level2_lift_moving == false)
- {
- level2_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG );
- if (level2_lift_down == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_02_JDG , 0, "MISS_ELEV2.MISS_ELEV2" );
- }
- else if (level2_lift_up == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_02_JDG , 45, "MISS_ELEV2.MISS_ELEV2" );
- }//101717 101718 101719 101720
- GameObject * lev2switch01 = Commands->Find_Object ( 101717 );
- GameObject * lev2switch02 = Commands->Find_Object ( 101718 );
- GameObject * lev2switch03 = Commands->Find_Object ( 101719 );
- GameObject * lev2switch04 = Commands->Find_Object ( 101720 );
- if (lev2switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch01, 0, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch02, 0, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch03, 0, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch04, 0, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (param == M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG && level1_lift_moving == false)
- {
- level1_lift_moving = true;
- Commands->Start_Timer ( obj, this, 3, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG );
- if (level1_lift_down == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_01_JDG , 0, "MISS_ELEV1.MISS_ELEV1" );
- }
- else if (level1_lift_up == true)
- {
- Commands->Static_Anim_Phys_Goto_Frame ( M11_MISSILE_LIFT_01_JDG , 45, "MISS_ELEV1.MISS_ELEV1" );
- }//101721 101722 101723
- GameObject * lev1switch01 = Commands->Find_Object ( 101721 );
- GameObject * lev1switch02 = Commands->Find_Object ( 101722 );
- GameObject * lev1switch03 = Commands->Find_Object ( 101723 );
- if (lev1switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch01, 0, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev1switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch02, 0, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev1switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch03, 0, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- }
- void Timer_Expired( GameObject * obj, int timer_id )
- {
- if (timer_id == M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG)
- {
- level4_lift_moving = false;
- if (level4_lift_down == true)
- {
- level4_lift_down = false;
- level4_lift_up = true;
- GameObject * lev4switch01 = Commands->Find_Object ( 101689 );
- GameObject * lev4switch02 = Commands->Find_Object ( 101651 );
- GameObject * lev4switch03 = Commands->Find_Object ( 101690 );
- GameObject * lev4switch04 = Commands->Find_Object ( 101691 );
- if (lev4switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch01, 1, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch02, 1, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch03, 1, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch04, 1, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (level4_lift_up == true)
- {
- level4_lift_up = false;
- level4_lift_down = true;
- GameObject * lev4switch01 = Commands->Find_Object ( 101689 );
- GameObject * lev4switch02 = Commands->Find_Object ( 101651 );
- GameObject * lev4switch03 = Commands->Find_Object ( 101690 );
- GameObject * lev4switch04 = Commands->Find_Object ( 101691 );
- if (lev4switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch01, 2, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch02, 2, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch03, 2, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev4switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev4switch04, 2, M11_PLAYER_HAS_POKED_LEVEL4_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- else if (timer_id == M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG)
- {
- level3_lift_moving = false;
- if (level3_lift_down == true)
- {
- level3_lift_down = false;
- level3_lift_up = true;
- GameObject * lev3switch01 = Commands->Find_Object ( 101692 );
- GameObject * lev3switch02 = Commands->Find_Object ( 101693 );
- GameObject * lev3switch03 = Commands->Find_Object ( 101694 );
- GameObject * lev3switch04 = Commands->Find_Object ( 101695 );
- if (lev3switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch01, 1, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch02, 1, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch03, 1, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch04, 1, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (level3_lift_up == true)
- {
- level3_lift_up = false;
- level3_lift_down = true;
- GameObject * lev3switch01 = Commands->Find_Object ( 101692 );
- GameObject * lev3switch02 = Commands->Find_Object ( 101693 );
- GameObject * lev3switch03 = Commands->Find_Object ( 101694 );
- GameObject * lev3switch04 = Commands->Find_Object ( 101695 );
- if (lev3switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch01, 2, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch02, 2, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch03, 2, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev3switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev3switch04, 2, M11_PLAYER_HAS_POKED_LEVEL3_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- else if (timer_id == M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG)
- {
- level2_lift_moving = false;
- if (level2_lift_down == true)
- {
- level2_lift_down = false;
- level2_lift_up = true;
- GameObject * lev2switch01 = Commands->Find_Object ( 101717 );
- GameObject * lev2switch02 = Commands->Find_Object ( 101718 );
- GameObject * lev2switch03 = Commands->Find_Object ( 101719 );
- GameObject * lev2switch04 = Commands->Find_Object ( 101720 );
- if (lev2switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch01, 1, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch02, 1, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch03, 1, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch04, 1, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (level2_lift_up == true)
- {
- level2_lift_up = false;
- level2_lift_down = true;
- GameObject * lev2switch01 = Commands->Find_Object ( 101717 );
- GameObject * lev2switch02 = Commands->Find_Object ( 101718 );
- GameObject * lev2switch03 = Commands->Find_Object ( 101719 );
- GameObject * lev2switch04 = Commands->Find_Object ( 101720 );
- if (lev2switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch01, 2, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch02, 2, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch03, 2, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev2switch04 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev2switch04, 2, M11_PLAYER_HAS_POKED_LEVEL2_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- else if (timer_id == M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG)
- {
- level1_lift_moving = false;
- if (level1_lift_down == true)
- {
- level1_lift_down = false;
- level1_lift_up = true;
- GameObject * lev1switch01 = Commands->Find_Object ( 101721 );
- GameObject * lev1switch02 = Commands->Find_Object ( 101722 );
- GameObject * lev1switch03 = Commands->Find_Object ( 101723 );
- if (lev1switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch01, 1, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev1switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch02, 1, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev1switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch03, 1, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- else if (level1_lift_up == true)
- {
- level1_lift_up = false;
- level1_lift_down = true;
- GameObject * lev1switch01 = Commands->Find_Object ( 101721 );
- GameObject * lev1switch02 = Commands->Find_Object ( 101722 );
- GameObject * lev1switch03 = Commands->Find_Object ( 101723 );
- if (lev1switch01 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch01, 2, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev1switch02 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch02, 2, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- if (lev1switch03 != NULL)
- {
- Commands->Send_Custom_Event ( obj, lev1switch03, 2, M11_PLAYER_HAS_POKED_LEVEL1_ELEVATOR_SWITCH_JDG, 0 );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepellers_Controller2_JDG, "")//106908
- {
- int spawned_units;
- int rope_C_id;
- Vector3 ropeC_v3;
- bool rope_C_spawned;
- REGISTER_VARIABLES()
- {
- SAVE_VARIABLE(spawned_units, 1);
- SAVE_VARIABLE(rope_C_id, 2);
- SAVE_VARIABLE(ropeC_v3, 4);
- SAVE_VARIABLE(rope_C_spawned, 6);
- }
- void Created( GameObject * obj )
- {
- Commands->Enable_Hibernation( obj, false );
- rope_C_spawned = false;
- spawned_units = 0;
- //Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_JDG, 5 );
- //Commands->Send_Custom_Event ( obj, obj, 0, M01_START_ACTING_JDG, 15 );
- ropeC_v3.Set (4.753f, 38.483f, 8.044f);
- }
- void Custom( GameObject * obj, int type, int param, GameObject * sender )
- {
- if (type == 0)
- {
- if (param == M01_START_ACTING_JDG)
- {
- rope_C_spawned = true;
- GameObject *controller = Commands->Create_Object("Invisible_Object", ropeC_v3);
- //Commands->Set_Facing ( controller, 75 );
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_Repel_Part3.txt");
- spawned_units++;
- }
- else if (param == M01_ROPE_IS_SENDING_ID_JDG)
- {
- rope_C_id = Commands->Get_ID ( sender );
- }
- else if (param == M01_MODIFY_YOUR_ACTION_02_JDG)
- {
- GameObject * rope_C = Commands->Find_Object ( rope_C_id );
- if (rope_C != NULL)
- {
- GameObject *controller = Commands->Create_Object("Invisible_Object", ropeC_v3);
- //Commands->Set_Facing ( controller, 75 );
- Commands->Attach_Script(controller, "Test_Cinematic", "X11D_Repel_Part4.txt");
- Commands->Set_Animation ( rope_C, "X11D_Rope.X11D_Rope_L", false);
- spawned_units++;
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_04_JDG, (95/30) );
- }
- }
- else if (param == M01_MODIFY_YOUR_ACTION_04_JDG)//set rope "C" to idle anim
- {
- GameObject * rope_C = Commands->Find_Object ( rope_C_id );
- if (rope_C != NULL)
- {
- Commands->Set_Animation ( rope_C, "X11D_Rope.X11D_Rope_Z", true);
- }
- }
- else if (param == M01_IVE_BEEN_KILLED_JDG )
- {
- if (rope_C_spawned == true)
- {
- float delayTimer = Commands->Get_Random ( 2, 5 );
- Commands->Send_Custom_Event ( obj, obj, 0, M01_MODIFY_YOUR_ACTION_02_JDG, delayTimer );
- }
- }
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepellers_RopeC_JDG, "")
- {
- void Created( GameObject * obj ) //M11_FIRSTFLOOR_REPELER_CONTROLLER_JDG
- {
- Commands->Enable_Hibernation( obj, false );
- GameObject * myController = Commands->Find_Object ( 106908 );
- if (myController != NULL)
- {
- Commands->Send_Custom_Event ( obj, myController, 0, M01_ROPE_IS_SENDING_ID_JDG, 0 );
- }
- }
- };
- DECLARE_SCRIPT(M11_CeilingRepeller2_JDG, "")
- {
- void Created( GameObject * obj )
- {
- ActionParamsStruct params;
- params.Set_Basic( this, 100, M01_DOING_ANIMATION_01_JDG );
- params.Set_Attack (STAR, 100, 0, true);
- Commands->Action_Attack (obj, params);
- }
- void Animation_Complete(GameObject * obj, const char *anim)
- {
- if (stricmp(anim, "S_a_Human.H_a_X11D_repel") == 0)
- {
- Commands->Attach_Script(obj, "M01_Hunt_The_Player_JDG","");
- }
- }
- void Killed( GameObject * obj, GameObject * killer )
- {
- GameObject * myController = Commands->Find_Object ( 106908 );
- if (myController != NULL)
- {
- Commands->Send_Custom_Event ( obj, myController, 0, M01_IVE_BEEN_KILLED_JDG, 0 );
- }
- }
- };
|