func InitializePlayer(int plr) { // Create buildings the_elevator = CreateConstruction(ELEV,165,110,0,80,1); valley_cata = CreateObject(CATA,240,387,0); hill_cata = CreateObject(CATA,540,247,0); valley_wood = CreateObject(WOOD,280,390,NO_OWNER); CreateObject(METL,285,390,NO_OWNER); // Remember clonks constructor_clnk = GetCrew(plr,0); valley_clnk = GetCrew(plr,1); catapult_clnk = GetCrew(plr,2); // Move valley and catapult clonk Exit(valley_clnk,230,390); Exit(catapult_clnk,520,250); // Prevent constructor and catapult clonks from falling down var hr = AddEffect("StayNearElev", constructor_clnk, 1, 30, 0, 0, 0, 0, 0, 0); AddEffect("StayNearCata", catapult_clnk, 1, 30); // Message and control positioning SetPlrShowControlPos(plr, SHOWCTRLPOS_Top); SetTutorialMessagePos(MSG_Bottom | MSG_Left | MSG_XRel | MSG_WidthRel, 10, -10, 35); // Start script ScriptGo(1); return true; }
func Initialize() { var iTimeout,pWipf; SetGamma(RGB(15,15,15),RGB(118,118,118),RGB(215,215,215)); SetSkyParallax(0,15,17,0,0,0,0); //Handgemacht... ;) Meeresrauschen(170); Meeresrauschen(1100); Meeresrauschen(2060); Meeresrauschen(2900); Meeresrauschen(3800); Meeresrauschen(4800); Meeresrauschen(5700); Moewen(900); Moewen(2300); Moewen(3900); Moewen(5000); //Nebel platzieren for(var i;i<260;++i) CreateParticle("Fog",Random(LandscapeWidth()),Random(LandscapeHeight()*2/3),RandomX(3,9),0,RandomX(1000,1500)); //Wipfe platzieren while(pWipf=FindObject(WIPF,0,0,0,0,0,0,0,0,pWipf)) { iTimeout=0; while(Stuck(pWipf)||GetMaterial(GetX(pWipf),GetY(pWipf))!=Material("Tunnel")) { SetPosition(Random(LandscapeWidth()),RandomX(LandscapeHeight()*2/3,LandscapeHeight()),pWipf); if(iTimeout++ > 50000) { RemoveObject(pWipf); break; } } } ScriptGo(1); }
func Initialize() { _inherited(); SetSkyParallax(1, 20,20, 20,0,0,0); ScriptGo(1); return(1); }
func Initialize() { MarsSky(); SetSkyAdjust(RGBa(255,255,255,160), RGB(70,30,15)); //Hintergrund CreateObject(BG_1,-0,0,-1); CreateObject(DUSK,0,0,-1); ScriptGo(1); // Spielziel setzen var goal = FindObject(RCOB); goal->AddType(DBSE); goal->AddType(DLAB); goal->AddType(DSOL); //Forschungsstation PlaceObjects(DBSE,1,"Durolava",950,1200,150,150); PlaceObjects(DLAB,1,"Durolava",950,1200,150,150); PlaceObjects(BONE,9,"Durolava",950,1200,150,150); PlaceObjects(SKUL,3,"Durolava",950,1200,150,150); PlaceObjects(DSOL,3,"Durolava",950,1200,150,150); PlaceObjects(METL,2,"Durolava",950,1200,150,150); PlaceObjects(CELL,1,"Durolava",950,1200,150,150); PlaceObjects(SATD,1,"Durolava",950,1200,150,150); PlaceObjects(ORE1,8,"Durolava",950,1200,150,150); // Spouter PlaceObjects(OILS, RandomX(1,3), "Oil", 0, 1300, LandscapeWidth(), 300); // Kristalle PlaceCrystals(5, 20); return(1); }
func Script10() { CreateMenu(MEPU, GetCursor(), 0, 0,"Regeneinstellungen", 0, 1,1,17); CanClose = 0; AddMenuItem("Säure", Format("bRegen(%d)",1),MEPU, GetCursor()); AddMenuItem("Lava", Format("bRegen(%d)",2),MEPU, GetCursor()); AddMenuItem("Wasser", Format("bRegen(%d)",3),MEPU, GetCursor()); ScriptGo(); }
func Initialize() { _inherited(); SetSkyParallax(1, 20,20, 0,0, SkyPar_Keep(),SkyPar_Keep()); CreateGate(SGR2,STGT, 2555, 280, -1,"Jaffa"); CreateObject(DHD_,2503,185,-1); CreateGate(SGR2,STGT, 2553, 1378, -1,"Wraith"); CreateObject(DHD_,2478,1375,-1); UpdateScoreboard(); helper = 1; ScriptGo(0); return(1); }
protected func Initialize() { // Sicherstellen, dass das Spielziel da ist if (!ObjectCount(_KTK)) CreateObject(_KTK,0,0,-1); // Zusätzlich Melee if (!ObjectCount(MELE)) CreateObject(MELE); // Himmelsparallaxität SetSkyParallax(0,20,10); // Script starten ScriptGo(1); // Fertig return(1); }
func Initialize() { // Always have some music Music("Frontend", 1); MusicLevel(30); // Create lens flare CreateObject(LENS, 70, 50, NO_OWNER); // Place hut CreateConstruction(HUT2,580,180,NO_OWNER,100,1); // Create goal CreateObject(SCRG, 50,50, NO_OWNER); // Start script ScriptGo(true); // Evaluation dialog options SetNextMission("Tutorial.c4f\\Tutorial01.c4s", "$BtnRepeatRound$", "$BtnRepeatRoundDesc$"); return true; }
func Initialize() { // Always have some music Music("Frontend", 1); MusicLevel(30); // Create lens flare CreateObject(LENS, 100, 100, NO_OWNER); // Fix vines (wrong offset when saved in Objects.txt for the first time) var pVine; for (pVine in FindObjects(Find_ID(VINE))) pVine->SetPosition(pVine->GetX(), pVine->GetY() - 60); // Create flag-checker effect AddEffect("CheckForFlag", 0, 1, 10); // Create goal CreateObject(SCRG); // Start the script ScriptGo(true); // Evaluation dialog options SetNextMission("Tutorial.c4f\\Tutorial02.c4s", "$BtnRepeatRound$", "$BtnRepeatRoundDesc$"); }
global func DoInitialize() { if(fInitialized) return(); fInitialized = 1; fUseHungerThirst = 1; if(!FindObject(NOPC)) CreateObject(NOPC); if(fUseHungerThirst) if (!ObjectCount(NDWA)) CreateObject(NDWA, 50,50, -1); // Durst if(fUseHungerThirst) if (!ObjectCount(NDFO)) CreateObject(NDFO, 50,50, -1); // Hunger if(FindObject(_ETG)) RemoveObject(FindObject(_ETG)); if(FindObject(REPR)) RemoveObject(FindObject(REPR)); CreateObject(REPR, 50,50, -1); // Nachwuchs if(FindObject(TREP)) RemoveObject(FindObject(TREP)); CreateObject(TREP, 50,50, -1); // Baumnachwuchs // NPC's sollen Position halten var i, pObj; while(pObj = FindObjectOwner(0,-1,0,0,0,0,OCF_CrewMember,0,0,pObj)) AddEffect("StayThere",pObj,1,35,pObj); // if (!GetPlayerCount()) return(); // Banditen erstellen pObj = CreateObject(BNDT, 3917, 570, -1); pObj->SetAI("BanditNoMove", 3); pObj->SetColorDw(RGB(150)); pObj = CreateObject(BNDT, 4120, 560, -1); pObj->SetAI("BanditNoMove", 3); pObj->SetColorDw(RGB(150)); pObj = CreateObject(BNDT, 4175, 520, -1); pObj->SetAI("BanditNoMove", 3); pObj->SetColorDw(RGB(150)); pObj = CreateObject(BNDT, 4044, 477, -1); pObj->SetAI("BanditNoMove", 3); pObj->SetColorDw(RGB(150)); pObj = CreateObject(BNDT, 4309, 471, -1); pObj->SetAI("BanditBoss", 3); pObj->SetColorDw(RGB(150)); pObj->MakeBoss(); pObj->Enter(FindObject(MTNT, 4309, 471, -1, -1)); // Startmaterial erstellen pWagon = CreateObject(COAC, 28, 270, -1); pHorse = CreateObject(HORS, 77, 270, -1); pHorse->ConnectWagon(pWagon); SetDir(1, pWagon); SetDir(1, pHorse); // Startmaterial CreateContents(MEAC,pWagon,6); CreateContents(WHKY,pWagon,3); for(i=0; i<2; i++) { pObj = CreateContents(WSKI, pWagon); LocalN("iWater", pObj) = 90; pObj->~UpdateGraphics(); } CreateContents(MLLT,pWagon); CreateContents(KNFE,pWagon); CreateContents(IGNB,pWagon); CreateContents(DYNB,pWagon,2); CreateContents(METL,pWagon,7); CreateContents(WOOD,pWagon,21); CreateContents(CNKT,pWagon,4); CreateContents(LNKT,pWagon); // Höhle muss immer vom Indianer zu betreten sein! FreeRect(1970,589,40,9); // Brauchbare Gebäude mit unzerstörbarkeit belegen for(pObj in FindObjects(Find_Category(C4D_StaticBack|C4D_Structure|C4D_Vehicle),Find_Not(Find_Category(32768)),Find_InRect(1130,190,300,140))) AddEffect("NoDmg",pObj,200); for(pObj in FindObjects(Find_Category(C4D_StaticBack|C4D_Structure|C4D_Vehicle),Find_Func("IsIndianHandcraft"), Find_Or(Find_InRect(1830,230,560,340),Find_InRect(3190,160,670,360)))) AddEffect("NoDmg",pObj,200); // Weil die Kanone hier bearbeitet worden ist if(pObj = FindObject(CCAN)) pObj->~Initialize(); if(fTestSection==1) return(ChangeSection("AshCity")); if(fTestSection==2) return(ChangeSection("Caves")); // ... und los! if(!fTesting) ScriptGo(1); return(1); }
global func wait(int iTicks) { ScriptGo(0); Schedule("ScriptGo(1)", iTicks * 10); }