diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/ActMap.txt b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/ActMap.txt new file mode 100644 index 00000000..f29cad65 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/ActMap.txt @@ -0,0 +1,4 @@ +[Action] +Name=Invis +Facet=10,0,10,10 +NextAction=Hold diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DefCore.txt new file mode 100644 index 00000000..3b9654f7 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=BSPN +Version=4,9,8,2 +Name=Bonus Spawnpoint +Category=C4D_StaticBack|C4D_Foreground|C4D_MouseIgnore +Timer=5 +TimerCall=Timer +Width=10 +Height=10 +Offset=-5,-5 +Picture=0,0,10,10 +Collectible=1 diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DescDE.txt new file mode 100644 index 00000000..3e3ee547 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DescDE.txt @@ -0,0 +1 @@ +Lässt Extras erscheinen. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DescUS.txt new file mode 100644 index 00000000..9d299be8 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/DescUS.txt @@ -0,0 +1 @@ +This is the place where the bonuses spawn. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Graphics.png new file mode 100644 index 00000000..05ae91d1 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Names.txt b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Names.txt new file mode 100644 index 00000000..81ee9b9c --- /dev/null +++ b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bonus-Spawnpunkt +US:Bonus spawnpoint \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Script.c b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Script.c new file mode 100644 index 00000000..4b0f66a1 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/BonusSpawnpoint.c4d/Script.c @@ -0,0 +1,135 @@ +/*-- Spawnpoint --*/ + +#strict + +local initialized, angle, spawntimer, objs, nextobj, timer; + +global func PlaceBonusSpawnpoint(array ids, int iX, int iY, int timer) +{ + var spwn = CreateObject(BSPN, iX, iY, -1); + spwn->AddBonusList(ids); + if(timer) + spwn->LocalN("spawntimer") = timer; + return(spwn); +} + +/* Listenverwaltung */ + +// Bonusliste füllen +public func AddBonusList(array ids) +{ + objs = ids; +} + +public func AddBonus(id idB) +{ + objs[GetLength(objs)] = idB; +} + +public func RemoveBonus(id idB) +{ + var newarray = CreateArray(); + for(var bon in objs) + if(bon != idB) + newarray[GetLength(newarray)] = bon; + objs = newarray; + if(nextobj == idB) + GetRandomBonus(); +} + +/* Sonstiges */ + +protected func Initialize() +{ + // Standardtimer = 2500 Frames + spawntimer = 2500; + SetClrModulation(RGBa(0,0,0,255)); + objs = CreateArray(); +} + +protected func Timer() +{ + // Noch nicht initialisiert? + if(!initialized) + // Ein Objekt zur Verfügung? + if(GetLength(objs)) + // Initialisieren + return(Initialized()); + // Kein Bonus? + if(!GetLength(objs)) + { + // Nicht mehr initialisiert + initialized = false; + return(); + } + // Tolle Effekt starten + angle += 10; + if(angle >= 360) angle = 0; + SetObjDrawTransform(1000, 0,0,0, 1000, Sin(angle, 8)*1000 - 2000,0, 1); + if(Random(2)) CreateParticle("NoGravSpark", RandomX(-5,5), RandomX(5,10), 0, -5, 25, nextobj->~Color()); + // Timer runterzählen + if(timer) DecreaseTimer(); +} + +private func Initialized() +{ + // Zufallsbonus aussuchen + GetRandomBonus(); + // Unsichtbar werden + SetAction("Invis"); + // Transformation + SetObjDrawTransform(1000, 0,0,0, 1000, -5000,0, 1); + Local() = true; + // Initialisiert + initialized = true; +} + +/* Timer runterzählen */ + +private func DecreaseTimer() +{ + // Timer runterzählen + timer -= 5; + if(timer <= 0) + { + // Objekt ist wieder da + timer = 0; + Local() = true; + SetVisibility(VIS_All()); + } +} + +public func RejectEntrance(object pClonk) +{ + // Objekt ist ein Clonk? + if(!(GetOCF(pClonk) & OCF_CrewMember)) return(1); + // Darf einsammeln + if(Local()) + { + if(nextobj->~Activate(pClonk)) { + PlayerMessage(GetOwner(pClonk),Format("%s",nextobj->~Color(),GetDesc(0,nextobj)),pClonk); + Sound("Grab", 0, pClonk, 0, GetOwner(pClonk)+1); + Collected(GetOwner(pClonk)); + } + } + return(1); +} + +private func Collected(int iPlr) // Regelt, dass ein Spieler das Objekt einsammelt +{ + // Timer hochsetzen + timer = spawntimer; + // Nicht mehr einsammelbar + Local() = false; + // Nicht mehr sichtbar + SetVisibility(VIS_God()); + // Neuen Bonus auswählen + GetRandomBonus(); +} + +private func GetRandomBonus() +{ + // nextobj belegen + nextobj = objs[Random(GetLength(objs))]; + SetGraphics(0, 0, nextobj, 1, 1); +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/AmmoExpert.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/AmmoExpert.wav new file mode 100644 index 00000000..2f1f984d Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/AmmoExpert.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DefCore.txt new file mode 100644 index 00000000..9189993f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=AEXB +Version=4,9,8,2 +Name=AmmoExpert +Category=C4D_StaticBack +Width=10 +Height=10 +Offset=-5,-5 +Components=AEXB=1 +Picture=0,0,10,10 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DescDE.txt new file mode 100644 index 00000000..ec2ef0e8 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DescDE.txt @@ -0,0 +1 @@ +Sowas, sieht so aus als währen deine Munitionsmagazine auf einmal doppelt so groß! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DescUS.txt new file mode 100644 index 00000000..c485d973 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/DescUS.txt @@ -0,0 +1 @@ +Huh, seems like your ammoclips are as twice as big now! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Graphics.png new file mode 100644 index 00000000..22231088 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Names.txt new file mode 100644 index 00000000..a6a996c9 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ammoexperte +US:AmmoExpert \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Script.c new file mode 100644 index 00000000..4fc137ac --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoExpert.c4d/Script.c @@ -0,0 +1,34 @@ +/*-- AmmoExpert --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(30,70,255)); } + +public func Activate(object obj) { + if(!AddEffect("AmmoExpBonus",obj,190,2,obj)) + return(); + Sound("AmmoExpert", 1, 0,0, GetOwner(obj)+1); + return(true); +} + +global func FxAmmoExpBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + CreateParticle("PSpark",Sin(iEffectTime*3,10),Cos(iEffectTime*3,10),0,0,30,RGB(30,130-Sin(iEffectTime*2,100),250),pTarget); + CreateParticle("PSpark",Sin(iEffectTime*3+180,10),Cos(iEffectTime*3+180,10),0,0,30,RGB(30,130-Sin(iEffectTime*2,100),250),pTarget,true); + if(iEffectTime > BONUS_Duration/1+BONUS_Duration) + return(-1); +} + +global func FxAmmoExpBonusEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "AmmoExpBonus") + { + return(-1); + } +} + +global func FxAmmoExpBonusFMData(object pTarget, int iEffectNumber, int iData, value) { + if(iData == FM_AmmoRate) return(value*2); + return(value); +} + diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/AmmoPack.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/AmmoPack.wav new file mode 100644 index 00000000..b7bf564a Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/AmmoPack.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DefCore.txt new file mode 100644 index 00000000..0c9f2d76 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=AMPB +Version=4,9,8,2 +Name=AmmoPack +Category=C4D_StaticBack +Width=15 +Height=15 +Offset=-7,-7 +Components=AMPB=1 +Picture=0,0,15,15 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DescDE.txt new file mode 100644 index 00000000..60498f2d --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein riesen Haufen Munition! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DescUS.txt new file mode 100644 index 00000000..6ce81722 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/DescUS.txt @@ -0,0 +1 @@ +A big bunch of Ammo! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Graphics.png new file mode 100644 index 00000000..d7d2f2f0 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Names.txt new file mode 100644 index 00000000..8db79016 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Munition +US:Ammo \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Script.c new file mode 100644 index 00000000..310ee53b --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/AmmoPack.c4d/Script.c @@ -0,0 +1,26 @@ +/*-- AmmoPack --*/ + +#strict + +public func IsBonus() { return(true); } + +func Color() { return(RGB(90,90,90)); } + +func Activate(object obj) { + var i,id; + while(id = GetDefinition(i++)) + DoAmmo(id,DefinitionCall(id,"MaxAmmo")/5,obj); + + AddEffect("AmmoBonus",obj,1,5); + Sound("AmmoPack", 1, 0,0, GetOwner(obj)+1); + + return(true); +} + +global func FxAmmoBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + CreateParticle("XSpark",GetX(pTarget)+Sin(EffectVar(0,pTarget,iEffectNumber)*60,12),GetY(pTarget)+Cos(EffectVar(0,pTarget,iEffectNumber)*60,12),0,0,40,RGB(90,90,90),pTarget); + if(++EffectVar(0,pTarget,iEffectNumber) > 6) { + CastParticles("XSpark",5,15,GetX(pTarget),GetY(pTarget),40,60,RGB(90,90,90),0,pTarget); + return(-1); + } +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Berserk.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Berserk.wav new file mode 100644 index 00000000..377d6532 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Berserk.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DefCore.txt new file mode 100644 index 00000000..bccf8ac9 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=BSKB +Version=4,9,8,2 +Name=Berserker +Category=C4D_StaticBack +Width=10 +Height=10 +Offset=-5,-5 +Components=BESB=1 +Picture=0,0,10,10 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DescDE.txt new file mode 100644 index 00000000..21de1e1d --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DescDE.txt @@ -0,0 +1 @@ +Du mutierst zum Berserker, und machst doppelten Schaden! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DescUS.txt new file mode 100644 index 00000000..a4efd955 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/DescUS.txt @@ -0,0 +1 @@ +You mutate into a berserker and deal double damage! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Graphics.png new file mode 100644 index 00000000..57e4c3d3 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Names.txt new file mode 100644 index 00000000..cbb4fe37 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Berserker +US:Berserker \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Script.c new file mode 100644 index 00000000..ae0c253c --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Berserker.c4d/Script.c @@ -0,0 +1,48 @@ +/*-- Berserker --*/ + +#strict + +//Dauer: die halbe * die ganze Antwort! +static const BONUS_Duration = 882; + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(255,100,0)); } + +public func Activate(object obj) { + if(!AddEffect("BerserkerBonus",obj,190,5,obj)) + return(); + Sound("Berserk", 1, 0,0, GetOwner(obj)+1); + return(true); +} + +global func FxBerserkerBonusStart(object pTarget, int iEffectNumber, int tmp) { + if(tmp) + return(); + SetClrModulation(RGB(255,50,0),pTarget); +} + +global func FxBerserkerBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + CreateParticle("PxSpark",RandomX(-3,3),-8,0,-10,35,RGB(250,50+Random(100),Random(20)),pTarget,1); + if(iEffectTime > BONUS_Duration) + return(-1); +} + +global func FxBerserkerBonusStop(object pTarget, int iEffectNumber, int tmp) { + if(tmp) + return(); + SetClrModulation(RGB(255,255,255),pTarget); +} + +global func FxBerserkerBonusEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "BerserkerBonus") + { + return(-1); + } +} + +global func FxBerserkerBonusFMData(object pTarget, int iEffectNumber, int iData, value) { + //Damage*2! + if(iData == FM_Damage) return(value*2); + return(value); +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DefCore.txt new file mode 100644 index 00000000..a1b362ea --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=HSTB +Version=4,9,8,2 +Name=Haste +Category=C4D_StaticBack +Width=10 +Height=10 +Offset=-5,-5 +Components=BESB=1 +Picture=0,0,10,10 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DescDE.txt new file mode 100644 index 00000000..740788cc --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DescDE.txt @@ -0,0 +1 @@ +Speeeeeeeeed. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DescUS.txt new file mode 100644 index 00000000..740788cc --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/DescUS.txt @@ -0,0 +1 @@ +Speeeeeeeeed. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Graphics.png new file mode 100644 index 00000000..117c5241 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Names.txt new file mode 100644 index 00000000..6293574a --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hast +US:Haste \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Script.c new file mode 100644 index 00000000..c550016f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Script.c @@ -0,0 +1,45 @@ +/*-- Haste --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(255,255,0)); } + +public func Activate(object obj) { + if(!AddEffect("HasteBonus",obj,60,5,obj)) + return(); + Sound("Speed", 1, 0,0, GetOwner(obj)+1); + return(true); +} + +global func FxHasteBonusStart(object pTarget, int iEffectNumber, int tmp) { + if(tmp) + return(); + pTarget->SetPhysical("Walk",pTarget->GetPhysical("Walk") + 15000,PHYS_StackTemporary); + pTarget->SetPhysical("Jump",pTarget->GetPhysical("Jump") + 15000,PHYS_StackTemporary); + pTarget->SetPhysical("Scale",pTarget->GetPhysical("Scale") + 10000,PHYS_StackTemporary); + pTarget->SetPhysical("Hangle",pTarget->GetPhysical("Hangle") + 10000,PHYS_StackTemporary); +} + +global func FxHasteBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + CreateParticle("NoGravSpark",RandomX(-5,5),RandomX(-6,6),0,0,35,RGB(250,250,Random(20)),0,Random(2)); + if(iEffectTime > BONUS_Duration) + return(-1); +} + +global func FxHasteBonusStop(object pTarget, int iEffectNumber, int tmp) { + if(tmp) + return(); + pTarget->SetPhysical("Walk",pTarget->GetPhysical("Walk") - 15000,PHYS_StackTemporary); + pTarget->SetPhysical("Jump",pTarget->GetPhysical("Jump") - 15000,PHYS_StackTemporary); + pTarget->SetPhysical("Scale",pTarget->GetPhysical("Scale") - 10000,PHYS_StackTemporary); + pTarget->SetPhysical("Hangle",pTarget->GetPhysical("Hangle") - 10000,PHYS_StackTemporary); +} + +global func FxHasteBonusEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "HasteBonus") + { + return(-1); + } +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Speed.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Speed.wav new file mode 100644 index 00000000..aec5048d Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Haste.c4d/Speed.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DefCore.txt new file mode 100644 index 00000000..ee308068 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=HELB +Version=4,9,8,2 +Name=Heal +Category=C4D_StaticBack +Width=11 +Height=11 +Offset=-5,-5 +Components=BESB=1 +Picture=0,0,11,11 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DescDE.txt new file mode 100644 index 00000000..d9077208 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DescDE.txt @@ -0,0 +1 @@ +Alle deine Wunden sind geheilt! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DescUS.txt new file mode 100644 index 00000000..1521288f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/DescUS.txt @@ -0,0 +1 @@ +All your wounds are healed! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Graphics.png new file mode 100644 index 00000000..390cd755 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Heal.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Heal.wav new file mode 100644 index 00000000..912c70dc Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Heal.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Names.txt new file mode 100644 index 00000000..d44e8dd5 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Heilung +US:Heal \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Script.c new file mode 100644 index 00000000..3cc4eebc --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Heal.c4d/Script.c @@ -0,0 +1,40 @@ +/*-- Heal --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(255,0,0)); } + +public func Activate(object obj) { + Sound("Heal", 1, 0,0, GetOwner(obj)+1); + obj->DoEnergy(100); + //ein Partikelkreuz! :D + var j,size=35, p = "NoGravSpark"; + var x=obj->GetX(),y=obj->GetY(); + for(j=1; j <= 4; j++) { + CreateParticle(p,x+5*j,y+5,0,0,size,RGB(255,0,0),obj,0); + CreateParticle(p,x+5*j,y-5,0,0,size,RGB(255,0,0),obj,0); + } + CreateParticle(p,x+20,y,0,0,size,RGB(255,0,0),obj,0); + + for(j=1; j <= 4; j++) { + CreateParticle(p,x-5*j,y+5,0,0,size,RGB(255,0,0),obj,0); + CreateParticle(p,x-5*j,y-5,0,0,size,RGB(255,0,0),obj,0); + } + CreateParticle(p,x-20,y,0,0,size,RGB(255,0,0),obj,0); + + for(j=1; j <= 4; j++) { + CreateParticle(p,x+5,y+5*j,0,0,size,RGB(255,0,0),obj,0); + CreateParticle(p,x-5,y+5*j,0,0,size,RGB(255,0,0),obj,0); + } + CreateParticle(p,x,y+20,0,0,size,RGB(255,0,0),obj,0); + + for(j=1; j <= 4; j++) { + CreateParticle(p,x+5,y-5*j,0,0,size,RGB(255,0,0),obj,0); + CreateParticle(p,x-5,y-5*j,0,0,size,RGB(255,0,0),obj,0); + } + CreateParticle(p,x,y-20,0,0,size,RGB(255,0,0),obj,0); + + return(true); +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DefCore.txt new file mode 100644 index 00000000..b783e11f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=INVB +Version=4,9,8,2 +Name=Invisible +Category=C4D_StaticBack +Width=10 +Height=19 +Offset=-5,-10 +Components=INVB=1 +Picture=0,0,10,19 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DescDE.txt new file mode 100644 index 00000000..8de5aa21 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DescDE.txt @@ -0,0 +1 @@ +Unsichtbarkeit! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DescUS.txt new file mode 100644 index 00000000..bf03d3b2 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/DescUS.txt @@ -0,0 +1 @@ +Invisibility! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Graphics.png new file mode 100644 index 00000000..dfe3cfec Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Invisible.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Invisible.wav new file mode 100644 index 00000000..0dde16ce Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Invisible.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Names.txt new file mode 100644 index 00000000..d362fbb3 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Unsichtbar +US:Invisible \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Script.c new file mode 100644 index 00000000..2878104d --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Invisible.c4d/Script.c @@ -0,0 +1,42 @@ +/*-- Invisible --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(200,0,255)); } + +public func Activate(object obj) { + if(!AddEffect("InvisBonus",obj,190,1,obj)) + return(); + Sound("Invisible", 1, 0,0, GetOwner(obj)+1); + return(true); +} + +global func FxInvisBonusStart(object pTarget, int iEffectNumber, int tmp) { + if(tmp) + return(); + //Wegen den Layern machen wir es einfach mit einem Hilfsobjekt. :) + pTarget->SetObjectBlitMode(1); + pTarget->SetClrModulation(RGBa(255,255,255,180)); +} + +global func FxInvisBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + SetPosition(GetX(pTarget),GetY(pTarget),EffectVar(0,pTarget,iEffectNumber)); + if(iEffectTime > BONUS_Duration) + return(-1); +} + +global func FxInvisBonusStop(object pTarget, int iEffectNumber, int tmp) { + if(tmp) + return(); + pTarget->SetClrModulation(); + pTarget->SetObjectBlitMode(); +} + +global func FxInvisBonusEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "BerserkerBonus") + { + return(-1); + } +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DefCore.txt new file mode 100644 index 00000000..3ada518a --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=KAMB +Version=4,9,8,2 +Name=Kamikaze +Category=C4D_StaticBack +Width=20 +Height=20 +Offset=-10,-10 +Components=KAMB=1 +Picture=0,0,20,20 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DescDE.txt new file mode 100644 index 00000000..66c9a2e0 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DescDE.txt @@ -0,0 +1 @@ +Kaboom. Aber wann? \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DescUS.txt new file mode 100644 index 00000000..3fb80a82 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/DescUS.txt @@ -0,0 +1 @@ +Kaboom. But when? \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Graphics.png new file mode 100644 index 00000000..b4514273 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Kamikaze.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Kamikaze.wav new file mode 100644 index 00000000..8583c8e9 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Kamikaze.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Names.txt new file mode 100644 index 00000000..1733e320 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kamikaze +US:Kamikaze \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Script.c new file mode 100644 index 00000000..5cd4ca69 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Kamikaze.c4d/Script.c @@ -0,0 +1,35 @@ +/*-- Kamikaze --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(20,20,20)); } + +public func Activate(object obj) { + if(!Random(10)) + Explode(50,CreateObject(TIM2,GetX(obj),GetY(obj),-1)); + else if(!AddEffect("KamikazeBonus",obj,190,5,obj)) + return(0); + Sound("Kamikaze", 1, 0,0, GetOwner(obj)+1); + return(1); +} + +global func FxKamikazeBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + if(!(iEffectTime%1500)) + if(!Random(10)) + return(-1); +} + +global func FxKamikazeBonusStop(object pTarget, int iEffectNumber, int iReason, bool tmp) { + if(tmp) + return(); + Explode(50,CreateObject(TIM2)); +} + +global func FxKamikazeBonusEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "KamikazeBonus") + { + return(-1); + } +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DefCore.txt new file mode 100644 index 00000000..7751146b --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=MNYB +Version=4,9,8,2 +Name=Money +Category=C4D_StaticBack +Width=10 +Height=10 +Offset=-5,-5 +Components=BESB=1 +Picture=0,0,10,10 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DescDE.txt new file mode 100644 index 00000000..8f522a8d --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DescDE.txt @@ -0,0 +1 @@ +Geld macht nicht glücklich, aber es hilft dir zu gewinnen. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DescUS.txt new file mode 100644 index 00000000..6b55c17f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/DescUS.txt @@ -0,0 +1 @@ +Money does not make happy, but it helps you to win. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Graphics.png new file mode 100644 index 00000000..09aaae95 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Money.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Money.wav new file mode 100644 index 00000000..a3297160 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Money.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Names.txt new file mode 100644 index 00000000..d2797869 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Geld +US:Money \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Script.c new file mode 100644 index 00000000..86482b61 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Money.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- Money --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(255,255,255)); } + +public func Activate(object obj) { + Sound("Money", 1, 0,0, GetOwner(obj)+1); + var plr = GetController(obj); + //ka-ching! + SetWealth(plr,GetWealth(plr)+100); + + //Effekt! :O + var x = GetX(obj), y = GetY(obj); + var p = "NoGravSpark", s = 35, c = RGB(255,255,0); + CreateParticle(p,x+10,y-13,0,0,s,c,obj); + CreateParticle(p,x+5,y-15,0,0,s,c,obj); + CreateParticle(p,0, y-15,0,0,s,c,obj); + CreateParticle(p,x-5,y-13,0,0,s,c,obj); + CreateParticle(p,x-10,y-9,0,0,s,c,obj); + CreateParticle(p,x-9,y-4,0,0,s,c,obj); + CreateParticle(p,x-3,y-1,0,0,s,c,obj); + + CreateParticle(p,x+3,y+1,0,0,s,c,obj); + CreateParticle(p,x+9,y+4,0,0,s,c,obj); + CreateParticle(p,x+10,y+9,0,0,s,c,obj); + CreateParticle(p,x+5,y+13,0,0,s,c,obj); + CreateParticle(p,x, y+15,0,0,s,c,obj); + CreateParticle(p,x-5,y+15,0,0,s,c,obj); + CreateParticle(p,x-10,y+13,0,0,s,c,obj); + + for(var j; j <= 8; j++) + CreateParticle(p,x,y-20+5*j,0,0,s,c,obj); + return(true); +} diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Names.txt new file mode 100644 index 00000000..8239901e --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Boni +US:Bonuses diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DefCore.txt new file mode 100644 index 00000000..33c809a2 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=RPFB +Version=4,9,8,2 +Name=Rapidfire +Category=C4D_StaticBack +Width=12 +Height=7 +Offset=-6,-4 +Components=RPFB=1 +Picture=0,0,12,7 diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DescDE.txt new file mode 100644 index 00000000..e6331475 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DescDE.txt @@ -0,0 +1 @@ +Für eine Zeit lang kannst du deine Waffe viel schneller nachladen, und den Abzug viel schneller betätigen! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DescUS.txt new file mode 100644 index 00000000..9d47ec40 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/DescUS.txt @@ -0,0 +1 @@ +Suddenly you can reload and fire your weapon faster! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Graphics.png new file mode 100644 index 00000000..a3d3e098 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Names.txt new file mode 100644 index 00000000..705e88d7 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rapidfire +US:Rapidfire \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Rapidfire.wav b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Rapidfire.wav new file mode 100644 index 00000000..3ed72575 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Rapidfire.wav differ diff --git a/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Script.c b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Script.c new file mode 100644 index 00000000..aee296ed --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Bonuses.c4d/Rapidfire.c4d/Script.c @@ -0,0 +1,48 @@ +/*-- Rapid Fire --*/ + +#strict + +public func IsBonus() { return(true); } + +public func Color() { return(RGB(0,255,0)); } + +public func Activate(object obj) { + if(!AddEffect("RapidBonus",obj,190,3,obj)) + return(0); + Sound("Rapidfire", 1, 0,0, GetOwner(obj)+1); + return(1); +} + +global func FxRapidBonusTimer(object pTarget, int iEffectNumber, int iEffectTime) { + var bar = EffectVar(0,pTarget,iEffectNumber); + var foo = (12*bar)/180, + off=4, + v = 90 < bar && bar < 270; + if(bar > 180) { + foo = -(13-foo); + off=-7; + } + CreateParticle("PSpark",Sin(bar,12),off+Cos(bar,foo),0,0,35,RGBa(50,255,50,20),pTarget,v); + CreateParticle("PSpark",Sin(bar,-12),(off+Cos(bar,foo)),0,0,35,RGBa(50,255,50,20),pTarget,v); + + EffectVar(0,pTarget,iEffectNumber) += 15; + if(EffectVar(0,pTarget,iEffectNumber) > 360) + EffectVar(0,pTarget,iEffectNumber) = 0; + + if(iEffectTime > BONUS_Duration) + return(-1); +} + +global func FxRapidBonusEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "RapidBonus") + { + return(-1); + } +} + +global func FxRapidBonusFMData(object pTarget, int iEffectNumber, int iData, value) { + //Log("Rapidfire"); + if(iData == FM_Recharge) return(Max(1,value/2)); + if(iData == FM_Reload) return(Max(1,value/2)); + return(value); +} diff --git a/Hazard.c4d/Arena.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/DescDE.txt new file mode 100644 index 00000000..2df8235f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/DescDE.txt @@ -0,0 +1 @@ +Spezielle Objekte zur Gestaltung von Arenen. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/DescUS.txt new file mode 100644 index 00000000..96839385 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/DescUS.txt @@ -0,0 +1 @@ +Special objects for arenas. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Names.txt new file mode 100644 index 00000000..f60ed154 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Arena +US:Arena diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/ActMap.txt b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/ActMap.txt new file mode 100644 index 00000000..f29cad65 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/ActMap.txt @@ -0,0 +1,4 @@ +[Action] +Name=Invis +Facet=10,0,10,10 +NextAction=Hold diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DefCore.txt new file mode 100644 index 00000000..305b17fd --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SPNP +Version=4,9,8,2 +Name=Spawnpoint +Category=C4D_StaticBack|C4D_Foreground|C4D_MouseIgnore +Timer=5 +TimerCall=Timer +Width=10 +Height=10 +Offset=-5,-5 +Picture=0,0,10,10 +Collectible=1 diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DescDE.txt new file mode 100644 index 00000000..7c09ed8c --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DescDE.txt @@ -0,0 +1 @@ +Lässt Waffen und Munition als Nachschub erscheinen. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DescUS.txt new file mode 100644 index 00000000..9eed8dba --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/DescUS.txt @@ -0,0 +1 @@ +Spawns weapons and gear. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Graphics.png new file mode 100644 index 00000000..c5f3687b Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Names.txt new file mode 100644 index 00000000..c6a1143d --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spawnpunkt +US:Spawnpoint \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Script.c b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Script.c new file mode 100644 index 00000000..a7b6a5d8 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Spawnpoint.c4d/Script.c @@ -0,0 +1,248 @@ +/*-- Spawnpoint --*/ + +#strict + +local initialized, angle, player, nocollect, spawntimer; + +global func PlaceSpawnpoint(id idObj, int iX, int iY, int timer) +{ + var spwn = CreateObject(SPNP, iX, iY, -1); + spwn->CreateContents(idObj); + if(timer) + spwn->LocalN("spawntimer") = timer; + return(spwn); +} + +protected func Initialize() +{ + // Standardtimer = 1000 Frames + spawntimer = 1000; + SetClrModulation(RGBa(0,0,0,255)); + // Arrays anlegen + nocollect = CreateArray(); + player = CreateArray(); +} + +protected func Timer() +{ + // Noch nicht initialisiert? + if(!initialized) + // Ein Inhaltsobjekt? + if(Contents()) + // Initialisieren + return(Initialized()); + // Kein Inhalt? + if(!Contents()) + { + // Nicht mehr initialisiert + initialized = false; + return(); + } + // Tolle Effekt starten + angle += 10; + if(angle >= 360) angle = 0; + SetObjDrawTransform(1000, 0,0,0, 1000, Sin(angle, 8)*1000 - 2000,0, 1); + if(Random(2)) CreateParticle("NoGravSpark", RandomX(-5,5), RandomX(5,10), 0, -5, 25, RGBa(210, 210, 255, 100)); + // Alle Timer runterzählen + DecreaseTimer(); +} + +private func Initialized() +{ + // Unsichtbar werden + SetAction("Invis"); + // Objekt als Layer auflegen + SetGraphics(0, 0, GetID(Contents()), 1, 1); + // Transformation + SetObjDrawTransform(1000, 0,0,0, 1000, -5000,0, 1); + // Sammeleffekt starten +// AddEffect("Collect", this(), 1, 3, this()); + // Waffen-Bleiben-Regel + if(FindObject(WPST)) + { + for(var i=0 ; i < GetPlayerCount() ; i++) + InitializeVisibilityFor(i); + + SetVisibility(VIS_Local() | VIS_God()); + } + // Initialisiert + initialized = true; +} + +// aufgerufen von WPST +private func InitializeVisibilityFor(int iPlr) +{ + var player = GetPlayerByIndex(iPlr); + if(GetPlayerType(player)) + if(!(Local(0) & 1 << player)) + Local(0) += 1 << player; +} + +/* Timer runterzählen */ + +private func DecreaseTimer() +{ + // Waffen-Bleiben-Regel + if(FindObject(WPST)) + { + for(var i=0, iPlr ; i < GetPlayerCount() ; i++) + // Spielertimer runterzählen + { + iPlr = GetPlayerByIndex(i); + if(GetPlayerType(iPlr) == C4PT_Script) continue; + + if(player[iPlr]) + player[iPlr] -= 5; + if(player[iPlr] <= 0 && nocollect[iPlr]) + { + // Spieler kann das Objekt wieder einsammeln + player[iPlr] = 0; + nocollect[iPlr] = false; + Local() += 1< Einsammeln lassen + var pObj; + for(var pClonk in FindObjects(Find_AtPoint(), Find_OCF(OCF_CrewMember()), Find_OCF(OCF_CrewMember()), Find_NoContainer())) + if(CheckCollect(GetOwner(pClonk))) + { + pObj = CreateContents(GetID(Contents())); + // Kann der Clonk einsammeln? + Collect(pObj, pClonk); + if(Contained(pObj) == this()) RemoveObject(pObj); + else + { + Sound("Grab", 0, pClonk, 0, GetOwner(pClonk)+1); + Collected(GetOwner(pClonk)); + // Munition + if(pObj->~IsAmmoPacket()) + pObj->~TransferAmmo(pClonk); + } + } +}*/ + +public func RejectEntrance(object pClonk) +{ + // Objekt ist ein Clonk? + if(!(GetOCF(pClonk) & OCF_CrewMember) && !(pClonk->~CanCollectFromSpawnpoints())) return(1); + // Ich hab Contents? + if(!Contents() || !initialized) return(1); + // Darf einsammeln + if(CheckCollect(GetOwner(pClonk), pClonk)) + { + var pObj = CreateContents(GetID(Contents())); + // Kann der Clonk einsammeln? + if(pObj->~IsAmmoPacket()) { + if(!(pObj->MayTransfer(pClonk))) + return(1); + if(NoAmmo()) return(1); + } + + Collect(pObj, pClonk); + if(Contained(pObj) == this()) RemoveObject(pObj); + else + { + Sound("Grab", 0, pClonk, 0, GetOwner(pClonk)+1); + Collected(GetOwner(pClonk), pClonk); + // Munition + if(pObj->~IsAmmoPacket()) { + pObj->~TransferAmmo(pClonk); + } + // Waffe, gleich einsatzbereit! + else if(pObj->~IsWeapon()) + DoAmmo(pObj->GetFMData(FM_AmmoID),pObj->GetFMData(FM_AmmoLoad),pObj); + } + } + return(1); +} + +private func CheckCollect(int iPlr, object pClonk) // Überprüft, ob ein Spieler das Objekt einsammeln darf +{ + if(!initialized) return(); + // Waffen-Bleiben-Regel + if(FindObject(WPST)) + { + if(GetPlayerType(iPlr) == C4PT_User) + return(!nocollect[iPlr]); + if(!nocollect[iPlr]) + { + nocollect[iPlr] = CreateArray(); + return(true); + } + for(var pClnk in nocollect[iPlr]) + if(pClnk == pClonk) + return(false); + return(true); + } + else + return(!nocollect[0]); +} + +private func Collected(int iPlr, object pClonk) // Regelt, dass ein Spieler das Objekt einsammelt +{ + // Waffen-Bleiben-Regel + if(FindObject(WPST)) + { + if(GetPlayerType(iPlr) == C4PT_Script) + { + if(!nocollect[iPlr]) + nocollect[iPlr] = CreateArray(); + for(var i=0 ; i < GetLength(nocollect[iPlr]) ; i++) + if(!nocollect[iPlr][i]) + break; + nocollect[iPlr][i] = pClonk; + ScheduleCall(this(), "AICollectTimer", spawntimer, 0, iPlr, pClonk); + return(); + } + // Spielertimer hochsetzen + player[iPlr] = spawntimer; + nocollect[iPlr] = true; + // Nicht mehr sichtbar für den Spieler + if(iPlr >= 0) + if(Local() & 1<GetID(), GetX(), GetY()); + return !false; +} diff --git a/Hazard.c4d/Arena.c4d/Tim.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Tim.c4d/DefCore.txt new file mode 100644 index 00000000..1315797a --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Tim.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=TIM2 +Version=4,9,8,2 +Name=TIM +Category=C4D_StaticBack +Width=1 +Height=1 +CollectionLimit=1 diff --git a/Hazard.c4d/Arena.c4d/Tim.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Tim.c4d/DescDE.txt new file mode 100644 index 00000000..0245c916 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Tim.c4d/DescDE.txt @@ -0,0 +1 @@ +Taste drücken zum Spawnen. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Tim.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Tim.c4d/DescUS.txt new file mode 100644 index 00000000..a13cb91d --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Tim.c4d/DescUS.txt @@ -0,0 +1 @@ +Press any key to spawn. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Tim.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Tim.c4d/Graphics.png new file mode 100644 index 00000000..9c5e8741 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Tim.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Tim.c4d/Script.c b/Hazard.c4d/Arena.c4d/Tim.c4d/Script.c new file mode 100644 index 00000000..f8fdd2cc --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Tim.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- TIM --*/ + +#strict + +local spawn; + +func Initialize() { ScheduleCall(this(), "SpawnOk", 20); } +func SpawnOk() +{ + if(!Contents()) + return(RemoveObject()); + if(Contents()->GetOwner() == NO_OWNER) + return(RemoveObject()); + spawn = true; + // Last man standing: no spawn hiding + if(FindObject(GLMS)) { + Spawn(); + } else { + ScheduleCall(this(), "Spawn", 350); + } +} + +public func ContainedLeft() { if(!spawn) return(1); return(Spawn()); } +public func ContainedRight() { if(!spawn) return(1); return(Spawn()); } +public func ContainedDown() { if(!spawn) return(1); return(Spawn()); } +public func ContainedUp() { if(!spawn) return(1); return(Spawn()); } +public func ContainedDig() { if(!spawn) return(1); return(Spawn()); } +public func ContainedThrow() { if(!spawn) return(1); return(Spawn()); } + +public func Spawn() +{ + if(!Contents()) return(RemoveObject()); + + AddSpawnEffect(Contents(), Contents()->GetColorDw()); + RemoveObject(0,1); + return(1); +} diff --git a/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DefCore.txt new file mode 100644 index 00000000..09f6eed2 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=VSPN +Version=4,9,8,2 +Name=Vehicle Spawnpoint +Category=C4D_StaticBack|C4D_MouseIgnore +Timer=5 +TimerCall=Timer +Width=25 +Height=25 +Offset=-12,-12 +Picture=0,0,25,25 \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DescDE.txt new file mode 100644 index 00000000..db8db925 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DescDE.txt @@ -0,0 +1 @@ +Lässt Fahrzeuge erscheinen. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DescUS.txt new file mode 100644 index 00000000..2d3f62e4 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/DescUS.txt @@ -0,0 +1 @@ +This is the place where the vehicles spawn. \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Graphics.png new file mode 100644 index 00000000..05ae91d1 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Names.txt b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Names.txt new file mode 100644 index 00000000..291a990f --- /dev/null +++ b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fahrzeug-Spawnpunkt +US:Vehicle spawnpoint diff --git a/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Script.c b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Script.c new file mode 100644 index 00000000..8f157466 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/VehicleSpawnpoint.c4d/Script.c @@ -0,0 +1,55 @@ +/*-- Vehicle Spawnpoint --*/ + +#strict + +local spawnId, angle, spawnwait, spawntime; + +local spawnedobj; + +global func PlaceVehicleSpawnpoint(id idObj, int iX, int iY, int timer) +{ + var spwn = CreateObject(VSPN, iX, iY, -1); + spwn->Set(idObj, timer); + return(spwn); +} +protected func Timer() +{ + if(!spawnId) return; + + angle += 10; + if(angle >= 360) angle = 0; + SetObjDrawTransform(1000, 0,0,0, 1000, Sin(angle, 8)*1000 - 2000,0, 1); + CreateParticle("NoGravSpark", RandomX(-10,10), RandomX(10,15), 0, -5, 25, RGBa(210, 210, 255, 100), this, true); + + if(spawnwait >= spawntime) + { + spawnedobj = CreateObject(spawnId,0,GetDefHeight(spawnId)/2,-1); + VehicleSpawnEffect(spawnedobj); + spawnwait = -1; + } + else if(spawnwait == -1 && !spawnedobj) + { + spawnwait = 0; + } + + if(spawnwait > -1) spawnwait+=5; +} + +private func Set(id spawn, int timeToSpawn) +{ + if(!timeToSpawn) timeToSpawn = 4000; //default: ~2.5 minuten + spawnId = spawn; + spawntime = timeToSpawn; + + SetGraphics(0, 0, spawnId, 1, 4); + SetObjDrawTransform(1000, 0,0,0, 1000, -10000,0, 1); + spawnwait = spawntime; +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra = Format("PlaceVehicleSpawnpoint(%i,%%d+%d,%%d+%d,%%d+%d)", spawnId, GetX(), GetY(), spawntime); + return true; +} diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/ActMap.txt b/Hazard.c4d/Arena.c4d/Warp.c4d/ActMap.txt new file mode 100644 index 00000000..47faac5c --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Warp.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Warp +Facet=0,0,36,36 +Length=10 +Delay=2 +Directions=2 +FlipDir=1 +NextAction=Warp \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/DefCore.txt b/Hazard.c4d/Arena.c4d/Warp.c4d/DefCore.txt new file mode 100644 index 00000000..4b3ad4c1 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Warp.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=AWRP +Version=4,9,8,2 +Name=Warp +Category=C4D_StaticBack +Timer=1 +TimerCall=CheckWarp +Width=36 +Height=36 +Offset=-18,-18 +Vertices=1 +VertexY=18 +Components=AWRP=1 +Picture=0,0,36,36 +BlitMode=1 diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/DescDE.txt b/Hazard.c4d/Arena.c4d/Warp.c4d/DescDE.txt new file mode 100644 index 00000000..3f6a0c5a --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Warp.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein toller Warp! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/DescUS.txt b/Hazard.c4d/Arena.c4d/Warp.c4d/DescUS.txt new file mode 100644 index 00000000..6db048e3 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Warp.c4d/DescUS.txt @@ -0,0 +1 @@ +A great warp! \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/Graphics.png b/Hazard.c4d/Arena.c4d/Warp.c4d/Graphics.png new file mode 100644 index 00000000..588e41e2 Binary files /dev/null and b/Hazard.c4d/Arena.c4d/Warp.c4d/Graphics.png differ diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/Names.txt b/Hazard.c4d/Arena.c4d/Warp.c4d/Names.txt new file mode 100644 index 00000000..210f3d72 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Warp.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Warp +US:Warp \ No newline at end of file diff --git a/Hazard.c4d/Arena.c4d/Warp.c4d/Script.c b/Hazard.c4d/Arena.c4d/Warp.c4d/Script.c new file mode 100644 index 00000000..447476a5 --- /dev/null +++ b/Hazard.c4d/Arena.c4d/Warp.c4d/Script.c @@ -0,0 +1,39 @@ +/*-- Warp --*/ + +#strict + +local iX, iY; + +func Initialize() { + SetAction("Warp"); + return(1); +} + +public func Set(int iXDest, int iYDest) { + iX = iXDest; + iY = iYDest; +} + +private func CheckWarp() // Timer um Zeugs zu warpen! +{ + for(var obj in FindObjects(Find_Distance(17), Find_NoContainer(), Find_Not(Find_Func("NoWarp")), Find_Or(Find_Category(C4D_Living),Find_Category(C4D_Object),Find_Category(C4D_Vehicle)))) + Warp(obj); +} + +private func Warp(object pObj) +{ + var xv, yv; + xv = pObj->GetXDir(); + yv = pObj->GetYDir(); + pObj->SetPosition(iX, iY); + pObj->SetXDir(xv); + pObj->SetYDir(yv); + pObj->AddSpawnEffect(0, RGBa(0,200,255)); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%d,%d)", iX, iY); +} diff --git a/Hazard.c4d/COPYING b/Hazard.c4d/COPYING new file mode 100644 index 00000000..7b0b2f9f --- /dev/null +++ b/Hazard.c4d/COPYING @@ -0,0 +1,23 @@ +Creative Commons Attribution-NonCommercial (CC BY-NC) +http://creativecommons.org/licenses/by-nc/3.0/ + +You are free to: + +Share - copy and redistribute the material in any medium or format +Adapt - remix, transform, and build upon the material +Under the following terms: + +Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +NonCommercial - You may not use the material for commercial purposes. +No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. + +------------------------------------------------------------------------------------ + +Authors +- Newton +- Clonkonaut +- Boni +- Raven +- Matthi +- K-Pone +- Hans-Christian Kuehl \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DefCore.txt new file mode 100644 index 00000000..ed4b95e3 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=__AI +Version=4,9,8,2 +Name=AI +Category=C4D_StaticBack +MaxUserSelect=1 +Timer=30 +TimerCall=Activity +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,1,1 diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DescDE.txt new file mode 100644 index 00000000..42fc9e4c --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DescDE.txt @@ -0,0 +1 @@ +Künstliche Intelligenz. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DescUS.txt new file mode 100644 index 00000000..81e40815 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/DescUS.txt @@ -0,0 +1 @@ +Artificial Intelligence. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Graphics.png new file mode 100644 index 00000000..cd7a4051 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Names.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Names.txt new file mode 100644 index 00000000..38f2e0f4 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:KI-Spieler +US:AI player \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Script.c b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Script.c new file mode 100644 index 00000000..8b0367aa --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Script.c @@ -0,0 +1,266 @@ +/*-- KI --*/ + +#strict + +// Variablen +local plrID; // Team! + +/* Globale Funktionen */ + +// Bisher nicht benutzt +global func IsAlienPlayer(int iPlr) +{ + if(GetPlayerType(iPlr) == C4PT_Script) + if(!GetCrew(iPlr)) + return(true); +} + +/* Steuerungsfunktionen */ + +// Fügt eine neue KI ins Spiel ein +global func AddAI(int iTeam) +{ + var ai = CreateObject(__AI, AbsX(0),AbsY(0), -1); + // ID zusammensetzen + var newID = Format("%d", ObjectCount(__AI)), oneID; + while(GetLength(newID) < 4) + newID = Format("0%s", newID); + oneID = C4Id(newID); + ai->Init(oneID); + + var name = Format("$Team$", iTeam); + if(!iTeam) name = Format("$NoTeam$", GetPlayerCount(C4PT_Script)); + + var color = HSL(Random(16)*16,200+Random(56),100+Random(50)); + if(GetTeamColor(iTeam)) color = GetTeamColor(iTeam); + + CreateScriptPlayer(name, color, iTeam, 0, oneID); + + return(ai); +} + +// Nicht benutzt +global func AddAlienAI(int iTeam) +{ + var name = Format("$Team$", iTeam); + if(!iTeam) name = Format("$NoTeam$", GetPlayerCount(C4PT_Script)); + + CreateScriptPlayer(name, HSL(Random(256),200+Random(56),100+Random(220)), iTeam, CSPF_NoScenarioInit | CSPF_NoEliminationCheck, __AI); + return(true); +} + +// Entfernt eine KI aus dem Spiel +global func RemoveAI(int iTeam) +{ + // Spezielles Team + if(iTeam) + { + for(var i=0 ; i < GetPlayerCount() ; i++) + if(GetPlayerTeam(GetPlayerByIndex(i)) == iTeam) + if(FindObjectOwner(__AI, GetPlayerByIndex(i))) + return(EliminatePlayer(GetPlayerByIndex(i))); + } + else + { + // Wir suchen den Spieler, mit der höchsten Spielernummer + for(var i=0 ; i < GetPlayerCount() ; i++) + if(GetPlayerType(GetPlayerByIndex(i)) == C4PT_Script) + if(FindObjectOwner(__AI, GetPlayerByIndex(i))) + return(EliminatePlayer(GetPlayerByIndex(i))); + } +} + +// Fügt einen neuen Clonk zum angegeben Team hinzu +global func AddBot(int iTeam) +{ + // Spieler suchen + for(var i=0, found = -1 ; i < GetPlayerCount(C4PT_Script) ; i++) + if(GetPlayerTeam(GetPlayerByIndex(i, C4PT_Script)) == iTeam) + { + found = GetPlayerByIndex(i, C4PT_Script); + break; + } + // Spieler vorhanden? + if(found == -1) return(AddAI(iTeam)); + // Clonk erstellen + var bot = CreateObject(HZCK, 0,0, found); + MakeCrewMember(bot, found); + GameCall("RelaunchPlayer", found, bot, -1); + return(bot); +} + +// Weg mit dem Bot! +global func RemoveBot(int iTeam) +{ + // Spieler suchen + for(var i=0, found = -1 ; i < GetPlayerCount(C4PT_Script) ; i++) + if(GetPlayerTeam(GetPlayerByIndex(i, C4PT_Script)) == iTeam) + { + found = GetPlayerByIndex(i, C4PT_Script); + break; + } + // Spieler vorhanden? + if(found == -1) return(); + // Clonk aus der Crew entfernen + var bot = GetCrew(found); + if(bot) + { + if(bot->Contained()) + { + if(bot->Contained()->GetID() == TIM1 || bot->Contained()->GetID() == TIM2) + bot->Contained()->RemoveObject(); + } + else + bot->RemoveObject(); + } +} + +/* Initialisierungen */ + +protected func Initialize() +{ + // Position + SetPosition(); + // Kategorie wechseln, damit GameCallEx ankommt + SetCategory(GetCategory() | C4D_Rule); +} + +public func Init(id oneID) // Initialisierung - für die richtige Zuweisung zum Spieler +{ + plrID = oneID; +} + +public func GetPlrID() { return(plrID); } + +public func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam, id idExtra) +{ + // Richtiger Spieler? + if(idExtra != plrID) return(); + // Hat schon ein Kontrollobjekt? + if(FindObjectOwner(GetID(), iPlr)) return(RemoveObject()); + // Ich übernehme + SetOwner(iPlr); + SetCategory(C4D_StaticBack); +} + +/* Sonstiges */ + +protected func OnOwnerRemoved() { RemoveObject(); } + +/* Verhalten */ + +public func Activity() +{ + // Kein Besitzer? + if(GetOwner() == NO_OWNER) return; + // Spielziel ermitteln (mehrere Spielziele gehen nicht!) + var goal = GetGoal(); + // Operate according mission objectives! + for(var i=0, pCrew ; pCrew = GetCrew(GetOwner(), i) ; i++) + { + if(pCrew->Contained()) + { + // Clonk steckt in TIM2? + if(pCrew->Contained()->GetID() == TIM2) pCrew->Contained()->ContainedLeft(); + } + if(pCrew->Contained()) + { + // Clonk steckt in TIM1? + if(pCrew->Contained()->GetID() == TIM1) + { + // Waffenwahl aktiviert? (Achtung: Hardcode!) + var rule = FindObject(WPCH); + if(rule) + { + // Warenangebot abfragen + var aWares = rule->GetBuyableWaresFor("IsWeapon",GetOwner()); + // Irgendwas rauspicken (0-3 Sachen) + var buyCount = BoundBy(Random(4), 0, GetLength(aWares)); + for(var i=0 ; i < buyCount ; i++) + { + var randomWp = Random(GetLength(aWares)); + var weapon = aWares[randomWp]; + if(weapon && weapon != PIWP) + { + rule->DoBuyItem(weapon, GetOwner(pCrew), pCrew); + aWares[randomWp] = 0; + } + } + // Menü weg + rule->Finish(0, pCrew); + } + } + } + } + // spezielle Taktik... + if(goal) + if(!(goal->~AITactic(this()))) { + for(var i=0, pCrew=0 ; pCrew = GetCrew(GetOwner(), i) ; i++) { + // Fallback + TacticDefault(pCrew); + } + } +} + +private func GetGoal() { return(FindObject2(Find_Category(C4D_Goal))); } + +/* Taktiken */ + +public func TacticDefault(object pCrew) { + if(pCrew->Contained()) return(true); + // Deathmatch hat keine besondere Taktik, wir suchen einen Wegpunkt und laufen hin + if(!(pCrew->GetCommand() || pCrew->GetMacroCommand())) + // Clonk hat nichts zu tun -> das müssen wir ändern + pCrew->SetMacroCommand(this(), "MoveTo", GetRandomWp(),0,0,0,Aggro_Follow); + // Standardinventarbehandlung + pCrew->CheckInventory(); + return(true); +} + + +// 'beyond' is interceptable because 'obj' is between 'beyond' and its target 'targ' +public func Interceptor(obj, targ, beyond) +{ + // a clonk counts as an interceptor if the angle to flagbase and carrier are more than 90° + var angle = 0; + var a1 = Angle(GetX(obj),GetY(obj),GetX(targ),GetY(targ)); + var a2 = Angle(GetX(obj),GetY(obj),GetX(beyond),GetY(beyond)); + angle = Abs(Normalize(a1-a2,0)); + if(angle > 90) return(1); + return(0); +} + +// Follow a target +public func Follow(object pCrew, object target, int maxdist, string text) { + if(pCrew->GetMacroCommand(0, 1) == target || pCrew->GetMacroCommand(1, 1) == target) return(); + if(ObjectDistance(pCrew,target) > maxdist) { + pCrew->SetMacroCommand(this(), "Follow", target, 0,0,0, Aggro_Follow); + pCrew->DebugMessage(Format("@%s", text),"tactics"); + } +} + +// Guard +public func Guard(pCrew, text) { + if(pCrew->GetAggroLevel() != Aggro_Guard) { + pCrew->SetMacroCommand(this(), "None", 0,0,0,0,Aggro_Guard); + pCrew->DebugMessage(Format("@%s", text), "tactics"); + } +} + +// Run to a target +public func Run(pCrew, target, text) { + if((pCrew->GetMacroCommand(0,1)) != target) { + pCrew->SetMacroCommand(this(), "MoveTo", target,0,0,0,Aggro_Shoot); + pCrew->DebugMessage(Format("@%s", text), "tactics"); + } +} + + +/* Helferlein */ + +// Zufälligen Wegpunkt suchen +private func GetRandomWp() +{ + var wps = FindObjects(Find_ID(WAYP)); + return(wps[Random(GetLength(wps))]); +} diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/StringTblDE.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/StringTblDE.txt new file mode 100644 index 00000000..c1e2dd6a --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +Team=KI-Team %d +NoTeam=KI %d \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/StringTblUS.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/StringTblUS.txt new file mode 100644 index 00000000..2a45c266 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +Team=AI Team %d +NoTeam=AI %d \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/ActMap.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/ActMap.txt new file mode 100644 index 00000000..bdbe2caf --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Vis +Procedure=NONE +Length=1 +Facet=16,0,16,16 +NextAction=Hold diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DefCore.txt new file mode 100644 index 00000000..ba87918e --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=WAYP +Version=4,9,8,2 +Name=Waypoint +Category=C4D_StaticBack|C4D_Foreground +Width=16 +Height=16 +Offset=-8,-8 +Picture=0,0,16,16 diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DescDE.txt new file mode 100644 index 00000000..9855f9bc --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DescDE.txt @@ -0,0 +1 @@ +Wegpunkte zur Routenfindung. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DescUS.txt new file mode 100644 index 00000000..35a7f88e --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/DescUS.txt @@ -0,0 +1 @@ +Waypoint \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Graphics.png new file mode 100644 index 00000000..2bc0084f Binary files /dev/null and b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Names.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Names.txt new file mode 100644 index 00000000..163542c6 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Wegpunkt +US:Waypoint \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/ActMap.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/ActMap.txt new file mode 100644 index 00000000..4cae05f8 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/ActMap.txt @@ -0,0 +1,20 @@ +[Action] +Name=Vis +Procedure=ATTACH +Length=1 +Facet=0,0,32,256,-16,0 +NextAction=Hold + +[Action] +Name=Vis2 +Procedure=ATTACH +Length=1 +Facet=32,0,32,256,-16,0 +NextAction=Hold + +[Action] +Name=Vis3 +Procedure=ATTACH +Length=1 +Facet=64,0,32,256,-16,0 +NextAction=Hold diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/DefCore.txt new file mode 100644 index 00000000..dfb64014 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=VIPU +Version=4,9,8,2 +Name=Visual Path +Category=C4D_StaticBack|C4D_Foreground +Timer=5 +TimerCall=Timer +Width=1 +Height=1 +Picture=0,0,1,1 diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Graphics.png new file mode 100644 index 00000000..8915263a Binary files /dev/null and b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Names.txt b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Names.txt new file mode 100644 index 00000000..084c2ff0 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pfad +US:Path diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Script.c b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Script.c new file mode 100644 index 00000000..edc6b944 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Path.c4d/Script.c @@ -0,0 +1,82 @@ +/*-- Pfad - Visualisierung --*/ + +#strict + +local so,eo, sx,sy, ex,ey, flag, jtpk, path, dir; + +protected func Timer() // Schaut nach Änderungen +{ + if(!so) return(RemoveObject()); + if(!(so->GetPathTarget(path))) return(RemoveObject()); + // Irgendeine klitzekleine Änderung? + if(so->GetX() != sx || + so->GetY() != sy || + eo->GetX() != ex || + eo->GetY() != ey || + so->GetPathFlag(path) != flag || + so->GetPathJetpack(path) != jtpk || + so->GetPathTarget(path) != eo || + so->GetPathDir(path) != dir) + + Set(so, so->GetPathTarget(path), so->GetPathFlag(path), so->GetPathJetpack(path), path, so->GetPathDir(path)); +} + +public func Set(object start, object end, int flags, int jetpack, int iPath, int iDir) { + so = start; + eo = end; + sx = start->GetX(); + sy = start->GetY(); + ex = end->GetX(); + ey = end->GetY(); + flag = flags; + jtpk = jetpack; + path = iPath; + dir = iDir; + + SetObjectBlitMode(GFX_BLIT_Additive); + SetClrModulation(MyColor(flags,jetpack,start)); + + var sx = GetX(start); + var sy = GetY(start); + var ex = GetX(end); + var ey = GetY(end); + var cl = 1000*Distance(sx,sy,ex,ey)/GetActMapVal("Facet",GetAction(),0,3); + var w = 650; + var r = Angle(sx,sy,ex,ey)-180; + + var fsin = -Sin(r, 1000), fcos = Cos(r, 1000); + + var xoff = -4; + var yoff = 0; + + var width = +fcos*w/1000, height = +fcos*cl/1000; + var xskew = +fsin*cl/1000, yskew = -fsin*w/1000; + + var xadjust = +fcos*xoff + fsin*yoff; + var yadjust = -fsin*xoff + fcos*yoff; + + // set matrix values + SetObjDrawTransform ( + -width*dir, xskew, xadjust, + -yskew*dir, height, yadjust + ); + +} + +private func MyColor(int flags, int jetpack, object start) { + SetAction("Vis",start); + if(jetpack) { + SetAction("Vis3",start); + return(RGB(255,0,0)); + } + else { + if(flags == Path_MoveTo) return(RGB(0,255,0)); + if(flags == Path_Jump) return(RGB(255,255,0)); + if(flags == Path_Backflip) { + SetAction("Vis3",start); + return(RGB(255,255,0)); + } + SetAction("Vis2",start); + if(flags == Path_Lift) return(RGB(255,0,255)); + } +} diff --git a/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Script.c b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Script.c new file mode 100644 index 00000000..ec412393 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/AIPlayer.c4d/Waypoint.c4d/Script.c @@ -0,0 +1,361 @@ +/* Waypoint */ + +#strict + +/* Global */ + +static WAYP_visibleWaypoints; + +global func CreateWP(int x, int y) { + var WP = CreateObject(WAYP,AbsX(x),AbsY(y+8),-1); + return WP; +} + +// Flags sind nicht kombinierbar +static const Path_MoveTo = 0; // ;) +static const Path_Jump = 1; +static const Path_Backflip = 2; +static const Path_Lift = 3; +//... weitere denkbar + +// Zündungsrichtungen für das Jetpack +static const Jetpack_Left = 1; +static const Jetpack_UpLeft = 2; +static const Jetpack_UpRight = 3; +static const Jetpack_Right = 4; + +static const WAYP_PathErr = "Path %d does not exist."; + +// macht alle Wegpunkte sichtbar/unsichtbar +global func WaypointsVisible(bool visu) { + for(var obj in FindObjects(Find_ID(WAYP))) + obj->SetVisible(visu); + WAYP_visibleWaypoints = visu; +} + +// alle Wegpunkte testen (deren Pfade) +global func WaypointsTest() { + var time = 0; + for(var obj in FindObjects(Find_ID(WAYP))) { + ScheduleCall(obj,"Test",time); + time += 80; + } +} + +// Schreibt ein Wegpunktscript in den Enginelog +global func LogWaypoints() { + var aWaypoints = FindObjects(Find_ID(WAYP)); + + var i = 0; + for(var pWp in aWaypoints) + Log(" var wp%d = CreateWP(%d,%d);", ++i, pWp->GetX(), pWp->GetY()); + + i = 0; + for(pWp in aWaypoints) + { + i++; + for(var j = 0,eo ; j < pWp->WAYP::GetPathCount() ; j++) + { + eo = Waypoints_GetArrayPosition(aWaypoints, pWp->WAYP::GetPathTarget(j)); + if(i < 0) + { + Log("// Path error: no target!"); + continue; // Pfad kann man nicht auswerten + } + + var flag = pWp->WAYP::GetPathFlag(j); + var strFlag = Format("%d",flag); + if(flag == 0) strFlag = "Path_MoveTo"; + if(flag == 1) strFlag = "Path_Jump"; + if(flag == 2) strFlag = "Path_Backflip"; + if(flag == 3) strFlag = "Path_Lift"; + + if(pWp->WAYP::GetPathJetpack(j)) + Log(" wp%d -> AddPath(wp%d, %s, %d, %d, %d);", i,eo, strFlag, pWp->WAYP::GetPathDir(j), pWp->WAYP::GetPathJetpack(j), pWp->WAYP::GetPathJetpackFlag(j)); + else + Log(" wp%d -> AddPath(wp%d, %s, %d);", i,eo, strFlag, pWp->WAYP::GetPathDir(j)); + + var cmd; + for(var z = 0; cmd = pWp->WAYP::GetArriveCommand(j,z,0,true);z++) + { + Log(" wp%d -> SetArriveCommand(%d, %d, \"%s\", Hier Objekt einfügen [%s], %d, %d);",i, j,z,cmd, GetName(pWp->WAYP::GetArriveCommand(j,z,1,true)), pWp->WAYP::GetArriveCommand(j,z,2,true), pWp->WAYP::GetArriveCommand(j,z,3,true)); + } + } + } +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + var cmd; + for (var i=0;iSet(this(),target,flag,jetpdelay,pId); + + if(fReconnect) + target->AddPath(this(), flag, dir*-1, jetpdelay, jetpflag); + + return(pId); +} + +public func RemovePath(int pId) { + RemoveEffect(0,this(),aPath[pId]); + var aNewArray = CreateArray(), i; + for(var path in aPath) + { + if(i != pId) aNewArray[GetLength(aNewArray)] = path; + i++; + } + aPath = aNewArray; +} + +public func SetPathTarget(int pId, object target) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + + // Vorsicht: wenn auf 0 gesetzt wird, zeigt der Pfad ins nix + EffectVar(0,this(),aPath[pId]) = target; +} + +public func SetPathDir(int pId, int dir) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + + // dir nicht angegeben: automatisch aus Position von target ermitteln + if(!dir) { + var target = GetPathTarget(pId); + if(!target) return(); + var diff = GetX(target)-GetX(); + dir = diff/Abs(diff); + } + EffectVar(2,this(),aPath[pId]) = dir; +} + +public func SetPathFlag(int pId, int flag) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + + EffectVar(1,this(),aPath[pId]) = flag; +} + +public func SetPathJetpack(int pId, int jetpack) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + + EffectVar(3,this(),aPath[pId]) = jetpack; +} + +public func SetPathJetpackFlag(int pId, int flag) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + + if(!flag && GetPathJetpack(pId)) + { + var angle = Angle(GetX(), GetY(), GetPathTarget(pId)->GetX(), GetPathTarget(pId)->GetY()); + if(Inside(angle, 180, 310)) flag = Jetpack_Left; + if(Inside(angle, 311, 360)) flag = Jetpack_UpLeft; + if(Inside(angle, 0, 49)) flag = Jetpack_UpRight; + if(Inside(angle, 50, 179)) flag = Jetpack_Right; + } + + EffectVar(4,this(),aPath[pId]) = flag; +} + +// Getters + +// iElement +// 0: szCommand +// 1: pTarget +// 2: iX +// 3: iY +// 4: pTarget2 +// 5: Data +public func GetArriveCommand(int pId, int iNo, int iElement, bool NoLog) { + if(GetPathCount() <= pId) + { + if(NoLog) + return(); + return(ErrorLog(WAYP_PathErr, pId)); + } + if(iElement < 0 || iElement > 5) return(); + if(!EffectVar(iNo + 5, this(), aPath[pId])) return(); + return(EffectVar(iNo + 5,this(),aPath[pId])[iElement]); +} + +public func GetArriveCommandCount(int pId) { + var i = 0; + while(EffectVar(i + 5,this,aPath[pId])) + i++; + return i; +} + +public func GetPathCount() { + return(GetLength(aPath)); +} + +public func GetPathTarget(int pId) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + return(EffectVar(0,this(),aPath[pId])); +} + +public func GetPathDir(int pId) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + return(EffectVar(2,this(),aPath[pId])); +} + +public func GetPathFlag(int pId) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + return(EffectVar(1,this(),aPath[pId])); +} + +public func GetPathJetpack(int pId) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + return(EffectVar(3,this(),aPath[pId])); +} + +public func GetPathJetpackFlag(int pId) { + if(GetPathCount() <= pId) return(ErrorLog(WAYP_PathErr, pId)); + return(EffectVar(4,this(),aPath[pId])); +} + +// Visualization + +public func SetVisible(bool vis) { + if(!vis) { + SetAction("Idle"); + Message("", this()); + // alle Pfad-Anzeige-Objekte löschen + RemovePathDisplays(); + } + else { + SetAction("Vis"); + Message("@%d", this(), ObjectNumber()); + // alle Pfad-Anzeige-Objekte erstellen + // (von Pfaden die vom Knoten wegführen) + CreatePathDisplays(); + } +} + +public func Test() { + // alle Pfade + for(var i; iCreateContents(JTPK); + hzck->DoAmmo(GSAM,500); + jtpk->Activate(hzck); + hzck->SetLocal(13,GetPathTarget(i)); + //hzck->SetMacroCommand(this(),"Wait",0,0,0,40); + hzck->SetMacroCommand(this(),"MoveTo",GetPathTarget(i)); + } +} + +public func OnMacroCommandFailed(clonk, iReason) { + Log("Failed for %d(%d,%d)->%d(%d,%d). Reason: %d",ObjectNumber(),GetX(),GetY(),ObjectNumber(Local(13,clonk)),GetX(Local(13,clonk)),GetY(Local(13,clonk)),iReason); +} + +public func OnMacroCommandSuccess(clonk) { + if(clonk) + { + clonk->LocalN("aGear") = CreateArray(); + while(clonk->Contents()) + RemoveObject(clonk->Contents()); + RemoveObject(clonk); + } +} + +/* Intern */ + +protected func Initialize() +{ + aPath = CreateArray(); + SetObjectBlitMode(GFX_BLIT_Additive); + if(WAYP_visibleWaypoints) { Message("@%d", this(), ObjectNumber()); SetAction("Vis"); } +} + +private func CreatePathDisplays() { + // alle Pfade + for(var i; iSet(this(),GetPathTarget(i),GetPathFlag(i),GetPathJetpack(i),i, GetPathDir(i)); + } +} + +private func RemovePathDisplays() { + for(var obj in FindObjects(Find_ID(VIPU),Find_ActionTarget(this()))) + if(obj) + RemoveObject(obj); +} + + +// visu Set(anfangsknoten, endknoten, flag, jetpack) + diff --git a/Hazard.c4d/Crew.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/DescDE.txt new file mode 100644 index 00000000..4e23a5dc --- /dev/null +++ b/Hazard.c4d/Crew.c4d/DescDE.txt @@ -0,0 +1 @@ +Der Hazardclonk und seine Zeitgenossen. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/DescUS.txt new file mode 100644 index 00000000..7cdaebc5 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/DescUS.txt @@ -0,0 +1 @@ +The hazardclonk and his coevals. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/ActMap.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/ActMap.txt new file mode 100644 index 00000000..4bbe1297 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/ActMap.txt @@ -0,0 +1,412 @@ +[Action] +Name=Walk +Procedure=WALK +Directions=2 +FlipDir=1 +Length=16 +Delay=15 +Facet=0,0,16,20,0,0 +NextAction=Walk +StartCall=CheckArmed + +[Action] +Name=Scale +Procedure=SCALE +Directions=2 +FlipDir=1 +Length=16 +Delay=15 +Facet=0,20,16,20,0,0 +NextAction=Scale +StartCall=Scaling + +[Action] +Name=ScaleDown +Procedure=SCALE +Directions=2 +FlipDir=1 +Length=16 +Reverse=1 +Delay=15 +Facet=0,20,16,20,0,0 +NextAction=ScaleDown +StartCall=Scaling + +[Action] +Name=ScaleLadder +Procedure=NONE +Directions=2 +FlipDir=1 +Length=16 +Facet=0,20,16,20,0,0 +NextAction=ScaleLadder +StartCall=PauseReloading + +[Action] +Name=Tumble +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=16 +Delay=1 +Facet=0,40,16,20,0,0 +NextAction=Tumble +EndCall=MacroComTumble +InLiquidAction=Swim +ObjectDisabled=1 + +[Action] +Name=Dig +Procedure=DIG +Directions=2 +FlipDir=1 +Length=16 +Delay=15 +Facet=0,60,16,20,0,0 +NextAction=Dig +StartCall=Digging +DigFree=11 + +[Action] +Name=Bridge +Procedure=BRIDGE +Directions=2 +FlipDir=1 +Length=16 +Delay=1 +Facet=0,60,16,20,0,0 +NextAction=Bridge +StartCall=Digging +InLiquidAction=Swim + +[Action] +Name=Swim +Procedure=SWIM +Directions=2 +FlipDir=1 +Length=16 +Delay=15 +Facet=0,80,16,20,0,0 +NextAction=Swim +StartCall=CheckArmed + +[Action] +Name=Hangle +Procedure=HANGLE +Directions=2 +FlipDir=1 +Length=11 +Delay=16 +Facet=0,100,16,20,0,0 +NextAction=Hangle +StartCall=Hangling + +[Action] +Name=Jump +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=8 +Delay=3 +Facet=0,120,16,20,0,0 +NextAction=Hold +StartCall=JumpStart +PhaseCall=CheckStuck +InLiquidAction=Swim + +[Action] +Name=KneelDown +Procedure=KNEEL +Directions=2 +FlipDir=1 +Length=4 +Delay=1 +Facet=0,140,16,20,0,0 +NextAction=KneelUp + +[Action] +Name=KneelUp +Procedure=KNEEL +Directions=2 +FlipDir=1 +Length=4 +Delay=1 +Facet=64,140,16,20,0,0 +NextAction=Walk + +[Action] +Name=Dive +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=8 +Delay=4 +Facet=0,160,16,20,0,0 +NextAction=Hold +StartCall=JumpStart +PhaseCall=CheckStuck +InLiquidAction=Swim +ObjectDisabled=1 + +[Action] +Name=FlatUp +Procedure=KNEEL +Directions=2 +FlipDir=1 +Length=8 +Delay=1 +Facet=0,180,16,20,0,0 +NextAction=KneelUp +ObjectDisabled=1 + +[Action] +Name=Throw +Procedure=THROW +Directions=2 +FlipDir=1 +Length=8 +Delay=1 +Facet=0,200,16,20,0,0 +NextAction=Walk + +[Action] +Name=Punch +Procedure=FIGHT +Directions=2 +FlipDir=1 +Length=8 +Delay=2 +Facet=0,220,16,20,0,0 +NextAction=Fight +EndCall=Punching +ObjectDisabled=1 + +[Action] +Name=Dead +Directions=2 +FlipDir=1 +Length=6 +Delay=3 +Facet=0,240,16,20,0,0 +NextAction=Hold +NoOtherAction=1 +ObjectDisabled=1 + +[Action] +Name=Ride +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=4 +Delay=3 +Facet=128,120,16,20,0,0 +NextAction=Ride +StartCall=Riding + +[Action] +Name=RideStill +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=1 +Delay=10 +Facet=128,120,16,20,0,0 +NextAction=RideStill +StartCall=Riding + +[Action] +Name=Push +Procedure=PUSH +Directions=2 +FlipDir=1 +Length=8 +Delay=15 +Facet=128,140,16,20,0,0 +NextAction=Push + +[Action] +Name=Chop +Procedure=CHOP +Directions=2 +FlipDir=1 +Length=8 +Delay=3 +Facet=128,160,16,20,0,0 +NextAction=Chop +StartCall=Chopping +InLiquidAction=Swim + +[Action] +Name=Fight +Procedure=FIGHT +Directions=2 +FlipDir=1 +Length=7 +Delay=4 +Facet=128,180,16,20,0,0 +NextAction=Fight +StartCall=Fighting +ObjectDisabled=1 + +[Action] +Name=GetPunched +Procedure=FIGHT +Directions=2 +FlipDir=1 +Length=8 +Delay=3 +Facet=128,200,16,20,0,0 +NextAction=Fight +ObjectDisabled=1 + +[Action] +Name=Build +Procedure=BUILD +Directions=2 +FlipDir=1 +Length=8 +Delay=2 +Facet=128,220,16,20,0,0 +NextAction=Build +StartCall=Building +InLiquidAction=Swim + +[Action] +Name=RideThrow +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=8 +Delay=1 +Facet=128,240,16,20,0,0 +NextAction=Ride +StartCall=Throwing + +[Action] +Name=WalkArmed +Procedure=WALK +Directions=2 +FlipDir=1 +Length=16 +Delay=15 +Facet=0,260,16,20,0,0 +NextAction=WalkArmed +StartCall=CheckArmed + +[Action] +Name=SwimArmed +Procedure=SWIM +Directions=2 +FlipDir=1 +Length=16 +Delay=15 +Facet=0,280,16,20,0,0 +NextAction=SwimArmed +StartCall=CheckArmed + +[Action] +Name=JumpArmed +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=8 +Delay=3 +Facet=0,300,16,20,0,0 +NextAction=Hold +StartCall=JumpStart +InLiquidAction=SwimArmed + +[Action] +Name=Aim +Procedure=NONE +Directions=2 +FlipDir=1 +Length=7 +Attach=8 +Facet=0,340,24,20,-4,0 +NextAction=Hold + +[Action] +Name=AimLow +Procedure=NONE +Directions=2 +FlipDir=1 +Length=7 +Attach=8 +Facet=0,360,24,20,-4,0 +NextAction=Hold + +[Action] +Name=AimSquat +Procedure=NONE +Directions=2 +FlipDir=1 +Length=7 +Attach=8 +Facet=0,380,24,20,-4,0 +NextAction=Hold + +[Action] +Name=AimSquatLow +Procedure=NONE +Directions=2 +FlipDir=1 +Length=7 +Attach=8 +Facet=0,400,24,20,-4,0 +NextAction=Hold + +[Action] +Name=BackFlip +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=13 +Delay=2 +Facet=0,320,16,20,0,0 +NextAction=Jump +PhaseCall=CheckStuck +AbortCall=ComNone +InLiquidAction=Swim + +[Action] +Name=ForwardFlip +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=13 +Delay=2 +Facet=0,320,16,20,0,0 +NextAction=Jump +PhaseCall=CheckStuck +AbortCall=ComNone +InLiquidAction=Swim +Reverse=1 + +[Action] +Name=JetpackFlight +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=1 +Delay=70 +Facet=32,80,16,20,0,0 +NextAction=Hold +InLiquidAction=Swim + + +[Action] +Name=Heal +Procedure=NONE +Directions=2 +FlipDir=1 +Length=1 +Delay=90 +Attach=8 +Facet=144,400,24,20,-4,0 +NextAction=Heal +ObjectDisabled=1 + + + + diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DefCore.txt new file mode 100644 index 00000000..f7472583 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=ABAG +Version=4,9,8,2 +Name=Ammobag +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DescDE.txt new file mode 100644 index 00000000..d46facfd --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DescDE.txt @@ -0,0 +1 @@ +Hilfsobjekt zum Einlagern von Munition. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DescUS.txt new file mode 100644 index 00000000..e7ebdb72 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/DescUS.txt @@ -0,0 +1 @@ +Helper to manage ammunition. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Graphics.png new file mode 100644 index 00000000..a72a1909 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Names.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Names.txt new file mode 100644 index 00000000..fac40d11 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Munitionsgürtel +US:Ammunition belt \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Script.c b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Script.c new file mode 100644 index 00000000..0c560251 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Ammobag.c4d/Script.c @@ -0,0 +1,16 @@ +/*-- Munitionsgürtel --*/ + +#strict + +func Initialize() +{ + SetPosition(1,1); //ins linke obere Eck setzten + SetVisibility(VIS_None); //und verstecken! + return(1); +} + +func IsAmmoStorage() { return(1); } + +/* Serialisierung */ + +public func NoSerialize() { return !false; } diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/ClonkNames.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/ClonkNames.txt new file mode 100644 index 00000000..9defa40a --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/ClonkNames.txt @@ -0,0 +1,31 @@ +Compor +Seldon +Trevize +Darell +Bayta +Harvey +Toran +Arkady +Dornick +Trantor +Branno +Kodell +Rapid +Delarmi +Golan +Count +Janov +Patton +Sterling +Grayson +Marik +Collins +Zero +Bruce +Gibson +Pynchon +Roebuck +Korolew +Hype +Giskard +Daneel \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm1.wav b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm1.wav new file mode 100644 index 00000000..19759f90 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm1.wav differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm2.wav b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm2.wav new file mode 100644 index 00000000..a8707386 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm2.wav differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm3.wav b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm3.wav new file mode 100644 index 00000000..12d74d35 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm3.wav differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm4.wav b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm4.wav new file mode 100644 index 00000000..94ba6785 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Confirm4.wav differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/ActMap.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/ActMap.txt new file mode 100644 index 00000000..1143fa37 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=Attach +Procedure=ATTACH +Delay=0 + +[Action] +Name=Base +Delay=0 +Facet=0,0,25,25 + +[Action] +Name=Overlay +Delay=0 +Facet=25,0,25,25 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DefCore.txt new file mode 100644 index 00000000..0ff553b3 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=HCRH +Version=4,9,8,2 +Name=Crosshair +Category=C4D_Vehicle | C4D_IgnoreFoW | C4D_Foreground +Timer=1 +TimerCall=Check +Width=25 +Height=25 +Offset=-12,-12 +Vertices=1 +VertexY=1 +VertexCNAT=64 +Picture=0,0,25,25 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DescDE.txt new file mode 100644 index 00000000..188fffee --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein toll futuristisches Fadenkreuz. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DescUS.txt new file mode 100644 index 00000000..a728708c --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/DescUS.txt @@ -0,0 +1 @@ +A futuristic crosshair. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Graphics.png new file mode 100644 index 00000000..5c2b7a48 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Names.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Names.txt new file mode 100644 index 00000000..705739d0 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fadenkreuz +US:Cross-Hair \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Script.c b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Script.c new file mode 100644 index 00000000..f02a0232 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Crosshair.c4d/Script.c @@ -0,0 +1,79 @@ +/*-- Fadenkreuz --*/ + +#strict + +static const CH_Distance = 60; + +local my_r; + +//Nein nein, das Fadenkreuz wolln wir nicht warpen :D +public func NoWarp() { return(1); } + +func Initialize() { + my_r = 0; + SetVertex(0,1,CH_Distance,0,2); + SetGraphics(0,this(),GetID(),1,GFXOV_MODE_Action,"Base",0); + SetGraphics(0,this(),GetID(),2,GFXOV_MODE_Action,"Overlay",0); + return(1); +} + +protected func Check() { + var user = GetActionTarget(); + if(!user) + return(RemoveObject()); + //if(!(user->GetAlive())) + // return(RemoveObject()); + if(!(user->~IsAiming())) + return(RemoveObject()); +} + +public func Init(object pTarget) { + SetOwner(GetController(pTarget)); + SetAction("Attach",pTarget); + Schedule(Format("SetVisibility(%d)",VIS_Owner),2,0,this()); + SetVisibility(VIS_None); +} + +public func SetAngle(int iAngle) { + my_r = iAngle; + UpdateAngle(); +} + +public func GetAngle() { + return(Normalize(my_r,-180)); +} + +public func ChangeDir() { + my_r = 360-my_r; + UpdateAngle(); +} + +public func DoAngle(int iChange) { + my_r += iChange; + UpdateAngle(); +} + +public func UpdateAngle() { + SetR(my_r+GetR(GetActionTarget())); + Timer(); +} + +protected func Timer() { + + var angle = GetR(); + //var angle2 = GetActTime()*Global(1); + + //var siz = Sin(angle2,200); + var w = 1000; + var l = 1000; + var fsin = -Sin(angle, 1000), fcos = Cos(angle, 1000); + var width = +fcos*w/1000, height = +fcos*l/1000; + var xskew = +fsin*l/1000, yskew = -fsin*w/1000; + + // set matrix values + SetObjDrawTransform ( + width, xskew, 0, + yskew, height, 0, + 0, 1 + ); +} \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DefCore.txt new file mode 100644 index 00000000..0fe0a896 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DefCore.txt @@ -0,0 +1,50 @@ +[DefCore] +id=HZCK +Version=4,9,8,2 +Name=HazardClonk +Category=C4D_Living|C4D_SelectHomebase +MaxUserSelect=5 +ContactCalls=1 +Width=16 +Height=20 +Offset=-8,-10 +Vertices=7 +VertexX=0,0,0,-2,2,-4,4 +VertexY=0,-7,9,-3,-3,3,3 +VertexCNAT=64,4,8,1,2,1,2 +VertexFriction=300,300,100,300,300,300,300 +Value=75 +Mass=50 +Components=HZCK=0 +Picture=192,100,32,40 +Collection=-8,-10,16,27 +ContactIncinerate=1 +Prey=1 +CrewMember=1 +Growth=15 +Float=1 +ColorByOwner=1 +BorderBound=1 +StretchGrowth=1 +NoBurnDecay=1 +IncompleteActivity=1 +Oversize=1 +NoFight=1 + +[Physical] +Energy=150000 +Breath=250000 +Walk=70000 +Jump=40000 +Scale=50000 +Hangle=60000 +Dig=40000 +Swim=90000 +Throw=50000 +Push=40000 +Fight=50000 +CanScale=1 +CanHangle=1 +CanDig=1 +CanConstruct=1 +CanChop=1 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DescDE.txt new file mode 100644 index 00000000..74ce5439 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DescDE.txt @@ -0,0 +1,7 @@ +Ein speziell ausgebildeter Clonk für härteste Einsätze. + +Kann bis zu fünf Objekte mit sich tragen, davon bis zu drei Waffen. Inventarsteuerung über Taste Spezial 1 und Spezial 2. + +Waffen feuern über Taste Werfen. Ablegen mit Doppelstop-Werfen. Zielen durch 3x Stop drücken. + +Der Hazardclonk ist in der Lage einen Rückwärtssprung auführen. Dazu in schneller Abfolge je nach Bewegungsrichtung hinten und Springen drücken. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DescUS.txt new file mode 100644 index 00000000..3fa09ad8 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/DescUS.txt @@ -0,0 +1,7 @@ +A specially trained clonk for most dangerous missions. + +Can carry up to five objects at a time thereof up to 3 may be weapons. Inventory control via commands Special 1 and Special 2. + +Command Throw to fire weapons. Double stop, then Throw to drop weapons. Press stop triple to aim. + +The Hazardclonk is able to do a backflip. Therefor press depending on the current direction backwards and then Jump. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Graphics.png new file mode 100644 index 00000000..11d68e91 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/GraphicsArmor.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/GraphicsArmor.png new file mode 100644 index 00000000..2c1623f3 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/GraphicsArmor.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/ActMap.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/ActMap.txt new file mode 100644 index 00000000..348c3f4f --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/ActMap.txt @@ -0,0 +1,3 @@ +[Action] +Name=Red +Facet=0,0,5,10 \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DefCore.txt new file mode 100644 index 00000000..c5d2be43 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=1HUD +Version=4,9,8,2 +Name=HUD +Category=C4D_StaticBack|C4D_Parallax|C4D_Foreground|C4D_MouseIgnore|C4D_IgnoreFoW +Timer=1 +TimerCall=Timer +Width=110 +Height=30 +Offset=-55,-15 +Picture=0,0,110,30 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DescDE.txt new file mode 100644 index 00000000..b97ec19e --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DescDE.txt @@ -0,0 +1 @@ +Zeigt Informationen an. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DescUS.txt new file mode 100644 index 00000000..8486b109 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/DescUS.txt @@ -0,0 +1 @@ +Shows information. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Graphics.png new file mode 100644 index 00000000..008b229a Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRed.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRed.png new file mode 100644 index 00000000..178862f3 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRed.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRow.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRow.png new file mode 100644 index 00000000..ca26f668 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRow.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAM.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAM.png new file mode 100644 index 00000000..7fd59658 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAM.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight1.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight1.png new file mode 100644 index 00000000..d41ce4f7 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight1.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight2.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight2.png new file mode 100644 index 00000000..f3de767c Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight2.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight3.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight3.png new file mode 100644 index 00000000..b884aed3 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight3.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight4.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight4.png new file mode 100644 index 00000000..ed856886 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowENAMHighlight4.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGRAM.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGRAM.png new file mode 100644 index 00000000..07f14826 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGRAM.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGSAM.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGSAM.png new file mode 100644 index 00000000..ccec621a Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGSAM.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGSAMHighlight.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGSAMHighlight.png new file mode 100644 index 00000000..bb074f79 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowGSAMHighlight.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowHighlight.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowHighlight.png new file mode 100644 index 00000000..16216a75 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowHighlight.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowHighlight2.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowHighlight2.png new file mode 100644 index 00000000..71e07178 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowHighlight2.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowMIAM.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowMIAM.png new file mode 100644 index 00000000..ca26f668 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowMIAM.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowSTAM.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowSTAM.png new file mode 100644 index 00000000..9f640c77 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/GraphicsRowSTAM.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/DefCore.txt new file mode 100644 index 00000000..13a1b58e --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=2HUD +Version=4,9,8,2 +Name=HUD Info +Category=C4D_StaticBack|C4D_Parallax|C4D_Foreground|C4D_MouseIgnore|C4D_IgnoreFoW +Width=32 +Height=32 +Offset=-16,-16 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Graphics.png new file mode 100644 index 00000000..faecbb2e Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Names.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Names.txt new file mode 100644 index 00000000..7ba59853 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:HUD Info +US:HUD Info \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Script.c b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Script.c new file mode 100644 index 00000000..b50cc52e --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Info.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Infoding --*/ + +#strict + +protected func Initialize() +{ + SetVisibility(VIS_Owner); +} diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Names.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Names.txt new file mode 100644 index 00000000..b6adfc5b --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:HUD +US:HUD \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Script.c b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Script.c new file mode 100644 index 00000000..fa15c030 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/HeadUpDisplay.c4d/Script.c @@ -0,0 +1,380 @@ +/*-- HUD --*/ + +#strict 2 + +local ammoobjs, // Array aus 2HUD-Objekten zur Anzeige der Ammo im Munitionsbeutel. Uneindeutiger Name wegen Rückwärtskompatibilität (QuakeR) + info, // 2HUD Hilfsobjekt um den Ladestand der Waffe anzuzeigen. Uneindeutiger Name wegen Rückwärtskompatibilität + itemInfoHUD; // 2HUD Hilfsobjekt um den Beschreibungstext für Nicht-Waffen anzuzeigen + +local allAmmo, // alle Definitionen die Ammo sind + ammovalues, // Füllstand der Munitionen (seit dem letzten Update). (Array in der gleichen Reihenfolge wie die allAmmo) + charge, recharge, // wie weit es geladen ist + currentWeapon, // momentane Waffe + currentAmmoId, // momentane AmmoId + currentAmmoCount, // momentane Ammo count die in der Waffe ist (seit dem letzten update) + currentClonk; // momentan ausgewähltes Crewmember + +static const HUD_Layer_AmmoBase = 1; +static const HUD_Layer_Recharge = 2; +static const HUD_Layer_AmmoHighlight = 3; + +global func GetHUD(object obj, id theID) +{ + if(!obj) + if(!(obj = this)) + return; + + var owner = GetOwner(obj); + if(owner <= NO_OWNER) return; + + // Scriptspieler bekommen kein HUD + if(GetPlayerType(owner) == C4PT_Script) + return; + + if(!theID) theID = 1HUD; + + var bar = FindObjectOwner(theID,owner); + if(!bar) + { + bar = CreateObject(theID, 0,0, owner); + } + return bar; +} + +protected func Initialize() +{ + allAmmo = CreateArray(); + ammovalues = CreateArray(); + + // Main Hud (Ammo progress bar) + var yoffset = -55; + SetPosition(105, yoffset); + SetGraphics("Row", 0, GetID(), HUD_Layer_AmmoBase, GFXOV_MODE_Base); + SetGraphics("RowHighlight", 0, GetID(), HUD_Layer_AmmoHighlight, GFXOV_MODE_Base/*, 0, GFX_BLIT_Additive*/); + SetVisibility(VIS_None); + // Ammo Hud + info = CreateObject(2HUD, 0,0, GetOwner()); + info->SetPosition(50, yoffset); + info->SetGraphics(0, 0, NONE,1,GFXOV_MODE_IngamePicture); + info->SetObjDrawTransform(750,0,0,0,750,0,0,1); + info->SetVisibility(VIS_None); + // Item Hud + itemInfoHUD = CreateObject(2HUD,0,0,GetOwner()); + itemInfoHUD->SetPosition(140, yoffset + 30); + + // Ammobag + InitAmmoBagHUD(); +} + +protected func Destruction() +{ + if(info) info->RemoveObject(); + if(itemInfoHUD) itemInfoHUD->RemoveObject(); + for(var i=0; i < GetLength(ammoobjs); ++i) + { + if(ammoobjs[i]) ammoobjs[i]->RemoveObject(); + } +} + +private func InitAmmoBagHUD() +{ + // remove ammobag display + var def = 0; + allAmmo = CreateArray(); + ammovalues = CreateArray(); + var arrI = 0; + // get all ammo + for(var i=0; def = GetDefinition(i,C4D_StaticBack); ++i) + { + if(DefinitionCall(def,"IsAmmo")) + { + allAmmo[arrI] = def; + ammovalues[arrI] = 0; + arrI++; + } + } + ammoobjs = CreateArray(); + + // place all ammo objects + for(var i=0; i < GetLength(allAmmo); ++i) + { + // ...now + ammoobjs[i] = CreateObject(2HUD,0,0,GetOwner()); + ammoobjs[i]->SetPosition(50,160+i*28); + ammoobjs[i]->SetGraphics(0, 0, allAmmo[i],1,GFXOV_MODE_IngamePicture); + ammoobjs[i]->SetObjDrawTransform(750,0,0,0,750,0,0,1); + ammoobjs[i]->SetVisibility(VIS_None); + } +} + +/* Timer */ + +protected func Timer() +{ + // Spieler weg? + if(GetOwner() == NO_OWNER || !GetPlayerName(GetOwner())) + { + RemoveObject(); + return; + } +} + +/* Aufrufe */ + +public func Update(object weapon, object ammobag, object who) +{ + // Nur den Cursor updaten + if(who) + { + if(GetCursor(GetOwner(who)) == who) + { + UpdateWeapon(weapon); + + if(ammobag) + UpdateAmmoBag(ammobag, weapon); + } + } +} + +// Waffen-HUD updaten +private func UpdateWeapon(object weapon) +{ + if(!weapon || !weapon->~IsWeapon()) + { + SetVisibility(VIS_None); + info->SetVisibility(VIS_None); + Message("",this); + Message("",info); + charge = 0; + recharge = 0; + SetCurrentWeapon(0); + + // garkein Inventar + if(!weapon) + { + itemInfoHUD->SetVisibility(VIS_None); + Message("",itemInfoHUD); + } + // Inventar, aber keine Waffe + else + { + itemInfoHUD->SetVisibility(VIS_Owner); + CustomMessage(Format("@%s|%s",GetName(weapon),GetDesc(weapon)), itemInfoHUD, GetOwner()); + } + } + // Waffe... + else + { + if(weapon->IsRecharging()) + recharge = weapon->GetRecharge(); + else + recharge = 0; + + charge = weapon->GetCharge(); + SetVisibility(VIS_Owner); + info->SetVisibility(VIS_Owner); + itemInfoHUD->SetVisibility(VIS_None); + Message("",itemInfoHUD); + + var ammoid = weapon->GetFMData(FM_AmmoID); + var ammoload = weapon->GetFMData(FM_AmmoLoad); + var modusname = weapon->GetFMData(FM_Name); + var ammocount = weapon->GetAmmo(ammoid); + + var ammodiff = 0; + if(currentWeapon == weapon && currentAmmoId == ammoid) + { + ammodiff = ammocount - currentAmmoCount; + } + + SetCurrentWeapon(weapon); + + currentAmmoCount = ammocount; + if(ammodiff) + AddEffect("AmmoUpdateNotification", info, 300, 1, this, 0, ammodiff, 750); + + var color = "ffff00"; + if(!ammocount) color = "ff0000"; + CustomMessage(Format("@%s", modusname), this, GetOwner(), 0, 10); + CustomMessage(Format("@%d/%d", color, ammocount, ammoload), info, GetOwner(), 118 + GetNumberCount(ammoload)*6, 31); + + if(!SetGraphics(Format("Row%i",ammoid), 0, GetID(), HUD_Layer_AmmoBase, GFXOV_MODE_Base)) + { + SetGraphics("Row", 0, GetID(), HUD_Layer_AmmoBase, GFXOV_MODE_Base); + } + info->SetGraphics(0, 0, ammoid,1,GFXOV_MODE_IngamePicture); + } + + UpdateCharge(); + UpdateRecharge(); +} + +// Setzt neue Waffe als aktive Waffe (oder 0 wenn keine) und startet dazu grafische Effekte +private func SetCurrentWeapon(object weapon) +{ + if(weapon == currentWeapon) + { + var ammoid = NONE; + if(weapon) ammoid = weapon->GetFMData(FM_AmmoID); + if(ammoid == currentAmmoId) return; + } + + if(currentWeapon) + { + RemoveEffect(Format("Animation%i",currentAmmoId),this); + SetGraphics("RowHighlight", 0, GetID(), HUD_Layer_AmmoHighlight, GFXOV_MODE_Base, 0, GFX_BLIT_Additive); + } + + if(weapon) + { + var ammoid = weapon->GetFMData(FM_AmmoID); + AddEffect(Format("Animation%i",ammoid),this,300,1,this); + currentAmmoId = ammoid; + } + else + { + currentAmmoId = NONE; + } + + currentWeapon = weapon; +} + +// Gibt Anzahl der Ziffern zurück +private func GetNumberCount(int value) +{ + var result = 0; + var bigNumba = 1; + while(value >= bigNumba) + { + bigNumba *= 10; + result++; + } + return result; +} + +// Reload: Balken strecht sich nach rechts +private func UpdateCharge() +{ + SetObjDrawTransform(charge, 0, -1000 * (1000-charge)/20,0, 1000, 0, this, HUD_Layer_AmmoBase); +} + +// Recharge: roter Balken wandert von links nach rechts +private func UpdateRecharge() +{ + if(recharge) + { + SetGraphics("Red", this, GetID(), GFXOV_MODE_Action, HUD_Layer_Recharge, "Red"); + SetObjDrawTransform(1000, 0, 50000 -1000 * (100-recharge),0, 1000, 0, this, HUD_Layer_Recharge); + } + else + { + SetGraphics(0,0,0, HUD_Layer_Recharge); + } +} + +// Munitionsanzeige updaten +private func UpdateAmmoBag(object ammobag, object weapon) +{ + + var ammoid = NONE; + if(weapon) + if(weapon->~IsWeapon()) + ammoid = weapon->GetFMData(FM_AmmoID); + + var clonk = GetCursor(); + + for(var i=0; i < GetLength(ammoobjs); ++i) + { + var aobj = ammoobjs[i]; + + // unsichtbar bei NoAmmo + if(NoAmmo() || !ammobag) { + aobj->SetVisibility(VIS_None); + aobj->Message("",aobj); + continue; + } + // ansonsten Munitionsstand anzeigen + aobj->SetVisibility(VIS_Owner); + + var ammo = 0; + if(ammobag) + ammo = ammobag->GetAmmo(allAmmo[i]); + + var ammodiff = 0; + if(clonk == currentClonk) + { + ammodiff = ammo - ammovalues[i]; + } + ammovalues[i] = ammo; + if(ammodiff) + AddEffect("AmmoUpdateNotification", aobj, 300, 1, this, 0, ammodiff, 750); + + var color = "eeeeee"; + if(!ammo) color = "777777"; + if(allAmmo[i] == ammoid) { + color = "ffff00"; + if(!ammo) color = "ff0000"; + } + aobj->CustomMessage(Format("@%d", color, ammo), aobj, GetOwner(), 25, 31); + } + + currentClonk = clonk; +} + +/* Ammocount geändert-Effekt - Das Ammo-Icon poppt auf wenn Munition hinzugefügt wird + (und andersrum wenn welches entfernt wird) */ + +func FxAmmoUpdateNotificationStart(object target, int number, int temp, int ammodiff, int size) +{ + if(temp) return; + + EffectVar(0,target,number) = 3*size*ammodiff/Abs(ammodiff)/4+size/4; // size ... -size/2 + EffectVar(1,target,number) = size; +} + +func FxAmmoUpdateNotificationAdd(object target, int number, string name, int timer, int ammodiff, int size) +{ + EffectVar(0,target,number) = 3*size*ammodiff/Abs(ammodiff)/4+size/4; // size ... -size/2 +} + +func FxAmmoUpdateNotificationEffect(string name, object target, int number, int newNumber) +{ + if(name == "AmmoUpdateNotification") return -2; +} + +func FxAmmoUpdateNotificationTimer(object target, int number, int timer) +{ + var diff = EffectVar(0,target,number); + var size = EffectVar(1,target,number); + + SetObjDrawTransform(size + diff, 0, 0, 0, size + diff, 0, target, 1); + + if(!diff) return -1; + + var sqrtDiff = diff/Abs(diff) * Sqrt(Abs(diff)); + EffectVar(0,target,number) -= sqrtDiff; +} + +/* Hübsche Overlay-Effekte für bestimme Ammo-Typen (erweiterbar) */ + +func FxAnimationENAMTimer(object target, int number, int timer) +{ + var lightning = EffectVar(0,target,number); + SetGraphics(Format("Row%iHighlight%d",ENAM,Random(4)+1), 0, GetID(), HUD_Layer_AmmoHighlight, GFXOV_MODE_Base, 0, GFX_BLIT_Additive); + if(!Random(35)) lightning-=60; + else lightning+=5; + lightning = BoundBy(lightning,120,240); + SetClrModulation(RGBa(255,255,255,lightning),this,HUD_Layer_AmmoHighlight); + SetObjDrawTransform(charge, 0, -1000 * (1000-charge)/20,0, 1000, 0, this, HUD_Layer_AmmoHighlight); + EffectVar(0,target,number) = lightning; +} + +func FxAnimationGSAMTimer(object target, int number, int timer) +{ + SetGraphics(Format("Row%iHighlight",GSAM), 0, GetID(), HUD_Layer_AmmoHighlight, GFXOV_MODE_Base, 0, GFX_BLIT_Additive); + SetClrModulation(RGBa(255,255,255,20),this,HUD_Layer_AmmoHighlight); + var xSkew = Cos(FrameCounter()*12,200); + var plusHeight = Cos(FrameCounter()*9,100)+Sin(FrameCounter()*22,35); + var yOffset = 500 -GetDefHeight()*plusHeight/4; + SetObjDrawTransform(charge, xSkew, -1000 * (1000-charge)/20, 0, 800 + plusHeight, yOffset, this, HUD_Layer_AmmoHighlight); +} \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DefCore.txt new file mode 100644 index 00000000..f9e0529a --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=INFO +Version=4,9,8,2 +Name=Info +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,32,32 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DescDE.txt new file mode 100644 index 00000000..d8695f67 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DescDE.txt @@ -0,0 +1 @@ +Zeigt Informationen über das gerade getragene oder angefaßte Objekt oder betretene Gebäude an. diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DescUS.txt new file mode 100644 index 00000000..2beef0b3 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/DescUS.txt @@ -0,0 +1 @@ +Displays information about the currently carried or grabbed object or entered building. diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/Graphics.png new file mode 100644 index 00000000..b03b0b3b Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Info.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DefCore.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DefCore.txt new file mode 100644 index 00000000..ab7e78e6 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=HHKS +Version=4,9,8,2 +Name=Killstatistics +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 +Components=HHKS=1 diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DescDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DescDE.txt new file mode 100644 index 00000000..dfbc347d --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Hilfsobjekt zur einfachen Verwendung der Killnachrichten und Statistiken. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DescUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DescUS.txt new file mode 100644 index 00000000..298a8b57 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/DescUS.txt @@ -0,0 +1 @@ +A help-object for easy to use kill-messages and statistics. \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Graphics.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Graphics.png new file mode 100644 index 00000000..c291b181 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Graphics.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Names.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Names.txt new file mode 100644 index 00000000..a35b6133 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Killstatistik +US:Killstatistics \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Script.c b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Script.c new file mode 100644 index 00000000..728e80ab --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/Script.c @@ -0,0 +1,234 @@ +/*-- Killstatistics --*/ + +#strict + +static const STAT_Spree = 5; + +static STAT_LogEnabled; + +/* Killmeldungen */ + +//Kill mit Team - Spieler von Team A hat Spieler von Team B getötet! +//Die Funktion ist so klug auch zu erkennen, ob es überhaupt Teams gibt +//und ob es ein Teamkill war +public func KTMsg(int plr1, int plr2, int type) { + if(!STAT_LogEnabled) return(ShortMsg(plr1, plr2, type)); + + //haben wir Parameter? D: + if(!plr1 && !plr2) + return(); //welcher Doofie hat denn den Schwachsinn übergeben >:( + + if(!GetPlayerName(plr1) || !GetPlayerName(plr2)) //weirde Spieler? + return(); + + //haben wir Teamplay? + var tp; + for(var goal in FindObjects(Find_Category(C4D_Goal))) + if(goal->~IsTeamGoal()) + tp = true; + //nein -> normale killmessage + if(!tp) +// return(KMsg(plr1, plr2, type)); + // Kein Hazardspielziel, da wollen wir das eher nicht haben + return; + //doch -> teamkiller? + else if(GetTaggedTeamName(plr1) S= GetTaggedTeamName(plr2)) + return(TKMsg(plr1,plr2)); + + + var msg; + if(Random(3) && type > 1) { + if(type == DMG_Projectile) + msg = $MsgKillProjectile$; + else if(type == DMG_Fire) + msg = $MsgKillFire$; + else if(type == DMG_Explosion) + msg = $MsgKillExplosion$; + else if(type == DMG_Energy) + msg = $MsgKillEnergy$; + else if(type == DMG_Bio) + msg = $MsgKillBio$; + else + msg = $MsgKill$; + } + else + msg = $MsgKill$; + + msg = msg[Random(GetLength(msg))]; + Log(msg,Format("%s %s",GetTaggedPlayerName(plr1),GetTaggedTeamName(plr1)) + ,Format("%s %s",GetTaggedPlayerName(plr2),GetTaggedTeamName(plr2))); +} + +//Kill - Spieler A hat Spieler B getötet! +public func KMsg(int plr1, int plr2, int type) { + if(!STAT_LogEnabled) return(ShortMsg(plr1, plr2, type)); + var msg; + if(Random(3) && type > 1) { + if(type == DMG_Projectile) + msg = $MsgKillProjectile$; + else if(type == DMG_Fire) + msg = $MsgKillFire$; + else if(type == DMG_Explosion) + msg = $MsgKillExplosion$; + else if(type == DMG_Energy) + msg = $MsgKillEnergy$; + else if(type == DMG_Bio) + msg = $MsgKillBio$; + else + msg = $MsgKill$; + } + else + msg = $MsgKill$; + + msg = msg[Random(GetLength(msg))]; + Log(msg, GetTaggedPlayerName(plr1),GetTaggedPlayerName(plr2)); +} + +//Selfkill - Spieler A hat sich selbst umgebracht! D: +public func SKMsg(int plr) { + if(!STAT_LogEnabled) return(); + var msg = $MsgSelfKill$; + msg = msg[Random(GetLength(msg))]; + Log(msg,GetTaggedPlayerName(plr)); +} + +//Teamkill - Spieler von Team A hat Spieler des selben Teams getötet! :O +public func TKMsg(int plr, int plr2) { + if(!STAT_LogEnabled) return(); + Log("$MsgTeamKill$",GetTaggedPlayerName(plr),GetTaggedTeamName(plr),GetTaggedPlayerName(plr2)); +} + +//Score - Spieler von Team A hat gepunktet! +public func SMsg(int plr) { + if(!STAT_LogEnabled) return(); + Log("$MsgScore$",GetTaggedPlayerName(plr),GetTaggedTeamName(plr)); +} + +public func ShortMsg(int killer, int victim, int type) { + var pKiller = GetCursor(killer); + if(!pKiller) pKiller = GetCrew(killer); + if(pKiller && Contained(pKiller)) pKiller = Contained(pKiller); + // multiple damit die Markierung afu dem Panzer nicht verloren geht + if(pKiller) + CustomMessage(Format("$MsgKillShort$", Format("%s %s",GetTaggedPlayerName(victim),GetTaggedTeamName(victim))), pKiller, killer, 0,-12,0,0,0,MSG_Multiple); + + AddEffect("DelayedCallShowKilledBy",0,1,1,0,GetID(),victim, killer, type); +} + +private func FxDelayedCallShowKilledByStart(object target, int nr, int iTemp, int victim, int killer, int type) +{ + EffectVar(0,target,nr) = victim; + EffectVar(1,target,nr) = killer; + EffectVar(2,target,nr) = type; +} + +private func FxDelayedCallShowKilledByTimer() +{ + return -1; +} + +private func FxDelayedCallShowKilledByStop(object target, int nr, int reason, bool temp) +{ + if(temp) return; + var victim = EffectVar(0,target,nr); + var killer = EffectVar(1,target,nr); + var type = EffectVar(2,target,nr); + ShowKilledBy(victim, killer, type); +} + +private func ShowKilledBy(int victim, int killer, int type) +{ + var pVictim = GetCursor(victim); + if(!pVictim) pVictim = GetCrew(victim); + if(!pVictim) return; + + if(Contained(pVictim)) pVictim = Contained(pVictim); + PlayerMessage(victim, "$MsgKilledByShort$",pVictim, Format("%s %s",GetTaggedPlayerName(killer),GetTaggedTeamName(killer))); +} + + + +/* Killstatistiken */ + +public func KillStat(object pClonk, int killedplr) { + //nein, die Engine darf keine Kills machen. >:( + if(!pClonk) + if(!(pClonk = this())) + return(); + if(killedplr == NO_OWNER) return(); + //Nein, Teamkills bringen keine Punkte. :( + if(GetPlayerTeam(killedplr) == GetPlayerTeam(GetController(pClonk))) + return(); + AddEffect("KillStats",pClonk,23,10,this(),HHKS); +} + +//KillStats-Effekt, Tötungsstatistiken! +func FxKillStatsStart(object pTarget, int iEffectNumber, int iTemp) { + if(iTemp) + return(FX_OK); + //Effectvars: + // 0 - Anzahl der Kills seit dem letzten Tod + // 1 - Zeitpunkt des letzten Kills (relativ) + // 2 - Anzahl der Kills innerhalb einer bestimmten Zeitperiode (Doublekill, etc.) + // 3 - Ob gerade ein Kill war, und die Zeit noch läuft + EffectVar(0, pTarget, iEffectNumber) = 0; + EffectVar(1, pTarget, iEffectNumber) = 0; + EffectVar(2, pTarget, iEffectNumber) = 0; + FxKillStatsAdd(pTarget, iEffectNumber); +} + +//Schaun ob die Killzeit schon abgelaufen ist +func FxKillStatsTimer(object pTarget, int iEffectNumber, int iEffectTime) { + //Haben wir gerade Killingtime? + if(!EffectVar(3, pTarget, iEffectNumber)) + return(); + //Schon lange genug gewartet? + if(iEffectTime - EffectVar(1, pTarget, iEffectNumber) > 126) { //Die dreifache Wahrheit! + EffectVar(2, pTarget, iEffectNumber) = 0; + EffectVar(3, pTarget, iEffectNumber) = 0; + } +} + +//Auswertung der Statistik beim Tod +func FxKillStatsStop(object pTarget, int iEffectNumber, int iReason, bool fTemp) { + //Auswerten? + if(iReason != 3 && iReason != 4) + return(); + + if(!STAT_LogEnabled) return(); + if(EffectVar(0, pTarget, iEffectNumber) >= STAT_Spree) + if(GetName(pTarget)) + Log("$MsgSpreeEnd$", GetName(pTarget)); +} + +//Kill++ +func FxKillStatsEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "KillStats") + return(-3); +} + +func FxKillStatsAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer) { + //Neue Daten speichern + var total = ++EffectVar(0, pTarget, iEffectNumber); + var running = ++EffectVar(2, pTarget, iEffectNumber); + EffectVar(1, pTarget, iEffectNumber) = GetEffect("KillStats", pTarget, 0, 6); + EffectVar(3, pTarget, iEffectNumber) = 1; + + //Auf Killfolgen prüfen + var msg = $MsgKillingSpree$; + if(STAT_LogEnabled) { + var t = GetLength(msg); + if(!(total%STAT_Spree) && total/STAT_Spree <= t) { + Log(Format("%s (%s)", msg[Min(total/STAT_Spree-1,t-1)],GetName(pTarget))); + } + } + + //auf Multikills prüfen + if(running >= 2) { + msg = $MsgMultikill$; + Message("%s",pTarget, msg[Min(running-2,GetLength(msg)-1)]); + } +} + + + diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/StringTblDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/StringTblDE.txt new file mode 100644 index 00000000..771c6bbe --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/StringTblDE.txt @@ -0,0 +1,20 @@ +MsgKillProjectile=["%s gibt %s Blei zu kauen.","%s hatte %s direkt im Visier.","%s hat jetzt ein leeres Magazin und %s einen vollen Bauch!"] +MsgKillFire=["%s schmort sich einen %s.","%s mag %s am liebsten gut durch.","%s sollte Koch werden, denn er hat %s flambiert."] +MsgKillExplosion=["%s hat %s kaputtgemacht.","%s spielt hier den Sprengmeister und jagt %s in die Luft!","%s hat Kilotonnen zu verschenken. Glückwunsch, %s!"] +MsgKillEnergy=["%s schickt %s auf ein höheres Energieniveau.","%s hat %s elektrifiziert!","%s durchleuchtet %s erstmal gründlich."] +MsgKillBio=["%s packt seine Biowaffen aus. %s packt ein.","%s zeigt %s seine Popelkanone.","Jetzt wird's klebrig. %s schleimt %s ein!"] +MsgKill=["%s hat %s erwischt.","%s hat's %s gezeigt.","Ein Kill mehr für %s. Ein Tod mehr für %s"] + +MsgKillShort=%s erledigt +MsgKilledByShort=Erledigt von %s + +MsgSelfKill=["%s hat sich selbst umgebracht, der Depp!","%s beging Selbstmord. Dafür sollte es Punktabzug geben!","Eine Runde Gelächter für %s."] + +MsgTeamKill=%s ist ein Teamkiller! (%s / %s) + +MsgScore=%s hat einen Punkt für Team %s geholt! + +MsgKillingSpree=["Killing Spree","Rampage","Godlike","matthes?!?"] +MsgSpreeEnd=%ss Killing Spree wurde beendet. + +MsgMultikill=["Doublekill","Triplekill","Multikill","Ultrakill","Monsterkill","Feuermonsterkill","Wipfkill","Wtf?"] \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/StringTblUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/StringTblUS.txt new file mode 100644 index 00000000..3616edb0 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Killstats.c4d/StringTblUS.txt @@ -0,0 +1,20 @@ +MsgKillProjectile=["%s shows %s that he ain't bullet-proof.","%s turns %s into a swiss cheese!","%s riddles %s to death."] +MsgKillFire=["%s roasts a %s for dinner.","%s burns %s to ashes.","%s turns %s into a briquette."] +MsgKillExplosion=["%s breaks %s.","%s likes explosives. %s felt that!","%s has some kilotons to give away. Congratulations, %s!"] +MsgKillEnergy=["%s zapps %s.","%s electrifies %s!","%s x-rays %s."] +MsgKillBio=["%s shows %s that the B in 'NBC weapons' does not mean 'Broadcasting'.","%s shows %s his booger-canon.","%s slimes %s!"] +MsgKill=["%s catches %s flat-footed.","%s spanks the monkey (%s)","%s shows no mercy to %s."] + +MsgKillShort=Killed %s +MsgKilledByShort=Killed by %s + +MsgSelfKill=["%s killed himself, dork!","%s committed suicide!","%s eliminated himself!"] + +MsgTeamKill=%s is a teamkiller! (%s / %s) + +MsgScore=%s scored for team %s! + +MsgKillingSpree=["Killing Spree","Rampage","Godlike","matthes?!?"] +MsgSpreeEnd=%s's Killing Spree was ended. + +MsgMultikill=["Doublekill","Triplekill","Multikill","Ultrakill","Monsterkill","Firemonsterkill","Wipfkill","Wtf?"] \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Overlay.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Overlay.png new file mode 100644 index 00000000..657eda13 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Overlay.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/OverlayArmor.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/OverlayArmor.png new file mode 100644 index 00000000..ce1d0174 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/OverlayArmor.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait1.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait1.png new file mode 100644 index 00000000..0808c85e Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait1.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait2.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait2.png new file mode 100644 index 00000000..b96f6ee2 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait2.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait3.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait3.png new file mode 100644 index 00000000..7d41e618 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Portrait3.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor1.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor1.png new file mode 100644 index 00000000..e372364a Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor1.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor2.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor2.png new file mode 100644 index 00000000..c8462527 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor2.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor3.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor3.png new file mode 100644 index 00000000..81435936 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/PortraitArmor3.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Rank.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Rank.png new file mode 100644 index 00000000..b73d0386 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Rank.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/RankDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/RankDE.txt new file mode 100644 index 00000000..050e1416 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/RankDE.txt @@ -0,0 +1,48 @@ +Rookie +Schütze +Marine +SFT +Hazard +Flaggendieb +Chaos Gunner +Elite +Terminator +Shuttlekommandant +Chaosgeneral +Space Luncher +Arso-Morf +Space Cowboy +Darkwing +Statist +Maneater +Redeemer +Drohne +Droide +Bot +Borg +Ewok +Wookie +Chippie +Ozark +Xenomorph +Replikator +Antiker +Predator +Bomberman +Megaman +Matrix +Semicolon +Pro +Kontra +42 +Whitespace +Void +Schwarzes Loch +Schlachtkreuzer +Stern +Zerstörer +Sternenzerstörer +Drazah +Darth Vader +Imperator +Last Man Standing \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/RankUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/RankUS.txt new file mode 100644 index 00000000..05e4bc7b --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/RankUS.txt @@ -0,0 +1,48 @@ +Rookie +Marksman +Marine +SFT +Hazard +Flagthief +Chaos Gunner +Elite +Terminator +Shuttlecommander +Chaosgeneral +Space Luncher +Arso-Morf +Space Cowboy +Darkwing +Tyrant +Maneater +Redeemer +Drone +Droid +Bot +Borg +Ewok +Wookie +Chippie +Ozark +Xenomorph +Replicator +Antiker +Predator +Bomberman +Megaman +Matrix +Semicolon +Pro +Kontra +42 +Whitespace +Void +Black Hole +Battle Cruiser +Star +Destroyer +Stardestroyer +Drazah +Darth Vader +Imperator +Last Man Standing \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Script.c b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Script.c new file mode 100644 index 00000000..6a2a4d7d --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Script.c @@ -0,0 +1,2671 @@ +/*---- HazardClonk ----*/ + +#strict +#include CLNK + +#include L_DR // can have drone (with context menu) +#include L_GE // can use gear (with context menu) +#include L_LA // can climb on ladders +#include L_AG // is agil +#include L_JP // can use jetpack +#include L_CA // can aim + +static const WeaponDrawLayer = 1; //Layer in dem die Waffen gezeichnet werden + +local ammobag; +local wpneffect; + +local LastDmgType; + +/* Initialisierung */ + +protected func Construction() +{ + aMacroCommandList = CreateArray(); + _inherited(); +} + +protected func Initialize() +{ + //dieser Effekt ist für die Waffen in den Händen zuständig + wpneffect = AddEffect("ShowWeapon",this(),1,1,this(),HZCK); + // Magieanzeige ist hier die Munitionsanzeige - nicht mehr +// SetPhysical("Magic",100000,2); + //Energie fixen (kA wo das gechanged wird...) UH H4X + DoEnergy( -GetPhysical("Energy") / 1000 + 1); //Noch 1 Energie + SetPhysical("Energy", 150000, 2); //Physical ändern + DoEnergy( GetPhysical("Energy") / 100 - 1); // Neu dazugeben + // Munitionsgürtel + AmmoStoring(); + var hud = GetHUD(this()); + // Schadenseffekt + AddEffect("DmgCheck",this(),1,0); + + // Verzögertes hud-update + if(hud) + ScheduleCall(this,"UpdateCharge",1); + + return(inherited()); +} + +public func IsThreat() { return(true); } + +/* Rekrutierung */ + +protected func Recruitment() +{ + ResetPortrait(this,true); + return(_inherited(...) ); +} + +// Anzahl Standardportraits +public func StdPortraitCount() { return(3); } + +global func ResetPortrait(object pObj, bool fPermanent) +{ + // Zur Netzwerk-Sicherheit + var iRandomPortrait = Random(pObj->~StdPortraitCount()) + 1; + // Mal schauen, was fuer ein Portrait wir haben + var portrait = GetPortrait(pObj, 0, 1); + var portrait_id = GetPortrait(pObj, 1, 1); + // Ist es ein eigenes Portrait? Dann lassen wir es. + if(portrait S= "custom") return; + // wenn kein valides normales Hazard-Portrait (nicht ArmoredX), reset + if(!portrait_id || portrait_id == NONE || portrait_id != pObj->GetID() || !WildcardMatch(portrait, "?")) + { + SetPortrait(Format("%d", iRandomPortrait), pObj, pObj->GetID(), fPermanent, false); + } + else + { + SetPortrait(portrait, pObj, portrait_id, fPermanent, false); + } +} + + +/* Steuerung Richtung (an Inhalt weitergeben, sonst internen Befehl ausführen) */ + +protected func ControlUpdate(object clonk, int comdir, bool dig, bool throw) +{ + if(inherited(clonk, comdir, dig, throw)) return(1); + if(Control2Grab("ControlUpdate", comdir, dig, throw)) return(0); + if(Control2Contents("ControlUpdate", comdir, dig, throw)) return(1); + if(ControlAim("ControlUpdate", comdir, dig, throw)) return(1); + if(ControlLadder("ControlUpdate", comdir, dig, throw)) return(1); +} + +protected func ControlUp() { + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlUp"); + + if (ControlAim("ControlUp")) return(1); + if (inherited()) return(1); // reiten und effektkontrolle + if (Control2Grab("ControlUp")) return(0); + if (Control2Contents("ControlUp") ) return(1); + if (ControlLadder("ControlUp") ) return(1); + if (ControlAgility("ControlUp") ) return(1); +} + +protected func ControlUpDouble() { + + if (ControlAim("ControlUp")) return(1); + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlUpDouble")) return(0); + if (Control2Contents("ControlUpDouble") ) return(1); + if (ControlJetpack("ControlUpDouble") ) return(1); + if (ControlAgility("ControlUpDouble") ) return(1); +} + +protected func ControlDown() { + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlDown"); + + if (ControlAim("ControlDown")) return(1); + if (inherited()) return(1); // reiten und effektkontrolle + if (Control2Grab("ControlDown")) return(0); + if (Control2Contents("ControlDown") ) return(1); + if (ControlLadder("ControlDown") ) return(1); + if(Contents(0)) + if (GetPlrDownDouble(GetOwner())) + if(ReadyToSquatAim()) + { + StartSquatAiming(); + return(1); + } +} + +private func ReadyToSquatAim() { + return( !GetEffect("SquatAimTimeout") + && Contents(0)->~CanAim() + && !IsAiming() + && (GetAction() eq "WalkArmed" || GetAction() eq "Walk")); +} + +protected func ControlLeft() { + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlLeft"); + + if (ControlAim("ControlLeft")) return(1); + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlLeft")) return(0); + if (Control2Contents("ControlLeft")) return(1); + if (ControlLadder("ControlLeft") ) return(1); + if (ControlJetpack("ControlLeft") ) return(1); + if (ControlAgility("ControlLeft") ) return(1); +} + +protected func ControlRight() { + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlRight"); + + if (ControlAim("ControlRight")) return(1); + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlRight")) return(0); + if (Control2Contents("ControlRight")) return(1); + if (ControlLadder("ControlRight") ) return(1); + if (ControlJetpack("ControlRight") ) return(1); + if (ControlAgility("ControlRight") ) return(1); +} + +protected func ControlLeftDouble() { + + if(IsHealing()) { + StopHealing(); + return(1); + } + if (ControlAim("ControlLeftDouble")) return(1); + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlLeftDouble")) return(0); + if (Control2Contents("ControlLeftDouble")) return(1); + if (ControlJetpack("ControlLeftDouble") ) return(1); + if (ControlAgility("ControlLeftDouble") ) return(1); +} + +protected func ControlRightDouble() { + + if(IsHealing()) { + StopHealing(); + return(1); + } + if (ControlAim("ControlRightDouble")) return(1); + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlRightDouble")) return(0); + if (Control2Contents("ControlRightDouble")) return(1); + if (ControlJetpack("ControlRightDouble") ) return(1); + if (ControlAgility("ControlRightDouble") ) return(1); +} + +protected func ControlDigDouble() { + ClearMacroCommands(); + + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlDigDouble")) return(0); + if (Control2Contents("ControlDigDouble")) return(1); +} + +protected func ControlDigSingle() { + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlDig"); + + if (_inherited()) return(1); // riding and control2effect + if (Control2Grab("ControlDig")) return(0); + if (Control2Contents("ControlDig")) return(1); + if (ControlLadder("ControlDig") ) return(1); +} + +protected func ContactBottom() { + if (GetAction() S= "Swim") + SetAction("Walk"); + if (GetAction() S= "SwimArmed") + SetAction("WalkArmed"); + return(1); +} + +/* Steuerung Werfen */ + +protected func ControlThrow() { + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlThrow"); + + // Bei vorherigem Doppel-Stop nur Ablegen + if ( GetPlrDownDouble(GetOwner()) ) + { + AddEffect("SquatAimTimeout", this(), 1, 15, this()); + return(inherited()); + } + // Steuerung an gerittenes Objekt weitergeben (macht der CLNK nicht) + if(IsRiding()) + if(GetActionTarget()->~ControlThrow(this())) + return(1); + + if (Control2Grab("ControlThrow")) return(0); + if (Control2Contents("ControlThrow") ) return(1); + if (ControlLadder("ControlThrow") ) return(1); + + return(inherited()); +} + +/* Steuerung Inhalt */ + +protected func ControlSpecial() + { + [$CtrlInventoryDesc$|Image=INVT] + if(!Contents()) return(); + + ClearMacroCommands(); + + //ControlSpecial an Container weitergeben (z.B. Fahrzeuge) + if(Contained() && Contained()->~ContainedSpecial(this)) + return true; + + //Manche Sachen dürfen einfach nicht + if(Contents()->~RejectShift()) + return; + // wenn wir zielen, wollen wir nur Waffen haben + if(IsAiming() && Contents(0)->~CanAim()) + { + // nächste Waffe suchen + for(var i = 1; i < ContentsCount(); i++) + if(Contents(i)->~CanAim()) + { + // zur Waffe wechseln + ShiftContents(0,0,Contents(i)->GetID(),true); + break; + } + } + else + // Inventory verschieben + ShiftContents(0,0,0,1); + + UpdateCharge(); + CheckArmed(); +} + +protected func Ejection(object pObj) // Wegwerfen +{ + // Nach Waffe suchen + CheckArmed(); + // Objekt benachrichtigen + if(Contents(0)) Contents(0)->~Selection(); + // Munitionsanzeige updaten + UpdateCharge(); + return _inherited(pObj); +} + +protected func Collection2(object pObj) // Einsammeln +{ + if(pObj->~RejectShift() && pObj != Contents(0)) + { + ShiftContents(0,0,pObj->GetID(),true); + } + else + { + // das neue Item nach hinten verschieben (außer es ist Ammo) + if(!(pObj->~IsAmmoPacket()) || NoAmmo()) + if (1 == ContentsCount(GetID(pObj))) + if(!(pObj->GetOCF() & OCF_Living)) + { + ShiftContents(0,0,0,0); + pObj ->~ OnDeselect(); + } + } + UpdateCharge(); + CheckArmed(); + return _inherited(pObj); +} + +public func AmmoTransfered(object pAP) { + AddEffect("AmmoCollection",this(),100,10,this(),0,pAP->AmmoID(),pAP->AmmoCount()); +} + + +protected func RejectCollect(id idObj, object pObj) +{ + // Für die KI + var effect; + if(effect = GetEffect("CollectionException", pObj)) + if(EffectVar(0, pObj, effect) == this()) + return(1); + // Spawnpunkt-Hack + if(idObj == SPNP) return(); + + //Spielzielgegenstände immer aufsammeln + if(pObj->~IsAlwaysCollectable()) + return false; + + // Munitionspaket? + if(pObj ->~ IsAmmoPacket()) + // Davon kann man in jeden Fall _eines_ im Inventar haben + if(!CustomContentsCount("IsAmmoPacket")) + return(0); + //Waffe? + if(pObj ->~ IsWeapon()) { + //Sonderbehandlung? + if(!(pObj ->~ OnCollection(this()))) { + //nein. Standardprozedur: + //schon so eine Waffe im Inventar? Oder bereits 3 andere Waffen? + if(ContentsCount(idObj) || CustomContentsCount("IsWeapon") >= WeaponCollectionLimit()) + return(1); //Ja, nicht aufnehmen + else + return(0); + } + else + return(0); + } + // Einsammellimit für Ausrüstung + if(pObj ->~ IsEquipment() && ContentsCount(idObj) > 0) + return(1); + //Wieviel haben wir denn schon im inventar? + if(ContentsCount() - CustomContentsCount("IsWeapon") >= ObjectCollectionLimit()) + return(1); + + // nicht angelegte Ausrüstung nochmal aufsammeln + for(var gear in aGear) + if(gear) + if(GetID(gear) == idObj) + return(1); + + // Ok + return(0); +} + +protected func Hangling() { + PauseReloading(); + if(!GetEffect("ScaleReloading",this())) + AddEffect("ScaleReloading",this(),1,1,this(),HZCK); +} + +protected func Scaling() +{ + PauseReloading(); + if(!GetEffect("ScaleReloading",this())) + AddEffect("ScaleReloading",this(),1,1,this(),HZCK); + return(_inherited()); +} + +func FxScaleReloadingTimer() +{ + if(!Contents()) + return(); + if(!WildcardMatch(GetAction(),"*Scale*") && !WildcardMatch(GetAction(), "*Hangle*")) + { + ResumeReloading(); + return(-1); + } + if(Contents()->~IsReloading()) + PauseReloading(); +} + +public func PauseReloading() { + var c = Contents(); + // only if the weapon is an aim-weapon + if(c) + if(c->~IsWeapon()) + if(c->GetFMData(FM_Aim) > 0) + c->PauseReload(); +} + +public func ResumeReloading() { + var c = Contents(); + // only if the weapon is an aim-weapon + if(c) + if(c->~IsWeapon()) + if(c->GetFMData(FM_Aim) > 0) + c->ResumeReload(); +} + +public func CustomContentsCount(string funcname) +{ + // Alle Inventarobjekte durchlaufen und Waffen zählen + for(var i=0,j,obj ; obj = Contents(i) ; i++) + if(ObjectCall(obj, funcname)) + j++; + // Waffen gezählt + return(j); +} + +public func WeaponCollectionLimit() { return(3); } // max. Waffen im Inventar +public func ObjectCollectionLimit() { return(2); } // max. Objekte im Inventar + +protected func Departure(pContainer) // Gebäude verlassen +{ + // nach Waffe suchen + CheckArmed(); + UpdateCharge(); +} + +protected func ContentsDestruction(object pObj) // Wenn Inhaltsobjekte verschwinden +{ + if(pObj == Contents(0)) + { + pObj->Exit(); // lösch dich gefälligst draußen! + // damit können entsprechende Calls jetzt schon in diesem Objekt gemacht werden + CheckArmed(); + if(Contents(0)) Contents(0)->~Selection(this); + UpdateCharge(); + } +} + +protected func ControlContents(idTarget) +{ + // Zielobjekt will gar nicht, dass wir was machen + if(idTarget->~NoControlContents()) return(); + // BR-Bombe etc. darf man nicht abwählen + if(Contents()) + if(Contents()->~RejectShift()) + return(1); + + // controlel Aim -> aufhören zu zielen außer die nächste Waffe kann es + // Siehe ChangeWeapon + if(ControlAim("ControlContents",idTarget)) return(1); + + // Hast du noch einen letzten Wunsch, Contents(0)??! + if(Contents(0)) Contents(0)->~Deselection(this()); + // Rotieren + if (!ShiftContents(0, 0, idTarget)) return(1); + // Waffe ziehen/wegstecken + CheckArmed(); + // Objekt benachrichtigen + if(Contents(0)) Contents(0)->~Selection(this()); + // Munitionsanzeige updaten + UpdateCharge(); +} + +private func ChangeWeapon(object pTarget) { + // Zielaktion anpassen + if(pTarget->~IsWeapon()) { + var phase = GetPhase(); + if(pTarget->~GetFMData(FM_Aim) == 2 || pTarget->~GetFMData(FM_Aim) == -1) + SetAction("AimSquatLow"); + else + SetAction("AimSquat"); + + SetPhase(phase); + } + else { + StopAiming(); + } +} + +/* Leitet die Steuerung an das erste Inhaltsobjekt weiter. Rückgabewert 1 wenn erfolgreich */ + +private func Control2Contents (string command) +{ + // Haben wir was angefasst? + if(GetAction() S= "Push") + return(0); + // Pause Reload: nicht wieder anfangen ey!!! + if(command S= "ControlThrow") { + if(WildcardMatch(GetAction(),"Scale*") || GetAction() S= "Hangle") + return(1); + } + + // Getragenes Objekt hat spezielle Steuerungsauswertung + if(ObjectCall(Contents(), command, this(), Par(1), Par(2), Par(3), Par(4), Par(5), Par(6), Par(7))) + return(1); + return(0); +} + +/* Und mit angefassten Objekten auch noch */ + +private func Control2Grab () +{ + // Haben wir was angefasst? + if(GetAction() eq "Push") + return(1); + +} + +/* Spezielles Leiterverhalten */ + +public func ReleaseLadderUp() { + //nach oben abspringen + ReleaseLadder(-15*(GetDir()*2-1),-25); +} + +/* Maussteuerung */ + +protected func ControlCommand(string szCommand, object pTarget, int iTx, int iTy, object pTarget2, int iData, object pCmdObj) +{ + ClearMacroCommands(); + SetAggroLevel(0,0,0,0,"ControlCommand"); + + // Context -> Keine Sonderbehandlung + if(szCommand S= "Context") { return(0); } + + if (szCommand S= "MoveTo") + { + if (Control2Grab("ControlCommand") || IsRiding()) + { + // Spezieller ControlCommand an das angefasst Objekt mit Info welches Objekt es aufruft (letzter Param) + if(GetActionTarget()) + { + if(GetActionTarget()->~ControlCommand(szCommand, pTarget, iTx, iTy, pTarget2, iData, pCmdObj, this)) + return(1); + } + } + if (ControlAim("ControlCommand",Par(1),Par(2),Par(3))) return(1); + // Klettert an einer Leiter + if (ControlLadder("ControlCommand")) return(0); + } + // Sonst nicht abfangen + return(_inherited(szCommand, pTarget, iTx, iTy, pTarget2, iData, pCmdObj) ); +} + +/* Kontextmenü */ + +protected func ContextHelpMessagesOn(object pCaller) { + [$CtxHelpMessagesOn$|Image=CXIN|Condition=HelpMessagesOff] + SetPlrExtraData(GetOwner(), "Hazard_NoHelpMsg", false); + Sound("Click", 1, 0,0, GetOwner()+1); +} + +protected func ContextHelpMessagesOff(object pCaller) { + [$CtxHelpMessagesOff$|Image=CXIN|Condition=HelpMessagesOn] + SetPlrExtraData(GetOwner(), "Hazard_NoHelpMsg", true); + Sound("Click", 1, 0,0, GetOwner()+1); +} + +public func HelpMessagesOn() { return(!GetPlrExtraData(GetOwner(), "Hazard_NoHelpMsg")); } +public func HelpMessagesOff() { return(!HelpMessagesOn()); } + +/* +only used as aimbot; there are no scenarios where it legitimally makes sense + +protected func ContextGuard(object pCaller) { + [$CtxGuard$|Image=FLA2|Condition=Outside] + // Bewachen + SetAggroLevel(Aggro_Guard); + Sound("Confirm*"); +} +*/ + +public func Outside() { return(!Contained()); } + +protected func ContextDropAmmo(object pCaller) +{ + [$AmmoDrop$|Image=STAP|Condition=AmmoBagContextCheck] + + CreateMenu(STAP,this,this,C4MN_Extra_None,"$AmmoDrop$",0,C4MN_Style_Context); + + for(var ammo in GetDroppableAmmoPacks()) + { + var ammoPackSize = ammo->AmmoPackID()->AmmoCount(); + AddMenuItem(ammo->GetName(), "DropAmmoPack", ammo->GetID(), this, ammoPackSize, ammoPackSize); + } +} + +protected func DropAmmoPack(id ammo, int amount) +{ + if(!CheckAmmo(ammo, amount)) return false; + + DoAmmo(ammo, -amount); + CreateObject(ammo->AmmoPackID(),0,0); +} + +private func GetDroppableAmmoPacks() +{ + var result = CreateArray(); + if(!ammobag) return result; + + var ammo, i = 0, j = 0; + while(ammo = ammobag->Contents(i++)) + { + if(!ammo->~IsAmmo()) continue; + var ammoPackSize = ammo->AmmoPackID()->AmmoCount(); + if(GetAmmo(ammo->GetID()) < ammoPackSize) continue; + result[j++] = ammo; + } + return result; +} + +private func AmmoBagContextCheck() +{ + if(FindObject(NOAM)) return false; + return GetLength(GetDroppableAmmoPacks()) > 0; +} + + +/* Gestorben */ + +protected func Death(int iKilledBy) { + var plr = GetOwner(); + +// HIER GEHÖRT KEIN INHERITED HIN +// das macht die ganze aufrufkette kaputt! +// _inherited(); + + // Info-Broadcasts für sterbende Clonks + GameCallEx("OnClonkDeath", this(), iKilledBy); + + // Sound und Meldung + Sound("Die"); + DeathAnnounce(GetOwner(),this(),GetKiller()); + NoDeathAnnounce(); // nicht nochmal aufrufen + // Letztes Mannschaftsmitglied func tot() { neuer Einsatz + + if(GetPlayerType(GetOwner()) == C4PT_Script) + GameCallEx("RelaunchPlayer",GetOwner(),this(), GetKiller()); + else + { + var gotcrew; + for(var i; i < GetCrewCount(plr); i++) + if(GetOCF(GetCrew(plr,i)) & OCF_Alive) + gotcrew = true; + + if(!gotcrew) + GameCallEx("RelaunchPlayer",GetOwner(),this(), GetKiller()); + } + + if(ammobag) + RemoveObject(ammobag); + + if(GetEffect(0,this(),wpneffect)) + RemoveEffect(0,this(),wpneffect); + + FadeOut(this()); + + if(HasGear()) TakeOffGear(); + + return(1); +} + +public func NoDeathAnnounce() // Hält 1 Frame lang, also Clonk schnell töten, dann kommt keine Nachricht +{ + AddEffect("NoAnnounce", this, 1, 1, this); +} + +public func FxNoAnnounceStop(dummy, dummy2, int iReason) +{ + if(iReason == 4) return -1; +} + +private func DeathAnnounce(int plr, object clonk, int killplr) { + if(GetEffect("NoAnnounce", this)) return; + + if(killplr == -1) + return(inherited(plr, clonk, killplr)); + + if(!clonk) + return(inherited(plr, clonk, killplr)); + + //Selfkill? + if(plr == killplr) + HHKS->SKMsg(plr); + else + HHKS->KTMsg(killplr, plr, clonk->~LastDamageType()); + + //Killstatistik. + //Zwar ungenau wenn mehrere Clonks eines Spielers im Spiel sind, + //aber wann ist das schon der Fall? + HHKS->KillStat(GetCursor(killplr),plr); + + inherited(plr, clonk, killplr); +} + +protected func Destruction() { + // Vorher töten, damit Relaunch ausgeführt wird. + if(GetAlive(this)) Kill(); + if(ammobag) RemoveObject(ammobag); + return _inherited(...); +} + +/* Waffe/Feuern */ + +public func ReadyToFire() { // nur aus bestimmten Aktionen feuern + + var a = GetAction(); + + // In Gebäude + if(Contained()) return(Contained()->~ReadyToFire()); + // Reitet + if(IsRiding()) return(GetActionTarget()->~ReadyToFire()); + // Schiebt + if(GetProcedure() eq "PUSH") + if(GetActionTarget()->~IsWeapon()) + return(true); + + // Nur beim Laufen, Schwimmen oder Springen + if(a eq "WalkArmed" + || a eq "SwimArmed" + || a eq "JumpArmed") + return(true); + + // JetpackFlight fehlt noch, sowie Aim*... das steht in den Funktionalitäten + return(_inherited()); +} + +private func CheckArmed() { // Bewaffnung prüfen + if (GetAction() eq "Walk") if (IsArmed2()) return(SetAction("WalkArmed")); + if (GetAction() eq "Jump") if (IsArmed2()) return(SetAction("JumpArmed")); + if (GetAction() eq "Swim") if (IsArmed2()) return(SetAction("SwimArmed")); + if (GetAction() eq "WalkArmed") if (!IsArmed2()) return(SetAction("Walk")); + if (GetAction() eq "JumpArmed") if (!IsArmed2()) return(SetAction("Jump")); + if (GetAction() eq "SwimArmed") if (!IsArmed2()) return(SetAction("Swim")); +} + +// Der Clonk ist bewaffnet (auch mit einer Waffe die nicht angezeigt wird) +// also Waffen mit denen man Zielen muss +public func IsArmed() { + if(!Contents()) return(); + if(Contents()->~IsWeapon()) + return(true); + return(false); +} +// Der Clonk hat einen Gegenstand in der Hand, der gezeichnet wird +public func IsArmed2() { + if(!Contents()) return(); + if(Contents()->~IsDrawable() || + (IsArmed() && (Contents()->~GetFMData(FM_Aim) <= 0))) + return(true); + return(false); + +} + +public func JumpStart(bool bBackflip) +{ + // bewaffnet? + CheckArmed(); + + _inherited(bBackflip); +} + +protected func ComNone() + { + SetComDir(COMD_None); + } + +private func IsJumping() { + if(GetAction() S= "Dive") + return(true); + if(WildcardMatch(GetAction(),"Jump*")) + return true; + return _inherited(); +} + +public func StartSquatAiming() { // Anfangen in der Hocke zu zielen + // Abbrechen + if(Contained()) return; + if(GetAction() ne "WalkArmed" && GetAction() ne "Walk") return; + + SetXDir(0); + + if(Contents(0)->~GetFMData(FM_Aim) == 2 || Contents(0)->~GetFMData(FM_Aim) == -1) + SetAction("AimSquatLow"); + else + SetAction("AimSquat"); + + SetPhase(AimAngle2Phase(90)); + SetComDir(COMD_Stop()); + + InitCrosshair(); + + if(!GetEffect("UpdateAiming", this)) + AddEffect("UpdateAiming", this, 1, 1, this); + + // Callback + if(Contents(0)) Contents(0)->~AimStart(); +} + +public func IsSquatAiming () { return(WildcardMatch(GetAction(), "AimSquat*")); } + +public func AimOverride () { + if(Contained()) return(Contained()->~AimOverride()); + + return(_inherited()); +} + +public func GetTarget(int iAngle, int iMaxAngle, int iRange) +{ + // Parameter zurechtstutzen + while(iAngle<0) iAngle+=360; + while(iAngle>360) iAngle-=360; + if(!iMaxAngle) iMaxAngle = 0; + if(!iRange) iRange = 350; + + // Landschaft durchsuchen + // es wird nur auf Lebewesen gezielt + var targets = FindTargets(this, iRange, iMaxAngle, iAngle, false); + var target; + + // nächstes Ziel finden... + for(var t in targets) { + if(!target) { + target = t; + continue; + } + if(ObjectDistance(t) < ObjectDistance(target)) { + target = t; + break; + } + } + + if(target) DebugLog("Target is %s","hazard",GetName(target)); + return(target); +} + +/* Magieanzeige updaten */ + +// Auch Updaten wenn wir Fahrzeuge/Geschütztürme/etc bedienen +func Grab(object pTarget, bool fGrab) +{ + UpdateCharge(); + CheckArmed(); +} + +func Entrance() { UpdateCharge(); } + +func CrewSelection(bool fDeselect, boolfCursorOnly) +{ + UpdateCharge(); +} + +public func UpdateCharge() +{ + // Nur wenn ich Cursor bin + if(GetCursor(GetOwner()) != this) return; + + if(GetOwner() < NO_OWNER) return; + + // in Gebäuden/Fahrzeugen + if(Contained()) + if(Contained()->~UpdateCharge(this)) + return true; + + // reitet + if(IsRiding()) + if(GetActionTarget()->~UpdateCharge(this)) + return true; + + var weapon = Contents(); + + // an angefasstes Objekt weiterleiten + if(GetAction() S= "Push") + { + var at = GetActionTarget(); + if(at && at->~IsWeapon()) + if(at->GetUser() == this) + weapon = at; + } + + // HUD + var hud = GetHUD(this); + if(hud) hud->Update(weapon, AmmoStoring(),this); // <- performanzfresser! + + return(1); +} + +public func AmmoStoring() +{ + // keiner da: neuen erstellen + if(!ammobag) { + ammobag = CreateObject(ABAG); + //ammobag->Init(this()); + } + return(ammobag); +} + +public func OnAmmoChange(id AmmoID, int NewAmount) +{ + UpdateCharge(); +} + +/* Heilung */ + +public func StopHealing() { // Heilen beenden + SetComDir(COMD_Stop()); + SetAction("Walk"); + CheckArmed(); + Sound("Grab"); + while(GetEffect("*Heal*", this())) + RemoveEffect("*Heal*", this()); +} + +// Heilt sich mit einem Medikit o.ä. +public func IsHealing () { return(WildcardMatch(GetAction(), "Heal*")); } + +/* Bonis Testbereich */ +//Mit dem betreten dieses Bereiches begeben sie sich in die Gefahrenzone. +//Weiterlesen nur mit Schutzhelm und funktionierendem Phaser erlaubt. + +public func WeaponAt(&x, &y, &r) { + + if(Contained()) return(0); + + var a = GetAction(); + var p = GetPhase(); + + // x < 0: Richtung hinter den Clonk + // x > 0: Richtung vor den Clonk + x=0; y=0; r=0; + + // hält Waffe in der Hand + if(a eq "WalkArmed") { + x=0; + y=1000; + return(1); + } + + else if(a eq "JumpArmed") { + x=500-125*p; + y=1000; + return(1); + } + else if(a eq "SwimArmed") { + x=4000; + return(1); + } + //Jetpack + else if(a eq "JetpackFlight") { + + x=4000; + r=35; + return(1); + } + + + // zielt mit der Waffe + else if(IsAiming()) { + //if(p>4) r=(p-4)*11; + //else r=p*23-90; + r = (Abs(crosshair->GetAngle())-90); + x=-Sin(65+p*20,4000)-1500; + y=-Sin(55+p*10,5000); + if(a eq "AimLow") + y += 4000; + if(a eq "AimSquat") + { + x += 5000; + y += 4500; + } + if(a eq "AimSquatLow") + { + x += 5000; + y += 6000; + } + return(1); + } +/* + // hat Waffe auf dem Rücken + else { + r=90; + x=-3000; + y=-2000; + + if(a eq "Walk") { + y-=2000; + } + else if(a eq "Jump") { + y-=2000; + } + else if(a eq "Scale" || a eq "ScaleDown") { + x-=1000-Cos(p*45,250); + } + else if(a eq "Hangle") { + x-=Cos(p*32,750); + } + else if(a eq "Push") { + r=100; + x+=1000-Cos(p*90,350); + y-=2000; + } + else if(a eq "Swim") { + r=135; + x=-1000+Sin(p*22,500); + y=-4000-Cos(p*22,250); + } + else if(a eq "Dive") { + r=135+p*10; + x=-1000; + y=-4000; + } + else */return(0); + +/* return(1); + }*/ +} + +public func WeaponBegin(&x, &y) { + var number = GetEffect("ShowWeapon",this()); + if(!number) + return(0); + x = EffectVar(2, this(), number)/1000; + y = EffectVar(3, this(), number)/1000; +} + +public func WeaponEnd(&x, &y) { + var number = GetEffect("ShowWeapon",this()); + if(!number) + return(0); + x = EffectVar(4, this(), number)/1000; + y = EffectVar(5, this(), number)/1000; +} + +public func GetWeaponR() { + var number = GetEffect("ShowWeapon",this()); + if(!number) + return(0); + return(EffectVar(1, this(), number)); +} + +/* Munitionsaufsammelanzeige */ + +func FxAmmoCollectionStart(object pTarget, int iEffectNumber, int iTemp, id idAmmo, int iAmmoCount) { + if(iTemp) + return(1); + EffectVar(0,pTarget,iEffectNumber) = 100; + EffectVar(1,pTarget,iEffectNumber) = idAmmo; + EffectVar(2,pTarget,iEffectNumber) = iAmmoCount; +} + +func FxAmmoCollectionEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber, id idAmmo, int iAmmoCount) { + if(szNewEffectName S= "AmmoCollection") + //return(-2); + // wird nich addiert: alten löschen + RemoveEffect(0,pTarget,iEffectNumber); + return(0); +} + +func FxAmmoCollectionAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer, id idAmmo, int iAmmoCount) { + var x=1; + while(EffectVar(x,pTarget,iEffectNumber)) { + if(EffectVar(x,pTarget,iEffectNumber) == idAmmo) + break; + else + x++; + } + EffectVar(x++,pTarget,iEffectNumber) = idAmmo; + EffectVar(x,pTarget,iEffectNumber) += iAmmoCount; + + EffectVar(0,pTarget,iEffectNumber) += 100; + return(1); +} + +func FxAmmoCollectionTimer(object pTarget, int iEffectNumber, int iEffectTime) { + var x=1, string = " "; + while(EffectVar(x,pTarget,iEffectNumber)) + string = Format("%s|{{%i}} %4d",string,EffectVar(x++,pTarget,iEffectNumber),EffectVar(x++,pTarget,iEffectNumber)); + + HelpMessage(GetOwner(pTarget),string,pTarget); + if(iEffectTime >= EffectVar(0,pTarget,iEffectNumber)) + return(-1); +} + +public func Incineration(int iPlr) { + // Hazardclonks brennen ncht wirklich ;) + Extinguish(); + AddFireEffect(this(),30,FIRE_Red,1); + AddEffect("FireDamage",this,100,1,this,0,30,5,iPlr); +} + +protected func FxFireDamageStart(object pTarget, int iEffectNumber, int iTemp, int iDuration, int iDamage, int iPlr) +{ + if(iTemp) return; + EffectVar(0,pTarget,iEffectNumber) = iDuration; + EffectVar(1,pTarget,iEffectNumber) = iDamage; + EffectVar(2,pTarget,iEffectNumber) = iPlr; +} + +protected func FxFireDamageTimer(object pTarget, int iEffectNumber, int iEffectTime) +{ + DoDmg(EffectVar(1,pTarget,iEffectNumber), DMG_Fire, pTarget, 1, EffectVar(2,pTarget,iEffectNumber)+1); + + if(EffectVar(0,pTarget,iEffectNumber) < iEffectTime) + return -1; +} + +protected func FxFireDamageEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) +{ + if(szNewEffectName S= "FireDamage") return -2; +} + +protected func FxFireDamageAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer, int iDuration, int iDamage, int iPlr) +{ + EffectVar(0,pTarget,iEffectNumber) = iDuration; + EffectVar(1,pTarget,iEffectNumber) = iDamage; + EffectVar(2,pTarget,iEffectNumber) = iPlr; +} + +public func OnDmg(int iDamage, int iType) { + // Ausrüstung will vielleicht mitreden... + var before = _inherited(iDamage, iType); + + var mod = 0; + if(iType == DMG_Fire) mod = -5; + if(iType == DMG_Energy) mod = 25; + if(iType == DMG_Bio) mod = -10; + + return(mod+before); +} + +public func OnHit(int iDmg, int iType, object pFrom) +{ + _inherited(iDmg, iType, pFrom); + + if(!GetAlive()) return(); + + // Besondere Effekte + if(iType == DMG_Bio) + AddFireEffect(this(),10,RGB(20,255,30)); + + // hurt + if(iDmg > 12) + Hurt(); + + // Aggro-Check + if(pFrom) + if(LocalN("shooter", pFrom)) + if(GetAggroLevel() > Aggro_Nothing) + if(!GetAggroTarget()) + if(CheckTarget(LocalN("shooter", pFrom))) + SetAggroTarget(LocalN("shooter", pFrom)); +} + +public func LastDamageType(int type) { + if(type) + LastDmgType = type; + + return(LastDmgType); +} + +/* KI-Zeugs */ + +// Array mit Effektnummern +// Effektvariablen: +// 0: Kommandoname (string) +// 1: Zielobjekt (objekt) +// 2: Ziel-X (int) +// 3: Ziel-Y (int) +// 4: Verzögerung (int) +// 5: Callbackobjekt (object) +// 6: Aggrolevel +local aMacroCommandList; +// Wegpunktearray +local aPath; + +// iAggro = -1 bedeutet keine Änderung am Aggrolevel +// Einen Makrobefehl setzen +public func SetMacroCommand(object pCallback, string szCommand, object pTarget, int iX, int iY, int iDelay, int iAggro) +{ + // kein ordentlicher Befehl -> nichts tun + if(!szCommand) return(); + if(szCommand ne "MoveTo" && szCommand ne "Follow" && szCommand ne "Wait" && szCommand ne "None") + { + ErrorLog("Unknown macro command: %s", szCommand); + return(); + } + // Parameter evtl. vorbearbeiten oder besondere Checks + if(szCommand eq "MoveTo") + if(pTarget) + { + iX = pTarget->GetX(); + iY = pTarget->GetY(); + } + if(szCommand eq "Follow") + if(!pTarget) + { + ErrorLog("Too few arguments for FOLLOW (no target object)"); + return(); + } + // Aktuelle Beschäftigung beenden + var currCom = GetMacroCommand(0,0); + if(currCom) + { + ClearScheduleCall(this(), Format("MacroCom%s", currCom)); + SetCommand(this(), "None"); + SetComDir(COMD_Stop); + } + // Liste löschen + //Log("%s #%d: ClearMacroCom by SetMacroCom", GetName(), ObjectNumber()); + ClearMacroCommands(); + // Befehl eintragen + var iEffect = AddEffect("MacroCommand", this(), 300, 0, this()); + aMacroCommandList[0] = iEffect; + EffectVar(0, this(), iEffect) = szCommand; + EffectVar(1, this(), iEffect) = pTarget; + EffectVar(2, this(), iEffect) = iX; + EffectVar(3, this(), iEffect) = iY; + EffectVar(4, this(), iEffect) = iDelay; + EffectVar(5, this(), iEffect) = pCallback; + EffectVar(6, this(), iEffect) = iAggro; + // Ausführung beantragen + ClearScheduleCall(this(), "MacroCommandMoveTo"); + ClearScheduleCall(this(), "MacroCommandFollow"); + ClearScheduleCall(this(), "MacroCommandWait"); + //Log("%s #%d: SetMacroCom: '%s' %d/%d Target: %s #%d", GetName(), ObjectNumber(), szCommand, iX, iY, GetName(pTarget), ObjectNumber(pTarget)); + if(szCommand != "None") + ScheduleCall(this(), Format("MacroCom%s", szCommand), 1); + else + { + ClearMacroCommands(); + if(iAggro != -1) SetAggroLevel(iAggro,0,0,0,"SetMacroCommand"); + } + return(1); +} + +// Befehl an den Anfang setzen +public func AddMacroCommand(object pCallback, string szCommand, object pTarget, int iX, int iY, int iDelay, int iAggro) +{//Log("%s #%d: AddMacroCom", GetName(), ObjectNumber()); + // Befehlsliste zwischenspeichern + var aComs = aMacroCommandList; + // Und leeren + var currCom = GetMacroCommand(0,0); + if(currCom) + { + ClearScheduleCall(this(), Format("MacroCom%s", currCom)); + SetCommand(this(), "None"); + SetComDir(COMD_Stop); + } + aMacroCommandList = CreateArray(); + // Kommando sollen nicht gelöscht werden + AddEffect("MacroCommandLocked", this(), 301); + // Befehl einsetzen + var ret = SetMacroCommand(pCallback, szCommand, pTarget, iX, iY, iDelay, iAggro); + // Andere Befehle wieder eintragen + if(ret) + { + for(var iCom in aComs) + if(iCom) + aMacroCommandList[GetLength(aMacroCommandList)] = iCom; + } + else + aMacroCommandList = aComs; + // Kommandos freigeben + RemoveEffect("MacroCommandLocked", this()); + // Rückgabe + return(ret); +} + +// Befehl ans Ende setzen +public func AppendMacroCommand(object pCallback, string szCommand, object pTarget, int iX, int iY, int iDelay, int iAggro) +{ + // kein ordentlicher Befehl -> nichts tun + if(!szCommand) return(); + if(szCommand ne "MoveTo" && szCommand ne "Follow" && szCommand ne "Wait" && szCommand ne "None") + { + ErrorLog("Unknown macro command: %s", szCommand); + return(); + } + // Parameter evtl. vorbearbeiten oder besondere Checks + if(szCommand eq "MoveTo") + if(pTarget) + { + iX = pTarget->GetX(); + iY = pTarget->GetY(); + } + if(szCommand eq "Follow") + if(!pTarget) + { + ErrorLog("Too few arguments for FOLLOW (no target object)"); + return(); + } + // Befehl eintragen + var iEffect = AddEffect("MacroCommand", this(), 300, 0, this()); + aMacroCommandList[GetLength(aMacroCommandList)] = iEffect; + EffectVar(0, this(), iEffect) = szCommand; + EffectVar(1, this(), iEffect) = pTarget; + EffectVar(2, this(), iEffect) = iX; + EffectVar(3, this(), iEffect) = iY; + EffectVar(4, this(), iEffect) = iDelay; + EffectVar(5, this(), iEffect) = pCallback; + EffectVar(6, this(), iEffect) = iAggro; + // Starten? + if(GetLength(aMacroCommandList) == 1) + { + if(szCommand != "None") + Call(Format("MacroCom%s", szCommand)); + else + ClearMacroCommands(); + } + return(1); +} + +// Abfrage +public func GetMacroCommand(int iCommandNum, int iElement) +{ + // An der Stelle gibt es nichts? + if(iCommandNum < 0 || GetLength(aMacroCommandList) <= iCommandNum) return(); + // Element zurückgeben + return(EffectVar(iElement, this(), aMacroCommandList[iCommandNum])); +} + +// Beenden (wenn, dann nur extern gebraucht) +public func FinishMacroCommand(bool fNoCallback, bool fNoSuccess, int iCommandNum) +{ + // An der Stelle gibt es nichts? + if(iCommandNum < 0 || GetLength(aMacroCommandList) <= iCommandNum) return(); + // mit Callback -> Callback machen + if(!fNoCallback) + { + if(!fNoSuccess) + return(MacroComSuccess(iCommandNum)); + else + return(MacroComSuccessFailed(iCommandNum)); + } + // Ohne Callback -> kein Callback ;) + RemoveMacroCommand(iCommandNum); + // Nächstes Kommando starten + if(GetMacroCommand() && !iCommandNum) + if(GetMacroCommand() != "None") + Call(Format("MacroCom%s", GetMacroCommand())); + return(1); +} + +// Löscht alle Makrobefehle (ohne Callbacks) +public func ClearMacroCommands() +{ + while(GetMacroCommand()) + RemoveMacroCommand(); + aMacroCommandList = CreateArray(); + ClearScheduleCall(this(), "MacroComMoveTo"); + ClearScheduleCall(this(), "MacroComWait"); + ClearScheduleCall(this(), "MacroComFollow"); + ClearScheduleCall(this(), "MacroComSuccessFailed"); + ClearScheduleCall(this(), "JumppadCheck"); +} + +local tellMe_tactics; + +public func FxTellMeWhatYouDoTimer(object target, int number) +{ + var i=0; + + var coms = "Commands:|"; + while(GetCommand(0,0,i) && i < 6) + { + var szName = GetCommand(0,0,i); + var pTarget = GetCommand(0,1,i); + var iX = GetCommand(0,2,i); + var iY = GetCommand(0,3,i); + var szTarget = ""; + if(pTarget) szTarget = GetName(pTarget); + + var color = HSL(i*75,255,128); + coms = Format("%s%s -> %s (%d,%d)|",coms, color, szName, szTarget, iX, iY); + CreateParticle("JetSpark",AbsX(iX),AbsY(iY),0,0,60,color); + ++i; + } + if(GetCommand(0,0,++i)) + coms = Format("%s...|",coms); + + var macroComs="Macro Commands:|"; + for(i=0; i < GetLength(aMacroCommandList); ++i) + { + var iEffect = aMacroCommandList[i]; + var szCommand = EffectVar(0, this, iEffect); + var pTarget = EffectVar(1, this, iEffect); + var iX = EffectVar(2, this, iEffect); + var iY = EffectVar(3, this, iEffect); + var iDelay = EffectVar(4, this, iEffect); + var pCallback = EffectVar(5, this, iEffect); + var iAggro = EffectVar(6, this, iEffect); + + var x = iX; + var y = iY; + if(!x && pTarget) x=GetX(pTarget); + if(!y && pTarget) y=GetY(pTarget); + var szTarget = ""; + if(pTarget) szTarget = GetName(pTarget); + + macroComs = Format("%s%s -> %s (%d,%d)|",macroComs, szCommand, szTarget,x, y); + } + + var tactics = ""; + if(tellMe_tactics) + tactics = Format("Tactics:|%s",tellMe_tactics); + + Message(Format("%s%s%s",coms,macroComs,tactics),this); +} + +public func DebugMessage(string msg, string name) { + if(name eq "tactics" && GetEffect("TellMeWhatYouDo",this)) + tellMe_tactics = msg; + else + _inherited(msg,name,Par(2),Par(3),Par(4),Par(5),Par(6),Par(7),Par(8),Par(9)); +} + +public func TellMeWhatYouDo(bool on) +{ + if(on) + AddEffect("TellMeWhatYouDo",this,1,1,this); + else + RemoveEffect("TellMeWhatYouDo",this); +} + +/* Makros */ + +// MoveTo +protected func MacroComMoveTo() +{ + // Erstes Kommando ist gar nicht MoveTo? + if(GetMacroCommand(0,0) ne "MoveTo") return(); + // Kein Ziel? (bewirkt, dass der Clonk nicht nach 0,0 laufen kann!) + if(!GetMacroCommand(0,2) && !GetMacroCommand(0,3)) + if(!GetMacroCommand(0,4)) + return(MacroComSuccessFailed(0, Macro_MoveToNoTarget)); + // Pfad suchen + aPath = CreateArray(); + var start, end; + start = FindWaypoint(GetX(), GetY()); + end = FindWaypoint(GetMacroCommand(0,2), GetMacroCommand(0,3)); + if(!start || !end) return(MacroComSuccessFailed(0, Macro_NoPath)); + aPath = FindPath(start, end, true); + // Kein Pfad konnte gefunden werden? + if(!aPath) return(MacroComSuccessFailed(0, Macro_NoPath)); + + // ist der Endpunkt ein Transportpunkt? (ein Wegpunkt mit nur einem Ausgang + // und dieser Ausgang zeigt nicht zum Eingang) + if(end->GetPathCount() == 1) { + var before = 0; + var leng = GetLength(aPath); + if(start != end) + before = aPath[leng-2]; + if(end->GetPathTarget(0) != before) { + // Ziel ändern (Regel: Pfad darf nicht auf Transportpunkt enden) + aPath[leng] = end->GetPathTarget(0); + // Ziel ändern auf folgenden Wegpunkt, Position entsprechend. + EffectVar(1, this(), aMacroCommandList[0]) = end->GetPathTarget(0); + EffectVar(2, this(), aMacroCommandList[0]) = GetX(end->GetPathTarget(0)); + EffectVar(3, this(), aMacroCommandList[0]) = GetY(end->GetPathTarget(0)); + } + } + // In Bewegung setzen (der erste Wegpunkt sollte durch MoveTo erreichbar sein, wenn nicht -> doof + // Spezialhack: reitet! + if(IsRiding()) SetAction("Walk"); + SetCommand(this(), "MoveTo", aPath[0]); + AppendCommand(this(), "Call", this(), 1,0,0,0, "MacroComMoveToStep"); + // Automatischer Abbruch + ScheduleCall(this(), "MacroComSuccessFailed", 500, 0, 0, Macro_PathImpossible); + // Falls Startwegpunkt = Jumppadpunkt + if(GetLength(aPath) > 1 && aPath[0]->GetPathCount() == 1) + ScheduleCall(this(), "JumppadCheck", 5, 0, aPath[1], 2); + // Aggrolevel + if(GetMacroCommand(0, 6) != -1) + SetAggroLevel(GetMacroCommand(0, 6),0,0,0,"MacroComMoveTo"); + //Log("%s #%d: MacroComMoveTo", GetName(), ObjectNumber()); +} + +protected func MacroComMoveToStep(object dummy, int iStep) // MoveTo-Schritt +{ + // Erstes Kommando ist gar nicht MoveTo? + if(GetMacroCommand(0,0) ne "MoveTo") return(); + // Wird haben das Ende des Pfades erreicht? + if(GetLength(aPath) == iStep) + {//Log("%s #%d: MacroComMoveTo finished", GetName(), ObjectNumber()); + // Zum Ziel laufen und beenden + var x = GetMacroCommand(0,2), y = GetMacroCommand(0,3); + SetCommand(this(), "MoveTo", 0, x,y); + AppendCommand(this(), "Call", this(), 0,0,0,0, "MacroComSuccess"); + return(1); + } + // Aus irgendeinem Grund ist kein Wegpunkt da? + if(!aPath[iStep]) return(MacroComSuccessFailed(0, Macro_PathBroken)); + if(!aPath[iStep-1]) return(MacroComSuccessFailed(0, Macro_PathBroken)); + // Nächsten Wegpunkt begehen + MoveAlongPath(aPath[iStep-1], aPath[iStep], iStep+1); + AppendCommand(this(), "Call", this(), iStep+1,0,0,0, "MacroComMoveToStep"); + // Automatischer Abbruch + ClearScheduleCall(this(), "MacroComSuccessFailed"); + // 200 Frames pro 100 Pixel Abstand sind angesetzt + var breaktime = Max(ObjectDistance(aPath[iStep-1], aPath[iStep]) / 100 * 200, 100); + ScheduleCall(this(), "MacroComSuccessFailed", breaktime, 0, 0, Macro_PathImpossible); + //Log("%s #%d: MacroComMoveToStep", GetName(), ObjectNumber()); + return(1); +} + +protected func MacroComMoveToStepFailed() // MoveTo-Schritt fehlgeschlagen +{//Log("%s #%d: MacroComMoveToStepFailed", GetName(), ObjectNumber()); + // Erstes Kommando ist gar nicht MoveTo? + if(GetMacroCommand(0,0) ne "MoveTo") return(); + // Fehlschlag auf ganzer Linie + MacroComSuccessFailed(0, Macro_PathImpossible); + return(1); +} + +// Follow +protected func MacroComFollow(bool fStarted) +{ + // Sonderbehandlung: wurde schon gestartet + if(fStarted) + { + DebugLog(Format("%s #%d: MacroComFollow timer", GetName(), ObjectNumber()), "MacroComFollow"); + // Prüfen, ob an der Stelle iPos in der Kette "Follow" steht + if(GetMacroCommand(1) ne "Follow" && GetMacroCommand(0) ne "Follow") + // Steht nicht da, ergo muss sich ein anderes Kommando reingeschaltet haben -> nichts tun + return(); + // Wir haben kein MoveTo mehr? Dann sind wir angekommen (wir starten einfach neu) + if(GetMacroCommand() ne "MoveTo") return(MacroComFollow()); + // Unser Ziel ist irgendwie weg? + if(!GetMacroCommand(1,1)) + { + DebugLog(Format("%s #%d: MacroComFollow target lost", GetName(), ObjectNumber()), "MacroComFollow"); + // MoveTo löschen + RemoveMacroCommand(); + // Fehlschlag ausgeben + return(MacroComSuccessFailed(0, Macro_FollowTargetLost)); + } + // Schauen, ob unser Bewegungsziel noch ok ist + var x,y,target; + x = GetMacroCommand(0,2); + y = GetMacroCommand(0,3); + target = GetMacroCommand(0,1); + // Distanz > 30 Pixel? + if(Distance(AbsX(x), AbsY(y), AbsX(target->GetX()), AbsY(target->GetY())) > 30) + { + DebugLog(Format("%s #%d: MacroComFollow new MoveTo", GetName(), ObjectNumber()), "MacroComFollow"); + // MoveTo löschen + if(GetMacroCommand() eq "MoveTo") RemoveMacroCommand(); + // Neues Kommando setzen + AddMacroCommand(0, "MoveTo", GetMacroCommand(0,1), 0, 0, 0, GetMacroCommand(0,6)); + } + // Follow Weiterlaufen lassen + return(ScheduleCall(this(), "MacroComFollow", 30, 0, true)); + } + DebugLog(Format("%s #%d: MacroComFollow started", GetName(), ObjectNumber()), "MacroComFollow"); + // Erstes Kommando ist gar nicht Follow? + if(GetMacroCommand(0,0) ne "Follow") return(); + // Kein Ziel? -> Fehlschlag + if(!GetMacroCommand(0,1)) + return(MacroComSuccessFailed()); + // Wir sind dem Ziel noch nicht nahe genug? + if(ObjectDistance(GetMacroCommand(0,1)) > 30) + // Follow bedeutet viele MoveTos -> loslaufen bitte + AddMacroCommand(0, "MoveTo", GetMacroCommand(0,1), 0, 0, 0, GetMacroCommand(0, 6)); + // Aggrolevel + //if(GetMacroCommand(0, 6) != -1) + //SetAggroLevel(GetMacroCommand(0, 6)); + // Alle 30 Frames aktualisieren wir + return(ScheduleCall(this(), "MacroComFollow", 30, 0, true)); +} + +// Wait +protected func MacroComWait(bool fEnd) +{ + // Erstes Kommando ist gar nicht Wait? + if(GetMacroCommand(0,0) ne "Wait") return(); + // Beenden? + if(fEnd) + return(MacroComSuccess(0)); + // Aggrolevel + if(GetMacroCommand(0, 6) != -1) + SetAggroLevel(GetMacroCommand(0, 6),0,0,0,"MacroComWait"); + // Dann warten wir jetzt eine Runde + return(ScheduleCall(this(), "MacroComWait", GetMacroCommand(0,4), 0, true)); +} + +/* Makro-Funktionen */ + +// Makrobefehl an der Stelle iCommand ist erfolgreich +protected func MacroComSuccess(iCommand, int iCmd2) +{//Log("%s #%d: MacroComSuccess", GetName(), ObjectNumber()); + // Für Aufrufe aus SetCommand(... "Call"); + if(GetType(iCommand) == C4V_C4Object) iCommand = iCmd2; + // An der Stelle gibt es nichts? + if(iCommand < 0 || GetLength(aMacroCommandList) <= iCommand) return(); + // Hat super geklappt! Callbackobjekt benachrichtigen, sofern vorhanden + var callback = GetMacroCommand(iCommand, 5); + if(callback) callback->~OnMacroCommandSuccess(this()); + // Kommando aus der Liste entfernen + RemoveMacroCommand(iCommand); + // Evtl. Weg löschen + aPath = CreateArray(); + // Nächstes Kommando starten + if(GetMacroCommand()) Call(Format("MacroCom%s", GetMacroCommand())); + return(1); +} + +protected func MacroComTumble() +{//Log("%s #%d: MacroComTumble", GetName(), ObjectNumber()); + MacroComSuccessFailed(0, Macro_PathImpossible); + CheckStuck(); +} + +// Fehlercodes: +static const Macro_NoPath = 0; // Keinen Weg gefunden +static const Macro_PathImpossible = 1; // Weg konnte abgelaufen werden +static const Macro_PathBroken = 2; // Pfad wurde beim Ablaufen unterbrochen (Wegpunkt gelöscht o.ä.) +static const Macro_FollowTargetLost = 3; // Target für Follow verloren +static const Macro_MoveToNoTarget = 4; // MoveTo hat kein Ziel bekommen + +// Makrobefehl an der Stelle iCommand ist fehlgeschlagen +protected func MacroComSuccessFailed(int iCommand, int iReason) +{//Log("%s #%d: MacroComSuccessFailed: %d", GetName(), ObjectNumber(), iCommand); + // An der Stelle gibt es nichts? + if(iCommand < 0 || GetLength(aMacroCommandList) <= iCommand) return(); + // Hat gar nicht geklappt! Callbackobjekt benachrichtigen, sofern vorhanden + var callback = GetMacroCommand(iCommand, 5); + if(callback) callback->~OnMacroCommandFailed(this(), iReason); + // Kommando aus der Liste entfernen + RemoveMacroCommand(iCommand); + if(!iCommand) SetCommand(this(), "None"); + // Evtl. Weg löschen + aPath = CreateArray(); + // Nächstes Kommando starten + if(GetMacroCommand()) Call(Format("MacroCom%s", GetMacroCommand())); + return(1); +} + +// Makrobefehle aus der Liste entfernen +private func RemoveMacroCommand(int iCommand) +{//Log("%s #%d: RemoveMacroCommand: %d", GetName(), ObjectNumber(), iCommand); + // An der Stelle gibt es nichts? + if(iCommand < 0 || GetLength(aMacroCommandList) <= iCommand) return(); + // Entfernen + for(var i = 0, iEff, checked ; i < GetEffectCount("MacroCommand", this()) ; i++) + { + iEff = GetEffect("MacroCommand", this(), i); + if(iEff == aMacroCommandList[iCommand]) + { + RemoveEffect("MacroCommand", this(), i); + continue; + } + if(GetEffect("MacroCommandLocked", this())) continue; + for(var mac in aMacroCommandList) + if(mac == iEff) + checked = true; + if(!checked) RemoveEffect("MacroCommand", this(), i, true); + checked = false; + } +/* if(RemoveEffect(0, this(), aMacroCommandList[iCommand])) + Log("Effect removed");*/ + var aNewMacroComList = CreateArray(); + i = 0; + for(var iCom in aMacroCommandList) + { + if(i == iCommand) continue; + aNewMacroComList[GetLength(aNewMacroComList)] = iCom; + i++; + } + // Erfolgreich entfernt + aMacroCommandList = aNewMacroComList; + return(1); +} + +public func FxMacroCommandStop(object pTarget) +{ + // Wenn wir gesichert sind, werden wir nicht entfernt + if(GetEffect("MacroCommandLocked", pTarget)) return(-1); +} + +/* Wegfindung */ + +public func FindPath(object pStart, object pEnd, bool fJetpack) +{ + return FindPathNaiveNoLoops(pStart, pEnd, fJetpack); +} + +private func FindPathNaiveNoLoops(object pStart, object pEnd, bool fJetpack) +{ + var aPath = FindPathNaive(pStart, pEnd, fJetpack); + + if(aPath) + { + for(var i = 0; i<=GetLength(aPath); i++) + for(var j = GetLength(aPath); j>i; j--) //rückwärts zählen + { + if(aPath[i] == aPath[j]) + { + aPath = ArrayRemove(aPath,i,j); + break; + } + } + } + return aPath; +} + +// Entfernt aus dem Array [iStart, iEnd) ... also ab iStart aber exklusive iEnd +private func ArrayRemove(A, int iStart, int iEnd) { + if (iStart == iEnd) return(A); + + var j = 0; + var newA = []; + for (var i = 0; i < iStart; i++) + newA[j++] = A[i]; + for (var i = iEnd; i < GetLength(A); i++) + newA[j++] = A[i]; + + return(newA); +} + +// gibt Pfad von Wegpunkt pStart bis pEnd als Array aus. An Stelle 0 ist pStart. +// wenn FindPath = 0, hat er keinen Pfad gefunden. +private func FindPathNaive(object pStart, object pEnd, bool fJetpack) +{ + // naive Wegfindung. Wir gehen davon aus, dass wenn der WP links von einem ist, + // nach links gegangen werden muss und gehen einfach Schritt fuer Schritt in diese + // Richtung. + + // maximale Iterationen fuer Wegfindung (abhaengig von Anzahl Wegpunkte) + var iterationLimit = ObjectCount(WAYP); + + var ex = GetX(pEnd); + var ey = GetY(pEnd); + + var pCurrent = pStart; + + var aWaypoints = CreateArray(); + + var jetp = 0; + var ammoload = DefinitionCall(JTPK,"GetFMData",FM_AmmoLoad); + + for(var j=0; j< iterationLimit; ++j) { + + aWaypoints[j] = pCurrent; + + // fertig! + if(pCurrent == pEnd) + return(aWaypoints); + + // ansonsten... + var cx = GetX(pCurrent); + var cy = GetY(pCurrent); + var cangle = Angle(cx,cy,ex,ey); + + var pNext = 0; + var pathcount = (pCurrent->WAYP::GetPathCount()); + var aBest = CreateArray(); + var good = 0; + var neutral = 0; + var bad = 0; + + // alle Nachbarknoten... + for(var i=0; iWAYP::GetPathTarget(i)); + + if(!Check4Jetpack(pCurrent,i,fJetpack,jetp,ammoload)) + continue; + + // Fuer die richtige Richtung zaehlt nicht der Winkel des naechsten Knotens, sondern + // wenn pNext nur einen Nachfolger hat, zaehlt die Richtung in die der Nachfolger geht + // (was rekursiv fortsetzbar ist) + var jetpgedacht = 0; + while((pNext->WAYP::GetPathCount()) == 1) { + // Endknoten? Wir brauchen nicht weiteriterieren + if(pNext == pEnd) break; + // für den gedachten Pfad muss noch gecheckt werden, ob da nicht Jetpack benötigt wird + var check = Check4Jetpack(pNext,0,fJetpack,jetp+jetpgedacht,ammoload); + if(check) + pNext = (pNext->WAYP::GetPathTarget(0)); + if(check == 2) + jetpgedacht += ammoload; + } + + // Endknoten? Super, fertig! + if(pNext == pEnd) { + aBest[0] = i; + good = 1; + break; + } + + // ansonsten + var nx = GetX(pNext); + var ny = GetY(pNext); + var nangle = Angle(cx,cy,nx,ny); + + // diffangle: Nimmt Werte von 0 (genau richtig) bis 180 (genau falsch) an + var diffangle = Abs(Normalize(nangle-cangle,-180)); + // Schummeln: der WP von dem man grad gekommen ist, wird als "bad" eingestuft + if(j>0) + if(pNext == aWaypoints[j-1] || pNext == pCurrent) + diffangle = 180; + // möglichst ein Array aus Pfaden zusammenstellen, die etwa in die gewünschte Richtung + // führen... (Differenz <= 55°) + if(diffangle <= 55) { + aBest[good] = i; + ++good; + } + // dann vielleicht nicht ganz so zielführende...? (nur wenn kein Pfad in richtige Richtung führt) + if(diffangle <= 110 && diffangle > 55 && !good) { + aBest[neutral] = i; + ++neutral; + } + // ansonsten dann ein Array aus nicht-zielführenden... + if(diffangle > 110 && !neutral && !good) { + aBest[bad] = i; + ++bad; + } + } + // Debug + if(Debug("waypoints")) { + var dbg = 0; + var str = " "; + var wayp = 0; + if(good) { str = "good"; dbg = good; } + else if(neutral) { str = "neutral"; dbg = neutral; } + else { str = "bad"; dbg = bad; } + if(dbg>1) { + DebugLog(" Choosing path from %s...","waypoints",str); + for(var d = 0; dWAYP::GetPathTarget(aBest[d])); + DebugLog(" waypoint (%d), angle %d","waypoints",ObjectNumber(wayp),Abs(Normalize(Angle(GetX(pCurrent),GetY(pCurrent),GetX(wayp),GetY(wayp))-cangle,-180))); + } + } + } + + // zufällig aus möglichen Pfaden auswählen + var chosenone = -1; + if(good) { chosenone = aBest[Random(good)]; } + else if(neutral) { chosenone = aBest[Random(neutral)]; } + else if(bad) { chosenone = aBest[Random(bad)]; } + else { + DebugLog("Failure: Selected waypoint leads into a dead end.","waypoints"); + return(false); + } + // ansonsten ok + pNext = (pCurrent->WAYP::GetPathTarget(chosenone)); + + // geschätzter Benzinverbrauch bei Jetpack hochzählen + if(pCurrent->WAYP::GetPathJetpack(chosenone)) + jetp += ammoload; + + DebugLog("Next %s waypoint (%d), angle %d","waypoints",str,ObjectNumber(pNext),Abs(Normalize(Angle(GetX(pCurrent),GetY(pCurrent),GetX(pNext),GetY(pNext))-cangle,-180))); + + // Fertig + if(pNext == pEnd) { + DebugLog("Success: Complete path consists of %d waypoints.","waypoints",GetLength(aWaypoints)); + } + + // kommt bei naechster Iteration ins Array + pCurrent = pNext; + } + DebugLog("Failure: No path found after %d iterations.","waypoints",iterationLimit); + return(false); +} + +// nächsten Wegpunkt von einer Position aus suchen (geht nur, wenn PathFree!) +private func FindWaypoint(int iX, int iY) +{ + var wp; + while(wp = FindObject(WAYP, AbsX(iX), AbsY(iY), -1, -1, 0,0,0,0, wp)) { + if(PathFree(iX, iY, wp->GetX(), wp->GetY()) || GBackSolid(wp->GetX(), wp->GetY())) + return(wp); + } + // Nix gefunden + return(); +} + +// Vorbedingung für Jetpack prüfen +private func Check4Jetpack(object pCurrent, int path, bool fJetpack, int jetp, int ammoload) +{ + // kein Jetpackpath... dann ist ja gut + if(!(pCurrent->WAYP::GetPathJetpack(path))) + return(1); + // ansonsten Vorbedingungen checken + if(fJetpack) + if(HasJetpack()) + //if(ammoload <= GetAmmo(GSAM)-jetp) + return(2); + return(0); +} + +// Lässt den Clonk von einem Wegpunkt zum anderen laufen, wobei er die jeweilige Pfadeigenschaft beachten muss +private func MoveAlongPath(object pCurrentWp, object pNextWp, int iNextStep) +{ + // Rausfinden, welchen Weg wir gehen müssen + for(var i = 0, path = -1 ; i < pCurrentWp->GetPathCount() ; i++) + if(pCurrentWp->GetPathTarget(i) == pNextWp) + { + path = i; + break; + } + // Kein Weg? -> Fehler + if(path < 0) return(MacroComSuccessFailed(0, Macro_PathBroken)); + // Sonderbehandlung für Zielwegpunkte, die nur einen Pfad von sich wegführen haben (da könnten Jumppads o.ä. sein) + ClearScheduleCall(this(), "JumppadCheck"); // Zur Sicherheit + if(GetLength(aPath) > iNextStep && pNextWp->GetPathCount() == 1) + ScheduleCall(this(), "JumppadCheck", 5, 0, pNextWp, iNextStep); + // Jetpackfliegen + if(pCurrentWp->GetPathJetpack(path)) + ScheduleCall(this(), "StartJetpack", pCurrentWp->GetPathJetpack(path), 0, pCurrentWp->GetPathJetpackFlag(path)); + // Flag rausfinden und entsprechend agieren + var flag = pCurrentWp->GetPathFlag(path); + if(flag == Path_MoveTo) + { + // Hinlaufen + SetCommand(this(), "MoveTo", pNextWp); + return(AddSpecialCommands(pCurrentWp, path)); + } + if(flag == Path_Jump) + { + // Springen und dann laufen + var dir = pCurrentWp->GetPathDir(path); + if(dir < 0) dir = 0; + SetDir(dir); + Jump(); + SetCommand(this(), "MoveTo", pNextWp); + return(AddSpecialCommands(pCurrentWp, path)); + } + if(flag == Path_Backflip) + { + // Backflippen und dann laufen + var dir = pCurrentWp->GetPathDir(path); + if(dir < 0) dir = 0; + SetDir(!dir); + var iEff = AddEffect("ControlStack", this, 110, 5, this); + if(GetDir() == DIR_Left) + EffectVar(0, this, iEff) = COMD_Right; + else + EffectVar(0, this, iEff) = COMD_Left; + Jump(); + ScheduleCall(0, "JumpStart", 1, 1, true); + + SetCommand(this(), "MoveTo", pNextWp); + return(AddSpecialCommands(pCurrentWp, path)); + } + if(flag == Path_Lift) + { + // Wir suchen den Lift und warten oder betreten ihn + LiftControl(0, ObjectNumber(pCurrentWp), ObjectNumber(pNextWp)); + return(AddSpecialCommands(pCurrentWp, path)); + } + // Unbekanntes flag, MoveTo versuchen + SetCommand(this(), "MoveTo", pNextWp); + return(AddSpecialCommands(pCurrentWp, path)); +} + +/* Sonderfunktionen */ + +protected func JumppadCheck(object pTargetWp, int iNextStep) +{ + // Pfad hat sich irgendwie geändert + if(GetLength(aPath) <= iNextStep) return(); + var pNextWp = aPath[iNextStep]; + // Feststellen, ob pTargetWp immernoch unser Bewegungsziel ist + if(aPath[iNextStep-1] != pTargetWp) + return(); + // Schauen, ob wir näher an pNextWp dran sind + if(ObjectDistance(pTargetWp) > ObjectDistance(pNextWp)) + // Wegpunkt wird übersprungen + return(MacroComMoveToStep(0, iNextStep)); + // Weiterlaufen + ScheduleCall(this(), "JumppadCheck", 5, 0, pTargetWp, iNextStep); +} + +protected func StartJetpack(int iDir) +{ + // Kein Jetpack mehr? oO + var jetpack = HasJetpack(); + if(!jetpack) return(); + // Richtung zünden + if(iDir == Jetpack_Left) // Links + { + SetDir(DIR_Left); + jetpack->ControlLeftDouble(this()); + } + if(iDir == Jetpack_UpLeft) // Oben links + { + SetDir(DIR_Left); + jetpack->ControlUpDouble(this()); + } + if(iDir == Jetpack_UpRight) // Oben rechts + { + SetDir(DIR_Right); + jetpack->ControlUpDouble(this()); + } + if(iDir == Jetpack_Right) // Rechts + { + SetDir(DIR_Right); + jetpack->ControlRightDouble(this()); + } +} + +protected func LiftControl(object dummy, int pCurrentWp, int pNextWp) +{ + // Fässt den Lift schon an? + if(GetAction() eq "Push") + { + var lift = GetActionTarget(); + if(!lift) return(); + // Nah genug am Ziel? Absteigen + if(ObjectDistance(Object(pNextWp)) <= 50) + return(AddCommand(this(), "MoveTo", Object(pNextWp))); + // Liftplatten befehligen + lift->~ControlCommand("MoveTo",0, Object(pNextWp)->GetX()); + // Warten + AddCommand(this(), "Call", this(), pCurrentWp, pNextWp, 0,0, "LiftControl"); + AddCommand(this(), "Wait", 0,0,0,0,0, 15); + return(1); + } + // Liftplatte suchen + var x1 = Object(pCurrentWp)->GetX(); + var x2 = Object(pNextWp)->GetX(); + if(x1 > x2) { x1 = x2; x2 = Object(pCurrentWp)->GetX(); } + var lift = FindObject2(Find_Func("IsLift"), Find_InRect(AbsX(x1), -25, x2-x1, 50)); + // Kein Lift? -> Fehlschlag + if(!lift) return(MacroComSuccessFailed(0, Macro_PathBroken)); + // Lift nah genug? -> Einsteigen + if(ObjectDistance(lift) <= 50) + { + AddCommand(this(), "Call", this(), pCurrentWp, pNextWp, 0,0, "LiftControl"); + AddCommand(this(), "Grab", lift); + return(1); + } + // Warten + AddCommand(this(), "Call", this(), pCurrentWp, pNextWp, 0,0, "LiftControl"); + + AddCommand(this(), "Wait", 0,0,0,0,0, 15); + return(1); +} + +// Alles was der Wegpunkt als ArriveCommand hat +protected func AddSpecialCommands(object pCurrentWp, int path) +{ + if(!(pCurrentWp->GetArriveCommandCount(path))) return; + for(var i= pCurrentWp->GetArriveCommandCount(path) - 1,command ; i > -1 ; i--) + AddCommand(this(), pCurrentWp->GetArriveCommand(path, i), + pCurrentWp->GetArriveCommand(path, i, 1), + pCurrentWp->GetArriveCommand(path, i, 2), + pCurrentWp->GetArriveCommand(path, i, 3), + pCurrentWp->GetArriveCommand(path, i, 4), 0, + pCurrentWp->GetArriveCommand(path, i, 5)); +} + +/* KI-Kampf */ + +// Setzt einen bestimmten Aggro-Wert für den Clonk +// 0 - keinerlei eigenmächtiges Handeln +// 1 - schießen auf Feinde, ohne dabei vom aktuellen Kommando abzuweichen +// 2 - auf Feinde wird geschossen und sie werden über kurze Strecken verfolgt +// 3 - Position (iX, iY) bewachen und dabei nur iDist weit weglaufen (wenn Feind verfolgt werden) +// Konstanten: +static const Aggro_Nothing = 0; +static const Aggro_Shoot = 1; +static const Aggro_Follow = 2; +static const Aggro_Guard = 3; + +public func SetAggroLevel(int iLevel, int iDist, int iX, int iY, string text) +{ +// if(GetOwner() < -1) Message("@SetAggroLevel: %d: %s", this(), iLevel, text); + // > 3 + if(iLevel > 3) return(); + // Wir kommen von > 2 + var target; + if(GetAggroLevel() >= 2 && iLevel < 2) + if(target = EffectVar(1, this(), GetEffect("Aggro", this()))) + if(GetMacroCommand(1, 1) == target) + { + FinishMacroCommand(1,0,1); + FinishMacroCommand(1); + } + // 0 + if(!iLevel) return(RemoveEffect("Aggro", this())); + // 1, 2 und 3 + var effect = GetEffect("Aggro", this()); + if(!effect) effect = AddEffect("Aggro", this(), 50, 10, this()); + EffectVar(0, this(), effect) = iLevel; + // Parameter + // iDist, Default = 500 + if(!iDist) + iDist = 500; + EffectVar(2, this(), effect) = iDist; + // iX und iY, Default = GetX() & GetY() + if(!iX && !iY && iLevel == 3) + { + iX = GetX(); + iY = GetY(); + } + EffectVar(3, this(), effect) = iX; + EffectVar(4, this(), effect) = iY; + return(1); +} + +public func GetAggroLevel() +{ + var effect = GetEffect("Aggro", this()); + if(!effect) return(); + return(EffectVar(0, this(), effect)); +} + +// Setzt sofort das Angriffsziel +public func SetAggroTarget(object pTarget) +{ + if(GetAggroLevel() == Aggro_Nothing) return(); + EffectVar(1, this(), GetEffect("Aggro", this())) = pTarget; + return(1); +} + +public func GetAggroTarget() +{ + return(EffectVar(1, this(), GetEffect("Aggro", this()))); +} + +public func FxAggroTimer(object pTarget, int no) +{ + // keine Waffe geladen? Dann waffen durchchecken + var hasWeapons = false; + var hasLoadedWeapon = false; + for(var i = 0; i < ContentsCount(); i++) + { + if(Contents(i)->~IsWeapon()) + { + hasWeapons = true; + if(Contents(i)->~GetCharge() > 0) + { + hasLoadedWeapon = true; + break; + } + } + } + + if(hasWeapons && !hasLoadedWeapon) + { + // Zielen beenden + if(IsAiming()) StopAiming(); + CheckIdleWeapon(); + return; + } + + // Wir haben ein Ziel? + if(EffectVar(1, this(), no)) { EffectCall(this(), no, "Fire"); return(1); } + // Zielen beenden + if(IsAiming()) StopAiming(); +// Message("@No target", this()); + // Ziel suchen + var dir = GetDir()*2-1; + var dist = EffectVar(2, this(), no); + // Vorne + var target = GetTarget(90*dir, 90, dist); + // Hinten + if(!target) + if((!GetCommand() && !GetMacroCommand()) || EffectVar(0, this(), no) != 1) + target = GetTarget(-90*dir, 90, dist); + // Gefunden? + if(!target) + { + // Nichts gefunden :( + // -> Bescheid geben! + if(EffectVar(99, this(), no)) + { + if(Contained()) + Contained()->~HandleAggroFinished(this()); + else if(IsRiding()) + GetActionTarget()->~HandleAggroFinished(this()); + + EffectVar(99, this(), no); + } + // -> Waffen durchchecken + CheckIdleWeapon(); + return(); + } + // Super + EffectVar(1, this(), no) = target; + EffectVar(99,this(), no) = true; // wir haben ein Ziel \o/ +} + +// Der Name dieser Funktion ist irreführend. Es ist die AI Behandlung wenn gerade ein Ziel da (EffectVar 1) +public func FxAggroFire(object pTarget, int no) +{ + // Zusatzhack: BR-Bombe! + if(GetID(Contents()) == GBRB) return; + + // Nichts tun, wenn gerade verhindert + if(!ReadyToFire() && !ReadyToAim()) return; + + var y = EffectVar(4, this, no); + var x = EffectVar(3, this, no); + var dist = EffectVar(2, this, no); + var target = EffectVar(1, this, no); + var level = EffectVar(0, this, no); + var pathfree = true; + + // Fahrzeugsteuerung + if(Contained()) + { + if(!(Contained()->~HandleAggro(this, level, target, dist, x, y))) + AddCommand(this, "Exit", 0,0,0,0,0,0,0, C4CMD_SilentSub); + return; + } + if(IsRiding()) + { + if(!(GetActionTarget()->~HandleAggro(this, level, target, dist, x, y))) + SetAction("Walk"); + return; + } + + // Zu weit von der Wachposition entfernt? + if(level == Aggro_Guard) + { + if(Distance(GetX(), GetY(), x, y) > dist) + { + if(GetMacroCommand(1, 1) == target) + { + FinishMacroCommand(1,0,1); + FinishMacroCommand(1); + } + AddMacroCommand(0, "MoveTo", 0, x,y, 0, level); + EffectVar(1, this, no) = 0; + // Message("@Returning to guarded position", this()); + return; + } + } + + var maxdist = dist; + if(!PathFree(GetX(), GetY(), target->GetX(), target->GetY())) + { + if(level == Aggro_Shoot) maxdist = 0; + if(level >= Aggro_Follow) maxdist = dist/2; + pathfree = false; + } + + // Ziel irgendwie weg? + // (Pathfree wurde schon gecheckt) + if(!CheckTarget(target,this,maxdist,0,0,true)) + { + EffectVar(1, this, no) = 0; + if(level == Aggro_Follow) + ClearMacroCommands(); + if(IsAiming()) + StopAiming(); + return; + } + // Ich hab nix? °-° + if(!Contents()) return; // Lauf, Forest, lauf! + // Waffe in die Hand nehmen + if(!SelectWeapon(level, target, false)) + { + // Evtl. Feuermodus wechseln (dann muss erst nachgeladen werden, aber besser als nichts) + if(!SelectWeapon(level, target, true)) + { + // Bei Aggro_Follow können wir von unserem Pfade weg. D.h. eine Waffe und/oder Munition muss her + if(level == Aggro_Follow) + { +// Message("@Searching for weapons / ammo", this()); + // Waffen auffrischen? + if(CustomContentsCount("IsWeapon") <= 1) + SearchWeapon(Aggro_Shoot); + // Munition auffrischen + else + SearchAmmo(Aggro_Shoot); + } + // ein Balrog, ein Feind gegen den ihr nichts ausrichten könnt...lauft! + return; + } + } + // Stufe 1 - nur in die grobe Richtung ballern, lieber nicht anhalten oder sowas + + // Schaue ich in die richtige Richtung? + if(level > Aggro_Shoot) + { + if(GetX() < target->GetX()) + { + if(GetDir() != DIR_Right) + SetDir(DIR_Right); + } + else + { + if(GetDir() != DIR_Left) + SetDir(DIR_Left); + } + } + + var weaponRange = Contents()->GetBotData(BOT_Range); + + var angle = Angle(GetX(), GetY(), target->GetX(), target->GetY()); + + // Feind nicht innerhalb von Winkel in dem wir auf autoaim vertrauen + var canHitTargetWithoutAiming = Inside(angle, 70, 120) || Inside(angle, 250, 290); + + // Zielen, muss auch mal sein + if(!GetCommand() && !GetMacroCommand() || level != Aggro_Shoot || IsAiming()) + { + var mustAimByWeapon = Contents()->GetFMData(FM_Aim)>0; + + // Bots sind etwas kurzsichtig, die können nicht weiter als 300px (~=ein Bildschirm auf niedriger Auflösung) sehen + // der fairness halber... + var targetInAimRange = ObjectDistance(target) < Min(weaponRange,300); + + if((!canHitTargetWithoutAiming || mustAimByWeapon ) && targetInAimRange && pathfree && weaponRange > 30) + { + if(!IsAiming()) StartSquatAiming(); + // nicht für ein else halten, think again! + if(IsAiming()) + { + var tx = target->GetX(); + var ty = target->GetY(); + + // ja so pi mal daum.... + if(Contents()->GetBotData(BOT_Ballistic)) + ty -= 15; + + DoMouseAiming(tx, ty); + } + } + // ... oder halt auch nicht zielen + else if(IsAiming()) + StopAiming(); + } + + // Gut. Feuern wir bereits? + if(Contents()->IsRecharging() || Contents()->IsShooting()) return; + + // Feuer! + var targetInShootRange = ObjectDistance(target) < Min(weaponRange,500); + if(pathfree && (canHitTargetWithoutAiming || IsAiming()) && targetInShootRange) + { + Control2Contents("ControlThrow"); + } + +// Message("@My target: %s @%d/%d with level %d", this(), target->GetName(), target->GetX(), target->GetY(), level); + // Stufe 2 - verfolgen! + if(level >= Aggro_Follow) + if(GetMacroCommand(1) ne "Follow" || GetMacroCommand(1, 1) != target) + if(GetMacroCommand(0) ne "Follow" || GetMacroCommand(0,1) != target) + { + DebugLog("FxAggroFire - Adding Follow command","aggro"); + AddMacroCommand(0, "MoveTo", 0, GetX(),GetY(), 0, level); + AddMacroCommand(0, "Follow", target, 0, 0, 0, level); + } +} + +// Wenn iLevel = 1 (Aggro_Shoot) werden keine Waffen mit FM_Aim ausgewählt +public func SelectWeapon(int iLevel, object pTarget, bool fFireModes) +{ + // Entfernung zum Ziel + var dist = ObjectDistance(pTarget); + // Keine Waffen in Inventar? + if(!CustomContentsCount("IsWeapon")) return(); + // Bevorzugten Schadenstyp bestimmen + var preftype = GetPrefDmgType(pTarget), type; + // Alle durchgehen und passende prüfen + var fav, favmode; + for(var i=0,obj,mode ; obj = Contents(i) ; mode++) + { + // Nix Waffe + if(!(obj->~IsWeapon())) { i++; mode = -1; continue; } + // Feuermodus + if(mode && !fFireModes) { i++; mode = -1; continue; } + if(!(obj->GetFMData(FM_Name, mode))) { i++; mode = -1; continue; } + if(mode == obj->GetFireMode() && mode) continue; + // Nix gut + if(obj->GetFMData(FM_Aim, mode)>0) + if(iLevel == 1 || !(ReadyToAim() || IsAiming())) + continue; + // Keine Munition dafür? + if(!(obj->GetCharge()) && !CheckAmmo(obj->GetFMData(FM_AmmoID, mode), obj->GetFMData(FM_AmmoLoad, mode))) + { + continue; + } + // EMP nur gegen Maschinen + if(obj->GetBotData(BOT_EMP, mode)) + if(!(pTarget->~IsMachine())) + continue; + // Kein Favorit bisher? + if(!fav) + { + fav = obj; + type = fav->GetBotData(BOT_DmgType, mode); + favmode = mode; + } + else + { + var favInRange = fav->GetBotData(BOT_Range, favmode) >= dist; + var objInRange = obj->GetBotData(BOT_Range, mode) >= dist; + + var objHasPrefDmgType = obj->GetBotData(BOT_DmgType, mode) == preftype; + var favHasPrefDmgType = preftype == type; + var objHasBetterDmgType = objHasPrefDmgType && !favHasPrefDmgType; + var neitherHasPrefDmgType = !objHasPrefDmgType && !favHasPrefDmgType; + var favHasFarMorePower = fav->GetBotData(BOT_Power, favmode)-1 > obj->GetBotData(BOT_Power, mode); + var objIsLongLoader = obj->GetBotData(BOT_Power, mode) != BOT_Power_LongLoad; + var favIsLongLoader = fav->GetBotData(BOT_Power, favmode) == BOT_Power_LongLoad; + var objIsLongLoaderThatReloads = objIsLongLoader && (obj->IsReloading() || !(obj->GetCharge())); + var favIsLongLoaderThatReloads = favIsLongLoader && (fav->IsReloading() || !(fav->GetCharge())); + + var objIsMorePowerful = fav->GetBotData(BOT_Power, favmode) < obj->GetBotData(BOT_Power, mode) || + favIsLongLoaderThatReloads && !objIsLongLoaderThatReloads; + + if(objInRange) + { + if(!favInRange || objHasBetterDmgType && !favHasFarMorePower || neitherHasPrefDmgType && objIsMorePowerful) + { + fav = obj; + type = obj->GetBotData(BOT_DmgType, mode); + favmode = mode; + } + } + } + } + + DebugLog(Format("Select Weapon: Favourite %s, Mode %v",GetName(fav),favmode),"hazard"); + + // Auswählen + if(!fav) return(); + // Feuermodus wechseln? + if(fFireModes) + if(favmode && favmode != fav->GetFireMode()) + fav->SetFireMode(favmode); + if(ContentsCount() == 1) return(1); + return(ShiftContents(0,0,fav->GetID())); +} + +public func GetPrefDmgType(object pTarget) +{ + var test = 100; + var current; + var min = current = pTarget->~OnDmg(test, DMG_Projectile); + var type = DMG_Projectile; + + if((current = pTarget->~OnDmg(test, DMG_Melee)) < min) + { + type = DMG_Melee; + min = current; + } + if((current = pTarget->~OnDmg(test, DMG_Fire)) < min) + { + type = DMG_Fire; + min = current; + } + if((current = pTarget->~OnDmg(test, DMG_Explosion)) < min) + { + type = DMG_Explosion; + min = current; + } + if((current = pTarget->~OnDmg(test, DMG_Energy)) < min) + { + type = DMG_Energy; + min = current; + } + if((current = pTarget->~OnDmg(test, DMG_Bio)) < min) + type = DMG_Bio; + + return(type); +} + +// Sucht nach Waffen und läuft dorthin +public func SearchWeapon(int iAggro) +{ + // Nächstbeste Spawnpunkte abklappern + for(var pSpawn in FindObjects(Find_ID(SPNP), Sort_Random())) + // Da ist eine Waffe drin? + if(pSpawn -> Contents() ->~ IsWeapon()) + // Die haben wir auch noch nicht? + if(!FindContents(pSpawn->Contents()->GetID())) + // Einsammelbar? + if(pSpawn->CheckCollect(GetOwner(),this())) + // Hinlaufen + return(SetMacroCommand(0, "MoveTo", pSpawn, 0,0,0, iAggro)); +} + +// Sucht nach Munition und läuft dorthin +public func SearchAmmo(int iAggro) +{ + // Nächstbeste Spawnpunkte abklappern + for(var pSpawn in FindObjects(Find_ID(SPNP), Sort_Random())) + // Da ist Munition drin? + if(pSpawn -> Contents() ->~ IsAmmo()) + // Einsammelbar? + if(pSpawn->CheckCollect(GetOwner(),this())) + // Hinlaufen (wir sind gutgläubig und denken, dass wir die auch brauchen) + return(SetMacroCommand(0, "MoveTo", pSpawn, 0,0,0, iAggro)); +} + +/* Waffenbehandlung wenn nicht im Kampf */ + +public func CheckIdleWeapon() +{ + + if(Contents()) + // Hack - mit BR-Bombe tut er gar nichts + if(Contents()->GetID() == GBRB) return false; + // Keine Waffen im Inventar + if(!CustomContentsCount("IsWeapon")) return false; + // nachladende Waffe in der Hand + if(Contents()->~IsWeapon()) + if(Contents()->IsReloading()) + return(); + + // Inventar nach Waffe durchsuchen, die man Nachladen könnte + var obj = 0; + for(var i = 0; obj = Contents(i); ++i) + { + // Keine Waffe + if(!(obj->~IsWeapon())) + { + continue; + } + + for(var mode=1; obj->GetFMData(FM_Name, mode); ++mode) + { + var ammoId = obj->GetFMData(FM_AmmoID, mode); + var ammoLoad = obj->GetFMData(FM_AmmoLoad, mode); + + // Waffe ist (mindestens zur hälfte) geladen + if(obj->GetAmmo(ammoId) >= ammoLoad / 2) + { + break; + } + + // EMP-Modi erstmal nicht laden + if(obj->GetBotData(BOT_EMP, mode)) continue; + + // Waffe ist nachladbar + if(CheckAmmo(ammoId, ammoLoad - obj->GetAmmo(ammoId))) + { + ShiftContents(this, 0, obj->GetID()); + // Feuermodus wechseln + obj->SetFireMode(mode); + // Und Muni reinhauen + obj->Reload(); + return true; + } + } + } +} + +/* Inventarbehandlung (wird von KI-Spieler aufgerufen) */ + +// Inventar behandeln +public func CheckInventory() +{ + for(var i=0,obj ; obj = Contents(i) ; i++) + { + // Wenn man etwas hardcoden möchte, dann einfach die Funktion AI_Inventory im Objekt erstellen und true zurückgeben + if(obj->~AI_Inventory(this)) + continue; + // Waffe + if(obj->~IsWeapon()) + continue; + // Ausrüstungsgegenstand + if(obj->~IsHazardGear()) + { + if(HasGear(obj->GetGearType())) + { + DropObject(obj); + continue; + } + // Ausrüstung wird prinzipiell als was gutes angesehen -> anlegen + ActivateGear(obj); + continue; + } + // Mine + if(obj->~IsMine()) + { + // Platzieren + PlaceMine(obj); + continue; + } + // Upgrade + if(obj->~IsUpgrade()) + { + var wpn = GetUpgradeableWeapon(obj); + // Eine passende Waffe gefunden -> upgraden (Upgrades sind immer gut.) + if(wpn) UpgradeWeapon(obj, wpn); + continue; + } + // Munition + if(obj->~IsAmmoPacket()) + { + ActivateAmmo(obj); + continue; + } + // Objekt ist wertlos für uns + DropObject(obj); + } +} + +// Objekt fallen lassen (verzögert, damit die Schleife nicht durcheinander kommt +public func DropObject(object pObj) +{ + Schedule(Format("Exit(Object(%d), 0, 10);", ObjectNumber(pObj)), 1, 0, this()); + // Nicht wieder einsammeln + var effect = AddEffect("CollectionException", pObj, 1, 36); + EffectVar(0, pObj, effect) = this(); +} + +// Ausrüstung anlegen (verzögert, damit die Schleife nicht durcheinander kommt +public func ActivateGear(object pObj) +{ + ScheduleCall(pObj, "Activate", 1, 0, this()); +} + +// Mine platzieren (verzögert, damit die Schleife nicht durcheinander kommt +public func PlaceMine(object pObj) +{ + ScheduleCall(pObj, "Activate", 1, 0, this()); +} + +// Waffe suchen, die man upgraden kann +public func GetUpgradeableWeapon(object pObj) +{ + for(var i=0,obj ; obj = Contents(i) ; i++) + if(obj->~IsUpgradeable(pObj->GetID())) + return(obj); +} + +// Waffe upgraden (verzögert, damit die Schleife nicht durcheinander kommt +public func UpgradeWeapon(object pObj, object pWeapon) +{ + ScheduleCall(pObj, "UpgradeObject", 1, 0, pWeapon); +} + +// Munition aufnehmen (verzögert, damit die Schleife nicht durcheinander kommt +public func ActivateAmmo(object pObj) +{ + ScheduleCall(pObj, "Activate", 1, 0, this()); +} + +// Hardgecodete Objekte + +// Support-Drohne +// Zufällige Waffe für eine Drohne aussuchen +private func GetRandomDroneWeapon() +{ + var aWps = CreateArray(); + for(var i=0,obj ; obj = Contents(i) ; i++) + if(obj->~IsWeapon()) + if(obj->GetFMData(FM_Aim)<=0) + aWps[GetLength(aWps)] = obj; + // Zufällig zurückgeben + if(!GetLength(aWps)) return(); + return(aWps[Random(GetLength(aWps))]); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + var x, ammo; + while(ammo = Contents(x++,ammobag)) { + if(!(ammo ->~IsAmmo())) continue; + extra[GetLength(extra)] = Format("DoAmmo(%i,%d)", GetID(ammo), GetAmmo(GetID(ammo))); + } +} diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/StringTblDE.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/StringTblDE.txt new file mode 100644 index 00000000..8e30b191 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/StringTblDE.txt @@ -0,0 +1,7 @@ +# Control Descs +CtrlInventoryDesc=Inventar auswählen +AmmoDrop=Munition ablegen +CtxObjectInfo=Objektinfo +CtxHelpMessagesOn=Hilfen an +CtxHelpMessagesOff=Hilfen aus +CtxGuard=Bewachen \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/StringTblUS.txt b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/StringTblUS.txt new file mode 100644 index 00000000..f309fd26 --- /dev/null +++ b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/StringTblUS.txt @@ -0,0 +1,7 @@ +# Control Descs +CtrlInventoryDesc=Shift inventory +AmmoDrop=Drop ammunition +CtxObjectInfo=Object info +CtxHelpMessagesOn=Help messages on +CtxHelpMessagesOff=Help messages off +CtxGuard=Guard \ No newline at end of file diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Title.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Title.png new file mode 100644 index 00000000..2b584b9f Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/Title.png differ diff --git a/Hazard.c4d/Crew.c4d/HazardClonk.c4d/TitleArmor.png b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/TitleArmor.png new file mode 100644 index 00000000..2a187e30 Binary files /dev/null and b/Hazard.c4d/Crew.c4d/HazardClonk.c4d/TitleArmor.png differ diff --git a/Hazard.c4d/Crew.c4d/Names.txt b/Hazard.c4d/Crew.c4d/Names.txt new file mode 100644 index 00000000..ba34a59e --- /dev/null +++ b/Hazard.c4d/Crew.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Clonks +US:Clonks diff --git a/Hazard.c4d/DescDE.txt b/Hazard.c4d/DescDE.txt new file mode 100644 index 00000000..3d6ffcb4 --- /dev/null +++ b/Hazard.c4d/DescDE.txt @@ -0,0 +1,3 @@ +Den speziell für Kampfeinsätze ausgebildeten Hazardclonk trifft man zumeist auf fremdartigen Planeten, alten Schlachtfeldern und verlassenen Raumstationen an. Bis an die Zähne bewaffnet, bahnt er sich seinen Weg durch diese gottverlassenen Orte und trotzt den Gefahren, die dort auf ihn lauern. + +Sein Waffenarsenal reicht dabei von Raketenwerfern über Miniguns, Laser und Granaten bis hin zu Energieschilden und weiterer Ausrüstung. Doch das sind nicht einmal seine schwersten Geschütze... \ No newline at end of file diff --git a/Hazard.c4d/DescUS.txt b/Hazard.c4d/DescUS.txt new file mode 100644 index 00000000..82e1cc03 --- /dev/null +++ b/Hazard.c4d/DescUS.txt @@ -0,0 +1,3 @@ +The hazardclonk is a clonk who is specially trained for armed combat. Mostly, one may encounter him on alien planets, old battlefields and abandoned space stations. Armed to the teeth, he faces the dangers that lurk in the dark corners of these soulless places. + +His equipment consists not only of rocket launchers, miniguns, lasers, plenty of grenades and energy shields but also even heavier ordnance... \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/DescDE.txt b/Hazard.c4d/Effects.c4d/DescDE.txt new file mode 100644 index 00000000..4019856e --- /dev/null +++ b/Hazard.c4d/Effects.c4d/DescDE.txt @@ -0,0 +1 @@ +Effekte und Hilfsobjekte. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/DescUS.txt b/Hazard.c4d/Effects.c4d/DescUS.txt new file mode 100644 index 00000000..32acf214 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/DescUS.txt @@ -0,0 +1 @@ +Effects and helper objects. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Graphics.png new file mode 100644 index 00000000..8665f27f Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Names.txt new file mode 100644 index 00000000..78a282ed --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Brandfleck +US:Burn mark diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Particle.txt new file mode 100644 index 00000000..8478b8bb --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/BurnMark.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=BurnMark +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,32,32,-16,0 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=1 +Additive=0 +RByV=2 diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/DefCore.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/DefCore.txt new file mode 100644 index 00000000..1ba1e5d5 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=BOOM +Version=4,9,8,2 +Name=Explosion +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/DescDE.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/DescDE.txt new file mode 100644 index 00000000..6bebd3e8 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/DescDE.txt @@ -0,0 +1 @@ +Kabooom! diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/DescUS.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/DescUS.txt new file mode 100644 index 00000000..6bebd3e8 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/DescUS.txt @@ -0,0 +1 @@ +Kabooom! diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Graphics.png new file mode 100644 index 00000000..2246ad08 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Names.txt new file mode 100644 index 00000000..cfed2c90 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rauch +US:Smoke diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Particle.txt new file mode 100644 index 00000000..a92a1ece --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/DuroSmoke.c4d/Particle.txt @@ -0,0 +1,10 @@ +[Particle] +Name=Smoke3 +MaxCount=800 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +AlphaFade=2 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Explosion.c4d/Graphics.png new file mode 100644 index 00000000..9c92efde Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Explosion.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Explosion.c4d/Names.txt new file mode 100644 index 00000000..55004c44 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Explosion +US:Explosion \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Explosion.c4d/Script.c b/Hazard.c4d/Effects.c4d/Explosion.c4d/Script.c new file mode 100644 index 00000000..93ba60c8 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Explosion.c4d/Script.c @@ -0,0 +1,160 @@ +/* Explosion */ + +#strict + +//Explode mit Effekt und tollen Extraparametern für performance-/effektmäßiges Zeug +global func Explode(int iLevel, object pObj, id idEffect, string szEffect, bool bNoShots) { + if(!pObj) + if(!(pObj=this())) + return(); + + var x = AbsX(pObj->GetX()), + y = AbsY(pObj->GetY()); + + var i=0, count = 3+iLevel/8, angle = Random(360); + while(count > 0 && ++i < count*10) { + angle += RandomX(40,80); + + if(!bNoShots) + if(GetName(0,SHT1)) { //Gibt es das Objekt? (HAX) + var ammo = CreateObject(SHT1,x,y,GetController(pObj)); + ammo->Launch(angle,100+iLevel*3,Max(1,RandomX(30,iLevel*8)),4,50, 3, 0,1); + } + + //Rauch + var smokex = +Sin(angle,RandomX(iLevel/4,iLevel/2)); + var smokey = -Cos(angle,RandomX(iLevel/4,iLevel/2)); + if(GBackSolid(x+smokex,y+smokey)) + continue; + var level = iLevel + Random(iLevel/5); + CreateSmokeTrail(level,angle,smokex,smokey,pObj); + count--; + } + + CreateBurnMark(x,y,iLevel,20+iLevel/2); + + if(IsDark()) { + var iSize = iLevel*100; + if(iLevel < 20) { + iSize /= 2; + } + AddLightFlash(iSize/3, x, y, RGBa(255,220,64,15)); + } + + return(inherited(iLevel, pObj, idEffect, szEffect)); +} + +global func CreateBurnMark(int iX, int iY, int iLevel, int Count) +{ + var boom; + if(!ObjectCount(BOOM)) boom = CreateObject(BOOM,0,0,-1); + else boom = FindObject(BOOM); + + var angle=Random(360/Count); //variablen für die überprüfung + var type; + for(var z; z < Count; z++) { + + angle += Max(1,360/Count); + + // Check: Sky or Solid/Liquid + var x = iX+Cos(angle,iLevel); + var y = iY+Sin(angle,iLevel); + if(GetMaterialVal("Density","Material",GetMaterial(x,y)) != 0 + || GetMaterial(x,y) == -1) + continue; + + type = 1+Random(3); + var size = BurnMarkCheck(angle,RandomX(iLevel/2,iLevel*2),iX,iY); + var sin = Sin(angle,(size-iLevel)/2+iLevel+Random(3)); + var cos = Cos(angle,(size-iLevel)/2+iLevel+Random(3)); + + CreateParticle("BurnMark",iX+cos,iY+sin,Cos(angle+RandomX(-5,5),50),Sin(angle+RandomX(-5,5),50),size*5+Random(25),RGBa(0,0,0,64),boom,1); + } + +} + +global func BurnMarkCheck(int angle,int size, int iX, int iY) { + var sin = Sin(angle,size); + var cos = Cos(angle,size); + var x = cos, y = sin, i=100; + while(GetMaterial(iX+x,iY+y) == -1 || GetMaterialVal("Density","Material",GetMaterial(iX+x,iY+y)) != 0) { + x = cos*i/100; + y = sin*i/100; + if(i <= 0) return(0); + i-=10; + } + return(size); +} + +global func CreateSmokeTrail(int iStrength, int iAngle, int iX, int iY, object pObj) { +// Log("I..."); + iX += GetX(pObj); + iY += GetY(pObj); + AddEffect("SmokeTrail", 0, 300, 1, 0, 0, iStrength, iAngle, iX, iY); +} + +// Variablen: +// 0 - Stärke +// 1 - momentane Stärke +// 2 - X-Position +// 3 - Y-Position +// 4 - Anfangs-X-Geschwindigkeit +// 5 - Anfangs-Y-Geschwindigkeit +global func FxSmokeTrailStart(object pTarget, int iEffectNumber, int iTemp, iStrength, iAngle, iX, iY) { + + if(iTemp) + return(); + + if(iAngle%90 == 1) iAngle += 1; + iStrength = Max(iStrength,5); + + EffectVar(0, pTarget, iEffectNumber) = iStrength; + EffectVar(1, pTarget, iEffectNumber) = iStrength; + EffectVar(2, pTarget, iEffectNumber) = iX; + EffectVar(3, pTarget, iEffectNumber) = iY; + EffectVar(4, pTarget, iEffectNumber) = +Sin(iAngle,iStrength*40); + EffectVar(5, pTarget, iEffectNumber) = -Cos(iAngle,iStrength*40); +} + +global func FxSmokeTrailTimer(object pTarget, int iEffectNumber, int iEffectTime) { + var iStrength = EffectVar(0, pTarget, iEffectNumber); + var iAStr = EffectVar(1, pTarget, iEffectNumber); + var iX = EffectVar(2, pTarget, iEffectNumber); + var iY = EffectVar(3, pTarget, iEffectNumber); + var iXDir = EffectVar(4, pTarget, iEffectNumber); + var iYDir = EffectVar(5, pTarget, iEffectNumber); + + iAStr = Max(1,iAStr-iAStr/10+Random(2)); + iAStr--; + iYDir += GetGravity()*2/3; + + var xdir = iXDir*iAStr/iStrength; + var ydir = iYDir*iAStr/iStrength; + + // Neu: Random + iX += RandomX(-3,3); + iY += RandomX(-3,3); + + // zuerst zeichnen + CreateParticle("Smoke3",iX,iY,RandomX(-2,2),RandomX(-2,4),20+iAStr*8,RGBa(75,65,55,55+35*iAStr/iStrength)); + CreateParticle("Blast",iX,iY,0,0,10+iAStr*8,RGBa(250,100+Random(100),100,160)); + + // dann nächste position berechnen + iX += xdir/100; + iY += ydir/100; + + if(GBackSemiSolid(iX,iY)) + return(-1); + if(iAStr <= 1) + return(-1); + + EffectVar(1, pTarget, iEffectNumber) = iAStr; + EffectVar(2, pTarget, iEffectNumber) = iX; + EffectVar(3, pTarget, iEffectNumber) = iY; + EffectVar(5, pTarget, iEffectNumber) = iYDir; +} + +global func FxSmokeTrailStop() { +// Log("Nikotine"); +} + diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/DefCore.txt b/Hazard.c4d/Effects.c4d/Fire.c4d/DefCore.txt new file mode 100644 index 00000000..07072700 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=MYFR +Version=4,9,8,2 +Name=Fire +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 +Components=DFLM=1 +Picture=0,0,1,1 diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/DescDE.txt b/Hazard.c4d/Effects.c4d/Fire.c4d/DescDE.txt new file mode 100644 index 00000000..19357ecc --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/DescDE.txt @@ -0,0 +1 @@ +Heiß. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/DescUS.txt b/Hazard.c4d/Effects.c4d/Fire.c4d/DescUS.txt new file mode 100644 index 00000000..7c21d9b0 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/DescUS.txt @@ -0,0 +1 @@ +Hot. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Fire.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire.c4d/Graphics.png new file mode 100644 index 00000000..317f6e57 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Fire.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire.c4d/Particle.txt new file mode 100644 index 00000000..328566b5 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=ColorFire +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +#CollisionFn=Stop +Face=0,0,26,26,-13,-13 +Repeats=1 +GravityAcc=0 +AlphaFade=5 +#VertexCount=1 +#VertexY=-50 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Fire2.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire2.c4d/Graphics.png new file mode 100644 index 00000000..abc29367 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Fire2.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire2.c4d/Particle.txt new file mode 100644 index 00000000..a1dab36e --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/Fire2.c4d/Particle.txt @@ -0,0 +1,15 @@ +[Particle] +Name=ColorFire2 +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +#CollisionFn=Stop +Face=0,0,32,32,-16,-16 +Repeats=1 +GravityAcc=0 +AlphaFade=10 +#VertexCount=1 +#VertexY=-75 +Additive=1 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Fire.c4d/Graphics.png new file mode 100644 index 00000000..0fe542f8 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Fire.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Fire.c4d/Names.txt new file mode 100644 index 00000000..086a5fa3 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Feuer +US:Fire \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Script.c b/Hazard.c4d/Effects.c4d/Fire.c4d/Script.c new file mode 100644 index 00000000..603eee2d --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Fire.c4d/Script.c @@ -0,0 +1,179 @@ +/*-- Feuer --*/ + +#strict + +//Farben +static const FIRE_Blue = 340810495; // RGBa(80,90,255,20); +static const FIRE_Green = 169148190; // RGBa(20,255,30,10); +static const FIRE_Red = 33554431; // intern geregelt + +/* Schadenszeugs und so! */ + +global func FxDmgCheckStart(object pTarget, int iEffectNumber, int iTemp) { + if(iTemp) + return(); + if(GetEffectCount("DmgCheck",pTarget) > 1) + return(-1); +} + +global func FxDmgCheckDamage(object pTarget, int iEffectNumber, int iDmgEngy, int iCause) { + var type; + //Explosion + if(iCause == 1 || iCause == 33) + type = DMG_Explosion; + //Feuer + else if(iCause == 2 || iCause == 35) + type = DMG_Fire; + //Säure (Bio) + else if(iCause == 38) + type = DMG_Bio; + //Melee = Clonk zu Clonk Kampf + else if(iCause == 34 || iCause == 40) + type = DMG_Melee; + //Was anderes -> nichts tun. + else + return(iDmgEngy); + + //Ziel sagen, welcher Schadenstyp gemach wurde + if(type) + pTarget->~LastDamageType(type); + + var red = pTarget->~OnDmg(iDmgEngy/100,type); + //reduzierten Schaden berechnen + var dmg; + dmg = (100-red)*iDmgEngy; + // OnHit aufrufen + pTarget->~OnHit(dmg/100, type); + return(dmg/100); //und zurückgeben +} + +/* Der Feuereffekt. Ganz ohne Feuer! :) */ + +global func AddFireEffect(object pTarget, int iDuration, int dwColor,bool bOverride, int iSize) { + if(!pTarget) + pTarget = this(); + return(AddEffect("FireEffect",pTarget,2,4,0,0, iDuration, dwColor, bOverride,iSize)); +} + +global func FxFireEffectStart(object pTarget, int iEffectNumber, int iTemp, int iDuration, int dwColor, bool bOverride, int iSize) { + if(iTemp) + return(0); + EffectVar(0,pTarget,iEffectNumber) = iDuration; //Wie lange der Effekt anhalten soll + EffectVar(1,pTarget,iEffectNumber) = dwColor; //die Farbe des Feuers. Teh Rok. :) + //Größe des Feuerzeugs. Relativ zur Standardgröße + if(iSize) + EffectVar(2,pTarget,iEffectNumber) = iSize; +} + +global func FxFireEffectTimer(object pTarget, int iEffectNumber, int iEffectTime) { + if(Contained(pTarget)) + return(1); + + var firemode; + if(GetOCF(pTarget) & OCF_Living) + firemode = 1; + + var width, height, yoff; + var id = GetID(pTarget); + + width = Max(GetObjWidth(pTarget),1); + height = GetObjHeight(pTarget); + yoff = height/2-GetDefFireTop(id); + + var count = Sqrt(width*height)/4; + var basesize = 30, + diffsize = 10, + relsize = 12; + var x = GetX(pTarget), + y = GetY(pTarget); + var xdir, ydir, con, wdtcon, a, size, wind; + var clr2; + + con=wdtcon=Max(100*GetCon(pTarget)/100,1); + if(!GetDefStretchGrowth(id)) + if(wdtcon<100) + wdtcon=100; + + x += GetDefOffset(id,0)+GetObjWidth(pTarget)/2; + y += GetDefOffset(id,1)+GetObjHeight(pTarget)/2; + + count = Max(2,count*wdtcon/100); + + a = Sqrt(Sqrt(width*height)*(con+20)/120)*relsize; + + wind = GetWind(x,y)/3; + + clr2 = EffectVar(1,pTarget,iEffectNumber); + + var countmod = GetEffectCount("FireEffect",pTarget); + + for(var i=0; i < count/countmod; ++i) { + size = Random(diffsize+1) + basesize - diffsize/2-1 + a + EffectVar(2,pTarget,iEffectNumber); + + var clr, particle; + if(i < count/(2*countmod)) { + clr = 32004000 + ((Random(59) + 196) << 16); + particle = "ColorFire1"; + if(IsAlphaOnly(clr2)) + particle = "Fire1"; + } + else { + clr = 16777215; + particle = "ColorFire2"; + if(IsAlphaOnly(clr2)) + particle = "Fire2"; + } +// if(!firemode) + // clr += 62000000; + +/* var clrr,clrg,clrb,clra; + clrr = BoundBy(ModulateColor(GetRGBValue(clr,1),GetRGBValue(clr2,1)),65536,16711680); + clrg = BoundBy(ModulateColor(GetRGBValue(clr,2),GetRGBValue(clr2,2)),256,65280); + clrb = BoundBy(ModulateColor(GetRGBValue(clr,3),GetRGBValue(clr2,3)),1,255); + clra = ModulateColor(GetRGBValue(clr,0),GetRGBValue(clr2,0)); + clr = RGBa(clrr,clrg,clrb,clra); */ + + clr = ModulateColor(clr,clr2); + + var randx = Random(width+1)-width/2-1; + var px = randx*wdtcon/100; + var py = yoff*con/100; + + if(firemode) { + py -= px*px*100/width/wdtcon; + + xdir = randx*con/400 - px/3 + wind - GetXDir(pTarget,1)*3; + ydir = -Random(15+height*con/300) - 1 - GetYDir(pTarget,1)*3; + } + else { + xdir = -GetXDir(pTarget,1)*3; + ydir = -GetYDir(pTarget,1)*3; + if (!ydir) + ydir = -Random(13+height/4)-1; + ydir -= EffectVar(2,pTarget,iEffectNumber)/(size/3); + } + +// Log("%s %d %d %d %d %d %s:",particle, x+px, y+py, xdir, ydir, size, GetName(pTarget)); + + CreateParticle(particle,x+px,y+py, xdir, ydir, size, clr, pTarget, !!Random(2)); + } + if(EffectVar(0,pTarget,iEffectNumber) && EffectVar(0,pTarget,iEffectNumber) < iEffectTime) + return(-1); +} + +global func FxFireEffectEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber, int iDuration, int dwColor, bool bOverride) { + if(szNewEffectName S= "Fire" || szNewEffectName S= "FireEffect") + if(bOverride) + return(-2); + +} + +global func FxFireEffectAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer, int iDuration, int dwColor, bool bOverride) { + EffectVar(0,pTarget,iEffectNumber) = iDuration; + EffectVar(1,pTarget,iEffectNumber) = dwColor; + return(1); +} + +global func IsAlphaOnly(int iColor) { + return((GetRGBaValue(iColor,0) && GetRGBaValue(iColor,1) == 255 && GetRGBaValue(iColor,2) == 255 && GetRGBaValue(iColor,3) == 255) || !iColor); +} diff --git a/Hazard.c4d/Effects.c4d/Fire.c4d/Title.png b/Hazard.c4d/Effects.c4d/Fire.c4d/Title.png new file mode 100644 index 00000000..a00d53be Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Fire.c4d/Title.png differ diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/ActMap.txt b/Hazard.c4d/Effects.c4d/Light.c4d/ActMap.txt new file mode 100644 index 00000000..2288c918 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Attach +Procedure=ATTACH +Delay=0 +Facet=0,0,128,128 +AbortCall=AttachTargetLost \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/DefCore.txt b/Hazard.c4d/Effects.c4d/Light.c4d/DefCore.txt new file mode 100644 index 00000000..bc80b507 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=LIGH +Version=4,9,8,2 +Name=Light +Category=C4D_Vehicle|C4D_Foreground|C4D_MouseIgnore +Width=128 +Height=128 +Offset=-64,-64 +Vertices=1 +VertexCNAT=64 +Components=LIGH=1 +Picture=0,0,128,128 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 +NoStabilize=1 +BlitMode=1 +NoSell=1 +NoGet=1 diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/DescDE.txt b/Hazard.c4d/Effects.c4d/Light.c4d/DescDE.txt new file mode 100644 index 00000000..7f5eba3f --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/DescDE.txt @@ -0,0 +1 @@ +Advent, Advent, ein Lichtlein brennt. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/DescUS.txt b/Hazard.c4d/Effects.c4d/Light.c4d/DescUS.txt new file mode 100644 index 00000000..79b8cb0a --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/DescUS.txt @@ -0,0 +1 @@ +Shiny! \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Light.c4d/Graphics.png new file mode 100644 index 00000000..c79aad76 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Light.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/GraphicsHalf.png b/Hazard.c4d/Effects.c4d/Light.c4d/GraphicsHalf.png new file mode 100644 index 00000000..2872b742 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Light.c4d/GraphicsHalf.png differ diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/ActMap.txt b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/ActMap.txt new file mode 100644 index 00000000..517dbb51 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Attach +Procedure=ATTACH +Delay=0 +FacetBase=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DefCore.txt b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DefCore.txt new file mode 100644 index 00000000..051ab971 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=LGHC +Version=4,9,8,2 +Name=Light Cone +Category=C4D_Vehicle|C4D_Foreground|C4D_MouseIgnore +Width=128 +Height=128 +Offset=-64,-64 +Vertices=1 +VertexCNAT=64 +Components=LIGH=1 +Picture=0,0,128,128 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 +NoStabilize=1 +BlitMode=1 +NoSell=1 +NoGet=1 diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DescDE.txt b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DescDE.txt new file mode 100644 index 00000000..c00a4095 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DescDE.txt @@ -0,0 +1 @@ +Photonen. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DescUS.txt b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DescUS.txt new file mode 100644 index 00000000..f497b5cf --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/DescUS.txt @@ -0,0 +1 @@ +Photones. \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Graphics.png new file mode 100644 index 00000000..90f49908 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Names.txt new file mode 100644 index 00000000..6e383a7e --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lichtkegel +US:Light Cone \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Script.c b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Script.c new file mode 100644 index 00000000..6d344ef8 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/LightCone.c4d/Script.c @@ -0,0 +1,71 @@ +/*-- Lichtkegel --*/ + +#strict +#include LIGH + +// Variablen + +local iSizeX, iSizeY, iOffX, iOffY, iR, bDir; + +/* + iSizeX - X-Größe + iSizeY - Y-Größe + iOffX - Verschiebung der Grafik in X-Richtung + iOffY - Verschiebung der Grafik in Y-Richtung + //Alle Werte in 1000/Pixel + iR - Rotation + bDir - Wenn true wird ist das X-Offset mit der Dir gespiegelt +*/ + +// Licht updaten... verändert keine Werte sondern +// passt die Anzeige nur an +public func Update() { + ChangeSizeXY(iSizeX, iSizeY); + ChangeColor(iColor); +} + +public func ChangeSize(int iNewSize) { + ChangeSizeXY(iNewSize,iNewSize); +} + +public func ChangeSizeXY(int iNewSizeX, int iNewSizeY) { + + iSizeX = iNewSizeX; + iSizeY = iNewSizeY; + + Draw(); +} + +public func ChangeOffset(int iNewOffX, int iNewOffY, bool bNewDir) { + iOffX = iNewOffX; + iOffY = iNewOffY; + bDir = bNewDir; + Draw(); +} + +public func ChangeR(int iNewR) { + iR = -iNewR; + Draw(); +} + +public func Draw() { + var dir; + if(!bDir) dir = 1; + else dir = 1-GetDir(GetActionTarget())*2; + + var alphamod, sizemod; + CalcLight(alphamod, sizemod); + + var fsin, fcos, xoff, yoff; + fsin = Sin(iR, 1000); + fcos = Cos(iR, 1000); + xoff = 0; + yoff = +64; + + var width = iSizeX*sizemod/100, height = iSizeY*sizemod/100; + + SetObjDrawTransform( + +fcos*width/1000, +fsin*height/1000, (((1000-fcos)*xoff - fsin*yoff)*height)/1000+iOffX*1000*dir, + -fsin*width/1000, +fcos*height/1000, (((1000-fcos)*yoff + fsin*xoff - 64000)*height)/1000+iOffY*1000 + ); +} diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Light.c4d/Names.txt new file mode 100644 index 00000000..70dc39e3 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Licht +US:Light \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/Script.c b/Hazard.c4d/Effects.c4d/Light.c4d/Script.c new file mode 100644 index 00000000..9970bff5 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Light.c4d/Script.c @@ -0,0 +1,146 @@ +/*-- Licht --*/ + +#strict + +local iColor, bAmbience, iF; + +//Licht initialisieren, Parameter setzen, etc. +protected func Init(int iSize, int iColor, object pTarget, string cGraphics) { + if(bAmbience && !IsDark()) + Schedule("RemoveObject()",1,0,this()); +//Werte + if(!iSize) + iSize = GetCon(); + if(!pTarget) + pTarget = GetActionTarget(); + + SetOwner(GetController(pTarget)); + +//Setzen und so + SetAction("Attach",pTarget); + SetPosition(GetX(pTarget),GetY(pTarget)); + ChangeColor(iColor); + ChangeSize(iSize); + ChangeGraphics(cGraphics); +} + +//Wenn das Licht kein Ziel mehr hat -> weg damit. +protected func AttachTargetLost() { + RemoveObject(); +} + +//Licht ausschalten +public func TurnOff() { SetVisibility(VIS_None); } + +//Licht einschalten +public func TurnOn() { SetVisibility(VIS_All); } + +// größe des Lichts ändern +public func ChangeSize(int iNewSize) { + var alphamod, sizemod; + CalcLight(alphamod, sizemod); + + iF = iNewSize; + SetObjDrawTransform(iF*sizemod/10,0,0,0,iF*sizemod/10); +} + +// Licht updaten... verändert keine Werte sondern +// passt die Anzeige nur an +public func Update() { + ChangeSize(iF); + ChangeColor(iColor); +} + +//Farbe des Lichts ändern +public func ChangeColor(int iNewColor) { + + iColor = iNewColor; + + //Wenn keine dunkelheit ist + if(!IsDark()) { + //Hintergrundlichter ausblenden + if(bAmbience) + iNewColor = RGBa(255,255,255,255); + } + + var alphamod, sizemod; + CalcLight(alphamod, sizemod); + + var r,g,b,a; + SplitRGBaValue(iColor,r,g,b,a); + iNewColor = RGBa(r,g,b,Min(a+60+alphamod,255)); + + SetClrModulation(iNewColor); + + return(iNewColor); +} + +//Grafik ändern +public func ChangeGraphics(string cNewGraphics) { + SetGraphics(cNewGraphics, 0, GetID()); +} + +//festlegen, dass es ein Licht ist. +public func IsLight() { return(1); } +public func NoWarp() { return(true); } + +/*-- Globale Funktionen zur Lichterzeugung --*/ + +//Hilfsfunktion +global func CreateLight(id ID, int iSize, int iColor, object pTarget, string sGraphics) { + var light = CreateObject(ID, 0, 0, GetController(pTarget)); + light->Init(iSize, iColor, pTarget, sGraphics); + + return(light); +} + +//erzeugt ein Licht mit Größe und Farbe und hängt es an pTarget +global func AddLight(int iSize, int iColor, object pTarget) { + if(!pTarget) + if(!(pTarget = this())) + return(); + + return(CreateLight(LIGH, iSize, iColor, pTarget)); +} + + +global func AddLightHalf(int iSize, int iColor, object pTarget) { + if(!pTarget) + if(!(pTarget = this())) + return(); + + return(CreateLight(LIGH, iSize, iColor, pTarget, "Half")); +} + +global func AddLightCone(int iSize, int iColor, object pTarget) { + if(!pTarget) + if(!(pTarget = this())) + return(); + + return(CreateLight(LGHC, iSize, iColor, pTarget)); +} + +//Ambience-Light, Umgebungslicht, nicht sichtbar wenn keine Dunkelheit herrscht. +global func AddLightAmbience(int iSize, object pTarget, string cGraphics) { + if(!pTarget) + if(!(pTarget = this())) + return(); + + var light = CreateObject(LIGH,0,0,GetController(pTarget)); + light->LocalN("bAmbience") = true; + light->Init(iSize*5, RGBa(255,255,255,50), pTarget, cGraphics); + + return(light); +} + +//Lichtblitz! +global func AddLightFlash(int iSize, int iX, int iY, int iColor) { + var alphamod, sizemod; + CalcLight(alphamod, sizemod); + + var r,g,b,a; + SplitRGBaValue(iColor,r,g,b,a); + iColor = RGBa(r,g,b,Min(a+alphamod,255)); + + CreateParticle("LightFlash",iX,iY,0,0,iSize*5*sizemod/100,iColor); +} diff --git a/Hazard.c4d/Effects.c4d/Light.c4d/Title.png b/Hazard.c4d/Effects.c4d/Light.c4d/Title.png new file mode 100644 index 00000000..b25c1faf Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Light.c4d/Title.png differ diff --git a/Hazard.c4d/Effects.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Names.txt new file mode 100644 index 00000000..8b40bdbf --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Effekte +US:Effects diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienBlood.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienBlood.c4d/Graphics.png new file mode 100644 index 00000000..be314381 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienBlood.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienBlood.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienBlood.c4d/Particle.txt new file mode 100644 index 00000000..1e06df0e --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienBlood.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=AlienBlood +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=10 +Additive=0 +RByV=2 +Attach=1 diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienHive.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienHive.c4d/Graphics.png new file mode 100644 index 00000000..f11517de Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienHive.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienHive.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienHive.c4d/Particle.txt new file mode 100644 index 00000000..a4a1b72a --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienHive.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=AlienHive +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=0 +Additive=0 +RByV=2 diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienSplatter.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienSplatter.c4d/Graphics.png new file mode 100644 index 00000000..655c6560 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienSplatter.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienSplatter.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienSplatter.c4d/Particle.txt new file mode 100644 index 00000000..c2316086 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Alien.c4d/AlienSplatter.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=AlienSplatter +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=1 +Additive=0 +RByV=2 diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/AlienPlasma.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/AlienPlasma.c4d/Graphics.png new file mode 100644 index 00000000..2c70a837 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/AlienPlasma.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/AlienPlasma.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/AlienPlasma.c4d/Particle.txt new file mode 100644 index 00000000..2c12677f --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/AlienPlasma.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=AlienPlasma +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-5,-5 +Delay=1 +Repeats=1 +Reverse=1 +AlphaFade=1 +Additive=1 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Graphics.png new file mode 100644 index 00000000..90e265a1 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Names.txt new file mode 100644 index 00000000..86f4209a --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Patronenhülse +US:Bulletcasing diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Particle.txt new file mode 100644 index 00000000..e817345a --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Casing.c4d/Particle.txt @@ -0,0 +1,16 @@ +[Particle] +Name=BulletCasing +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +CollisionFn=BounceY +DrawFn=Std +Face=0,0,16,16,-8,-8 +Delay=0 +Repeats=1 +GravityAcc=120 +VertexCount=1 +VertexY=50 +AlphaFade=7 +Additive=0 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Graphics.png new file mode 100644 index 00000000..c7d14a79 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Names.txt new file mode 100644 index 00000000..0469cba6 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lichtblitz +US:Flash diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Particle.txt new file mode 100644 index 00000000..ae021304 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Flash.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=LightFlash +MaxCount=500 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,128,128,-64,-64 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=4 +Additive=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/FrSprk.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/FrSprk.c4d/Graphics.png new file mode 100644 index 00000000..9b8dd8ca Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/FrSprk.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/FrSprk.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/FrSprk.c4d/Particle.txt new file mode 100644 index 00000000..35a9117d --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/FrSprk.c4d/Particle.txt @@ -0,0 +1,17 @@ +[Particle] +Name=FrSprk +MaxCount=2500 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +CollisionFn=Stop +Face=0,0,36,36,-18,-18 +Reverse=1 +Delay=30 +Repeats=1 +VertexCount=1 +VertexY=1 +GravityAcc=0 +FadeOutLen=5 +AlphaFade=6 +Attach=1 diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Graphics.png new file mode 100644 index 00000000..469df144 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Names.txt new file mode 100644 index 00000000..cc014bcc --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fetzen +US:Frazzle diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Particle.txt new file mode 100644 index 00000000..ece7deed --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Frazzle.c4d/Particle.txt @@ -0,0 +1,16 @@ +[Particle] +Name=Frazzle +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +CollisionFn=Die +DrawFn=Std +Face=0,0,16,16,-8,-8 +Delay=0 +Repeats=1 +GravityAcc=100 +VertexCount=1 +VertexY=50 +AlphaFade=8 +Additive=1 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Graphics.png new file mode 100644 index 00000000..b162c54e Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Names.txt new file mode 100644 index 00000000..3041696c --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Glassplitter +US:Glas diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Particle.txt new file mode 100644 index 00000000..45b522ce --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Glas.c4d/Particle.txt @@ -0,0 +1,16 @@ +[Particle] +Name=Glas +MaxCount=200 +InitFn=StdInit +ExecFn=StdExec +CollisionFn=Die +DrawFn=Std +Face=0,0,16,16,-8,-8 +Delay=0 +Repeats=1 +GravityAcc=100 +VertexCount=1 +VertexY=50 +AlphaFade=4 +Additive=1 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Graphics.png new file mode 100644 index 00000000..f49231fc Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Names.txt new file mode 100644 index 00000000..c484132c --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Mündungsfeuer +US:Muzzle flash diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Particle.txt new file mode 100644 index 00000000..b03ed52e --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/MuzzleFlash.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=MuzzleFlash2 +MaxCount=200 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=1 +Repeats=1 +GravityAcc=0 +Additive=1 +RByV=2 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/Names.txt new file mode 100644 index 00000000..951d2afc --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleim +US:Slime diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Graphics.png new file mode 100644 index 00000000..63fed402 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Names.txt new file mode 100644 index 00000000..0abcd737 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleim +US:Slime \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Particle.txt new file mode 100644 index 00000000..d2f61eb1 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeFast.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=SlimeFast +MaxCount=400 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,25,25,-12,-12 +Delay=2 +Repeats=1 +VertexCount=1 +VertexY=50 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Graphics.png new file mode 100644 index 00000000..63fed402 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Names.txt new file mode 100644 index 00000000..0abcd737 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleim +US:Slime \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Particle.txt new file mode 100644 index 00000000..e4e64a53 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeGrav.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=SlimeGrav +MaxCount=600 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +CollisionFn=Stop +Face=0,0,25,25,-12,-12 +Delay=7 +Repeats=1 +VertexCount=1 +VertexY=50 +GravityAcc=75 +Additive=0 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Graphics.png new file mode 100644 index 00000000..63fed402 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Names.txt new file mode 100644 index 00000000..0abcd737 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleim +US:Slime \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Particle.txt new file mode 100644 index 00000000..5f4c0a97 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Slime.c4d/SlimeSlow.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=SlimeSlow +MaxCount=600 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,25,25,-12,-12 +Delay=5 +Repeats=1 +VertexCount=1 +VertexY=50 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Graphics.png new file mode 100644 index 00000000..a6ae5052 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Names.txt new file mode 100644 index 00000000..cfed2c90 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rauch +US:Smoke diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Particle.txt new file mode 100644 index 00000000..fb389a97 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Smoke2.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=Smoke2 +MaxCount=600 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=8 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Graphics.png new file mode 100644 index 00000000..b6b9ff79 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Names.txt new file mode 100644 index 00000000..260b29a7 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Glassplitter +US:Glass splinter \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Particle.txt new file mode 100644 index 00000000..4a332132 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/SplinterGlass.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=SplinterGlass +MaxCount=300 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +CollisionFn=Stop +Face=0,0,3,4,-2,-2 +Delay=0 +RByV=1 +GravityAcc=100 +VertexCount=1 +VertexY=50 +AlphaFade=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/Title.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/Title.txt new file mode 100644 index 00000000..4a30d835 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/Title.txt @@ -0,0 +1,2 @@ +DE:Partikel +US:Particles \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Graphics.png b/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Graphics.png new file mode 100644 index 00000000..8c694e1a Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Graphics.png differ diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Names.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Names.txt new file mode 100644 index 00000000..705e88d7 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rapidfire +US:Rapidfire \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Particle.txt b/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Particle.txt new file mode 100644 index 00000000..bea17627 --- /dev/null +++ b/Hazard.c4d/Effects.c4d/Particles.c4d/XSpark.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=XSpark +MaxCount=500 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,32,32,-16,-16 +Repeats=3 +Delay=1 +FadeOutLen=3 +FadeOutDelay=2 +AlphaFade=3 +Additive=1 \ No newline at end of file diff --git a/Hazard.c4d/Effects.c4d/Wind.wav b/Hazard.c4d/Effects.c4d/Wind.wav new file mode 100644 index 00000000..f9c1f4a2 Binary files /dev/null and b/Hazard.c4d/Effects.c4d/Wind.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Berserker.c4d/ActMap.txt new file mode 100644 index 00000000..cf14ebd7 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Berserker.c4d/ActMap.txt @@ -0,0 +1,120 @@ +[Action] +Name=Walk +Procedure=WALK +Directions=2 +FlipDir=1 +Facet=0,0,128,58,0,0 +Length=12 +Delay=40 +NextAction=Walk +InLiquidAction=Swim + +[Action] +Name=Swim +Procedure=SWIM +Directions=2 +FlipDir=1 +Facet=0,0,128,58,0,0 +Length=12 +Delay=40 +EndCall=CheckLiquid +NextAction=Swim + +[Action] +Name=Attack1 +Procedure=NONE +Attach=8 +Directions=2 +FlipDir=1 +Facet=0,63,128,90,0,-32 +Length=12 +Delay=1 +NextAction=Walk +EndCall=EndAttack +InLiquidAction=Swim + +[Action] +Name=Attack2 +Procedure=NONE +Attach=8 +Directions=2 +FlipDir=1 +Facet=0,172,128,77,0,-19 +Length=12 +Delay=1 +NextAction=Walk +EndCall=EndAttack +InLiquidAction=Swim + +[Action] +Name=Attack3 +Procedure=NONE +Attach=8 +Directions=2 +FlipDir=1 +Facet=0,276,128,70,0,-12 +Length=12 +Delay=1 +NextAction=Walk +EndCall=EndAttack +InLiquidAction=Swim + +[Action] +Name=KneelDown +Procedure=KNEEL +Directions=2 +FlipDir=1 +Facet=0,382,128,60,0,-2 +Length=12 +Delay=2 +NextAction=Walk +InLiquidAction=Swim +ObjectDisabled=1 + +[Action] +Name=Death +Procedure=NONE +Directions=2 +FlipDir=1 +Facet=0,478,128,60,0,-2 +Length=12 +Delay=5 +NextAction=Hold +ObjectDisabled=1 +NoOtherAction=1 + +[Action] +Name=Roar +Procedure=NONE +Attach=8 +Directions=2 +FlipDir=1 +Facet=0,548,128,86,0,-28 +Length=12 +Delay=7 +NextAction=ReRoar +InLiquidAction=Swim + +[Action] +Name=ReRoar +Procedure=NONE +Attach=8 +Directions=2 +FlipDir=1 +Facet=0,548,128,86,0,-28 +Length=6 +Delay=7 +Reverse=1 +NextAction=Walk +InLiquidAction=Swim + +[Action] +Name=Jump +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Facet=0,666,128,64,0,-6 +Length=12 +Delay=2 +NextAction=Hold +InLiquidAction=Swim \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/BerserkerRoar.wav b/Hazard.c4d/Enemies.c4d/Berserker.c4d/BerserkerRoar.wav new file mode 100644 index 00000000..dcb2b21c Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Berserker.c4d/BerserkerRoar.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Berserker.c4d/DefCore.txt new file mode 100644 index 00000000..f6007746 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Berserker.c4d/DefCore.txt @@ -0,0 +1,35 @@ +[DefCore] +id=ALN5 +Version=4,9,8,2 +Name=Alien5 +Category=C4D_Living|C4D_SelectAnimal +MaxUserSelect=1 +Timer=5 +TimerCall=Activity +Width=128 +Height=58 +Offset=-64,-29 +Vertices=4 +VertexX=0,-20,20 +VertexY=26,0,0,-25 +VertexCNAT=8,1,2,4 +VertexFriction=100,100,100,100 +Value=50 +Mass=300 +Picture=928,276,80,70 +ContactIncinerate=20 +Growth=15 +Float=1 +BorderBound=1 +StretchGrowth=1 +NoBurnDecay=1 +IncompleteActivity=1 +Oversize=1 + +[Physical] +Energy=350000 +Breath=500000 +Walk=80000 +Jump=50000 +Swim=50000 +CorrosionResist=1 diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Berserker.c4d/DescDE.txt new file mode 100644 index 00000000..d21a94cb --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Berserker.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Berserker sind die absoluten Krieger der Alienrasse. Sie zerreißen alles was sich ihnen den Weg stellt mit ihren riesigen Klauen. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Berserker.c4d/DescUS.txt new file mode 100644 index 00000000..eb8e6722 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Berserker.c4d/DescUS.txt @@ -0,0 +1 @@ +ALIENZZZZZzzzzzzzzzzzzzzzzzzzzzzz.......... \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Berserker.c4d/Graphics.png new file mode 100644 index 00000000..4c2bc12d Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Berserker.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Berserker.c4d/Names.txt new file mode 100644 index 00000000..1241edcd --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Berserker.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Berserker +US:Berserk \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Berserker.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Berserker.c4d/Script.c new file mode 100644 index 00000000..a5a5df96 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Berserker.c4d/Script.c @@ -0,0 +1,220 @@ +/*--Berserker --*/ + +#strict + +/* Initialisierung */ + +protected func Initialize() +{ + SetAction("Walk"); + SetDir(Random(2)); + // Gruppen-KI + AddEffect("GroupKI", this(), 1, 0, this()); + // Schadenseffekt + AddEffect("DmgCheck",this(),1,0); +} + +/* Aktivität */ + +protected func Activity() +{ + // Tot? + if(!GetAlive()) return(); + // Gerade verhindert? + if(!Ready()) return(); + + // Rumangreifen + if(ReadyToAttack()) { + // Nur wenn möglich + for(var prey in FindTargets(this, 200)) { + Attack(prey); + return(); + } + } + + // Kommando? + if(GetCommand()) return(); + + // Brüllen! + if(!Random(500)) return(Roar()); + + // Rumlaufen + if(GetAction() eq "Walk") + { + if(Random(5)) return(); + if(Random(2)) SetComDir(COMD_Left()); + else SetComDir(COMD_Right()); + } +} + +public func Ready() // Wenn das Alien gerade nichts tun kann +{ + if(GetAction() eq "Jump") return(); + if(GetAction() eq "KneelDown") return(); + if(GetAction() eq "Death") return(); + + return(1); +} + +/* Aktionen */ + +// Unglaublich schrecklicher Schrei! +public func Roar() +{ + if(GetAction() eq "Roar") return(); + SetAction("Roar"); + Sound("BerserkerRoar"); +} + +// Angreifen oder Hinlaufen +public func Attack(object pPrey, bool noKI) +{ + // Gruppe benachrichtigen + if(!noKI) + GroupAttack(pPrey); + // Geth nicht?! + if(!ReadyToAttack()) return(); + // Nah genug zum krassen Angriff? + if(ObjectDistance(pPrey) <= 64) + // RAAR! + return(ClawAttack(pPrey)); + // Hinrennen + SetCommand(this(), "MoveTo", pPrey); +} + +// Klauenangriff +private func ClawAttack(object pPrey) +{ + // Puh, jetzt wirds kompliziert. Richtige Attackanimation auswählen :D + + // Ist oben Platz? + if(!GBackSolid(0,-60)) + // Wir haben genug Platz für alle Angriffe. Random! + SetAction(Format("Attack%d",Random(3)+1)); // *hax* + + // Genug Platz für Angriff von der Seite? + else if(!GBackSolid(0,-45)) + // Attack! :D + SetAction(Format("Attack%d",Random(2)+2)); + + // Okay, bleibt nur noch Beißen. >:( + else + SetAction("Attack3"); + + // Geräusch + Sound("BerserkerAttack"); + Sound("JumperBite"); +} + +// Beißen +private func EndAttack() +{ + // Feind suchen + var pPrey; + for(pPrey in FindTargets(this,64)) { break; } + // Kein Feind + if(!pPrey) return(); + // Hauen!!1 + DoDmg(35+Random(50)*GetCon()/100, DMG_Melee, pPrey); + Sound("BerserkerStab"); + // Hacksperre, damit man nicht dauerhackt + AddEffect("NoAttack", this(), 99, 30, this()); +} + +public func Birth() +{ + // Miniwinzig! + SetCon(50); +} + +protected func Death(int iKilledBy) +{ + // Sterben + SetAction("Death"); + Sparks(20, RGBa(25, 255, 25, 20)); + // Tönen! + Sound("BerserkerDeath"); + GameCallEx("OnAlienDeath", this, iKilledBy); +} + +func CheckLiquid() +{ + if(!GBackLiquid(0,-3)) + return(); + if(GetMaterial(0,-3) == Material("Water")) + { + ExtractMaterialAmount(0,0, Material("Water"), GetMass()); + CastPXS("Acid",GetMass(),GetMass()); + Death(-1); + FadeOut(); + } +} + +/* Gruppen-KI */ + +protected func GroupAttack(object pPrey) +{ + // Andere Aliens benachrichtigen + for(var alien in FindObjects(Find_Distance(100), Find_Func("IsAlien"), Find_Exclude(this()))) + if(!CheckEnemy(alien)) + alien->~Attack(pPrey, true); +} + +/* Schaden */ + +public func OnDmg(int iDmg, int iType) { + //Melee + if(iType == DMG_Melee) + return(20); + //Projectile + if(iType == DMG_Projectile) + return(0); + //Flame + if(iType == DMG_Fire) + return(-50); + //Explosion + if(iType == DMG_Explosion) + return(-10); + //Energy + if(iType == DMG_Energy) + return(50); + //Bio + if(iType == DMG_Bio) { + return(90); + } +} + +public func OnHit(int iDmg, int iType, object pFrom) { + if(iType == DMG_Fire) + AddFireEffect(this(),(5*iDmg*(105))/100); +} + +/* Status */ + +public func ReadyToAttack() +{ + if(GetEffect("NoAttack", this())) return(); + + return(GetAction() eq "Walk"); +} + +public func IsAlien() { return(GetAction() ne "Death"); } +public func IsBulletTarget() { return(true); } + +/* Effekte */ + +public func FxGroupKIDamage(object target, int no, int iDmg, int iCause) +{ + // Angeschossen? + if(iCause == 32 || iCause == 33 || iCause == 35) + // Feinde in weiter Ferne suchen + for(var prey in FindTargets(this,400)) + { + Attack(prey); + return(iDmg); + } + return(iDmg); +} + +public func IgnoreFriendlyFire() { return(1); } +public func IsThreat() { return(true); } diff --git a/Hazard.c4d/Enemies.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/DescDE.txt new file mode 100644 index 00000000..59a60226 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/DescDE.txt @@ -0,0 +1 @@ +Die mächtigen Feinde aus den tiefen des All, die so manche Zivilisation zu vernichten ersuchen. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/DescUS.txt new file mode 100644 index 00000000..afa502b6 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/DescUS.txt @@ -0,0 +1 @@ +The mighty enemies from the depths of the universe. Who knows how many civilizations fell before them? diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Fish.c4d/ActMap.txt new file mode 100644 index 00000000..4a217bc7 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Fish.c4d/ActMap.txt @@ -0,0 +1,42 @@ +[Action] +Name=Walk +Procedure=WALK +Directions=2 +FlipDir=1 +Length=10 +Delay=1 +Facet=0,0,16,12 +NextAction=Walk +InLiquidAction=Swim + +[Action] +Name=Swim +Procedure=SWIM +Directions=2 +FlipDir=1 +Length=20 +Delay=1 +Facet=0,12,16,12 +NextAction=Swim +TurnAction=Turn + +[Action] +Name=Turn +Procedure=SWIM +Directions=2 +FlipDir=1 +Length=15 +Delay=3 +Facet=0,36,16,12 +NextAction=Swim + +[Action] +Name=Jump +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Length=15 +Delay=1 +Facet=0,24,16,12 +NextAction=Hold +InLiquidAction=Swim \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Fish.c4d/DefCore.txt new file mode 100644 index 00000000..e3ce6cd1 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Fish.c4d/DefCore.txt @@ -0,0 +1,40 @@ +[DefCore] +id=ALN6 +Version=4,9,8,2 +Name=Aquacit +Category=C4D_Living|C4D_SelectAnimal|C4D_TradeLiving +MaxUserSelect=20 +TimerCall=Activity +ContactCalls=1 +Width=16 +Height=12 +Offset=-8,-6 +Vertices=4 +VertexX=-4,0,4 +VertexY=0,-3,0,4 +VertexCNAT=1,4,2,8 +VertexFriction=100,100,100,100 +Value=8 +Mass=15 +Components=MEAT=1;FAT1=1;FSHB=1 +Picture=320,0,64,64 +Collection=-8,-6,16,12 +Placement=1 +Growth=15 +Float=1 +BorderBound=5 +StretchGrowth=1 +NoBurnDecay=1 +IncompleteActivity=1 +Oversize=1 +VehicleControl=2 +Pathfinder=1 +ClosedContainer=2 + +[Physical] +Energy=30000 +Breath=100000 +Walk=30000 +Jump=30000 +Swim=100000 +BreatheWater=1 diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Fish.c4d/DescDE.txt new file mode 100644 index 00000000..e214bb6d --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Fish.c4d/DescDE.txt @@ -0,0 +1 @@ +Adaption der Aliens an flüssige Umgebung. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Fish.c4d/DescUS.txt new file mode 100644 index 00000000..ded6ac33 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Fish.c4d/DescUS.txt @@ -0,0 +1 @@ +Adaption of the aliens to liquids. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Fish.c4d/Graphics.png new file mode 100644 index 00000000..2af78559 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Fish.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Fish.c4d/Names.txt new file mode 100644 index 00000000..9b65326d --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Fish.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Aquacit +US:Aquacit diff --git a/Hazard.c4d/Enemies.c4d/Fish.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Fish.c4d/Script.c new file mode 100644 index 00000000..63f2f479 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Fish.c4d/Script.c @@ -0,0 +1,252 @@ +/*-- Aquacit --*/ + +#strict + +local prey; + +func IsAlien() { return(true); } +func IsBulletTarget() { return(true); } + +func IsRecovering() { return(GetEffect("Recovering",this())); } +func IsSwimming() { return(GetAction() S= "Swim" || GetAction() S= "Turn"); } +func IsAttacking() { return(GetEffect("KameHameHa",this())); } + +/* Initialisierung */ + +protected func Initialize() +{ + SetAction("Swim"); + // Schadenseffekt + AddEffect("DmgCheck",this(),1,0); +} + +/* TimerCall mit KI-Steuerung */ + +private func Activity() +{ + if (GetAction() S= "Walk") WalkDir(); + + if(prey) + return(Attack(prey)); + else { + for(var p in FindTargets(this,150)) { + prey = p; + break; + } + + } + + + // Schwimmverhalten + if (!GBackLiquid(0, -8) && GetAction() ne "Walk") return(SetComDir(COMD_Down())); + if (Random(2)) return(1); + if (GetAction()ne"Swim") return(1); + if (!Random(5)) SetComDir(COMD_Up()); + + // Umdrehen + if (Random(2)) return(TurnRight()); + return(TurnLeft()); +} + +private func WalkDir() +{ + SetComDir(COMD_Left()); + if (Random(2)) SetComDir(COMD_Right()); + return(1); +} + +/* Kontakte */ + +protected func ContactLeft() +{ + return(TurnRight()); +} + +protected func ContactRight() +{ + return(TurnLeft()); +} + +protected func ContactTop() +{ + SetComDir(COMD_Down()); + return(1); +} + +protected func ContactBottom() +{ + if (GetAction() ne "Walk") SetComDir(COMD_Up()); + if (Random(10)) SetComDir(COMD_Right()); + if (Random(10)) SetComDir(COMD_Left()); + return(1); +} + +/* Aktionen */ + +func Attack(object target) +{ + if(IsAttacking()) + return(); + + if(target != prey) + prey = target; + + if(ObjectDistance(target) > 40 && ObjectDistance(target) < 100) + if(KameHameHa()) + return(); + + if(ObjectDistance(target) < 10) + Bite(); + + if(!GetCommand()) + SetCommand(this(),"Follow",target); +} + +func KameHameHa() +{ + // Attacke erst ausgeführt + if(IsRecovering()) + return(); + // Schwimmt nicht! + if(!IsSwimming()) + return(); + // Sicht frei? + if(!PathFree(GetX(),GetY(),GetX(prey),GetY(prey))) + return(); + // Kein Wasser am Ende? + if(!GBackLiquid(prey->GetX()-GetX(), prey->GetY()-GetY())) + return(); + + AddEffect("KameHameHa",this(),150,1,this(),ALN6); + + return(true); +} + +func FxKameHameHaStart(object target, int num, bool temp) +{ + if(temp) + return(); +} + +func FxKameHameHaTimer(object target, int num) +{ + var angle = Angle(GetX(),GetY(),prey->GetX(),prey->GetY()); + + // Kamehameha! + SetGraphics(0,0,GetID(),1,6); + SetObjectBlitMode(1,0,1); + + var dist,x,y; + for(dist = 0; dist < 100; dist++) + { + x = Sin(angle, dist); + y = -Cos(angle,dist); + if(GBackSolid(x, y)) + break; + } + + // größenversetzte Partikellinie! + var step = Max(dist/20,1); + for(var i; i < 20; i++) + { + CreateParticle("PSpark",Sin(angle,step*i),-Cos(angle,step*i),0,0,i*4+20,RGB(200,200,255)); + } + + SetPosition(GetX()+x, GetY()+y); + + for(var victim in FindTargets(this,150)) + target->DoDmg(10,DMG_Energy,victim); + + return(-1); +} + +func FxKameHameHaStop(object target, int num, bool temp) +{ + if(temp) + return(); + + Recover(200); + AddEffect("UnGlow",this(),111,1,this(),ALN6); +} + +func FxUnGlowTimer(object obj, int num) +{ + SetClrModulation(RGBa(255,255,255,EffectVar(0,obj,num)),0,1); + EffectVar(0,obj,num) += 10; + if(EffectVar(0,obj,num) > 255) + { + SetGraphics(0,0,0,1); + return(-1); + } +} + +func Bite() +{ + // Nur im Wasser + if(!IsSwimming()) + return(); + + Sound("JumperBite"); + DoDmg(4, DMG_Melee,prey); + DoDmg(4, DMG_Bio,prey); + Recover(30); +} + +private func TurnRight() +{ + if (Stuck() || (GetAction() ne "Walk" && GetAction() ne "Swim")) return(); + if (GetXDir() < 0) SetXDir(0); + SetDir(DIR_Right()); + SetComDir(COMD_Right()); + return(1); +} + +private func TurnLeft() +{ + if (Stuck() || (GetAction() ne "Walk" && GetAction() ne "Swim")) return(); + if (GetXDir() > 0) SetXDir(0); + SetDir(DIR_Left()); + SetComDir(COMD_Left()); + return(1); +} + +protected func Death(int iKilledBy) +{ + //Splooortsch + Sparks(10, RGBa(25, 155, 185, 20)); + GameCallEx("OnAlienDeath", this, iKilledBy); + RemoveObject(); +} + +func Recover(int time) +{ + AddEffect("Recovering",this(),1,time); +} + +/* Schaden */ + +public func OnDmg(int iDmg, int iType) { + //Melee + if(iType == DMG_Melee) + return(0); + //Projectile + if(iType == DMG_Projectile) + return(10); + //Flame + if(iType == DMG_Fire) { + return(-100); + } + //Explosion + if(iType == DMG_Explosion) + return(-50); + //Energy + if(iType == DMG_Energy) + return(90); + //Bio + if(iType == DMG_Bio) { + return(80); + } +} + +public func IgnoreFriendlyFire() { return(1); } +public func IsThreat() { return(true); } \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/ActMap.txt new file mode 100644 index 00000000..97c96fc3 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/ActMap.txt @@ -0,0 +1,23 @@ +[Action] +Name=Bubble +Procedure=FLOAT +Facet=0,0,40,40 +Delay=0 +Length=7 +NextAction=Hold + +[Action] +Name=Alien +Procedure=FLOAT +Facet=280,0,40,40 +Delay=0 +Length=1 +NextAction=Hold + +[Action] +Name=Vein +Procedure=FLOAT +Facet=0,40,140,40,-50,0 +Delay=0 +Length=1 +NextAction=Hold diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/AlienEggBreak1.wav b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/AlienEggBreak1.wav new file mode 100644 index 00000000..f33a4de5 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/AlienEggBreak1.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/AlienEggBreak2.wav b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/AlienEggBreak2.wav new file mode 100644 index 00000000..f5124d35 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/AlienEggBreak2.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/DefCore.txt new file mode 100644 index 00000000..25b4100d --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/DefCore.txt @@ -0,0 +1,14 @@ +[DefCore] +id=HBBL +Version=4,9,8,2 +Name=Bubble +Category=C4D_Vehicle +Width=40 +Height=40 +Value=4 +Offset=-20,-20 +Rotate=1 +TimerCall=BubbleBobble +Timer=1 +Oversize=1 +StretchGrowth=1 \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Graphics.png new file mode 100644 index 00000000..c227c341 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Names.txt new file mode 100644 index 00000000..2718fff7 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Blase +US:Bubble \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Script.c new file mode 100644 index 00000000..9ed5d80f --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/Bubble.c4d/Script.c @@ -0,0 +1,207 @@ +/*-- GubblBlubbl --*/ + +#strict + +local pd; +local idAlien; +local hive; +local myalien; +local li, a; +local vein, hasvein; + +public func MaxDamage() { return(25); } + +public func IsAlien() { return(true); } +public func IsBulletTarget() { return(true); } +public func NoWarp() { return(true); } + +public func GetAlienID() { return(idAlien); } +public func GetMyHive() { return(hive); } +public func HasVein() { return(hasvein); } +public func GetVeinTarget() { return(vein); } + +public func Hatch() +{ + if(!idAlien) return(); + + var alien = CreateObject(idAlien, 0, 0, GetOwner()); + if(hive) hive->AddAlien(alien); + + // Aufbrechen + Sound("AlienEggBreak*"); + DoDamage(100); +} + +// Was werd ich wohl mal werden, wenn ich groß bin? +public func Set(id idA, object by) +{ + idAlien = idA; + hive = by; + myalien = 0; + + // machen wir mal ein kleines Ding da rein + SetGraphics(0,0,HBBL,1,GFXOV_MODE_Action,"Alien"); + SetClrModulation(RGBa(255,255,255,200),0,1); + SetObjDrawTransform(myalien,0,0,0,myalien,0,0,1); +} + +public func SetVeinTo(object to) { + + // wir ham schon... + if(vein) return(); + if(to->GetVeinTarget() == this()) return(); + + var distance = ObjectDistance(to); + + // zu nah + if(distance < 50) return(); + + vein = to; + hasvein = true; + + SetGraphics(0,0,HBBL,2,GFXOV_MODE_Action,"Vein"); + SetClrModulation(RGBa(li,li,li,30),0,2); + + ShowVein(); +} + +public func RemoveVein() { + vein = 0; + hasvein = false; + SetGraphics(0,0,0,2); +} + +private func ShowVein(int widthMod) { + + if(!vein) return(); + if(!widthMod) widthMod = 1000; + + var angle = Angle(GetX(),GetY(),GetX(vein),GetY(vein))+90; + var distance = ObjectDistance(vein); + + var w = 1000*distance/140; + var l = widthMod; + + var fsin = -Sin(angle, 1000), fcos = Cos(angle, 1000); + + var xoff = -distance/2; + var yoff = 0; + + var width = +fcos*w/1000, height = +fcos*l/1000; + var xskew = +fsin*l/1000, yskew = -fsin*w/1000; + + var xadjust = +fcos*xoff + fsin*yoff; + var yadjust = -fsin*xoff + fcos*yoff; + + // set matrix values + SetObjDrawTransform ( + width, xskew, xadjust, + yskew, height, yadjust, + 0, 2 + ); +} + +protected func Initialize() +{ + pd = Random(90); + DoCon(RandomX(0,25)); + + // Wir sehen klasse aus! + SetAction("Bubble"); + SetPhase(Random(7)); + + // vorne oder hinten + li = 200; + var alpha = 0; + var size = RandomX(50,80); + var front = 0; + + if(Chance(60)) { + SetCategory(GetCategory() | C4D_Foreground); + li = 255; + alpha += 60; + front = true; + + } + + // ein bischen Farbmodulation + a = 40+alpha/2; + + SetClrModulation(RGBa(li,li,li,a)); + + // Aleinnest-hintergrund + var color = RGBa(li,li,li,alpha); + AlienHive(size, RandomX(-5,5), RandomX(-5,5), color,this(), front); + +} + +protected func BubbleBobble() { + + // Effekte + + var t = GetActTime()*20; + + var pulse = Abs(Pulse(t)); + + var wdt = 1000+pulse/7; + var hgt = 1000+Abs(Pulse(t+pd))/7; + + SetObjDrawTransform(wdt,0,0,0,hgt,0,this(),0); + + var lo = BoundBy(li-myalien/8,50,255); + + SetClrModulation(RGBa(lo,lo,lo,a)); + + // Eier Bayer + if(idAlien) { + myalien += RandomX(1,3); + + if(myalien >= 1200) { + Hatch(); + } + SetObjDrawTransform(myalien*wdt/1000,0,0,0,myalien*wdt/1000,0,0,1); + SetClrModulation(RGBa(255,255,255,200-myalien/8),0,1); + } + + // Ader Makaber! + if(hasvein) { + if(!vein) RemoveVein(); + else { + ShowVein(800+Pulse(3*t/2)/20); + } + } +} + +global func Pulse(int pos) { + var pulse = Sin(3*pos/5,1000); + var fire = 1000-Abs(Sin(pos/7+90,1000)); + return( (pulse * fire ) / 1000); +} + +// Aua! +public func Damage( int iChange) { + if(GetDamage() > MaxDamage()) { + // Effekt + AlienSplatter(60*GetCon()/100); + AlienBlood(60); + + GameCallEx("OnAlienDeath", this, -1); + RemoveObject(); + } +} + +public func OnDmg(int iDmg, int iType) +{ + //Melee + if(iType == DMG_Melee) + return(50); + if(iType == DMG_Bio) //Bioresistent. + return(90); + if(iType == DMG_Energy) //fast Energieresistent + return(50); + if(iType == DMG_Fire) + return(-50); +} + +public func IgnoreFriendlyFire() { return(1); } +public func IsThreat() { return(true); } \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/DefCore.txt new file mode 100644 index 00000000..abb4c7f9 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=HCON +Version=4,9,8,2 +Name=Hive controller +Category=C4D_StaticBack +TimerCall=Activitiy +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,1,1 diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/DescDE.txt new file mode 100644 index 00000000..a7b8d784 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/DescDE.txt @@ -0,0 +1 @@ +Steuert alle Nestfunktionen. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/DescUS.txt new file mode 100644 index 00000000..a42a696d --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/DescUS.txt @@ -0,0 +1 @@ +Controls all the hive functionality. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Hive.c4d/Graphics.png new file mode 100644 index 00000000..ecfe8212 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Hive.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Hive.c4d/Names.txt new file mode 100644 index 00000000..b9e5fbc1 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Nest +US:Hive diff --git a/Hazard.c4d/Enemies.c4d/Hive.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Hive.c4d/Script.c new file mode 100644 index 00000000..d3aafdea --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Hive.c4d/Script.c @@ -0,0 +1,340 @@ +/* Nest-Steuerung */ + +#strict + +public func NoWarp() { return(true); } + +// IDs +static const BubbleID = HBBL; // Blasen-ID +// Eier +static const EggMCount = 10; // Maximale Anzahl Eier + +// Ausbreitung +local HiveMSize; // Maximale Nestausbreitung (Pixel) +local BubbMSize; // Maximale Nestausbreitung (Blasen) +local BubbMHeight; // Maximale Höhe einer Blase über dem Boden + +local seekR; // interne Variable für die Bubble-Platzierung + +local Eggs; // Meine Eier! +local Aliens; // Die Aliens die von uns kommen! +local AlienChance; // Die Chancen der einzelnen Aliens, dass sie erstellt werden +local prodAliens; // Herstellbare Aliens +local AlienMax; // Max Aliens + +local bubbleDelay; + +// Setzbare Variablen +local NestSize; // Die Größe des Nests +local SpreadRate; // Ausbreitungsgeschwindigkeit der Bubbles +local Fertility; // Fruchtbarkeit: wie schnell Eier schlüpfen (0 bis 100) +local BubbDist; // Minimale Distanz zwischen zwei Bubbles + +local lastcount; + +/* Interface */ + +public func Init(int size, int spread, int fertility, int bubbdist) +{ + SetSpreadRate(spread); + SetFertility(fertility); + SetSize(size); + SetMinBubbleDistance(bubbdist); +} + +public func SetSize(int size) +{ + + NestSize = size; + HiveMSize = (200*NestSize)/100; // Maximale Nestausbreitung (Pixel) + BubbMSize = (20*NestSize*NestSize)/8000; // Maximale Nestausbreitung (Blasen) + BubbMHeight = (80*NestSize)/100; // Maximale Höhe einer Blase über dem Boden +} + +public func SetSpreadRate(int spreadrate) // 0 bis 100 +{ + SpreadRate = BoundBy(spreadrate,0,100); +} + +public func SetFertility(int fertility) // 0 bis 100 +{ + Fertility = BoundBy(fertility,0,100); +} + +public func SetMinBubbleDistance(int dist) { + BubbDist = dist; +} + +public func GetSize() { return(NestSize); } +public func GetSpreadRate() { return(SpreadRate); } +public func GetFertility() { return(Fertility); } +public func GetMinBubbleDistance() { return(BubbDist); } + +/* Initialisierung */ + +protected func Initialize() +{ + // $Depp hat uns falsch platziert! *sterb* + if(GBackSolid()) return(RemoveObject()); + + // auf den Boden der Tatsachen bringen + var i; + while(!GBackSolid(0,i)) + i++; + + SetPosition(GetX(),GetY()+i-20); + + // Objekt sets + Aliens = CreateObject(L_OS,0,0,-1); // unsere Aliens + Eggs = CreateObject(L_OS,0,0,-1); // unsere Eier + + // Standardparameter + Init(80+RandomX(25), 90, 30, 30); + DefaultTactic(); + + // Debugzeugs + DebugLog("Nest-Info:","Hive",); + DebugLog(" Position: %d, %d","Hive", GetX(), GetY()); + DebugLog(" Größe: %d","Hive", NestSize); + DebugLog(" Aliens:","Hive", CountHiveAliens()); + + // Ich bin das Nest, dein Gott! + PlaceBubble(); +} + + +/* Wachstum */ + +protected func Activitiy() +{ + + var count = CountHiveParts(BubbleID); + // Oh mein Gott! Sie haben das Nest getötet! Ihr Wipfe! + if(!count) return(Die()); + + // Wuuu!< + //if(!Random(100)) + // AlienFog(RandomX(20,200), RandomX(-100,100), RandomX(-10,10)); + + // Schleim + if(Chance(GetSpreadRate())) + if(count > BubbMSize/4) + if(CountHiveVeins() <= BubbMSize/4) + PlaceVein(); + + // Eier + if(Chance(GetFertility())) + if(count > BubbMSize/4) + { + if(Eggs->GetItemCount() <= EggMCount) + PlaceEgg(); + } + + // Wir suchen nicht alles auf einmal ab, zu viel Rechenleistung! + + // jede Sekunde runterzählen + if(bubbleDelay) bubbleDelay--; + + // Blasen zählen, schauen ob genug da + if(count <= BubbMSize && bubbleDelay <= 0) + { + + // etwas wurde weggeschossen... wieder zurückziehen + if(lastcount > count) { + seekR = 0; + } + + // Erstmal den Suchradius hochzählen + seekR += RandomX(6,10); + // Zu groß? + if(seekR > HiveMSize) seekR = 0; + // Einmal rundherum suchen + for(var i = Random(360),x,y, j = i + 360 ; i < j ; i += RandomX(10,20)) + { + // Ohne meine Koordinaten sage ich nichts! + x = Sin(i, seekR); + y = Cos(i, seekR); + // Hui, keine da! Wie nachlässig. Na ja. Erstmal schauen, ob der Ort auch in Ordnung ist D:! + if(!GoodPlace2Bubble(x,y)) + continue; + // Scheint alles gut zu sein. Warum warten wir noch? + PlaceBubble(x,y); + // Ok. Hier brechen wir ab, damit das Nest nicht alles auf einmal da ist :o! + seekR -= 10; + // und ein bischen Delay + var plusDelay = (100-GetSpreadRate()); + bubbleDelay = RandomX(1,4)+plusDelay*plusDelay/100; + break; + + // Zur Übersicht wie groß das Delay für neue Bubbles ist bei bestimmter SpreadRate ist... (etwa) + //100 - 5s + //80 - 9s + //60 - 21s + //40 - 41s + //20 - 69s + //10 - 86s + //0 - 1m 45s + } + } + + lastcount = count; +} + +/* Tod */ + +public func Die() // Das Nest stirbt :[ +{ + RemoveObject(); +} + +/* Hilfsfunktionen */ + +private func AddAlien(object alien) +{ + Aliens->AddItem(alien); +} + +// Es begab sich aber zu der Zeit, dass ein Gebot von dem Steuerungsobjekt ausging, dass alles Nest geschätzt würde +private func CountHiveParts(id idC) +{ + return(ObjectCount2(Find_ID(idC), Find_Distance(HiveMSize), Find_Owner(GetOwner()))); +} + +private func CountHiveVeins() { + return(ObjectCount2(Find_ID(HBBL), Find_Distance(HiveMSize), Find_Owner(GetOwner()), Find_Func("HasVein"))); +} + +private func CountHiveAliens(id idAlien) { + return(Aliens->GetItemCount(idAlien)); +} + +// Heute ist ein guter Tag zum Sterben..äh..dies ist ein guter Ort für eine Blase! +private func GoodPlace2Bubble(int iX, int iY) +{ + // Komisch in der Wand drin? + if(GBackSolid(iX, iY)) return(false); + // Viel zu hoch? + if(!GroundOK(iX, iY)) return(false); + // Schauen, ob Blase vorhanden + if(FindObject2(Find_Distance(GetMinBubbleDistance(),iX, iY), Find_ID(BubbleID))) return(false); + // Wah?! + if(!PathFree(GetX(),GetY(), GetX()+iX,GetY()+iY)) return(false); + // Noch mehr checken? + return(true); // Nö! +} + +// Das Spice muss fließen! +private func PlaceBubble(int iX, int iY) +{ + CreateObject(BubbleID, iX, iY + GetDefHeight(BubbleID)/2, GetOwner()); + // Blasen platzen ab und an auch + // -> machen die blasen selber + //if(!Random(3)) + // ScheduleCall(bubble, "Destruction", RandomX(500,1000)); +} + +// Plaziert tolles schleimiges Zeugs. +private func PlaceVein() +{ + var bubbles = FindObjects(Find_ID(HBBL), Find_Distance(HiveMSize)); //Blasen! + var b1 = bubbles[Random(GetLength(bubbles))]; + var b2 = bubbles[Random(GetLength(bubbles))]; + if(b1 == b2) return(); + + //b1->SetVeinTo(b2); +} + +// Eier für die Brut! +private func PlaceEgg() +{ + //if(Aliens->GetItemCount() >= 15) return(); + // Herausfinden, ob ein Alientyp gebraucht wird + var idAlien = GetAlienID(); + if(!idAlien) return(); + // Ein Ei platzieren + var bubble = FindObject2(Find_ID(BubbleID),Find_Distance(HiveMSize),Sort_Random()); + if(bubble) { + bubble->Set(idAlien,this()); + Eggs->AddItem(bubble); + } +} + +// Nicht den Boden unter den Füßen verlieren +private func Check2Ground(int iX, int iY) +{ + for(var i = 0 ; i - 10 < BubbMHeight ; i += 10) + if(GBackSolid(iX, iY+i)) + break; + return(i); +} + +private func GroundOK(int iX, int iY) { + return( Check2Ground(iX,iY) <= BubbMHeight*(100-100*iX*iX/HiveMSize/HiveMSize) ); +} + +protected func Destruction() { + if(Eggs) Eggs->RemoveObject(); + if(Aliens) Aliens->RemoveObject(); +} + +/** Alien-Produzier-Zeug **/ + +/* Vermehrung */ + +// Liefert die ID eines Alientyps, der zZ benötigt wird +public func GetAlienID() +{ + // auswürfeln welches wir haben wollen + var die = Random(100); + for(var i = 0; i < GetLength(prodAliens); ++i) { + var chance = AlienChance[i]; + if(die <= chance) { + var maxAliens = AlienMax[i]; + var idAlien = prodAliens[i]; + var aliens = CountHiveAliens(idAlien); + if(!maxAliens || maxAliens >= aliens) { + return( idAlien ); + } else { + return( 0 ); + } + } + } +} + +public func AlienClear() { + prodAliens = 0; + AlienChance = 0; +} + +public func AlienAdd(id idAlien, int probability, int max) { + if(!prodAliens) + prodAliens = CreateArray(); + if(!AlienChance) + AlienChance = CreateArray(); + if(!AlienMax) + AlienMax = CreateArray(); + + var len = GetLength(AlienChance); + + // schon voll... + if(AlienChance[len-1] >= 100) return(); + + prodAliens[len] = idAlien; + AlienMax[len] = max; + + // Ein Array was so aussieht... + // 0 -> 20 + // 1 -> 50 + // 2 -> 100 + // bedeutet dass 0 20% Chance hat, 1 30% und 2 50%... + var before = 0; + if(len-1 >= 0) + before = AlienChance[len-1]; + AlienChance[len] = Min(before + probability,100); +} + +public func DefaultTactic() { + AlienAdd(ALN2,60,20); + AlienAdd(ALN4,25,10); + AlienAdd(ALN1,15,3); +} \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Jumper.c4d/ActMap.txt new file mode 100644 index 00000000..3fa6184e --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Jumper.c4d/ActMap.txt @@ -0,0 +1,55 @@ +[Action] +Name=Walk +Procedure=WALK +Directions=2 +FlipDir=1 +Facet=0,0,30,15 +Length=20 +Delay=12 +NextAction=Walk +InLiquidAction=Swim + +[Action] +Name=Swim +Procedure=SWIM +Directions=2 +FlipDir=1 +Facet=0,0,30,15 +Length=20 +Delay=12 +EndCall=CheckLiquid +NextAction=Swim + +[Action] +Name=Scale +Procedure=SCALE +Directions=2 +FlipDir=1 +Facet=0,45,15,30,6,-8 +Length=20 +Delay=10 +NextAction=Scale +InLiquidAction=Swim + +[Action] +Name=Hangle +Procedure=HANGLE +Directions=2 +FlipDir=1 +Facet=0,15,30,15 +Length=20 +Delay=12 +NextAction=Hangle +InLiquidAction=Swim +StartCall=StartHangling + +[Action] +Name=Jump +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Facet=0,30,30,15,0,-1 +Length=10 +Delay=1 +NextAction=Hold +InLiquidAction=Swim \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Jumper.c4d/DefCore.txt new file mode 100644 index 00000000..3aedbfdd --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Jumper.c4d/DefCore.txt @@ -0,0 +1,39 @@ +[DefCore] +id=ALN2 +Version=4,9,8,2 +Name=Alien2 +Category=C4D_Living|C4D_SelectAnimal +MaxUserSelect=20 +Timer=5 +TimerCall=Activity +Width=30 +Height=15 +Offset=-15,-7 +Vertices=4 +VertexX=0,-4,4,0 +VertexY=6,-1,-1,-6 +VertexCNAT=8,1,2,4 +VertexFriction=100,100,100,300 +Value=5 +Mass=15 +Picture=0,75,64,64 +ContactIncinerate=2 +Growth=15 +Float=1 +BorderBound=1 +StretchGrowth=1 +NoBurnDecay=1 +IncompleteActivity=1 +Oversize=1 + +[Physical] +Energy=10000 +Breath=30000 +Walk=90000 +Jump=50000 +Scale=50000 +Hangle=50000 +Swim=40000 +CanScale=1 +CanHangle=1 +CorrosionResist=1 diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Jumper.c4d/DescDE.txt new file mode 100644 index 00000000..df0078a1 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Jumper.c4d/DescDE.txt @@ -0,0 +1 @@ +Arociten sind gefährliche Monster, die ihre Feinde bevorzugt aus dem Hinterhalt anspringen und mit ihren messerscharfen Klauen schwere Verletzungen hinterlassen. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Jumper.c4d/DescUS.txt new file mode 100644 index 00000000..6494ffe6 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Jumper.c4d/DescUS.txt @@ -0,0 +1 @@ +Arocites are dangerous monsters that attack by jumping at the enemy with their razor sharp claws. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Jumper.c4d/Graphics.png new file mode 100644 index 00000000..711bba9a Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Jumper.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperAttack.wav b/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperAttack.wav new file mode 100644 index 00000000..c561159a Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperAttack.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperBite.wav b/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperBite.wav new file mode 100644 index 00000000..e75ec3cc Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperBite.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperDeath.wav b/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperDeath.wav new file mode 100644 index 00000000..10a74612 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Jumper.c4d/JumperDeath.wav differ diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Jumper.c4d/Names.txt new file mode 100644 index 00000000..56980470 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Jumper.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Arocit +US:Arocit \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Jumper.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Jumper.c4d/Script.c new file mode 100644 index 00000000..57711305 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Jumper.c4d/Script.c @@ -0,0 +1,452 @@ +/*--Springer --*/ + +#strict + +local glob; +local lure; //lauern! + +/* Initialisierung */ + +protected func Initialize() +{ + SetAction("Walk"); + SetDir(Random(2)); + // Gruppen-KI + AddEffect("GroupKI", this(), 1, 0, this()); + // Schadenseffekt + AddEffect("DmgCheck",this(),1,0); + + Need4Speed(); +} + +protected func Need4Speed() +{ + SetPhysical("Walk", 90000 + RandomX(-10,10)*1000, PHYS_Temporary); + ScheduleCall(this(), "Need4Speed", Random(200)+100); +} + +/* Aktivität */ + +protected func Activity() +{ + // Gerade verhindert? + if(!Ready()) return(); + + // Rumangreifen + if(ReadyToBite()) + { + var l = lure+1; + // Nur wenn möglich + for(var prey in FindTargets(this, 150/l)) + // Hinrennen / anspringen + return(Attack(prey)); + } + + // Wir machen auch mal Zufallsjump! Aber Hechtjumplike! + if(!Random(31)) + { + Jump(); + SetYDir(GetYDir()/2); + } + + // Kommando? + if(GetCommand()) return(); + + // Schleimglobs nehmen + if(!glob) + { + var goodglob = FindObject2(Find_ID(GLOB), Find_InRect(-15, -5, 30, 10), Find_Action("Globbing")); + if(goodglob) + { + glob = goodglob; + glob->SetAction("AGlobbing", this()); + } + } + else + { + if(GetAction() eq "Scale") + glob->SetVertexXY(0, 0, -9*(GetDir()*2-1)); + else + glob->SetVertexXY(0, -9*(GetDir()*2-1), 3); + } + + if(IsLuring()) + return(); + + //Auflauern! + if(!GetEffect("JumpedToTop",this())) + if(!Random(50) && (GetAction() S= "Hangle" || GetAction() S= "Scale") && GetActTime() > 100) + if(GetLength(FindObjects(Find_Func("IsAlien"),Find_Func("IsLuring"),Find_InRect(-150, -150, 300, 300))) < 3) + { + //Sind wir eh nicht zu weit über dem Boden? Sonst finden wir ja nie Beute. + for(var x=1; x <= 5; x++) + if(GBackSolid(0,10*x-1)) + { + StartLuring(); + break; + } + //Wir wollen ja nicht IRGENDWO rumklettern wo uns kein Mensch findet :( + if(!IsLuring()) + SetAction("Walk"); + } + + // Rumlaufen, aber nicht zuviel wechseln, sonst sieht es so aus, als wäre er verwirrt! + if(!Random(10)) { + if(GetAction() eq "Walk" || GetAction() eq "Hangle") + { + if(Random(2)) SetComDir(COMD_Left()); + else SetComDir(COMD_Right()); + } + if(GetAction() eq "Scale") + { + if(Random(2)) SetComDir(COMD_Up()); + else SetComDir(COMD_Down()); + } + } + // Niedrige Decke in der nähe? noch wenige kletternde? + if(!Random(10)) { + var aliencount = GetLength(FindObjects(Find_ID(GetID()),Find_InRect(-150, -50, 300, 100))); + var hanglingaliens = GetLength(FindObjects(Find_ID(GetID()),Find_InRect(-150, -50, 300, 100),Find_Action("Hangle"))); + if(hanglingaliens < aliencount/2) { + // An die Decke springen! + JumpToTop(); + } + } +} + +private func JumpToTop() { + var dist; + for(dist=0; dist < 80; dist += 2) + if(GBackSolid(0,-dist)) + { + SetAction("Walk"); //teh hax! + Jump(); + SetXDir(GetXDir()/4); + SetYDir(AdjustSpeed(-dist)); + //Erfolgreich gesprungen! + return(true); + } + + return(false); +} + +public func Ready() // Wenn das Alien gerade nichts tun kann +{ + if(GetAction() eq "Jump") return(); + + return(1); +} + +/* Aktionen */ + +// Angreifen oder Hinlaufen +public func Attack(object pPrey, bool noKI) +{ + // Geth nicht?! + if(!ReadyToBite()) return(); + if(!pPrey) return(); + if(pPrey == this) return(); + + if(GetX(pPrey)-GetX()) + SetDir(DIR_Right); + else + SetDir(DIR_Left); + + //Walljumpattack? + if(GetEffect("CoolWalljumpAttack",this())) + { + RemoveEffect("CoolWalljumpAttack",this()); + return(JumpTo(pPrey)); + } + + // Gruppe benachrichtigen + if(!noKI) + GroupAttack(pPrey); + + // ZU nah? + if(ObjectDistance(pPrey) < 30 && GetAction() ne "Hangle") + { + // Beißen! + Bite(pPrey); + // und etwas Distanz gewinnen + SetAction("Walk"); + Jump(); + SetXDir((GetDir()*2-1)*10); + SetYDir(-10); + } + + // Nah genug zum krassen Angriff? + if(ObjectDistance(pPrey) <= 100) + { + //kleiner Gegner, Decke da oder einfach nur Random? :D + if(GetAction() eq "Walk" && (GetY(pPrey)-GetY() > 5 || !Random(3)) && Abs(GetX(pPrey)-GetX()) > 50) + { + if(!JumpToTop()) + return(JumpTo(pPrey)); + else + { + AddEffect("CoolWalljumpAttack",this(),200); + + return(); + } + } + else + return(JumpTo(pPrey)); + } + // Hinrennen + if(!IsLuring()) + SetCommand(this(), "MoveTo", pPrey); +} + +// Sprungangriff +private func JumpTo(object pPrey) +{ + if(IsLuring()) { + StopLuring(); + } + // Spezialangriff: Schleim ballern + if(glob) return(GlobTo(pPrey)); + // Springen + SetAction("Walk"); // *hax* + Jump(); + // Geschwindigkeit anpassen + SetXDir(AdjustSpeed(GetX(pPrey)-GetX())); + SetYDir(AdjustSpeed(GetY(pPrey)-GetY())); + // Geräusch + Sound("JumperAttack"); + // Effekt dranfügen + if(!GetEffect("Bite", this())) AddEffect("Bite", this(), 99, 1, this()); +} + +// Hilfsfunktion um die Sprunggeschwindigkeit anzupassen +private func AdjustSpeed(int iSpeed) +{ + // Richtung speichern + var dir = iSpeed / Abs(iSpeed); + // Min- und Maxwerte anpassen + iSpeed = BoundBy(Abs(iSpeed), 20, 55); + return(iSpeed*dir*GetCon()/100); +} + +// Beißen +private func Bite(object pPrey) +{ + // Beißen!11 + DoDmg(3+Random(10)*GetCon()/100, DMG_Melee, pPrey); + // Beißsperre, damit man nicht dauerhüpft + AddEffect("NoBite", this(), 99, 50, this()); + Sound("JumperBite"); +} + +// Schleim schleudern +private func GlobTo(object pPrey) +{ + if(!glob) return(); + // Glob entfernen + RemoveObject(glob); + var sGlob; + if(GetAction() eq "Scale") + sGlob = CreateObject(SLST, 0, 18*(GetDir()*2-1), GetOwner()); + else + sGlob = CreateObject(SLST, 18*(GetDir()*2-1), -3, GetOwner()); + // Feuern + sGlob->Launch(AdjustSpeed(GetX(pPrey)-GetX()), AdjustSpeed(GetY(pPrey)-GetY())); + // Beißpause + AddEffect("NoBite", this(), 99, 25, this()); +} + +public func StartLuring() +{ + if(IsLuring()) + return(); + //wir lauern + lure=1; + //tarnen! + FadeOut(this(),120); + //nichstun und warten. + SetCommand(0,"None"); + SetComDir(COMD_Stop); +} + +public func StopLuring() +{ + //nicht mehr lauern + lure = 0; + //farbe! + StopFading(); +} + +func StartHangling() +{ + // Machen wir gerade Walljump-Attacke? + if(!GetEffect("CoolWalljumpAttack", this())) + //nö, nichts tun. + return(); + + if(GetCommand()) + SetCommand(this(), "None"); + +} + +public func Birth() +{ + // Volle Größe! + SetCon(100); +} + +protected func Death(int iByPlayer) +{ + // Zersplattern! + //Sparks(10, RGBa(25, 255, 25, 20)); + + //Test + AlienSplatter(35); + AlienBlood(30); + + // Quieken! + Sound("JumperDeath"); + GameCallEx("OnAlienDeath", this, iByPlayer); + // Verschwinden! + RemoveObject(); +} + + +/* Gruppen-KI */ + +protected func GroupAttack(object pPrey) +{ + // Andere Aliens benachrichtigen + for(var alien in FindObjects(Find_Distance(100), Find_Func("IsAlien"), Find_OCF(OCF_Alive), Find_Exclude(this()))) + if(alien) + if(!CheckTarget(alien,this)) + alien->~Attack(pPrey, true); +} + +/* Schaden */ + +public func OnDmg(int iDmg, int iType) { + //Melee + if(iType == DMG_Melee) + return(20); + //Projectile + if(iType == DMG_Projectile) + return(0); + //Flame + if(iType == DMG_Fire) + return(-50); + //Explosion + if(iType == DMG_Explosion) + return(-10); + //Energy + if(iType == DMG_Energy) + return(50); + //Bio + if(iType == DMG_Bio) { + return(90); + } +} + +// Reaktion auf Schaden +func OnHit(int iDmg, int iType, object pFrom) +{ + if(iType == DMG_Fire) + AddFireEffect(this(),(5*iDmg*(105))/100); + // verzögert... + ScheduleCall(this(), "OnHit2", 5, 0, pFrom); +} + +protected func OnHit2(object by) +{ + //wir gehen mal davon aus, dass es ein Spieler war. + var obj = GetCursor(GetController(by)); + //doch nicht? + if(!obj) + //nach feinden suchen und so + return(Activity()); + + if(ObjectDistance(obj,this()) < 200) + Attack(obj); +} + +func CheckLiquid() +{ + if(!GBackLiquid(0,-3)) + return(); + if(GetMaterial(0,-3) == Material("Water")) + { + ExtractMaterialAmount(0,0, Material("Water"), GetMass()); + CastPXS("Acid",GetMass()*5,GetMass()); + Death(-1); + } +} + +/* Status */ + +public func ReadyToBite() +{ + if(GetEffect("NoBite", this())) return(); + + return( + GetAction() eq "Walk" || + GetAction() eq "Scale" || + GetAction() eq "Hangle" + ); +} + +public func IsAlien() { return(true); } +public func IsBulletTarget() { return(true); } +public func IsLuring() { return(lure); } + +/* Effekte */ + +public func FxBiteTimer() +{ + // Nicht mehr im Sprung? + if(ReadyToBite()) + { + AddEffect("NoBite", this(), 99, 35, this()); + return(-1); + } + // Ist ein fressbares Objekt in der Nähe? + var toBite; + for(var prey in FindTargets(this, 11)) + { + toBite = prey; + break; + } + // Eines gefunden? + if(toBite) + { + Bite(toBite); + // Und weg + return(-1); + } +} + +public func FxBiteEffect(string EffectName) +{ + // Nur ein Beiß-Effekt + if(EffectName == "Bite") return(-1); +} + +public func FxNoBiteEffect(string EffectName) +{ + // Kein Beiß-Effekt gerade + if(EffectName == "Bite") return(-1); +} + +public func FxGroupKIDamage(object target, int no, int iDmg, int iCause) +{ + // Angeschossen? + if(iCause == 32 || iCause == 33 || iCause == 35) + // Feinde in weiter Ferne suchen + for(var prey in FindTargets(this,400)) + { + Attack(prey); + return(iDmg); + } + return(iDmg); +} + +public func IgnoreFriendlyFire() { return(1); } +public func IsThreat() { return(true); } \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/ActMap.txt new file mode 100644 index 00000000..3fa6184e --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/ActMap.txt @@ -0,0 +1,55 @@ +[Action] +Name=Walk +Procedure=WALK +Directions=2 +FlipDir=1 +Facet=0,0,30,15 +Length=20 +Delay=12 +NextAction=Walk +InLiquidAction=Swim + +[Action] +Name=Swim +Procedure=SWIM +Directions=2 +FlipDir=1 +Facet=0,0,30,15 +Length=20 +Delay=12 +EndCall=CheckLiquid +NextAction=Swim + +[Action] +Name=Scale +Procedure=SCALE +Directions=2 +FlipDir=1 +Facet=0,45,15,30,6,-8 +Length=20 +Delay=10 +NextAction=Scale +InLiquidAction=Swim + +[Action] +Name=Hangle +Procedure=HANGLE +Directions=2 +FlipDir=1 +Facet=0,15,30,15 +Length=20 +Delay=12 +NextAction=Hangle +InLiquidAction=Swim +StartCall=StartHangling + +[Action] +Name=Jump +Procedure=FLIGHT +Directions=2 +FlipDir=1 +Facet=0,30,30,15,0,-1 +Length=10 +Delay=1 +NextAction=Hold +InLiquidAction=Swim \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DefCore.txt new file mode 100644 index 00000000..f8af94e8 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DefCore.txt @@ -0,0 +1,39 @@ +[DefCore] +id=ALN4 +Version=4,9,8,2 +Name=Alien4 +Category=C4D_Living|C4D_SelectAnimal +MaxUserSelect=20 +Timer=5 +TimerCall=Activity +Width=30 +Height=15 +Offset=-15,-7 +Vertices=4 +VertexX=0,-4,4 +VertexY=6,-1,-1,-6 +VertexCNAT=8,1,2,4 +VertexFriction=100,100,100,100 +Value=7 +Mass=25 +Picture=0,75,64,64 +ContactIncinerate=2 +Growth=15 +Float=1 +BorderBound=1 +StretchGrowth=1 +NoBurnDecay=1 +IncompleteActivity=1 +Oversize=1 + +[Physical] +Energy=20000 +Breath=30000 +Walk=90000 +Jump=50000 +Scale=50000 +Hangle=50000 +Swim=40000 +CanScale=1 +CanHangle=1 +CorrosionResist=1 diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DescDE.txt new file mode 100644 index 00000000..e3206e02 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DescDE.txt @@ -0,0 +1 @@ +Pyrociten sind noch gefährlicher als Arociten. Werden sie verletzt, verfallen sie in eine wilde Raserei, gehen in Flammen auf und explodieren an Feinden. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DescUS.txt new file mode 100644 index 00000000..1d738dae --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/DescUS.txt @@ -0,0 +1 @@ +Pyrocites are even more dangerous as Arocites. If they are wounded, the lapse into a blind rage, start to burn and explode at enemies. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Graphics.png new file mode 100644 index 00000000..680b6047 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Names.txt new file mode 100644 index 00000000..647ecaf5 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pyrocit +US:Pyrocit \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Script.c new file mode 100644 index 00000000..0b8c95ef --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Kamikaze.c4d/Script.c @@ -0,0 +1,111 @@ +/*--Kamikaze --*/ + +#strict +#include ALN2 + +local hurt; + +/* Aktionen */ + +func StartLuring() +{ + if(hurt) + return(); + inherited(); +} + +// Beißen +private func Bite(object pPrey) +{ + // Beißen!11 + DoDmg(3+Random(10)*GetCon()/100, DMG_Explosion, pPrey); + // Beißsperre, damit man nicht dauerhüpft + AddEffect("NoBite", this(), 99, 50, this()); + Sound("JumperBite"); + + //alien "scharf"? :D + if(hurt) + { + if(glob) //extradmg mit Glob + { + DoDmg(20, DMG_Bio, pPrey); + } + //Kaboom. :D + Detonate(); + } +} + +// Schleim schleudern +private func GlobTo(object pPrey) +{ + return(); //kann er nicht :( +} + +public func Birth() +{ + // Miniwinzig! + SetCon(50); +} + +protected func Death(int iByPlayer) +{ + // Zersplattern! + Sparks(10, RGBa(255, 205, 25, 20)); + // Quieken! + Sound("JumperDeath"); + GameCallEx("OnAlienDeath", this, iByPlayer); + // Mit Knall Verschwinden! + if(hurt) + Detonate(); + else + RemoveObject(); +} + +func CheckLiquid() +{ + if(!GBackLiquid(0,-3)) + return(); + if(GetMaterial(0,-3) == Material("Water")) + { + ExtractMaterialAmount(0,0, Material("Water"), GetMass()); + CastPXS("Lava",GetMass(),GetMass()); + Death(-1); + } +} + +public func OnDmg(int iDmg, int iType) { + //Flame + if(iType == DMG_Fire) { + return(25); + } + else + return(inherited(iDmg, iType)); +} + +//Treffer +func OnHit() { + hurt = true; + AddEffect("Hurt",this(),1,4,this(),GetID()); +} + +private func Detonate() { + var r = 25; + if(glob) + r += 10; + Schedule(Format("Explode(%d)",r),1); +} + +func FxHurtTimer(object pTarget, int iEffectNumber, int iEffectTime) { + var x,y; + if(GetAction() eq "Hangle") + y = 2; + if(GetAction() eq "Scale") + x = (GetDir()*2-1) * 5; + CreateParticle("Thrust",RandomX(-4,4)+x,RandomX(-4,4)+y,GetXDir()/2,GetYDir()/2,RandomX(100,300),RGBa(255,200,200,100),0,0); + CreateParticle("Fire",RandomX(-2,2)+x,Random(2)+y,0,RandomX(-6,-12),RandomX(100,180),RGBa(255,RandomX(224,255),0,160)); + CreateParticle("Fire2",RandomX(-2,2)+x,Random(2)+y,0,RandomX(-8,-14),RandomX(100,180),RGBa(255,255,255,128)); +} + +func FxHurtEffect (string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName S= "Hurt") return(-1); +} diff --git a/Hazard.c4d/Enemies.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Names.txt new file mode 100644 index 00000000..8b777bdb --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Aliens +US:Aliens diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DefCore.txt new file mode 100644 index 00000000..789a8c0a --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=WACC +Version=4,9,8,2 +Name=Acid Chunk +Category=C4D_Vehicle +Width=15 +Height=28 +Offset=-7,-14 +Vertices=3 +VertexX=-7,8,0 +VertexY=-7,-7,-14 +Picture=0,0,15,28 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 +TimerCall=AdjustR +Timer=1 +BlitMode=1 \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DescDE.txt new file mode 100644 index 00000000..064324ed --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine geballte Ladung halbverdauter Mageninhalt. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DescUS.txt new file mode 100644 index 00000000..7100d2b0 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/DescUS.txt @@ -0,0 +1 @@ +A big portion of stomache contents. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Graphics.png new file mode 100644 index 00000000..719e6521 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Names.txt new file mode 100644 index 00000000..144c88e4 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Säurebröcken +US:Acid Chunk \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Script.c new file mode 100644 index 00000000..11fa1579 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Script.c @@ -0,0 +1,33 @@ +/*-- Säurebrocken --*/ + +#strict 2 + +protected func AdjustR() +{ + SetR(Angle(0,0,GetXDir(),GetYDir())); +} + +public func Launch(int xdir, int ydir, object byObj) +{ + SetXDir(xdir); + SetYDir(ydir); + AddEffect("HitCheck", this(), 1,1, 0, SHT1,byObj); + AddAlienFlareEffect(this,500); +} + +protected func Hit(int xdir, int ydir) +{ + var x,y; + x = Sin(GetR(),14); + y =-Cos(GetR(),14); + + CreateObject(WACM, x,y+32, GetOwner()); + + for(var i = 5, glob ; i ; i--) + { + glob = CreateObject(SLST, 0, 0, GetOwner()); + glob ->~ Launch(RandomX(-40,40), RandomX(-40,40), 5); + } + + RemoveObject(); +} diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/ActMap.txt new file mode 100644 index 00000000..e87f7b07 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Be +Procedure=NONE +Directions=1 +Length=6 +Delay=0 +Facet=0,0,64,64 \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DefCore.txt new file mode 100644 index 00000000..41243fbf --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=WACM +Name=Acid Contamination +Version=4,9,5 +Category=1 +Width=64 +Height=64 +Offset=-32,-32 +Components=ACID=999; +Picture=0,0,64,64 +BlitMode=1 +TimerCall=Check +Timer=5 +IncompleteActivity=1 +StretchGrowth=1 \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DescDE.txt new file mode 100644 index 00000000..f36a5fe6 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DescDE.txt @@ -0,0 +1 @@ +Säure die dem Clonk schadet. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DescUS.txt new file mode 100644 index 00000000..00475c7b --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/DescUS.txt @@ -0,0 +1 @@ +Hazardous acid. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Graphics.png new file mode 100644 index 00000000..86a70ac9 Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Names.txt new file mode 100644 index 00000000..13626957 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Säureverseuchung +US:Acid Contamination \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Script.c new file mode 100644 index 00000000..6fa88302 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/AcidChunk.c4d/Verseuchung.c4d/Script.c @@ -0,0 +1,49 @@ +/*-- Verseuchung --*/ + +#strict + +local fade; + +func Initialize() +{ + SetAction("Be"); + SetPhase(Random(6)); +} + +func Check() +{ + for(var enemy in FindTargets(this(),40)) { + if(enemy->GetAlive()) { + var abzug = fade/50; + DoDmg(Max(0,4-abzug),DMG_Bio,enemy); + } + } + + if(GetActTime() > 200) + DoFade(5); +} + +func OnHit(int dmg, int type, object from) +{ + if(type == DMG_Fire) + DoFade(5); + if(type == DMG_Explosion) + DoFade(25); +} + +func DoFade(int change) +{ + fade += change; + + if(fade > 250) + RemoveObject(); + + SetClrModulation(RGBa(255,255,255,fade)); +} + +public func IsBulletTarget(id ID) +{ + if(ID == FFLM) + return(true); + return(false); +} diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/ActMap.txt new file mode 100644 index 00000000..92033260 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/ActMap.txt @@ -0,0 +1,41 @@ +[Action] +Name=Exist +Procedure=FLOAT +Facet=0,40,80,80 +NextAction=Hold + +[Action] +Name=Dead +Procedure=FLOAT +Facet=0,40,80,80 +NextAction=Hold +ObjectDisabled=1 + +[Action] +Name=Part1 +Facet=0,0,40,40 + +[Action] +Name=Part2 +Facet=40,0,40,40 + +[Action] +Name=Part3 +Facet=80,0,40,40 + +[Action] +Name=Part4 +Facet=120,0,40,40 + +[Action] +Name=Part5 +Facet=160,0,40,40 + +[Action] +Name=Part6 +Facet=200,0,40,40 + +[Action] +Name=Part7 +Facet=240,0,40,40 + diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/DefCore.txt new file mode 100644 index 00000000..ecf187a0 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=ALN1 +Version=4,9,8,2 +Name=Wurm +Category=C4D_Living|C4D_SelectAnimal +MaxUserSelect=3 +Timer=5 +TimerCall=Activity +Width=80 +Height=80 +Offset=-40,-40 +Picture=80,40,64,64 +Mass=20 +Rotate=90 +NoBreath=1 +NoFight=1 +VehicleControl=2 \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/DescDE.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/DescDE.txt new file mode 100644 index 00000000..2393cc3a --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/DescDE.txt @@ -0,0 +1 @@ +Ih, ein Wurm! Windet sich, und verspeist gerne genüsslich Wipfe. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/DescUS.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/DescUS.txt new file mode 100644 index 00000000..9606c969 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/DescUS.txt @@ -0,0 +1 @@ +Omigod it's a worm! Hobbies: Schlorzing(tm) and eating Wipfs. \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Worm.c4d/Graphics.png new file mode 100644 index 00000000..cd1160cb Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Worm.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/ActMap.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/ActMap.txt new file mode 100644 index 00000000..f107dcda --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/ActMap.txt @@ -0,0 +1,60 @@ +[Action] +Name=Be +Procedure=FLOAT +Facet=0,0,40,40 +Length=1 +Delay=0 +InLiquidAction=Swim + +[Action] +Name=Opening +Procedure=FLOAT +Facet=0,0,40,40 +Length=11 +Delay=1 +NextAction=Open +InLiquidAction=Swim + +[Action] +Name=Opening2 +Procedure=FLOAT +Facet=0,0,40,40 +Length=11 +Delay=1 +NextAction=DuroOpen +InLiquidAction=Swim + +[Action] +Name=DuroOpen +Procedure=FLOAT +Facet=400,0,40,40 +Length=1 +Delay=5 +NextAction=DuroOpen +InLiquidAction=Swim + +[Action] +Name=Open +Procedure=FLOAT +Facet=400,0,40,40 +Length=1 +Delay=1 +NextAction=Closing +InLiquidAction=Swim + +[Action] +Name=Closing +Procedure=FLOAT +Facet=0,0,40,40 +Length=11 +Delay=1 +Reverse=1 +NextAction=Be +InLiquidAction=Swim + +[Action] +Name=Swim +Procedure=FLOAT +Facet=0,0,40,40 +NextAction=Hold +StartCall=CheckLiquid \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/DefCore.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/DefCore.txt new file mode 100644 index 00000000..9743bf62 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=ALNH +Version=4,9,8,2 +Name=WormHead +Category=C4D_Living | C4D_Foreground +ContactCalls=1 +Width=40 +Height=40 +Value=30 +Offset=-20,-20 +Mass=1 +Picture=400,0,40,40 +Rotate=1 +NoStabilize=1 +NoBreath=1 +NoFight=1 +BorderBound=7 + +[Physical] +Energy=150000 +Float=600 +CorrosionResist=1 diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Graphics.png b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Graphics.png new file mode 100644 index 00000000..b510d73e Binary files /dev/null and b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Graphics.png differ diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Names.txt new file mode 100644 index 00000000..a0ee46dd --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kopf +US:Head \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Script.c new file mode 100644 index 00000000..67848a33 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/Head.c4d/Script.c @@ -0,0 +1,212 @@ +/*-- Kopf --*/ + +#strict + +local base; + +public func IsBulletTarget() { return(true); } +public func IsAlien() { return(false); } + +public func Init(object by) +{ + base = by; + SetAction("Be"); + // Schadenseffekt + AddEffect("DmgCheck",this(),1,0); +} + +public func Death(iByPlayer) +{ + SetClrModulation(RGBa(0,0,0,255)); + base->Die(); + GameCallEx("OnAlienDeath", this, iByPlayer); +} + +public func OnDmg(int iDmg, int iType) { + if(iType == DMG_Bio) //Bioresistent. + return(90); + if(iType == DMG_Energy) //fast Energieresistent + return(50); + if(iType == DMG_Fire) + return(-50); +} + +public func OnHit(int dmg, int type, object byObj) +{ + AlienBlood(40,0,0,0,this); + base->OnHit(dmg, type, byObj); +} + +protected func CheckLiquid() // Startcall von Swim +{ + if(!GBackLiquid(0,-3)) + return(); + if(GetMaterial(0,-3) == Material("Water")) + { + Death(-1); + } +} + +func Open() +{ + if(GetAction() S= "Closing") + { + var p = 0-GetPhase(); + SetAction("Opening"); + SetPhase(p); + } + if(GetAction() S= "Be") + SetAction("Opening"); + if(GetAction() S= "DuroOpen") + SetAction("Open"); +} + +func Close() +{ + if(GetAction() S= "Opening" || GetAction() S= "Opening2") + { + var p = 0-GetPhase(); + SetAction("Closing"); + SetPhase(p); + } + if(GetAction() S= "DuroOpen") + SetAction("Closing"); + if(GetAction() S= "Open") + SetAction("Closing"); +} + +func Move(int x, int y, bool override, int speed) +{ + var ef; + if(ef = GetEffect("Move",this())) + { + if(override) + RemoveEffect(0,this(), ef); + else + return(false); + } + + AddEffect("Move",this(),100,1,this(),GetID(),x,y,speed); + return(true); +} + +private func FxMoveStart(object target, int num, bool temp, int x, int y, int speed) +{ + if(temp) + return(); + + EffectVar(0,target,num) = x; + EffectVar(1,target,num) = y; + EffectVar(2,target,num) = speed; +} + +private func FxMoveTimer(object target, int num, int time) +{ + if(GBackSolid()) + { + DoEnergy(-1); + SetPosition(GetX()+RandomX(-1,1),GetY()+RandomX(-1,1)); + } + + var x,y; + x = EffectVar(0,target,num); + y = EffectVar(1,target,num); + + var d = Distance(target->GetX(),target->GetY(),x,y); + var r = Angle(target->GetX(),target->GetY(),x,y); + + //Log("%d / %d",EffectVar(0,target,num),EffectVar(1,target,num)); + + if(d <= 1) + { + return(-1); + } + + if(EffectVar(2,target,num)) + if(Distance(target->GetX(),target->GetY(),x,y) < 10) + return(-1); + +// if(Distance(target->GetX(),target->GetY(),base->GetX(),base->GetY()-(WORM_Part-WORM_Cutoff)*WORM_Count) > (WORM_Part-WORM_Cutoff)*WORM_Count) +// { +// SetPosition(GetX()-GetXDir(), GetY()-GetYDir()); +// return(-1); +// } + + var speed = Max(1,EffectVar(2,target,num)*d); + + SetXDir(+Sin(r,speed,1),target,100); + SetYDir(-Cos(r,speed,1),target,100); + + var x = +Sin(r,35); + var y = -Cos(r,35); + + if(GBackSolid(x,y)) + { + return(-1); + } + + base->AdjustParts(); +} + +func FxMoveStop(object target, int num, int reason, bool tmp) +{ + if(tmp) + return(); + + SetXDir(0); + SetYDir(0); + + //if(GetY() >= base->GetY()-5) + // SetPosition(GetX(),base->GetY()-6); + base->FinishedMoving(); +} + +func Rotate(int angle, bool override, int speed) +{ + var ef; + if(ef = GetEffect("Rotate",this())) + { + if(override) + RemoveEffect(0,this(),ef); + else + return(); + } + + AddEffect("Rotate",this(),99,1,this(),GetID(),angle,speed); +} + +private func FxRotateStart(object target, int num, bool temp, int r, int speed) +{ + if(temp) + return(); + + if(r < 0) + r += 360; + EffectVar(0,target,num) = r; + EffectVar(1,target,num) = speed; +} + +private func FxRotateTimer(object target, int num, int time) +{ + var angle = EffectVar(0,target,num); + var speed = EffectVar(1,target,num); + var r = Normalize(GetR()); + angle = Normalize(angle); + + if(r == angle) + return(-1); + + var dif = Abs(angle - r); + if(dif > 180) dif = 360-dif; + + var dir = BoundBy(Normalize(angle-r,-180),-Max(1,speed*dif/30),Max(1,speed*dif/30)); + + // anpassen + SetR(r+dir); + + base->AdjustParts(); +} + +public func NoWarp() { return(1); } +public func IgnoreFriendlyFire() { return(1); } +public func IsThreat() { return(true); } diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Names.txt b/Hazard.c4d/Enemies.c4d/Worm.c4d/Names.txt new file mode 100644 index 00000000..770d0b4e --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Wurm +US:Worm \ No newline at end of file diff --git a/Hazard.c4d/Enemies.c4d/Worm.c4d/Script.c b/Hazard.c4d/Enemies.c4d/Worm.c4d/Script.c new file mode 100644 index 00000000..92826856 --- /dev/null +++ b/Hazard.c4d/Enemies.c4d/Worm.c4d/Script.c @@ -0,0 +1,642 @@ +/*-- Wurm --*/ + +#strict 2 + +static const WORM_Part = 17; //Wie groß ein Teil ist +static const WORM_Count = 7; //Wieviele Teile +static const WORM_Cutoff = 3; // so Offsetzeugs + +static const WORM_MaxPreyDist = 500; +static const WORM_MaxMealSize = 25; + +static const WORM_PartGraphics = 7; + +local head; +local prey; +local posx, posy, posr; +local parts; + +public func IsClosed() { return head->GetAction() == "Be"; } + +protected func Initialize() +{ + SetCategory(C4D_Vehicle); + SetAction("Exist"); + + //wir brauchen Teile! + head = CreateObject(ALNH,0,0,GetOwner()); + head->Init(this()); + SetParts(WORM_Count); + + // Animationseffekt + AddEffect("WormDraw",this(),10,1,this()); +} + +protected func InitParts(bool norand) { + + for(var x=1; x <= WORM_Count; x++) + { + if(x <= parts) { + if(!norand) { + var actionName = Format("Part%d",Random(WORM_PartGraphics)+1); + SetGraphics(0,this(),GetID(),x,GFXOV_MODE_Action,actionName);//,GFX_BLIT_Parent); + SetClrModulation(RGBa(255,255,255,Max(0,120-x*60)),this(),x); + } + } + else { + SetGraphics(0,this(),0,x); + } + } +} + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Interface */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +public func MoveHead(int angle, int distance, int speed) +{ + distance = BoundBy(distance,0,1000); + + if(!speed) speed = 1; + var blub = speed; + if(blub > 4) blub = 4; + + var hmax = (WORM_Part-WORM_Cutoff)*parts; + var x,y; + + var h = hmax*distance/1000; + + x = Sin(angle,h); + y = -Cos(angle,h); + + angle = Normalize(angle,-180); + + head->Move(GetX()+x,GetY()+y, true, speed); + + // je weiter in der Mitte desto verdrehter. + var dir = angle/Abs(angle)*((Abs(angle)<90)*2-1); + var anglemod = blub * 180 * dir * (1000*1000-distance*distance)/1000/1000 / speed; + + head->Rotate(angle + anglemod, true, speed); + +} + +public func LookToTarget(object target) { + if(!target) return; + var angle = Angle(head->GetX(),head->GetY(),target->GetX(),target->GetY()); + head->Rotate(angle, true, 5); +} + +public func MoveToTarget(object target, int speed) { + if(!target) return; + if(!speed) speed = 15; + var x = GetX(); + var y = GetY(); + var tx = target->GetX()+target->GetXDir(); + var ty = target->GetY()+target->GetYDir(); + var angle = Angle(x,y,tx,ty); + var h = Distance(x,y,tx,ty); + var hmax = (WORM_Part-WORM_Cutoff)*parts; + var distance = 1000*h/hmax; + + MoveHead(angle,distance,speed,true); +} + +public func MoveSomewhere() { + var r = RandomX(-90,90); + var dist = RandomX(700,900); + MoveHead(r,dist,0,true); +} + +public func OpenMouth() { + head->Open(); +} + +public func SetPrey(object p) { + prey = p; +} + +public func SetParts(int p) { + var norand = false; + if(p < parts) norand = true; + + parts = BoundBy(p,0,WORM_Count); + + InitParts(norand); + AdjustParts(); +} + +public func GetParts() { + return parts; +} + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Aktivität */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +protected func Activity() +{ + if(GetAction() == "Dead") + return; + + // neue Beute suchen + if(Chance(40)) { + if(!prey) prey = SearchForPrey(); + if(prey) { + Tactic(prey); + return; + } + } + + if(IsSnapping()) return; + + // ansonsten doof hin und herschwanken + if(Chance(10)) + { + MoveSomewhere(); + } +} + +private func SearchForPrey() { // search for prey + + var targets = FindTargets(head, WORM_MaxPreyDist); + + // irgendein Objekt anivisieren + if(GetLength(targets)) + return targets[0]; + + return false; +} + +// ist das Opfer noch lecker? +private func PreyIsGood(int maxdist) { + if(!prey) return false; + if(!maxdist) maxdist = WORM_MaxPreyDist; + + if(Contained(prey) == this()) return true; + + return CheckTarget(prey, head, maxdist); +} + +// Schaut wie angegriffen werden muss und so +private func Tactic(object target) +{ + // Länge! + var th = (WORM_Part-WORM_Cutoff)*parts; + + var dist; + dist = Distance(head->GetX(),head->GetY(), target->GetX(),target->GetY()); + + // Prey ist garnicht mehr relevant? + if(!PreyIsGood()) + { + prey = 0; + return; + } + + if(IsSnapping()) return; + + // Ausrichten + LookToTarget(target); + + // so, fangen wir an! + + // Mampfen + if(dist < th+20) { + if(Chance(30)) + if(!GetEffect("NoSnap",this())) + if(GetObjWidth(target) < WORM_MaxMealSize && GetObjHeight(target) < WORM_MaxMealSize) + Snap(target); + } + + // Explosionsartige Freigabe von halbverdautem zeug + if(Chance(10)) + if(!GetEffect("NoSchlorz",this())) + Schlorz(); +} + + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Angriffstechniken */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +public func IsSnapping() { return GetEffect("Snap*",this()); } +public func IsSchlorzing() { return GetEffect("Schlorz*",this()); } + +public func IsAttacking() { return(IsSnapping() || IsSchlorzing()); } + +/* Auffressen */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +// Effekte: +// Snapping - gerade am zuschnappen. Wird von FinishedMoving beendet. +// SnapBack - Clonk aufgefressen -> Schnelle Bewegung nach oben. Wird von FinishedMoving beendet. +// NoSnap - 3sek Delay bis zum nächstne Snap + +private func Snap(object target) +{ + DebugMessage("Snap","Worm"); + if(IsAttacking()) + return; + + Sound("JumperAttack",head); + MoveToTarget(target); + head->Open(); + AddEffect("Snapping",this(),1,0,this(),GetID()); +} + +private func EndSnapping(int Effect) { + + if(!PreyIsGood(20)) prey = 0; + + if(prey) Enter(this(),prey); + + RemoveEffect("Snapping",this()); + // Zumachen! + head->Close(); + + // Fressen erfolgreich? + if(Contained(prey) != this()) { + prey = 0; + MoveSomewhere(); + return; + } + + // Animation, danach ausspucken + //MoveSomewhere(); + AddEffect("SnapBack",this(),1,1,this(),0,prey); +} + +protected func FxSnapBackStart(object target, int num, int temp, object prey) { + if(temp) return; + + EffectVar(0,target,num) = prey; +} + +protected func FxSnapBackTimer(object target, int num, int time) { + // Durchgängig geringen Schaden machen + if(time%8 == 0) if(Chance(60)) + target->DoDmg(3, DMG_Melee, EffectVar(0,target,num)); + + // grafischer Effekt + if(time == 1) { AddEffect("WormDraw",target,10,1,this(),0, 8, 600, 1, 2); } + // erstmal schön weitergehen + if(time == 20) { target->MoveSomewhere(); } + // Verdaut... moment mal, das kommt wieder hoch...urääägh + if(time == 110) { AddEffect("WormDraw",target,10,1,target,0, 8, 600, 0, 2); } + // Verdauungsschwierigkeiten bringen Zuckungen + if(time > 110 && time < 250) { + var dringend = 100*(250-time)/140; // Werte von 0-100 + var haufigkeit = 7 + dringend/5; // Werte von 7 bis 27 + var schnelligkeit = 2+(100-dringend)/12; // Werte von 2 - 10 + if(time%haufigkeit == 0) + if(Chance(80)) + { target->MoveHead(RandomX(-70,70),RandomX(700,1000),schnelligkeit); } + } + // Ende (Ausspucken) + if(time == 250) { target->EndSnapBack(EffectVar(0,target,num)); } +} + +private func EndSnapBack(object myprey) +{ + + RemoveEffect("SnapBack",this()); + AddEffect("WormDraw",this(),10,1,this()); + + if(myprey) + { + var a = head->GetR(); + Exit(myprey,head->GetX()-GetX(),head->GetY()-GetY(),0,Sin(a,parts),-Cos(a,parts)); + myprey->SetAction("Tumble"); + head->SetAction("Open"); + DoDmg(20,DMG_Bio,myprey); + //Punch(prey,0); + AddEffect("NoSnap",this(),1,150); + } +} + + +/* Schlorz-Attacke */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +// Kotzen! +private func Schlorz() +{ + if(IsAttacking()) + return; + + // wir sind sowieso ausgerichtet, also zusammenziehen! + AddEffect("Schlorzing",this(),1,70,this(),GetID()); +} + +protected func FxSchlorzingStart(object target, int num, temp) { + if(temp) return; + + // Uhrr, da kommt was hoch.... + AddEffect("WormDraw",target,10,1,target,0, 16, 600, 0, 2); + target->MoveHead(RandomX(-70,70),600,3); +} + +protected func FxSchlorzingStop(object target, int number, int reason, temp) { + + target->EndSchlorzAttack(); +} + +private func EndSchlorzAttack() { + + if(!prey) return; + + var a = Normalize(head->GetR(),-180); + var x = head->GetX()-GetX() + Sin(a,10), + y = head->GetY()-GetY() - Cos(a,10); + var d = 50; + + var target = prey; + + MoveHead(a,1000,10); + + var chunk = CreateObject(WACC,x,y+14,GetOwner()); + var xdir,ydir; + + var dist, correction; + dist = ObjectDistance(head,target)/2; + correction = dist/20; + if(a < 0) + a += correction; + else + a -= correction; + + a += RandomX(-1,1); + + xdir = Sin(a, dist); + ydir =-Cos(a, dist); + + chunk->Launch(xdir,ydir, this()); + + /* + var t = 15; // t für TOLERANZ! + + if(prey) + d = Distance(head->GetX(),head->GetY(), prey->GetX(),prey->GetY()); + + for(var i = 3+Random(2); i; i--) + CreateObject(SLST,x,y,GetController())->Launch(+Sin(a+RandomX(-t, t),130+Random(50)), -Cos(a+RandomX(-t,t),130+Random(50)),true,15); + + for(var i = 8+Random(8); i; i--) + CreateObject(GLBL,x,y,GetController())->Launch(a+RandomX(-t, t), 130+Random(50),600,6, 60, 10,0,1); + + for(var i = 15+Random(10); i; i--) + CreateObject(FFLM,x,y,GetController())->Launch(+Sin(a+RandomX(-t, t),130+Random(50)), -Cos(a+RandomX(-t,t),130+Random(50)),true,15); + */ + + head->Close(); + + AddEffect("NoSchlorz",this(),1,200); + AddEffect("WormDraw",this(),10,1,this()); +} + + +/* Trigger für viele Aktionen: Kopf ist an Ziel angekommen */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +// Wird vom Kopf aufgerufen +public func FinishedMoving() +{ + var Effect; + // Wir haben gerade zugeschnappt + if(Effect = GetEffect("Snapping",this())) EndSnapping(Effect); + +} + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Zeichnen des Wurms! */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +// Plaziert die Teilelemente des Wurms. +// An dieser Funktion bin ich Tage gesessen +// und hab sie 4 mal neu geschrieben. Würdigt das!!!! %( +public func AdjustParts() +{ + posx = CreateArray(parts); + posy = CreateArray(parts); + posr = CreateArray(parts); // ja, das pos ist nur damit es passt \o/ + + var bx, by, //base-pos + hx,hy; //head-pos + + bx = GetX(); + by = GetY(); + hx = head->GetX(); + hy = head->GetY(); + + var hr = Normalize(head->GetR(),-180); + if(Abs(hr) > 90) hr = Normalize(180-hr,-180); + + var xh; //x-head für sin() + var xs; //x-step + + var amp; + + var dif; + var kfh; // Kugeln für Höhe + var hd; // Höhenunterschied zwischen den Kugeln + var wd; // Breitenunterschied zwischen den Kugeln + + var ph = WORM_Part-WORM_Cutoff; + var th = parts*ph; //max. höhe des Wurms + + var dist = Distance(bx,by,hx,hy); + var angle = Angle(bx,by,hx,hy); + + // Zuerst alle Positionen kalkulieren + // Allgemeines + dif = Abs(hy-by)+WORM_Part*4/3; + + var maximum = Min( Abs(hr*1200/180), 1000); + var sinus = Sin(Max(55,Abs(hr)),1000); + + amp = Abs(hy-by)*1000*1000/Max(maximum,sinus); + + var ydir = -Abs(hy-by)/(hy-by); + + //xh = 180 - xh*2; + xh = Abs(Normalize(angle-head->GetR(),-180));//; Min(170,Max(55,Abs(hr))); + + xh = BoundBy(xh,55,130); + + xs = xh*100 / parts; + + //Log("%d, %d",xh,xs); + + wd = ((hx-bx)*1000)/parts; + + // Dann für jeden Teil + for(var i=0; i < parts; i++) + { + posx[i] = wd*i; + posy[i] = -Sin(xs*i+700,amp*ydir,100); + } + + // Dann Rotieren + posr[0] = Angle(posx[0],posy[0],posx[1],posy[1]); + posx[parts] = (hx-bx)*1000; + posy[parts] = (hy-by)*1000; + //posr[WORM_Count-1] = Angle(posx[WORM_Count-1],posy[WORM_Count-1],(GetX()-head->GetX())*1000,(GetY()-head->GetY())*1000); + for(var i=1; i < parts; i++) + { + posr[i] = Angle(posx[i],posy[i],posx[i+1],posy[i+1]); + } + + return 1; +} + +private func Pulse(int pos) { // values from -1000 to 1000 + var pulse = Sin(3*pos/5,1000); + var fire = 1000-Abs(Sin(pos/7+90,1000)); + return (pulse * fire ) / 1000; +} + +public func RedrawParts(int time, int speed, int blow, int dir, int mode) { + + if(time == -1) time = GetActTime(); + if(!speed) speed = 15; + if(!blow) blow = 100; + if(!dir) dir = -1; + + for(var i=0; i <= parts; i++) + { + var r = dir*i*7+time*1; + var pulse = blow*Pulse(r*speed)/1000; + //if(mode == 0) pulse = pulse; + if(mode == 1) pulse = Abs(pulse); + else if(mode == 2) pulse = Max(0,pulse); + + var thorn = 500-i*100; + var w = thorn+1000+pulse; + var l = thorn/2+1000+pulse; + + // auch der Kopf + if(i == parts) { + SetObjDrawTransform(w,0,0,0,l,0,head); + break; + } + + var fsin=-Sin(posr[i], 1000), fcos=Cos(posr[i], 1000); + + var width = +fcos*w/1000, height = +fcos*l/1000; + var xskew = +fsin*l/1000, yskew = -fsin*w/1000; + + SetObjDrawTransform(width,xskew,posx[i],yskew,height,posy[i],this(),i+1); + } +} + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Blubb0r Effekt0rz */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +protected func FxWormDrawStart(object target, int num, int temp, int speed, int size, int reverse, int mode) { + if(temp) return; + + EffectVar(1,target,num) = speed; + EffectVar(2,target,num) = size; + EffectVar(3,target,num) = reverse; + EffectVar(4,target,num) = mode; +} + +protected func FxWormDrawTimer(object target, int num, int time) { + + RedrawParts(time-EffectVar(0,target,num),EffectVar(1,target,num),EffectVar(2,target,num),EffectVar(3,target,num),EffectVar(4,target,num)); +} + +protected func FxWormDrawEffect(string name, object target, int num, int newnum, int speed, int size, int reverse, int mode) { + + if(name == "WormDraw") { + // übernehmen und ablehnen, hurrhurr + EffectVar(0,target,num) = GetEffect(0,target,num,6); + EffectVar(1,target,num) = speed; + EffectVar(2,target,num) = size; + EffectVar(3,target,num) = reverse; + EffectVar(4,target,num) = mode; + + return -1; + } +} + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Sterbeeffekt */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +protected func FxWormDieTimer(object target, int num, int time) { + + target->MoveHead(RandomX(-70,70),RandomX(500,700),15); + + if(!(time%8)) { + var count = target->GetParts(); + var x = LocalN("posx",target)[count-1]/1000; + var y = LocalN("posy",target)[count-1]/1000; + AlienBlood(70, AbsX(target->GetX()+x), AbsY(target->GetY())+y); + target->SetParts(count-1); + } + + if(!(target->GetParts())) return -1; +} + +protected func FxWormDieStop(object pTarget, int iEffectNumber, int iReason, bool fTemp) { + if(fTemp) return 0; + + RemoveEffect("WormDraw",pTarget); +} + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Kein Ablegen*/ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +protected func ContainedThrow() { return(1); } +protected func ContainedLeft() { return(1); } +protected func ContainedRight() { return(1); } + +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* Sterbeanimation */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ + +public func OnHit(int dmg, int type, object byObj) +{ + // ein Feind?? Wo! + SetPrey(byObj); + // Aua!!! (falls nicht angreifen) + //if(!IsSnapping()) MoveHead(RandomX(-70,70),RandomX(700,1000),BoundBy(dmg,1,15)); +} + +public func Die() +{ + while(Contents()) Contents()->Exit(); + AddEffect("WormDraw",this(),10,1,this(),0, 18, 600, 1, 1); + AddEffect("WormDie",this(),1,20,this()); + SetAction("Dead"); + SetAlive(false); + FadeOut(); +} + + +// Globale Einstellung: Kann von Paketen oder Szenarien überladen werden +// Ja, wir überladen es. \o/ +global func ANIM_IsCollectible(object pByContainer) +{ + // Der Wurm darf! + if(GetID(pByContainer) == ALN1) + return true; + + return _inherited(pByContainer); +} + +/* ... */ + +protected func Destruction() { + if(head) RemoveObject(head); + while(Contents()) Contents()->Exit(); +} + +public func NoWarp() { return(1); } +public func IgnoreFriendlyFire() { return(1); } +public func IsThreat() { return(true); } +public func IsAlien() { return(GetAction()!="Dead"); } diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/DefCore.txt b/Hazard.c4d/Environment.c4d/Darkness.c4d/DefCore.txt new file mode 100644 index 00000000..e42e07b5 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=DARK +Version=4,9,8,2 +Name=Darkness +Category=C4D_StaticBack|C4D_Environment +MaxUserSelect=10 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/DescDE.txt b/Hazard.c4d/Environment.c4d/Darkness.c4d/DescDE.txt new file mode 100644 index 00000000..cf8490a6 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/DescDE.txt @@ -0,0 +1 @@ +Sorgt für düstere Atmosphäre. \ No newline at end of file diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/DescUS.txt b/Hazard.c4d/Environment.c4d/Darkness.c4d/DescUS.txt new file mode 100644 index 00000000..0d30c81d --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/DescUS.txt @@ -0,0 +1 @@ +Provides a dark ambient. \ No newline at end of file diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/Graphics.png b/Hazard.c4d/Environment.c4d/Darkness.c4d/Graphics.png new file mode 100644 index 00000000..d2fd6d49 Binary files /dev/null and b/Hazard.c4d/Environment.c4d/Darkness.c4d/Graphics.png differ diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/Names.txt b/Hazard.c4d/Environment.c4d/Darkness.c4d/Names.txt new file mode 100644 index 00000000..1d7b2dc0 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Düsternis +US:Darkness \ No newline at end of file diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/Script.c b/Hazard.c4d/Environment.c4d/Darkness.c4d/Script.c new file mode 100644 index 00000000..506c8651 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/Script.c @@ -0,0 +1,214 @@ +/*-- Düsternis --*/ + +#strict + +//Ob es wirklich dunkel ist. +local darkness; + +// Kann mittels des Spielzielauswählers ausgewählt werden +//public func IsChooseable() { return(true); } +// Das war einmal. Der Regelwähler behandelt Dunkelheit jetzt gesondert. + +protected func Activate(iPlr) { + MessageWindow(GetDesc(),iPlr); +} + +public func Initialize() { + ScheduleCall(this(),"PostInitialize",1); +} + +private func PostInitialize() { + //nur eine Dunkelheit! + var count = 1; + for(var d in FindObjects(Find_ID(GetID()),Find_Exclude(this()))) { + count++; + RemoveObject(d); + } + + if(FindObject(CHOS)) count = 0; + + //sehr wichtig + SetDarkness(count); +} + +public func UpdateLights() { + var obj; + + for(obj in FindObjects(Find_Func("IsLight"))) { + obj->~Update(); + } + + var d = GetDarkness(100); + for(obj in FindObjects(Find_Func("IsHUD"))) + obj->~UpdateColor(d); +} + +global func CalcLight(&alphamod, &sizemod) { + sizemod = 100+GetDarkness(1000)*3/2/10; // bis zu 250% so groß + alphamod = (1000-GetDarkness(1000))/50; // 0-20 alpha werden aufaddiert + + // keine Dunkelheit: beinahe unsichtbar + // Genauso bei Dunkelheit = 0 + if(!IsDark() || !GetDarkness(1000)) alphamod = 30; +} + +public func InitializePlayer(int iPlr) { + SetFoW(true,iPlr); +} + +public func OnClonkRecruitment(object pClonk) { + if(FindObject(CHOS)) return(); + if(ObjectCount(GetID()) > 1) + return(ScheduleCall(this(),"OnClonkRecruitment",1,0,pClonk)); + SetPlrViewRange(700-3*GetDarkness(100),pClonk); + var tmp = AddLightAmbience(80,pClonk); + tmp->ChangeColor(RGBa(255,255,255,110)); + SetVisibility(VIS_Owner,tmp); +} + +public func ChooserFinished() { + for(var pClonk in FindObjects(Find_OCF(OCF_CrewMember), Find_Not(Find_Owner(NO_OWNER)))) + { + SetPlrViewRange(700-3*GetDarkness(100),pClonk); + var tmp = AddLightAmbience(80,pClonk); + tmp->ChangeColor(RGBa(255,255,255,110)); + tmp->SetOwner(pClonk->GetOwner()); + SetVisibility(VIS_Owner,tmp); + } +} + +global func IsDark() { + var obj; + if(GetID(this()) != DARK) + obj = FindObject(DARK); + else + obj = this(); + //kein Dunkelheit-Objekt -> Keine Dunkelheit + if(!obj) + return(false); + + return(obj); +} + +global func GetDarkness(int precision) { + var dark; + if(!(dark = IsDark())) + return(0); + + if(!precision) precision = 10; + + var val; + + var darkness = dark->LocalN("darkness"); + + val = darkness/(1000/precision); + + return(val); +} + +global func SetDarkness(int iGrade) { + var obj; + if(GetID(this()) != DARK) + obj = FindObject(DARK); + else + obj = this(); + //kein Dunkelheit-Objekt -> Keine Dunkelheit + if(!obj) + return(false); + + iGrade = BoundBy(iGrade,0,10); + + obj->LocalN("darkness") = iGrade*100; + var g = BoundBy(128-iGrade*10,0,128); + SetGamma(RGB(0,0,0),RGB(g,g,g),RGB(255,255,255),2); + SetSkyAdjust(RGB(127+g,127+g,127+g),RGB(100+g,100+g,100+g)); + + obj->UpdateLights(); + + return(true); +} + +// iStep: wie viel Änderung der Dunkelheit pro 10 Frames +global func FadeDarkness(int iGrade, int iStep) { + var obj; + if(GetID(this()) != DARK) + obj = FindObject(DARK); + else + obj = this(); + //kein Dunkelheit-Objekt -> Keine Dunkelheit + if(!obj) + return(false); + + if(!iStep) iStep = 100; + + iGrade = BoundBy(iGrade,0,10); + + var darkness = obj->LocalN("darkness"); + + AddEffect("Fading",obj,20,1,obj,DARK,iGrade*100,darkness,iStep); + + return(true); +} + +public func Destruction() { + SetDarkness(0); + UpdateLights(); + for(var light in FindObjects(Find_Func("IsLight"),Find_Func("LocalN(\"bAmbience\")"))) + RemoveObject(light); +} + +func FxFadingStart(object pTarget, int iEffectNumber, int iTemp, int endgrade, int startgrade, int frames) { + if(iTemp) + return(); + EffectVar(0, pTarget, iEffectNumber) = endgrade; + EffectVar(1, pTarget, iEffectNumber) = startgrade; + EffectVar(2, pTarget, iEffectNumber) = frames; + EffectVar(3, pTarget, iEffectNumber) = 0; +} + +func FxFadingTimer(object pTarget, int iEffectNumber, int iEffectTime) { + var grade = EffectVar(1,pTarget,iEffectNumber); + var end = EffectVar(0,pTarget,iEffectNumber); + var fade = EffectVar(2,pTarget,iEffectNumber); + var go = EffectVar(3,pTarget,iEffectNumber); + if(grade == end) + return(-1); + + go += fade; + + if(go >= 10) { + if(grade > end) { + grade = Max(grade-go/10, end); + } + else { + grade = Min(grade+go/10, end); + } + go = 0; + + EffectVar(1,pTarget,iEffectNumber) = grade; + + //Log("%d -> %d -> %d",grade,g,end); + + var g = BoundBy(128-grade*100/1000,0,128); + + SetGamma(RGB(0,0,0),RGB(g,g,g),RGB(255,255,255),2); + SetSkyAdjust(RGB(127+g,127+g,127+g),RGB(100+g,100+g,100+g)); + + pTarget->LocalN("darkness") = grade; + + UpdateLights(); + } + + EffectVar(3,pTarget,iEffectNumber) = go; + +} + +func FxFadingEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber, int endgrade, int stargrade, int frames) { + if(szNewEffectName S= "Fading") + return(-3); +} + +func FxFadingAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer, int endgrade, int stargrade, int frames) { + EffectVar(0,pTarget,iEffectNumber) = endgrade; + EffectVar(2,pTarget,iEffectNumber) = frames; +} diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/StringTblDE.txt b/Hazard.c4d/Environment.c4d/Darkness.c4d/StringTblDE.txt new file mode 100644 index 00000000..378c0da1 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/StringTblDE.txt @@ -0,0 +1 @@ +TimeUp=Dunkelheit-Regeln müssen für Funktionalität am Anfang des Szenarios erstellt werden. \ No newline at end of file diff --git a/Hazard.c4d/Environment.c4d/Darkness.c4d/StringTblUS.txt b/Hazard.c4d/Environment.c4d/Darkness.c4d/StringTblUS.txt new file mode 100644 index 00000000..717f82e9 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Darkness.c4d/StringTblUS.txt @@ -0,0 +1 @@ +TimeUp=Darkness-rules have to be created at the beginning to work properly. \ No newline at end of file diff --git a/Hazard.c4d/Environment.c4d/DescDE.txt b/Hazard.c4d/Environment.c4d/DescDE.txt new file mode 100644 index 00000000..b02ab5fb --- /dev/null +++ b/Hazard.c4d/Environment.c4d/DescDE.txt @@ -0,0 +1 @@ +Diese Umweltsteuerungsobjekte können für zahlreiche zusätzliche Effekte in Szenarien eingefügt werden. diff --git a/Hazard.c4d/Environment.c4d/DescUS.txt b/Hazard.c4d/Environment.c4d/DescUS.txt new file mode 100644 index 00000000..63838355 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/DescUS.txt @@ -0,0 +1 @@ +Environment control objects can be placed in scenarios for additional scenic effects. \ No newline at end of file diff --git a/Hazard.c4d/Environment.c4d/Names.txt b/Hazard.c4d/Environment.c4d/Names.txt new file mode 100644 index 00000000..bec4e418 --- /dev/null +++ b/Hazard.c4d/Environment.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Umwelt +US:Environment diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DefCore.txt new file mode 100644 index 00000000..70ebac44 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GAH_ +Version=4,9,8,2 +Name=Alien Hunt +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=1 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GAH_=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DescDE.txt new file mode 100644 index 00000000..134f072c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DescDE.txt @@ -0,0 +1 @@ +Alle Aliens müssen vernichtet werden. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DescUS.txt new file mode 100644 index 00000000..692d2958 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/DescUS.txt @@ -0,0 +1 @@ +You have to destroy all aliens. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Graphics.png new file mode 100644 index 00000000..42e3d37d Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Names.txt new file mode 100644 index 00000000..eeda2d18 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Alienjagd +US:Alienhunt \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Script.c b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Script.c new file mode 100644 index 00000000..61bc403e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/Script.c @@ -0,0 +1,142 @@ +/*-- Alienjagd --*/ + +#strict 2 +#include GOAL + +local aPlayerLives, iWinScore; + +public func Initialize() +{ + // Anzahl Leben wird durch Anzahl Aktivierungen eingestellt + var goal; + if(goal = FindObject(GetID())) + { + goal->AddRelaunch(); + RemoveObject(); + } + iWinScore = 1; + aPlayerLives = CreateArray(); + InitScoreboard(); +} + +public func AddRelaunch() +{ + iWinScore++; +} + +public func WinScoreChange(iNewScore) +{ + iWinScore = iNewScore; +} + +public func ChooserFinished() +{ + InitScoreboard(); +} + +protected func InitializePlayer(int playerNr, int x, int y, object base, int teamId) +{ + if(!aPlayerLives) aPlayerLives = CreateArray(); // Rückwärtskompatibilität + aPlayerLives[playerNr] = iWinScore-1; + + UpdateScoreboard(playerNr); +} + +protected func RemovePlayer(int playerNr) +{ + var playerId = GetPlayerID(playerNr); + SetScoreboardData(playerId, 0, 0,0); +} + +protected func InitScoreboard() +{ + SetScoreboardData(SBRD_Caption, SBRD_Caption, "", SBRD_Caption); + SetScoreboardData(SBRD_Caption, 0, "{{HZCK}}", SBRD_Caption); +} + +protected func UpdateScoreboard(int playerNr) +{ + var playerId = GetPlayerID(playerNr); + SetScoreboardData(playerId, SBRD_Caption, GetTaggedPlayerName(playerNr)); + SetScoreboardData(playerId, 0, Format("%d", aPlayerLives[playerNr])); +} + +public func RelaunchPlayer(int playerNr, object clonk, int killerplayerNr) +{ + if(playerNr == -1 || !GetPlayerName(playerNr)) return; + if(GetPlayerType(playerNr) == C4PT_Script) + if(GetAlive(clonk)) + { + aPlayerLives[playerNr] += iWinScore; + return; + } + + if(playerNr == -1) + return; + + aPlayerLives[playerNr]--; + UpdateScoreboard(playerNr); + + if(aPlayerLives[playerNr] < 0) + { + // Verloren + EliminatePlayer(playerNr); + } +} + +public func IsFulfilled() { + if(FindObject(CHOS)) return false; + + return(!GetLength(AliensLeft())); +} + +protected func Activate(player) +{ + return(MessageWindow(GetFulfillText(),player)); +} + +private func GetFulfillText() +{ + var aAliens = AliensLeft(); + if(!GetLength(aAliens)) + return("$MsgAllDead$"); + var aliens = CreateArray(); + for(var obj in aAliens) { + if(!FindIn(aliens,GetID(obj))) + aliens[GetLength(aliens)] = GetID(obj); + } + + var text = "$MsgStillLeft$"; + for(var ID in aliens) + { + text = Format("%s|{{%i}} %s: %d",text,ID,GetName(0,ID),ObjectCount(ID)); + } + return(text); +} + +private func AliensLeft() +{ + return(FindObjects(Find_Func("IsAlien"))); +} + +private func FindIn(array a, b) +{ + for(var c in a) + if(c == b) + return(true); + + return(false); +} + +public func OnAlienDeath(object alien, int killedBy) +{ + // halber Wert des getöteten Aliens = money + DoWealth(killedBy, + alien->GetValue() / 2); +} + +// Kann mittels des Spielzielauswählers konfiguriert werden +public func IsConfigurable() { return true; } + +public func GetMoreScoreText() { return "$MoreRelaunch$"; } + +public func GetLessScoreText() { return "$LessRelaunch$"; } \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/StringTblDE.txt new file mode 100644 index 00000000..dd5b5588 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/StringTblDE.txt @@ -0,0 +1,4 @@ +MsgAllDead=Die Jagd war erfolgreich, alle Aliens sind tot. +MsgStillLeft=Noch lebende Aliens: +MoreRelaunch=Mehr Leben +LessRelaunch=Weniger Leben \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Alienhunt.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/StringTblUS.txt new file mode 100644 index 00000000..abc669a0 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Alienhunt.c4d/StringTblUS.txt @@ -0,0 +1,4 @@ +MsgAllDead=The hunt was a success. All aliens are dead. +MsgStillLeft=Aliens left: +MoreRelaunch=More lifes +LessRelaunch=Less lifes \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/ActMap.txt new file mode 100644 index 00000000..32333345 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Turn +Procedure=FLOAT +Length=25 +Delay=2 +Facet=0,0,32,32 +NextAction=Turn \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DefCore.txt new file mode 100644 index 00000000..a4191522 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DefCore.txt @@ -0,0 +1,7 @@ +[DefCore] +id=_AR2 +Version=4,9,8,2 +Name=Arrow +Category=C4D_Object +Width=32 +Height=32 diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DescDE.txt new file mode 100644 index 00000000..36e34ca6 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DescDE.txt @@ -0,0 +1 @@ +Dieser Pfeil markiert das Hauptziel. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DescUS.txt new file mode 100644 index 00000000..008c4180 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/DescUS.txt @@ -0,0 +1 @@ +This arrow assigns the main target. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Graphics.png new file mode 100644 index 00000000..6cee4d0e Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Names.txt new file mode 100644 index 00000000..bc45ab64 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pfeil +US:Arrow diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Script.c b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Script.c new file mode 100644 index 00000000..6ca7cd86 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Arrow.c4d/Script.c @@ -0,0 +1,14 @@ +/*-- Pfeil --*/ + +#strict + +protected func Initialize() { SetAction("Turn"); } + +global func SetArrow(iX,iY) { + RemoveObject(FindObject(_AR2)); + CreateObject(_AR2,iX,iY,-1); +} + +global func RemoveArrow() { + RemoveObject(FindObject(_AR2)); +} diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/DefCore.txt new file mode 100644 index 00000000..6b091ce2 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=GAS_ +Version=4,9,8,2 +Name=Assault +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=1 +TimerCall=Timer +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GAS_=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/DescDE.txt new file mode 100644 index 00000000..bae5cd89 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/DescDE.txt @@ -0,0 +1 @@ +Ziel für das Angreiferteam ist es, dass Hauptziel zu zerstören. Das Verteidigerteam muss dies um jeden Preis verhindern. Nachdem das Angreiferteam gewonnen hat, werden die Teams getauscht. Das Team, welches den Verteidiger schneller besiegt, gewinnt die Runde. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/DescUS.txt new file mode 100644 index 00000000..3995198f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/DescUS.txt @@ -0,0 +1 @@ +The goal of the attacking team is to destroy the main target. The defending team has to prevent that no matter what. After the attacker team has won, the teams will be switched. The team who defeats the defender team faster wins the round. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/ActMap.txt new file mode 100644 index 00000000..bcb3bd56 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Attach +Procedure=ATTACH +Length=1 +Delay=0 +FacetBase=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DefCore.txt new file mode 100644 index 00000000..d34cd816 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=EBAR +Version=4,9,8,2 +Name=EnergyBar +Category=C4D_StaticBack | C4D_Foreground +Width=110 +Height=20 +Offset=-55,-10 +Vertices=1 +Picture=0,0,110,20 diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DescDE.txt new file mode 100644 index 00000000..fc3a9147 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DescDE.txt @@ -0,0 +1 @@ +Zeigt an wieviel Schaden ein Ziel hat. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DescUS.txt new file mode 100644 index 00000000..c1e9d891 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/DescUS.txt @@ -0,0 +1 @@ +Shows how much damage a target has taken. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Graphics.png new file mode 100644 index 00000000..0204346b Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/GraphicsRow.png b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/GraphicsRow.png new file mode 100644 index 00000000..1fa76ae2 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/GraphicsRow.png differ diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Names.txt new file mode 100644 index 00000000..b2b5e219 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Energiebalken +US:Energy Bar \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Script.c b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Script.c new file mode 100644 index 00000000..71cf5281 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/EnergyBar.c4d/Script.c @@ -0,0 +1,28 @@ +/*-- Energiebalken --*/ + +#strict + +local obj; + +protected func Initialize() +{ + SetGraphics("Row", this(), GetID(), 1, 1); +} + +public func Set(object target, int color) +{ + obj = target; + + SetVertex(0,0,GetVertex(0,0,target)); + SetVertex(0,1,GetVertex(0,1,target) + GetObjHeight(target)/2+10); + SetAction("Attach",target); + + SetClrModulation(color,this(),1); + + Update(100); +} + +public func Update(int percent) +{ + SetObjDrawTransform(10*percent,0,-500*(100-percent), 0,1000,0, 0, 1); +} diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Assault.c4d/Graphics.png new file mode 100644 index 00000000..341b649f Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Assault.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/Names.txt new file mode 100644 index 00000000..b1097d56 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Assault +US:Assault \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/Script.c b/Hazard.c4d/Goals.c4d/Assault.c4d/Script.c new file mode 100644 index 00000000..0da8d37f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/Script.c @@ -0,0 +1,380 @@ +/* Assault */ + +#strict +#include TEAM + +local targets; // Die Ziele +local targetstatus; // Status der Ziele +local targetopt; // Ob das Ziel optional ist + +local timer1; +local timer2; +local phase, phasechange; + +local finished; + +local attacker, defender; + +global func AS_GetAttackerTeam() +{ + var goal = FindObject(GAS_); + if(GetID() == GAS_) goal = this; + if(!goal) return; + return LocalN("attacker", goal); +} + +global func AS_GetDefenderTeam() +{ + var goal = FindObject(GAS_); + if(GetID() == GAS_) goal = this; + if(!goal) return; + return LocalN("defender", goal); +} + +protected func Initialize() +{ + targets = CreateArray(); + targetstatus = CreateArray(); + targetopt = CreateArray(); + + // secTime = Zeit die noch übrig ist in Sekunden + timer1 = 0; + timer2= 0; + phase = 0; + iWinScore = 1; + finished = false; + + // Angreifer ist erstmal Team 1 + attacker = 1; + // Verteidiger ist demnach Team 2 + defender = 2; + + return(_inherited()); +} + +public func AddTarget(object newtarget, int opt, int maxdmg, bool nobar) +{ + // kein Ziel? WTF?! + if(!newtarget) + return(); + + // Ziel adden + var index = GetLength(targets); + targets[index] = newtarget; + targetstatus[index] = 1; + targetopt[index] = opt; + + // Effekt hinzufuegen == Zerstoerungskontrolle + AddEffect("AS_Target",newtarget, 42, 0, this(), GAS_, maxdmg, nobar); + + newtarget->SetTeam(AS_GetDefenderTeam()); + + //das wars! + return(index+1); +} + +public func SetTargetStatus(int Index, int status, int maxdmg, bool nobar) +{ + // Index muss >0 und <=GetLength() sein. + if(GetLength(targetstatus) < Index && Index <= 0) + return(0); //wtf? kein target? einfach 0 zurueckgeben. + + if(status) + { + //existiert das Objekt noch? + if(!targets[Index]) + return(); + + AddEffect("AS_Target",targets[Index], 42, 0, this(), GAS_, maxdmg, nobar); + } + else + { + RemoveEffect("AS_Target",targets[Index],GetEffect("AS_Target",targets[Index])); + } + targetstatus[Index]=status; +} + +public func GetTargetStatus(int index) +{ + // *copy'n'paste* + // Index muss >0 und <=GetLength() sein. + if(GetLength(targetstatus) < index && index <= 0) + return(0); //wtf? kein target? einfach 0 zurueckgeben. + + return(targetstatus[index-1]); +} + +public func GetAssaultPhase() { + return(phase); +} + +public func GetHUDInfo(int player) { + + return(Format("%d:%.2d - %d:%.2d",GetTeamColor(1), timer2/60, timer2%60, GetTeamColor(2), timer1/60, timer1%60)); +} + +/* +public func SetDamageMask(int index, int dmgmask) +{ + // *copy'n'paste* + // Index muss >0 und <=GetLength() sein. + if(GetLength(targetstatus) < index && index <= 0) + return(0); //wtf? kein target? einfach 0 zurueckgeben. + + var obj = targets[index-1]; + var nr = GetEffect("AS_Target", obj); + EffectVar(1, obj, nr) = dmgmask; +} + +public func GetDamageMask(int index ) +{ + // *copy'n'paste* + // Index muss >0 und <=GetLength() sein. + if(GetLength(targetstatus) < index && index <= 0) + return(0); //wtf? kein target? einfach 0 zurueckgeben. + + var obj = targets[index-1]; + var nr = GetEffect("AS_Target", obj); + return(EffectVar(1, obj, nr)); +} */ + +/* Effekte!!!! */ + +// Variablen: +// 0 - Maximaler Schaden +// 1 - nicht benutzt +// 2 - Farbe des Balkens + +// Anfang +private func FxAS_TargetStart(object pTarget, int iEffectNumber, int iTemp, int maxdmg, bool nobar) +{ + if(iTemp) + return(); + + var index; + for(index = 0; index < GetLength(targets); index++) + if(targets[index] == pTarget) + break; + + // Lebensbalken erstellen? + if(!nobar) + { + var color = RGBa(230,10,10,50); + if(targetopt[index] == 1) + color = RGBa(180,230,10,50); + if(targetopt[index] == 2) + color = RGBa(10,230,180,50); + + var bar = CreateObject(EBAR,0,0,-1); + bar->Set(pTarget, color); + EffectVar(2, pTarget, iEffectNumber) = bar; + } + + EffectVar(0, pTarget, iEffectNumber) = maxdmg; + + FxAS_TargetUpdate(pTarget, iEffectNumber, 0); +} + +// Und Ende? +private func FxAS_TargetDamage(object pTarget, int iEffectNumber, int iDmgEngy, int iCause) +{ + var eng = pTarget->GetDamage() + iDmgEngy; + if(GetOCF(pTarget) & OCF_Living) + eng = pTarget->GetPhysical("Energy")/1000 - pTarget->GetEnergy() - iDmgEngy/1000; + + // Lebensanzeige und evtl. Status updaten! + FxAS_TargetUpdate(pTarget, iEffectNumber, (eng*100)/EffectVar(0, pTarget, iEffectNumber)); + + // Schaden durchgehen lassen. + return(iDmgEngy); +} + +private func FxAS_TargetUpdate(object pTarget, int iEffectNumber, int percent) +{ + // Lebensbalken updaten + if(EffectVar(2, pTarget, iEffectNumber)) + EffectVar(2, pTarget, iEffectNumber)->Update(Max(0,100-percent)); + + /* macht das dings selbst + if(percent >= 100) + { + pTarget->~Damage(); + RemoveEffect(0, pTarget, iEffectNumber); + return(-1); + }*/ + return(); +} + +// Das wahre Ende. +private func FxAS_TargetStop(object pTarget, int iEffectNumber, int iReason, bool fTemp) +{ + if(fTemp) + return; + + // Nichts tun wenn gerade die Phase gewechselt wird + if(phasechange) return; + + // stirb Lebensbalken, stirb! + RemoveObject(EffectVar(2, pTarget, iEffectNumber)); + + var index, count; + for(index = 0; index < GetLength(targets); index++) + if(targets[index] == pTarget) + break; + + var count; + for(var i = 0; i <= index; i++) + if(!targetopt[i]) + count++; + + // Ziel zerstört! + targetstatus[index] = false; + + // Das Spiel benachrichtigen. :D + GameCall(Format("OnTarget%dDestruction",index+1)); + // Nachricht ausgeben + if(targetopt[index] == 0) + Log("$TargetDestroyed$", count, GetName(pTarget)); + if(targetopt[index] == 1) + Log("$OptTargetDestroyed$", GetName(pTarget)); + + Sound("TargetDestroyed",1); + + // Geld! + DoWealth(attacker,50); + + // alle Hauptziele put? + var end = true; + for(index = 0; index < GetLength(targetstatus); index++) + // Ziel noch am leben und nicht optional? + if(targetstatus[index] && !targetopt[index]) + { + end = false; + break; + } + + if(end) + { + // Phase 0 ist zuende... Phase 1 einleiten!!!! (zweites Team greift an) + if(phase == 0) { + + phasechange = true; + phase = 1; + + targets = CreateArray(); + targetstatus = CreateArray(); + targetopt = CreateArray(); + + Log("$TeamChange$", GetTeamName(AS_GetAttackerTeam()), timer1/60, timer1%60, GetTeamName(AS_GetDefenderTeam())); + Sound("TeamChange", 1); + + // Teams austauschen + attacker = 2; + defender = 1; + + // Anderer GameCall, den man für die Teamstartpositionen benutzen sollte + GameCall("PreResetAssault"); + + // Alles löschen --- ##### !!!!! Gefahr! + for(var obj in FindObjects(Find_Not(Find_ID(GOAL)), // und hier hats geknallt + Find_Not(Find_Category(C4D_Goal)), + Find_Not(Find_Category(C4D_Rule)), + Find_Not(Find_Category(C4D_Environment)), + Find_Not(Find_Func("NoAssaultRemove")))) // Damit werden Objekte nicht gelöscht! + if(obj) // Nullpointerschutz falls Objekte ihre Hilfsobjekte löschen + { + if(obj->GetOCF() & OCF_CrewMember) obj->~NoDeathAnnounce(); + obj->RemoveObject(0, true); + } + + // Alles vom Szenario neu erzeugen lassen + Schedule("GameCall(\"ResetAssault\")",1,0); + + phasechange = false; + } + // Phase 2: Spiel ist zuende und das Angreiferteam der zweiten Runde hat gewonnen. + else if(phase == 1) { + if(!finished) { + DoTeamScore(attacker, 1); + finished = true; + } + } + } +} + +/* Steuerung */ + +func Timer() +{ + if(FindObject(CHOS)) + return(); + + //OMGROFLOLHA$X=RFURLOL X-DD!11! :DD!ORLGMF! + // ^- Überreste einer Gobby-Sitzung . + + if(phase == 0) timer1++; + else timer2++; + + // in Phase 2 hat das Angreiferteam versagt. + if(timer2 > timer1 && phase == 1) + { + //CustomMessage(Format("Win!"),0,NO_OWNER,0,0,GetTeamColor(2),0,0,MSG_NoLinebreak); + + if(!finished) { + DoTeamScore(defender, 1); + finished = true; + } + } + InitScoreboard(); + UpdateHUDs(); +} + +private func InitScoreboard() +{ + //var iColID = TEAM_GoalColumn; + + SetScoreboardData(SBRD_Caption, SBRD_Caption, Format("{{%i}} Assault",GetID())); + SetScoreboardData(0,SBRD_Caption,"Timer"); + SetScoreboardData(0,1, Format("%d : %.2d",GetTeamColor(2),timer1/60,timer1%60)); + SetScoreboardData(1,1, Format("%d : %.2d",GetTeamColor(1),timer2/60,timer2%60)); +} + +public func Activate(int iPlr) { + var count; + for(var index = 0; index < GetLength(targetstatus); index++) + if(targetstatus[index] && !targetopt[index]) + count++; + + return(MessageWindow(Format("$MsgGoalUnfulfilled$", count),iPlr)); +} + +private func UpdateScoreboard() +{ + // leer :( +} + +public func RelaunchPlayer(int iPlr, object pClonk, int iMurdererPlr) +{ + if(iPlr == -1 || !GetPlayerName(iPlr)) return(); + + // Scoreboard-stuff brauchen wir nicht + + // Geld + Money(iPlr, pClonk, iMurdererPlr); +} + +/* Entwicklungshilfe */ + +public func Debug() +{ + var i,j = GetLength(targets); + for(i = 0; i < j; i++) + { + if(!targets[i]) + Log("%2d: Zerstört/Nicht vorhanden"); + if(targetopt[i]) + Log("%2d: %s - Nebenziel", i+1, GetName(targets[i])); + else + Log("%2d: %s", i+1, GetName(targets[i])); + } +} diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/StringTblDE.txt new file mode 100644 index 00000000..9dd313ec --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +MsgGoalUnfulfilled=Es gibt noch %d primäre Ziele. +TargetDestroyed=%d. Ziel zerstört! ( %s ) +OptTargetDestroyed=%s zerstört! + +TeamChange=Team %s hat alle Hauptziele nach %d:%.2d zerstört! Zeigt ihnen, ob ihr es besser könnt, %s! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/Assault.c4d/StringTblUS.txt new file mode 100644 index 00000000..1f41ace4 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Assault.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +MsgGoalUnfulfilled=There are still %d primary Targets. +TargetDestroyed=%d. target destroyed! ( %s ) +OptTargetDestroyed=%s destroyed! + +TeamChange=Team %s has destroyed every main target in %d:%.2d. Time to do it better, %s! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/TargetDestroyed.wav b/Hazard.c4d/Goals.c4d/Assault.c4d/TargetDestroyed.wav new file mode 100644 index 00000000..eb923a73 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Assault.c4d/TargetDestroyed.wav differ diff --git a/Hazard.c4d/Goals.c4d/Assault.c4d/TeamChange.wav b/Hazard.c4d/Goals.c4d/Assault.c4d/TeamChange.wav new file mode 100644 index 00000000..66a7e669 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Assault.c4d/TeamChange.wav differ diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/ActMap.txt new file mode 100644 index 00000000..4a752295 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=BombFriendly +Length=1 +Facet=64,0,24,24 + +[Action] +Name=BombEnemy +Length=1 +Facet=64,24,24,24 + +[Action] +Name=BombGone +Length=1 +Facet=88,0,24,24 \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/ActMap.txt new file mode 100644 index 00000000..8df084b3 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Fly +Procedure=NONE +Length=1 +Delay=0 +Facet=0,0,10,11 +NextAction=Fly + diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/BombShot.wav b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/BombShot.wav new file mode 100644 index 00000000..ac96a008 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/BombShot.wav differ diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DefCore.txt new file mode 100644 index 00000000..d4851a93 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=GBRB +Version=4,9,8,2 +Name=Bomb +Category=C4D_Vehicle +MaxUserSelect=1 +Width=10 +Height=11 +Offset=-5,-5 +Vertices=4 +VertexX=0,-4,4 +VertexY=4,0,0,-4 +VertexFriction=100,100,100 +Value=45 +Mass=15 +Components=METL=2 +Picture=10,0,64,64 +Collectible=1 +Rotate=1 +ColorByOwner=1 +NoSell=1 diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DescDE.txt new file mode 100644 index 00000000..4ed08f48 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Bombe. Sie sollte durch das gegnerische Tor. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DescUS.txt new file mode 100644 index 00000000..d465d95d --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/DescUS.txt @@ -0,0 +1 @@ +The bomb. Throw it through the enemies' goal! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Graphics.png new file mode 100644 index 00000000..ce00a11d Binary files /dev/null and b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Names.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Names.txt new file mode 100644 index 00000000..fbad7f04 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bombe +US:Bomb \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Script.c b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Script.c new file mode 100644 index 00000000..dcf6cab7 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/Script.c @@ -0,0 +1,308 @@ +/*-- Bombe (Zapper kann nicht coden) --*/ + +#strict + +local startX,startY; +local pLight; +local timer, holder; + +public func RejectShift() +{ + return true; +} + +public func IsAlwaysCollectable() +{ + return true; +} + +// Timer zurückliefern +public func GetBombTimer() +{ + return(timer); +} + +public func IsAtHome() { + if(Abs(GetX()-startX) < 20) + if(Abs(GetY()-startY) < 20) + if(GetOwner() == -1) + return(true); + return(false); +} + +public func Init(iX,iY) +{ + startX=iX; + startY=iY; + Exit(); + SetPosition(startX,startY); + SetOwner(NO_OWNER); + holder = 0; + AddEffect("BombFlight",this(),20,1,this(),GetID()); + // eventuelle Bombeneffekte entfernen + var effect = GetEffect("BombTimer",this()); + if(effect) + RemoveEffect(0,this(),effect); +} + +// Anzeige in der Hand +public func IsDrawable() { return(true); } +public func HandSize() { return(1050); } +public func HandX() { return(1000); } +public func HandY() { return(1000); } + +public func IsBouncy() { return(true); } +public func CanAim() { return(1); } + +public func ControlThrow() { + // bereit zum Schießen + if(!(Contained()->ReadyToFire())) return(false); + + LaunchBomb(6,Contained()->~AimAngle(0)); + return(true); +} + +// verschießt die Bombe +// speed: Geschwindigkeit +// angle: Winkel +public func LaunchBomb(int speed, int angle) { + var user = Contained(); + var dir = GetDir(user)*2-1; + + // Adjust angle + angle = BoundBy(angle+GetYDir(user)*dir,-360,360); + // calculate speed + var xdir = Sin(angle,speed); + var ydir = -Cos(angle,speed); + + var x,y; + user->WeaponEnd(x,y); + + // effect + Sound("BombShot"); + + for(var cnt=0;cnt<5;cnt++) + CreateParticle("Thrust",x,y,GetXDir(user)+RandomX(-2,2),GetYDir(user)+RandomX(-2,2),100,RGBa(10,10,255,0),0,0); + + for(var i=0; i<0; ++i) { + CreateParticle("Smoke2",x+RandomX(-5,+5),y+RandomX(-5,+5), + GetXDir(user)+RandomX(0,xdir/4),GetYDir(user)+RandomX(0,ydir/4), + RandomX(80,140),RGBa(100,100,255,0),0,0); + } + + var no = AddEffect("CollectionException", this(), 1, 5); + EffectVar(0, this(), no) = Contained(); + Exit(this(), x+xdir/10, y+ydir/10,xdir,xdir, ydir,0); +} + +protected func Destruction() +{ + var pBomb=CreateObject(GetID(),0,0,-1); + pBomb->Init(startX,startY); + GameCallEx("BombReturned"); + Log("$Returned$"); + Sound("BombReset",1); +} + +protected func Departure() { + GameCallEx("BombLoose"); +} + +protected func ReturnToSpawn() +{ + var eff; + while(eff = GetEffect("BombFlight",this())) + RemoveEffect(0, this(),eff); + SetSpeed(); + Init(startX, startY); + GameCallEx("BombScored"); +} + +protected func Entrance(pTo) +{ + // Wer sie sammelt, besitzt. Quasi. + if(GetOwner(pTo) != NO_OWNER) + SetOwner(GetOwner(pTo)); + + var eff; + while(eff = GetEffect("BombFlight",this())) + RemoveEffect(0, this(),eff); + + // Timer starten + if(!(GetOCF(pTo) & OCF_CrewMember)) return(1); + if(pTo == holder) + AddEffect("BombTimer", this(), 1, 1, this(),0, pTo, timer); + else + AddEffect("BombTimer", this(), 1, 1, this(),0, pTo, 1000); + + GameCallEx("BombTaken"); +} + +protected func Hit(xDir,yDir) +{ + if(GBackSolid(-6,0) || GBackSolid(6,0) || GBackSolid(-2,4) || GBackSolid(2,4)) SetXDir(-(xDir/20)); + if(GBackSolid(-4,3) || GBackSolid(4,3) || GBackSolid(0,6) || GBackSolid(0,-6)) SetYDir(-(yDir/20)); + return(_inherited()); +} + +/*---- Effekt für den Flug der Bombe ----*/ + +protected func FxBombFlightStart(pTarget) +{ + // Licht erstellen + if(!pLight) pLight=AddLight(200,HSL(0,255,255),pTarget); + return(true); +} + +protected func FxBombFlightTimer(pTarget,iEffectNumber,iEffectTime) +{ + // Licht effektiern + if(pLight) + pLight->ChangeColor(HSL(BoundBy(Abs(Sin(iEffectTime*2,120)),0,120),128,200)); + if(!Contained()) + { + if((GetOwner() != NO_OWNER)) // Irgendwer hat sie irgendwo hingeschmissen. + { + // Zeit + if((++EffectVar(0, pTarget, iEffectNumber)) > 32*30) + { + pTarget -> Explode(25); // Draußen-Zeit erhöhen, schauen ob zu lang, evntl. bumm + return(); + } + // Effekte + if( (36*30 % (36*30 - EffectVar(0, pTarget, iEffectNumber))) == 0) + { + CreateParticle("PSpark", 0, 0, 0, 0, 20, RGB(255,0,0), pTarget); + Sound("Bip", 0, pTarget, 20); + } + } + if(!pLight) + { + pLight=AddLight(200,HSL(0,255,255),pTarget); + pLight->SetPosition(pTarget->GetX(), pTarget->GetY()); + } + } + else + { + if(EffectVar(0, pTarget, iEffectNumber)) // Nicht draußen? Zeit zurücksetzen! + EffectVar(0, pTarget, iEffectNumber) = 0; + if(pLight) pLight->RemoveObject(); + } + + return(true); +} + +protected func FxBombFlightStop() +{ + if(pLight) RemoveObject(pLight); // Das Licht wegmachen. +} + +/*---- Effekt für den Timer der Bombe ----*/ + +protected func FxBombTimerStart(object pTarget, int iNo, int iTemp, object pHolder, int iTimer) +{ + if(iTemp) return(); + if(!Contained()) return(-1); + holder = pHolder; + timer = iTimer; +} + +protected func FxBombTimerTimer() +{ + if(!Contained()) return(-1); + timer--; + if(!timer) return(Explode(25)); + var angle = 90 * timer / 1000; + PlayerMessage(Contained()->GetOwner(), "%d", Contained(), RGB(Cos(angle, 255), Sin(angle, 255)), timer); +} + +public func AI_Inventory(object clonk) +{ + if(clonk->Contents() != this) return false; + + // nächstes, feindliches Tor suchen + var nextding, distance = -1; + for(var pGate in FindObjects(Find_ID(GBRG))) + { + if(pGate->GetGoalTeam() == GetPlayerTeam(clonk->GetOwner())) continue; + if(distance == -1) + { + nextding = pGate; + distance = ObjectDistance(pGate); + } + else + { + if(ObjectDistance(pGate) < distance) + { + nextding = pGate; + distance = ObjectDistance(pGate); + } + } + } + // Tor ist zu weit weg? + if(distance > 200) + { + distance = -1; + nextding = false; + } + // Freunde suchen, wenn der Timer abläuft + if(!nextding && GetBombTimer() <= 100) + { + for(var pFriend in FindObjects(Find_OCF(OCF_CrewMember), Find_Allied(clonk->GetOwner()), Find_Exclude(clonk))) + { + if(distance == -1) + { + nextding = pFriend; + distance = ObjectDistance(pFriend); + } + else + { + if(ObjectDistance(pFriend) < distance) + { + nextding = pFriend; + distance = ObjectDistance(pFriend); + } + } + } + } + // Ziel? + if(nextding) + { + + // Ziel ist in Reichweite? + if(distance <= 200 && PathFree(GetX(), GetY(), nextding->GetX(), nextding->GetY())) + { + // Winkel bestimmen + var angle = Angle(GetX(), GetY(), nextding->GetX(), nextding->GetY()); + + // Winkel stimmt! + if(Inside(angle, 70, 110) || Inside(angle, 250, 290)) + { + if(clonk->ReadyToFire()) + { + if(GetX() < nextding->GetX()) + clonk->SetDir(DIR_Right); + else + clonk->SetDir(DIR_Left); + // Feuer frei! + ControlThrow(); + } + } + else + { + // Zielen beginnen + if(!clonk->IsAiming()) + { + if(clonk->ReadyToSquatAim()) + clonk->StartSquatAiming(); + } + else + { + clonk->DoMouseAiming(nextding->GetX(), nextding->GetY()); + } + } + } + } + + return true; +} diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/StringTblDE.txt new file mode 100644 index 00000000..ae8308b5 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +Returned=Die Bombe ist zurück! +Bomb=Bombe \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/StringTblUS.txt new file mode 100644 index 00000000..12cf4b02 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Bomb.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +Returned=The bomb returned! +Bomb=Bomb \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/ActMap.txt new file mode 100644 index 00000000..d71cad5b --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/ActMap.txt @@ -0,0 +1,34 @@ +[Action] +Name=FlashUp +Directions=2 +FlipDir=1 +Length=6 +Delay=2 +Facet=0,80,33,49,26,10 +FacetBase=1 +NextAction=FlashDown +StartCall=SoundScore + +[Action] +Name=FlashDown +Directions=2 +FlipDir=1 +Length=5 +Reverse=1 +Delay=4 +Facet=0,80,33,49,26,10 +FacetBase=1 +NextAction=Exist +StartCall=SoundOut + +[Action] +Name=Exist +Directions=2 +FlipDir=1 +Length=1 +Delay=5 +Facet=0,80,33,49,26,10 +FacetBase=1 +NextAction=Exist + + diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DefCore.txt new file mode 100644 index 00000000..44a6d18e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=GBRG +Version=4,9,8,2 +Name=Bomb gate +Category=C4D_StaticBack +Timer=1 +TimerCall=CheckGoal +Width=90 +Height=80 +Offset=-45,-40 +SolidMask=90,0,90,80,0,0 +TopFace=45,0,45,80,45,0 +Picture=198,0,64,64 \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DescDE.txt new file mode 100644 index 00000000..b60d94d6 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DescDE.txt @@ -0,0 +1 @@ +Modernste Technik erlaubt es den Hazardclonks präzise festzustellen, wann eine Bombe ein festlegbares Areal passiert. Klar, dass diese Technologie gleich für halsbrecherische Spiele missbraucht wird. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DescUS.txt new file mode 100644 index 00000000..9c233d0f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/DescUS.txt @@ -0,0 +1 @@ +Who knows what is behind this? \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Graphics.png new file mode 100644 index 00000000..134523a1 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Names.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Names.txt new file mode 100644 index 00000000..5dd27794 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bombentor +US:Bomb gate \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Script.c b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Script.c new file mode 100644 index 00000000..ca41342f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/Script.c @@ -0,0 +1,75 @@ +/*-- Tor (Zapper kann nicht coden) --*/ + +#strict +local iTeam; // Hier ist das Team drin gespeichert. + +protected func Initialize() +{ + SetAction("Exist"); +} + +private func SoundScore() +{ + Sound("Energize"); +} + +private func SoundOut() +{ + Sound("DeEnergize"); +} + +protected func CheckGoal() +{ + var pObj = FindObject2(Find_InRect(-19,-30,38,49), Find_ID(GBRB), Find_Not(Find_Owner(NO_OWNER))); // Bombe suchen. + if( pObj ) + { + var iBombTeam = GetPlayerTeam(pObj->GetOwner()); // Team speichern + if(iBombTeam != GetGoalTeam()) // Eigentore gibt es nicht! + { + // Punktevergabe + if(pObj->Contained()) + { + DoTeamScore(iBombTeam, +2); + Log("$TeamMultiScore$", GetPlayerName(pObj->GetOwner()), 2, GetTeamName(iBombTeam)); + } + else + { + DoTeamScore(iBombTeam, +1); + Log("$TeamScored$", GetPlayerName(pObj->GetOwner()), GetTeamName(iBombTeam)); + } + + // Effekte + var dir = GetDir(); + SetAction("FlashUp"); + SetDir(dir); + pObj -> CastParticles("MSpark", 15, 25, 0, 0, 20, 30, RGB(200, 230, 255), RGB(255,255,255)); + + // Bombe zurücksetzen + pObj -> ReturnToSpawn(); + + Sound("TeamChange",1); + + } + } +} + +public func IsBombGoal(){return(true);} + +public func GetGoalTeam() +{ + return(iTeam); +} + +public func SetGoalTeam(int t) +{ + iTeam = t; +} + +//Erzeugt ein Bombentor +global func CreateBombGate(int iT,int iX,int iY, int iDir) +{ + var gate=CreateObject(GBRG,AbsX(iX),AbsY(iY),-1); + gate->SetGoalTeam(iT); + gate->SetDir(iDir); + return (gate); +} diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/StringTblDE.txt new file mode 100644 index 00000000..36f9a3ae --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +TeamScored=%s punktet für Team %s! +TeamMultiScore=%s erzielt %d Punkte für Team %s! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/StringTblUS.txt new file mode 100644 index 00000000..e07d3f01 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombGate.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +TeamScored=%s (Team %s) scores! +TeamMultiScore=%s receives %d points (Team %s)! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombReset.wav b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombReset.wav new file mode 100644 index 00000000..b741395d Binary files /dev/null and b/Hazard.c4d/Goals.c4d/BombingRun.c4d/BombReset.wav differ diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/DefCore.txt new file mode 100644 index 00000000..11d57c90 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GBR_ +Version=4,9,8,2 +Name=Bombing Run +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=100 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GBR_=1 +Picture=0,0,64,64 \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/DescDE.txt new file mode 100644 index 00000000..fec8fd3e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/DescDE.txt @@ -0,0 +1 @@ +Es gilt die Bombe durch das gegnerische Tor zu befördern. Wenn man durch das Portal läuft gibt es zwei Punkte. Wenn man die Bombe schießt nur einen. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/DescUS.txt new file mode 100644 index 00000000..fd7d8688 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/DescUS.txt @@ -0,0 +1 @@ +You have to transport the bomb trough the enemies' goal. If you go through the goal yourself you receive two points, when you just shoot the bomb, you get one point. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Graphics.png new file mode 100644 index 00000000..02b16602 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Names.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Names.txt new file mode 100644 index 00000000..03dfd4ec --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bombing Run +US:Bombing Run \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/Script.c b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Script.c new file mode 100644 index 00000000..bcd84c3e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/Script.c @@ -0,0 +1,154 @@ +/*-- BR --*/ + +#strict +#include TEAM + +protected func Initialize() +{ + //Anzahl gewinne wird durch Anzahl Aktivierungen eingestellt + var pGoal; + if (pGoal = FindObject(GetID())) + { + LocalN("iWinScore", pGoal)++; + return(RemoveObject()); + } + iWinScore = 1; + return(_inherited()); +} + +public func GetHUDInfo(int player, object hud) { + + var team = GetPlayerTeam(player); + if(team < 1) return(inherited(player)); + + var bomb = GetBomb(); + if(bomb) // can be null during initialization + { + var bc = GetBombCarrier(bomb); + if(bc) { + var bcteam = GetPlayerTeam(GetOwner(bc)); + + // which side + if(bcteam == team) + SetHUDGraphics(0,hud,GetID(),2,2,"BombFriendly"); + else + SetHUDGraphics(0,hud,GetID(),2,2,"BombEnemy"); + } + // Bombe an Heimatposition + else if(bomb->IsAtHome()) { + SetHUDGraphics(0,hud,GetID(),2,2); + } + // ansonsten isse lose + else { + SetHUDGraphics(0,hud,GetID(),2,2,"BombGone"); + } + } + + return(inherited(player)); +} + +public func BombTaken() { + UpdateHUDs(); +} + +public func BombReturned() { + UpdateHUDs(); +} + +public func BombScored() { + UpdateHUDs(); +} + +public func BombLoose() { + UpdateHUDs(); +} + +/* Globale Funktionen */ + +global func CreateBomb(int iX, int iY, int iColor) // Platziert eine Bombe an der angegebenen Position mit der angegebenen Farbe. +{ + var pBomb = CreateObject(GBRB, AbsX(iX), AbsY(iY), -1); + pBomb->Init(iX,iY,iColor); +} + +public func Activate(iCaller) +{ + var desc=GetDesc(); + desc=Format("%s||$WinString$",desc,iWinScore); + MessageWindow(desc,iCaller); +} + +// Kann mittels des Spielzielauswählers konfiguriert werden +public func IsConfigurable() { return(1); } + +// Taktik für KI + +public func GetBomb() +{ + return(FindObject2(Find_ID(GBRB))); +} + +public func GetBombCarrier(object bomb) +{ + return(bomb->Contained()); +} + +public func GetOwnGoal(int owner) +{ + for(var goal in FindObjects(Find_ID(GBRG))) + if(goal->GetGoalTeam() == GetPlayerTeam(owner)) + return(goal); +} + +private func GetEnemyGoal(int owner) +{ + for(var goal in FindObjects(Find_ID(GBRG))) + if(goal->GetGoalTeam() != GetPlayerTeam(owner)) + return(goal); +} + +// Tactic for bombing run +public func AITactic(object pAIPlayer) +{ + var owner = pAIPlayer->GetOwner(); + var bomb = GetBomb(); + var carrier = GetBombCarrier(bomb); + var goal = GetOwnGoal(owner); + var egoal = GetEnemyGoal(owner); + + var crewcount = GetCrewCount(GetOwner()); + + for(var i=0, pCrew ; pCrew = GetCrew(owner, i) ; i++) { + if(pCrew->Contained()) continue; + + // bomb carrier + if(pCrew == carrier) { + if(pCrew->GetMacroCommand(0, 1) != egoal); + // rush to enemy goal + pAIPlayer->Run(pCrew, egoal); + } + else { + // someone has the bomb + if(carrier) { + if(pCrew->GetMacroCommand(0, 1) != carrier) { + // hostile bomb carrier? + if(Hostile(owner, carrier->GetOwner())) { + // Intercept! + pCrew->SetMacroCommand(this, "Follow", carrier, 0,0,0, Aggro_Follow); + } + else { + // friendly bomb carrier, guard + pCrew->SetMacroCommand(this, "Follow", carrier, 0,0,0, Aggro_Shoot); + } + } + } + // No one has the bomb! + else { + if(pCrew->GetMacroCommand(0, 1) != bomb); + // rush to bomb + pAIPlayer->Run(pCrew, bomb); + } + } + } + return true; +} diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/StringTblDE.txt new file mode 100644 index 00000000..24c678f6 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/StringTblDE.txt @@ -0,0 +1 @@ +WinString=Das Punktelimit ist %d. diff --git a/Hazard.c4d/Goals.c4d/BombingRun.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/BombingRun.c4d/StringTblUS.txt new file mode 100644 index 00000000..b8f29758 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/BombingRun.c4d/StringTblUS.txt @@ -0,0 +1 @@ +WinString=The scorelimit is %d. diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/ActMap.txt new file mode 100644 index 00000000..f926bd16 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=FlagStolen +Length=1 +Facet=64,0,24,24 + +[Action] +Name=FlagCaptured +Length=1 +Facet=64,24,24,24 + +[Action] +Name=FlagLoose +Length=1 +Facet=88,0,24,24 \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DefCore.txt new file mode 100644 index 00000000..16850ffa --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GCTF +Version=4,9,8,2 +Name=CaptureTheFlag +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=100 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GCTF=1 +Picture=0,0,64,64 \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DescDE.txt new file mode 100644 index 00000000..7a444407 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DescDE.txt @@ -0,0 +1 @@ +Ziel ist es, eine feindliche Flagge zu stehlen und zur eigenen zu bringen. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DescUS.txt new file mode 100644 index 00000000..55201115 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/DescUS.txt @@ -0,0 +1 @@ +Capture the enemy flag and carry it to your own. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/DefCore.txt new file mode 100644 index 00000000..65ced514 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=FLBS +Version=4,9,8,2 +Name=Flag Base +Category=C4D_Vehicle +Width=15 +Height=4 +Offset=-7,-2 +Vertices=2 +VertexY=-3,5 +VertexFriction=100 +Value=1 +Mass=1000 +Components=ROCK=10 +SolidMask=0,0,15,4,0,0 +Picture=0,4,34,50 diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/ActMap.txt new file mode 100644 index 00000000..1f1f261d --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/ActMap.txt @@ -0,0 +1,49 @@ +[Action] +Name=Fly +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=21 +Delay=3 +Facet=0,0,34,50,0,0 +NextAction=Fly2 + +[Action] +Name=Fly2 +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=21 +Delay=2 +Facet=0,0,34,50,0,0 +NextAction=Fly + +[Action] +Name=Attach +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=21 +Delay=3 +Facet=0,0,34,50,0,0 +NextAction=Attach2 + +[Action] +Name=Attach2 +Procedure=ATTACH +Directions=2 +FlipDir=1 +Length=21 +Delay=2 +Facet=0,0,34,50,0,0 +Reverse=1 +NextAction=Attach + +[Action] +Name=Lost +Procedure=NONE +Delay=1 +Facet=0,0,34,50,0,0 +NextAction=Lost + + diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DefCore.txt new file mode 100644 index 00000000..c3c9f3fa --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=FLA2 +Version=4,9,8,2 +Name=Flag +Category=C4D_Vehicle +MaxUserSelect=1 +Timer=2 +TimerCall=Wee +Width=34 +Height=50 +Offset=-17,-25 +Vertices=7 +VertexX=0,-7,0,7,-4,4,0 +VertexY=20,-24,20,-24,-8,-8,0 +VertexFriction=100,100,100,100,100,100,100 +Value=15 +Mass=50 +Picture=714,0,34,50 +Rotate=1 +ColorByOwner=1 diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DescDE.txt new file mode 100644 index 00000000..981565c8 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DescDE.txt @@ -0,0 +1 @@ +Die gilt es zu klauen! diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DescUS.txt new file mode 100644 index 00000000..9dc33990 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/DescUS.txt @@ -0,0 +1 @@ +Capture this! diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Graphics.png new file mode 100644 index 00000000..40a735e7 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Names.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Names.txt new file mode 100644 index 00000000..49df5376 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flagge +US:Flag diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Overlay.png b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Overlay.png new file mode 100644 index 00000000..1a537d61 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Overlay.png differ diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Script.c b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Script.c new file mode 100644 index 00000000..6a43df21 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/Script.c @@ -0,0 +1,223 @@ +/*--- Flagge! ---*/ + +#strict + +local base, team, cteam; + +local carrier; + +/* TimerCall */ + +private func Wee() +{ + if(WildcardMatch(GetAction(), "*Fly*")) return(Wind2Fly()); + if(WildcardMatch(GetAction(), "*Attach*")) return(Clonk2Rotate()); +} + +private func Wind2Fly() +{ + if(GetWind() > 0) + SetDir(DIR_Right); + else + SetDir(DIR_Left); +} + +private func Clonk2Rotate() +{ + if(!GetAlive(carrier)) return(AttachTargetLost()); + + var at = GetActionTarget(); + + SetDir(at->GetDir()); + + if(at->GetDir() == DIR_Left()) + { + SetR(at->GetR()+15-at->GetXDir()); + } + if(at->GetDir() == DIR_Right()) + { + SetR(at->GetR()-15-at->GetXDir()); + } +} + +protected func Activate(pBase, iTeam, rgb) +{ + base = pBase; + SetAction("Fly", base); + Wind2Fly(); + + carrier = 0; + team = iTeam; + SetColorDw(rgb); + + // bei Dunkelheit besser zu sehen + var tmp = AddLightAmbience(30,this()); + var r,g,b,a; + SplitRGBaValue(rgb,r,g,b,a); + tmp->ChangeColor(RGBa(r,g,b,a+30)); + SetVisibility(VIS_All,tmp); + + AddEffect("Collect", this(), 101, 5, this()); +} + +protected func Entrance(object obj) +{ + var canCarryFlag = obj->~CanCarryFlag(); + + // kann keine Flagge haben - die Flagge wird bei Eintritt fallengelassen (default) + if(!canCarryFlag) + { + AttachTargetLost(); + } + // komischer Spezialfall (z.b. für Fahrstuhl) - Clonk nimmt Flagge mit rein (so wie früher) + else if(canCarryFlag < 0) + { + return; + } + // Flagge klebt außen dran (z.B. Panzer, Shuttle) + else + { + SetAction("Attach", obj); + SetActionData(obj->~GetFlagAttachVertex()); + AddEffect("WaitForCarrierExit", this(), 101, 1, this()); + } +} + +private func FxWaitForCarrierExitTimer(target, no) +{ + if(!carrier) return -1; + + if(!Contained(carrier)) + { + SetAction("Attach",carrier); + return -1; + } +} + +/* Einsamml0rn!!11 */ + +protected func Collected(pClonk) +{ + Log("$HasTheFlag$", GetPlayerName(GetOwner(pClonk)), GetTeamName(team)); + SetAction("Attach", pClonk); + + carrier = pClonk; + cteam = GetPlayerTeam(GetOwner(pClonk)); + + // game call: FlagCaptured(flagTeam, captureTeam, clonk) + // flagTeam: The team to which the flag belongs to + // captureTeam: The team that captured the flag + // clonk: the clonk who did it + GameCallEx("FlagCaptured",team, GetPlayerTeam(GetOwner(pClonk)), pClonk); + Sound("FlagCaptured",1); + return(1); +} + +protected func CheckCollect(pClonk) +{ + if(WildcardMatch(GetAction(), "*Attach*")) return(); + if(GetPlayerTeam(GetOwner(pClonk)) == team) + { + if(GetAction() ne "Lost") CheckFlag(pClonk); + else Return2Base(pClonk); + return(); + } + if(FindObject(GetID(), 0,0,0,0,0, 0, pClonk)) return(); // Mehr als 2 Teams ftw! + + return(Collected(pClonk)); +} + +protected func AttachTargetLost() +{ + SetAction("Lost"); + SetActionTargets(); + carrier = 0; + SetDir(); + Exit(); + // falls sie festsitzt, wird sie sofort zurückgebracht + if(GBackSolid()) { + RemoveObject(); + return(); + } + Log("$FlagLost$", GetTeamName(team)); + GameCallEx("FlagLost",team); +} + +/* Zurückfliegen und Punkte vergeben */ + +public func IsAtHome() { + if(GetActionTarget() == base) + return(true); +} + +public func GetCarrier() { + if(WildcardMatch(GetAction(), "*Attach*")) { + return(carrier); + } +} + +protected func Return2Base(pClonk, nolog) +{ + SetR(); + SetRDir(); + SetAction("Fly", base); + carrier = 0; + if(!nolog) + { + Log("$ReturnedTheFlag$", GetPlayerName(GetOwner(pClonk))); + Sound("FlagReturned",1); + } + // game call: FlagReturned(flagTeam, clonk) + // flagTeam: The team to which the flag belongs to + // clonk: the clonk who did it + GameCallEx("FlagReturned",team, GetPlayerTeam(GetOwner(pClonk))); +} + +protected func CheckFlag(pClonk) +{ + var flag = FindObject(GetID(), 0,0,0,0,0, 0,pClonk); + if(!flag) return(); + + Log("$CapturedTheFlag$", GetPlayerName(GetOwner(pClonk))); + DoWealth(GetOwner(pClonk), 50); // Geld! + DoTeamScore(GetPlayerTeam(GetOwner(pClonk)), 1); + flag->~Return2Base(0,1); + // game call: FlagScored(flagTeam, scoreTeam, clonk) + // flagTeam: The team to which the flag belongs to + // scoreTeam: the team that just scored + // clonk: the clonk who did it + GameCallEx("FlagScored",team, GetPlayerTeam(GetOwner(pClonk)), pClonk); + Sound("TeamChange",1); +} + +// verbessertes Einsammeln +public func FxCollectTimer(target, no) +{ + if(WildcardMatch(GetAction(target),"*Attach*")) return(); + var clonk; + while(clonk = FindObject(0, -20, -20, 40, 40, OCF_CrewMember(), 0,0, NoContainer(), clonk)) + if(clonk->GetOCF() & OCF_Alive()) + if(CheckCollect(clonk)) + return(); +} + +/* Kaputt! */ + +public func Destruction() +{ + if(!base) return; + // Flaggen dürfen nicht einfach weg sein + var nFlag = CreateObject(FLA2, 0,0, GetOwner()); + nFlag->Activate(base, team, GetColorDw()); + // game call: FlagReturned(flagTeam) + // flagTeam: The team to which the flag belongs to + GameCallEx("FlagReturned",team); + Log("$FlagReturned$", GetTeamName(team)); + Sound("FlagReturned",1); +} + +public func NoWarp() { return(1); } + +public func GetBase() { return(base); } + +public func GetTeam() { return (team); } diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/StringTblDE.txt new file mode 100644 index 00000000..b8778b61 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +ReturnedTheFlag=%s hat die Flagge zurückgebracht +CapturedTheFlag=%s hat die Flagge erfolgreich geklaut +HasTheFlag=%s hat die Flagge von Team %s +FlagLost=Die Flagge von Team %s wurde fallen gelassen +FlagReturned=Die Flagge von Team %s ist zurück \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/StringTblUS.txt new file mode 100644 index 00000000..cb45accd --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Flag.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +ReturnedTheFlag=%s returned the flag +CapturedTheFlag=%s captured the flag +HasTheFlag=%s has got the flag of team %s +FlagLost=The flag of team %s was dropped +FlagReturned=The flag of team %s was returned \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Graphics.png new file mode 100644 index 00000000..2f3311c6 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Names.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Names.txt new file mode 100644 index 00000000..917a923c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagBase.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sockel +US:Base \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagCaptured.wav b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagCaptured.wav new file mode 100644 index 00000000..26fe9a86 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagCaptured.wav differ diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagReturned.wav b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagReturned.wav new file mode 100644 index 00000000..5ba2c552 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/FlagReturned.wav differ diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Graphics.png new file mode 100644 index 00000000..920b979a Binary files /dev/null and b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Names.txt b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Names.txt new file mode 100644 index 00000000..f9d300a1 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Capture the flag +US:Capture the flag \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Script.c b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Script.c new file mode 100644 index 00000000..3a2f201d --- /dev/null +++ b/Hazard.c4d/Goals.c4d/CaptureTheFlag.c4d/Script.c @@ -0,0 +1,290 @@ +/*-- CTF --*/ + +#strict +#include TEAM + +local aFlagCarrier; + +protected func Initialize() +{ + //Anzahl Gewinne wird durch Anzahl Aktivierungen eingestellt + var pGoal; + if (pGoal = FindObject(GetID())) + { + LocalN("iWinScore", pGoal)++; + return(RemoveObject()); + } + iWinScore = 1; + aFlagCarrier = CreateArray(); + return(_inherited()); +} + +public func GetHUDInfo(int player, object hud) { + + var team = GetPlayerTeam(player); + if(team < 1) return(inherited(player)); + var ourFlag = GetFriendlyFlag(player); + + if(ourFlag) // is null during initialization + { + // Flag stolen? + if(ourFlag->GetCarrier()) { + // stolen + SetHUDGraphics(0,hud,GetID(),2,2,"FlagStolen"); + } + else if(ourFlag->IsAtHome()) + SetHUDGraphics(0,hud,GetID(),2,2); + else + SetHUDGraphics(0,hud,GetID(),2,2,"FlagLoose"); + } + + // flag captured + if(GetFriendlyFlagCarrier(player)) { + SetHUDGraphics(0,hud,GetID(),3,2,"FlagCaptured"); + } + else + SetHUDGraphics(0,hud,GetID(),3,2); + + return(inherited(player)); +} + +/* Globale Funktionen */ + +global func CreateFlag(int iTeam, int iX, int iY, int iColor) // Platziert eine Flagge für Team iTeam, Position und Farbe angeben +{ + var pBase = CreateObject(FLBS, AbsX(iX), AbsY(iY), -1); + var pFlag = CreateObject(FLA2, AbsX(iX), AbsY(iY), -1); + pFlag->Activate(pBase, iTeam, iColor); + if(FindObject(GCTF)) FindObject(GCTF)->InitTeam(iTeam); +} + +/* Geld */ + +// Clonks mit Flaggen sind mehr wert +public func Money(int iPlr, object pClonk, int iMurdererPlr) +{ + if(iMurdererPlr != NO_OWNER) + { + var extra; + var flag = FindObject2(Find_ID(FLA2), Find_ActionTarget(pClonk)); + if(flag) + extra = 30; + // Teamkill! Wert des Clonks wird abgezogen + if(GetPlayerTeam(iPlr) == GetPlayerTeam(iMurdererPlr)) + DoWealth(iMurdererPlr, - (pClonk->GetValue(0,0,0, iMurdererPlr) + extra)); + // Regulärer Kill, Wert des Clonks wird vergeben + else + DoWealth(iMurdererPlr, + pClonk->GetValue(0,0,0, iMurdererPlr) + extra); + } + // Geld für den getöteten, halber Wert des Clonks wird gegeben + DoWealth(iPlr, + pClonk->GetValue(0,0,0, iPlr) / 2); +} + +/* Scoreboard */ + +public func InitTeam(int iTeam) +{ + aFlagCarrier[iTeam] = -1; +} + +public func FlagCaptured(int iTeam, int iCTeam, object pClonk) +{ + aFlagCarrier[iTeam] = GetOwner(pClonk); + SetFlagMarker(GetOwner(pClonk), iTeam); // pClonk hat die flagge von iTeam + UpdateHUDs(); +} + +public func FlagLost(int iTeam) +{ + UpdateHUDs(); + if(aFlagCarrier[iTeam] == -1) return(); + SetFlagMarker(aFlagCarrier[iTeam], 0, true); + aFlagCarrier[iTeam] = -1; +} + +public func FlagScored(int iTeam, int iCTeam, object pClonk) +{ + UpdateHUDs(); + if(aFlagCarrier[iTeam] == -1) return(); + SetFlagMarker(aFlagCarrier[iTeam], 0, true); + aFlagCarrier[iTeam] = -1; +} + +public func FlagReturned(int iTeam) +{ + SetFlagMarker(aFlagCarrier[iTeam], 0, true); + aFlagCarrier[iTeam] = -1; + UpdateHUDs(); +} + +private func SetFlagMarker(int iPlr, int iCTeam, bool fRemove) +{ + var iCol = TEAM_PlayerColumn, iData; +// var iPlr = GetOwner(pPlr); + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) == 1) + { + iCol = TEAM_TeamColumn; + iData = GetPlayerTeam(iPlr); + } + if(!fRemove) + SetScoreboardData(iPlr, iCol, Format("{{FLBS}} %s", GetTeamColor(iCTeam), GetTaggedPlayerName(iPlr)), iData); + else + SetScoreboardData(iPlr, iCol, GetTaggedPlayerName(iPlr), iData); +} + +// Kann mittels des Spielzielauswählers konfiguriert werden +public func IsConfigurable() { return(1); } + + +// Returns the enemy flag carrier if any +public func GetEnemyFlagCarrier(int iOwner) { + var ourFlag = GetFriendlyFlag(iOwner); + return(ourFlag -> GetCarrier()); +} + +// Returns the friendly flag carrier if any. +public func GetFriendlyFlagCarrier(int iOwner) { + // The flag... + for(var pFlag in FindObjects(Find_ID(FLA2))) { + // ... that is attached to a clonk... + if(WildcardMatch(pFlag->GetAction(), "*Attach*")) { + var flagger = pFlag->GetActionTarget(); + var flagger_team = GetPlayerTeam(flagger->GetOwner()); + // ... which is in our team ... + if( flagger_team == GetPlayerTeam(iOwner) ) { + // ...his flag + return(flagger); + } + } + } + return(0); +} + +public func GetFriendlyFlag(int iOwner) { + // The flag... + for(var pFlag in FindObjects(Find_ID(FLA2))) { + // that is not ours + if( pFlag->GetTeam() == GetPlayerTeam(iOwner) ) { + return(pFlag); + } + } + return(0); +} + +// Returns the flag of a random enemy +public func GetEnemyFlag(int iOwner) { + var flags = CreateArray(); + // A flag... + for(var pFlag in FindObjects(Find_ID(FLA2))) { + // that is not ours + if( pFlag->GetTeam() != GetPlayerTeam(iOwner) ) { + flags[GetLength(flags)] = pFlag; + } + } + // Choose a flag randomly + return(flags[Random(GetLength(flags))]); +} + +// Returns the own flag base +public func GetOwnFlagBase(int iOwner) { + // The flag... + for(var pFlag in FindObjects(Find_ID(FLA2))) { + // ... of our team ... + if( pFlag->GetTeam() == GetPlayerTeam(iOwner) ) { + // ...its base + return(pFlag->GetBase()); + } + } + return(0); +} + +// Some constants +private func MaxFlagBaseDistance() { return(250); } + +// KI Taktik +public func AITactic(object pAIPlayer) +{ + var owner = pAIPlayer->GetOwner(); + + var pEFC = GetEnemyFlagCarrier(owner); + var flag = GetFriendlyFlag(owner); + if(!pEFC) + if(!(flag->IsAtHome())) + pEFC = flag; + var pFFC = GetFriendlyFlagCarrier(owner); + var flagbase = GetOwnFlagBase(owner); + var eflagbase = GetEnemyFlag(owner); + + if(pEFC) DebugLog("Flag was stolen by %s (%d,%d)","tactics",GetName(pEFC),GetX(pEFC),GetY(pEFC)); + if(pFFC) DebugLog("%s (%d,%d) got the enemy flag","tactics",GetName(pFFC),GetX(pFFC),GetY(pFFC)); + + var crewcount = GetCrewCount(owner); + + for(var i=0, pCrew ; pCrew = GetCrew(owner, i) ; i++) { + if(pCrew->Contained()) continue; + pCrew->CheckInventory(); + + // flag carrier returns home + if(pCrew == pFFC) { + + // return to own flag if own flag is not stolen or he is too far from the flag base + if(!pEFC || ObjectDistance(pCrew,flagbase) > MaxFlagBaseDistance()) { + if(GetCrewCount(pCrew->GetOwner())>1 || !pEFC) { + pAIPlayer->Run(pCrew,flagbase,"Returning home!"); + continue; + } + else if(pEFC) { + pAIPlayer->Follow(pCrew,pEFC,0,"Attacking enemy flag carrier"); + continue; + } + } + // own flag is stolen + else { + // I'm not the only one + if(GetCrewCount(pCrew->GetOwner())>1) { + pAIPlayer->Guard(pCrew,"Guarding our flag base!"); + continue; + } + // however, if I'm the only one, I need to perhaps follow the enemy flagger... + else if(pEFC) { + pAIPlayer->Follow(pCrew,pEFC,0,"Attacking enemy flag carrier"); + continue; + } + } + } + else { + var intercept = 0; + // flag was stolen. Everyone who can intercept, does that + if(pEFC) { + intercept = pAIPlayer->Interceptor(pCrew,eflagbase,pEFC); + if(intercept) { + pAIPlayer->Follow(pCrew,pEFC,0,"Intercepting enemy flag carrier!"); + continue; + } + } + if(!intercept) { + // friendly flag carrier around + if(pFFC && !pEFC) { + var follower = pAIPlayer->Interceptor(pCrew,flagbase,pFFC); + // between flagger and own flag: follow flagger + if(follower) { + pAIPlayer->Follow(pCrew,pFFC,0,"Escorting friendly flag carrier!"); + continue; + } + } + // else just go to enemy flag/enemy flag carrier + if(!pEFC) { + if(!(pCrew->GetCommand() || pCrew->GetMacroCommand())) { + pCrew->SetMacroCommand(this(), "MoveTo", eflagbase,0,0,0,Aggro_Follow); + DebugMessage("@Going to enemy flag base.", "tactics"); + } + } + else { + pAIPlayer->Follow(pCrew,pEFC,0,"Hunting down enemy flag carrier!"); + } + + } + } + } + return true; +} diff --git a/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DefCore.txt new file mode 100644 index 00000000..60f6745d --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GTDM +Version=4,9,8,2 +Name=Deathmatch +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=100 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GTDM=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DescDE.txt new file mode 100644 index 00000000..f57178d3 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DescDE.txt @@ -0,0 +1 @@ +Ziel ist es, eine gewisse Anzahl Kills zu machen. Ob alleine oder im Team spielt keine Rolle. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DescUS.txt new file mode 100644 index 00000000..cbe8412f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/DescUS.txt @@ -0,0 +1 @@ +Gain the needed number of kills. Alone or in teams is irrelevant. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Graphics.png new file mode 100644 index 00000000..9bdf15ac Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Names.txt new file mode 100644 index 00000000..b1b427a6 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Deathmatch +US:Deathmatch \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Script.c b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Script.c new file mode 100644 index 00000000..42ab1723 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Deathmatch.c4d/Script.c @@ -0,0 +1,70 @@ +/*-- Deathmatch --*/ + +#strict +#include TEAM + +protected func Initialize() { + //Anzahl gewinne wird durch Anzahl Aktivierungen eingestellt + var pGoal; + if (pGoal = FindObject(GetID())) + { + LocalN("iWinScore", pGoal)++; + return(RemoveObject()); + } + iWinScore = 1; + return(_inherited()); +} + +public func RelaunchPlayer(int iPlr, object pClonk, int iMurdererPlr) { + inherited(iPlr, pClonk, iMurdererPlr); + if(iPlr == -1 || !GetPlayerName(iPlr)) return(); + if(iMurdererPlr == -1) + return(); + + // kein Teamkill? + if(GetPlayerTeam(iPlr) != GetPlayerTeam(iMurdererPlr)) + //Punktestand erhöhen + DoTeamScore(GetPlayerTeam(iMurdererPlr),+1); +} + +// Kann mittels des Spielzielauswählers konfiguriert werden +public func IsConfigurable() { return(1); } + +public func GetHUDInfo(int player) { + var t34m = GetPlayerTeam(player); + + // Rückstand + var y00Rl4me; + y00Rl4me = Max(0,TeamGetScore(t34m))-BestTeamGetScore(t34m); + + var secondstring; + if(y00Rl4me == 0) secondstring= ""; + if(y00Rl4me > 0) secondstring = Format("(+%d)",y00Rl4me); + if(y00Rl4me < 0) secondstring = Format("(%d)",y00Rl4me); + + return(Format("%d kills %s",TeamGetKills(t34m), secondstring)); +} + +// KI-Taktik +public func AITactic(object pAIPlayer) +{ + var owner = pAIPlayer->GetOwner(); + + for(var i=0, pCrew ; pCrew = GetCrew(owner, i) ; i++) { + if(pCrew->Contained()) continue; + var leader = GetCrew(owner, 0); + + // Es ist der Anführer? (oder kein Anführer da?) + if(leader == pCrew || !leader) + pAIPlayer->TacticDefault(pCrew); + // Nicht? Dann folge doch bitte dem Anführer + else { + pCrew->CheckInventory(); + if(!(pCrew->GetCommand() || pCrew->GetMacroCommand())) + { + pCrew->SetMacroCommand(this(), "Follow", leader,0,0,0,Aggro_Follow); + } + } + } + return(true); +} \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/DescDE.txt new file mode 100644 index 00000000..7562de6c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/DescDE.txt @@ -0,0 +1 @@ +Spielziele bestimmen den Spielablauf. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/DescUS.txt new file mode 100644 index 00000000..7c9c3286 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/DescUS.txt @@ -0,0 +1 @@ +Goals determine the action of the game. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Destruction.c4d/DefCore.txt new file mode 100644 index 00000000..484b6bd5 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GAS2 +Version=4,9,8,2 +Name=DoubleAssault +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=1 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GAS_=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Destruction.c4d/DescDE.txt new file mode 100644 index 00000000..47c1a5ee --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/DescDE.txt @@ -0,0 +1 @@ +Um zu gewinnen müssen alle gegnerischen Hauptziele zerstört werden. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Destruction.c4d/DescUS.txt new file mode 100644 index 00000000..de6473b2 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/DescUS.txt @@ -0,0 +1 @@ +The goal is destroying all targets of the enemy. diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Destruction.c4d/Graphics.png new file mode 100644 index 00000000..617cca10 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Destruction.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Destruction.c4d/Names.txt new file mode 100644 index 00000000..a1fd158c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Zerstörung +US:Destruction diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/Script.c b/Hazard.c4d/Goals.c4d/Destruction.c4d/Script.c new file mode 100644 index 00000000..d48c54d3 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/Script.c @@ -0,0 +1,197 @@ +/* Destruction */ + +#strict 2 +#include TEAM + +local aTargets; +// aTarget-Struktur +// [pTarget, iTeam, fOpt ] +// [Ziel, Team, Optionales Ziel?] + +public func Initialize() +{ + aTargets=[]; + iWinScore=10; + return _inherited(...); +} + +public func Activate(int iPlr) +{ + var Targets=""; + for(var tgt in aTargets) + { + if(tgt[1]==GetTeam(iPlr)) + if(tgt[2]==false) + Targets=Format("%s%s,",Targets,GetName(tgt)); + } + return MessageWindow(Format("%s $TargetsRemain$ %s",GetDesc(),Targets),iPlr); +} + +// Ein Ziel hinzufügen... +public func AddTarget(object pTrgt, bool fOpt, int iMaxDmg, bool fNoBar, int iTeam) +{ + // Kein Ziel? + if(!pTrgt) + return false; + // sonst hinzufügen... + aTargets[GetLength(aTargets)] = [pTrgt,iTeam,fOpt]; + AddEffect("DEST_TargetCheck",pTrgt,50,0,0,GetID(),[iMaxDmg,iTeam,fNoBar,fOpt]); + pTrgt->SetTeam(iTeam); + return true; +} + +// ... und wieder entfernen. +public func RemoveTarget(object pTrgt) +{ + // Kein Ziel? + if(!pTrgt) + return false; + + var newTargets=[]; + for(var aTarget in aTargets) + { + // Keine Arraystruktur? Überspringen... + if(!GetLength(aTarget)) + continue; + // Das aus der Liste zu entfernende Objekt? Überspringen... + if(aTarget[0]==pTrgt) + continue; + newTargets[GetLength(newTargets)]=aTarget; + } + aTargets=newTargets; + return true; +} + +// Ein Ziel suchen... +public func FindTarget(object pTrgt) +{ + var aTarget; + // Abwärts suchen... + var i; + for(i=GetLength(aTargets)-1;i>0;i--) + { + aTarget=aTargets[i]; + // Keine Arraystruktur? Überspringen... + if(!GetLength(aTarget)) + continue; + // Gefunden! (Rückgabe: Index + Werte) + if(aTarget[0]==pTrgt) + return [i,aTarget]; + } + return -1; +} + +// Ein Ziel wurde zerstört... +public func TargetDestructed(pTrgt,iTeam,iKiller) +{ + Log("$TargetDestroyed$",GetName(pTrgt),iTeam); + Sound("TargetDestroyed",1); + // Entfernen... + if(pTrgt) + RemoveTarget(pTrgt); + // Schauen ob das Team noch ein Hauptziel hat... + var fHaveTarget; + for(var aTarget in aTargets) + { + // Keine Arraystruktur? Überspringen... + if(!GetLength(aTarget)) + continue; + // Gehört dem Team? + if(aTarget[1]==iTeam) + { + if(aTarget[2]) continue; + fHaveTarget=true; + break; + } + } + if(!fHaveTarget) + EndOfTeam(iTeam); +} + +// Alle Ziele eines Teams wurden zerstört +public func EndOfTeam(iTeam) +{ + // Alle Ziele zerstört... allen anderen Teams nen Punkt geben und dieses Team eliminieren + var plr,team; + for(var i = 0 ; i < GetPlayerCount() ; i++) + { + plr = GetPlayerByIndex(i); + team = GetPlayerTeam(plr); + if(team != iTeam) + { + if(!Var(team)) + { + DoTeamScore(team, 1); + Var(team)=1; + } + } + else + { + DoEvaluation(plr); + EliminatePlayer(plr); + } + } +} + +//**----_/ FxDEST_TargetCheck \_----**// +// EffectVars: +// 0 - MaxDamage +// 1 - Die Lebensleiste +// 2 - Team +// -------------------------------------------- + + +func FxDEST_TargetCheckStart(pTrgt,iNum,iTmp,arr) +{ + if(iTmp) + return 0; + EffectVar(0,pTrgt,iNum)=arr[0]; + EffectVar(2,pTrgt,iNum)=arr[1]; + + var dwClr = RGBa(230,10,10,50); + if(arr[3]) + dwClr=RGBa(180,230,10,50); + // Energieleiste erstellen + if(!arr[2]) + { + var pBar=CreateObject(EBAR,0,0,-1); + pBar->Set(pTrgt,dwClr); + EffectVar(1,pTrgt,iNum)=pBar; + } + return 1; +} + +func FxDEST_TargetCheckDamage(pTrgt,iNum,iNewDmg,iCause) +{ + var pBar=EffectVar(1,pTrgt,iNum); + var iMaxDmg=EffectVar(0,pTrgt,iNum); + var iDmg=GetDamage(pTrgt)+iNewDmg/*/1000*/; + if(GetAlive(pTrgt)) + iDmg=pTrgt->GetPhysical("Energy")/1000-pTrgt->GetEnergy()+iNewDmg/1000; + // Maximalschaden wurde erreicht: Effekt beenden + if(iDmg>iMaxDmg) + RemoveEffect(0,pTrgt,iNum); + // Keine Energieleiste... nichts zum Updaten + if(!pBar) + return iNewDmg; + // Sonst updaten + pBar->Update(100-BoundBy(iDmg*100/iMaxDmg,0,100)); + return iNewDmg; +} + + +func FxDEST_TargetCheckStop(pTrgt,iNum,iReason,fTmp) +{ + if(fTmp) + return 0; + + var iTeam=EffectVar(2,pTrgt,iNum); + var pBar=EffectVar(1,pTrgt,iNum); + GameCallEx("TargetDestructed",pTrgt,iTeam,GetKiller(pTrgt)); + + if(pBar) + RemoveObject(pBar); + return 1; +} + +//public func IsConfigurable() { return true; } \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/Destruction.c4d/StringTblDE.txt new file mode 100644 index 00000000..5dc243a9 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +TargetDestroyed=%s von Team %d wurde zerstört! +TargetsRemain=Verbleibende Ziele: diff --git a/Hazard.c4d/Goals.c4d/Destruction.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/Destruction.c4d/StringTblUS.txt new file mode 100644 index 00000000..1038f501 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Destruction.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +TargetDestroyed=%s of team %d was destroyed! +TargetsRemain=Remaining targets: diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/ActMap.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/ActMap.txt new file mode 100644 index 00000000..cb07a864 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Std +Facet=0,0,24,24 +Delay=1 +NextAction=Std \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/DefCore.txt new file mode 100644 index 00000000..1f20e8f7 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=DBAS +Version=4,9,8,2 +Name=Domination Base +Category=C4D_Vehicle +Timer=1 +TimerCall=Timer +Width=30 +Height=25 +Offset=-15,-12 +Vertices=3 +VertexX=0,-14,14 +VertexY=0,12,12 +VertexFriction=50,100,100 +Picture=0,0,30,25 diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics.png new file mode 100644 index 00000000..0358bc81 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics1.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics1.png new file mode 100644 index 00000000..41746cb5 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics1.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics2.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics2.png new file mode 100644 index 00000000..8b88074c Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics2.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics3.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics3.png new file mode 100644 index 00000000..162400da Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics3.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics4.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics4.png new file mode 100644 index 00000000..b3e1a6ea Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics4.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics5.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics5.png new file mode 100644 index 00000000..b86cd6ca Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Graphics5.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture1.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture1.png new file mode 100644 index 00000000..87368945 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture1.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture2.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture2.png new file mode 100644 index 00000000..cef92a03 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture2.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture3.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture3.png new file mode 100644 index 00000000..3fb5ee4b Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture3.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture4.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture4.png new file mode 100644 index 00000000..09fd01ae Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture4.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture5.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture5.png new file mode 100644 index 00000000..d7d25a69 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/GraphicsCapture5.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Names.txt new file mode 100644 index 00000000..54cd81a1 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Marker +US:Marker \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Script.c b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Script.c new file mode 100644 index 00000000..4566b67a --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/Script.c @@ -0,0 +1,154 @@ +/*-- Marker --*/ + +#strict + +local iTeam, mID, iOrder; +local light1, light2, progress; +local iCaptureTeam, iCaptureStartTime; + +public func Set(int iID, int iNumber, id sourceID) +{ + mID = iID; + iOrder = iNumber; + SetGraphics(Format("%d", iID), this(), sourceID, 1, 2, "Std"); + SetObjDrawTransform(1000,0,0,0,1000,-20000,0,1); + light1 = AddLightCone(700, RGB(50,50,50), this()); + light2 = AddLightCone(700, RGB(50,50,50), this()); + light1->ChangeOffset(-10,3); + light1->ChangeR(-30); + light1->ChangeColor(RGB(50,50,50)); + light2->ChangeOffset(10,3); + light2->ChangeR(30); + light2->ChangeColor(RGB(50,50,50)); + progress = CreateObject(EBAR); + progress->Set(this); + progress->SetVisibility(VIS_None); + progress->SetVertex(0,1,43); +} + +protected func Timer() +{ + var team = 0; + var heldByOnlyOneTeam = false; + var heldByNoone = true; + for(var clnk in FindObjects(Find_InRect(-25,-10, 50,20), Find_OCF(OCF_CrewMember), Find_OCF(OCF_Alive))) + { + heldByNoone = false; + if(!team) + { + team = GetPlayerTeam(clnk->GetOwner()); + heldByOnlyOneTeam = true; + } + else if(team != GetPlayerTeam(clnk->GetOwner())) + { + heldByOnlyOneTeam = false; + break; + } + } + + // neues Team erobert + if(heldByOnlyOneTeam && team != iTeam && team != iCaptureTeam) + { + SetCaptureTeam(team); + } + else if(team == iTeam && iTeam) + { + SetNoCaptureTeam(); + } + // gleiches Team erobert weiter + else if(iCaptureTeam) + { + // undo capture progress wenn niemand mehr da + if(heldByNoone) iCaptureStartTime+=3; + // Capture progress anhalten wenn nicht der einzige dort + else if(!heldByOnlyOneTeam) iCaptureStartTime++; + + DoCaptureProgress(); + } +} + +private func SetCaptureTeam(int team) +{ + iCaptureTeam = team; + SetClrModulation(GetTeamColor(team),progress,1); + progress->Update(0); + progress->SetVisibility(VIS_All); + iCaptureStartTime = FrameCounter(); + GameCallEx("MarkerTeamChange",iTeam,iCaptureTeam); +} + +private func SetNoCaptureTeam() +{ + iCaptureTeam = 0; + progress->Update(0); + progress->SetVisibility(VIS_None); + GameCallEx("MarkerTeamChange",iTeam,iCaptureTeam); +} + +private func DoCaptureProgress() +{ + var timeCapturing = FrameCounter() - iCaptureStartTime; + if(timeCapturing >= GetCaptureTime()) + { + progress->SetVisibility(VIS_None); + ChangeTeam(iCaptureTeam); + } + else if(timeCapturing < 0) + { + progress->SetVisibility(VIS_None); + SetNoCaptureTeam(); + } + progress->Update(100 * timeCapturing / GetCaptureTime()); +} + +public func ChangeTeam(int team) +{ + // Gleiches Team? + if(iTeam == team) return(); + + // Team ändern + iTeam = team; + iCaptureTeam = 0; + // Farbe ändern + SetClrModulation(GetTeamColor(iTeam), 0, 1); + // Lichter ändern + light1->ChangeColor(GetTeamColor(iTeam)); + light2->ChangeColor(GetTeamColor(iTeam)); + // Symbole benachrichtigen + GameCallEx("MarkerTeamChange",iTeam,iCaptureTeam); + // Testen, ob Punkt gemacht + CheckPoint(); +} + +public func GetCaptureTime() { return 220; } +public func GetTeam() { return iTeam; } +public func GetCaptureTeam() { return iCaptureTeam; } +public func GetMarkerID() { return mID; } +public func GetOrder() { return iOrder; } + +private func CheckPoint() +{ + var count, mark = FindObjects(Find_ID(GetID()), Find_Exclude(this())); + for(var pMarker in mark) + if(pMarker->GetTeam() == iTeam) + count++; + // score + if(ObjectCount(GetID()) == count) + { + var team = iTeam; + SetNoTeam(); + for(pMarker in mark) + pMarker->SetNoTeam(); + GameCallEx("Dominating",team); + } +} + +public func SetNoTeam() +{ + iTeam = 0; + SetNoCaptureTeam(); + SetClrModulation(RGB(255,255,255), 0, 1); + // Lichter + light1->ChangeColor(RGB(50,50,50)); + light2->ChangeColor(RGB(50,50,50)); +} diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/StringTblDE.txt new file mode 100644 index 00000000..624f8b7c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Dominating=Team %s dominiert! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/StringTblUS.txt new file mode 100644 index 00000000..58004c3b --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Base.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Dominating=Team %s is dominating! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/DefCore.txt new file mode 100644 index 00000000..89b53a0e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GDOM +Version=4,9,8,2 +Name=Domination +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=100 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GDOM=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/DescDE.txt new file mode 100644 index 00000000..4a43c49a --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/DescDE.txt @@ -0,0 +1 @@ +Wann immer ein Team es schafft, alle markierten Ziele für sich zu erobern, bekommt es einen Punkt. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/DescUS.txt new file mode 100644 index 00000000..3e56442d --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/DescUS.txt @@ -0,0 +1 @@ +Whenever a team is able to conquer every marked position, the team gains a point. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Domination.wav b/Hazard.c4d/Goals.c4d/Domination.c4d/Domination.wav new file mode 100644 index 00000000..d84df6ac Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Domination.wav differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Domination.c4d/Graphics.png new file mode 100644 index 00000000..ca9bd771 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Domination.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/Names.txt new file mode 100644 index 00000000..5d39c3ae --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Domination +US:Domination \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/Script.c b/Hazard.c4d/Goals.c4d/Domination.c4d/Script.c new file mode 100644 index 00000000..8027c263 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/Script.c @@ -0,0 +1,184 @@ +/*-- Dominaton --*/ + +#strict +#include TEAM + +static DOM_markerNumber; + +global func CreateDominationPoint(int iX, int iY, int iID, id sourceID) +{ + if(!sourceID) sourceID = DBAS; + var point = CreateObject(DBAS, iX, iY, -1); + point->Set(iID, DOM_markerNumber++, sourceID); + return(point); +} + +protected func Initialize() { + //Anzahl Punkte wird durch Anzahl Aktivierungen eingestellt + var pGoal; + if (pGoal = FindObject(GetID())) + { + LocalN("iWinScore", pGoal)++; + return(RemoveObject()); + } + iWinScore = 1; + return(_inherited()); +} + +public func Dominating(int iTeam) +{ + Sound("Domination", 1); + Log("$Dominating$", GetTeamName(iTeam)); + DoTeamScore(iTeam, 1); + var iX, iY; + for(var pClonk in FindObjects(Find_OCF(OCF_CrewMember), Find_OCF(OCF_Alive))) + { + var pos = GameCall("RelaunchPosition",GetPlayerTeam(pClonk->GetOwner())); + var iX = pos[0]; + var iY = pos[1]; + pClonk->SetPosition(iX, iY); + pClonk->SetComDir(COMD_Stop); + if(GetPlayerTeam(pClonk->GetOwner()) == iTeam) // Geld! + DoWealth(pClonk->GetOwner(), 30); + } +} + +public func GetHUDInfo(int player, object hud) { + + var team = GetPlayerTeam(player); + if(team < 1) return(inherited(player)); + + var markerCount = ObjectCount(DBAS); + + for(var marki in FindObjects(Find_ID(DBAS))) { + var mID = marki->GetMarkerID(); + var color = GetTeamColor(marki->GetTeam()); + if(!marki->GetTeam()) color = RGB(255,255,255); + var overlay = 2+marki->GetOrder(); + var order = marki->GetOrder(); + + SetDOMHudGraphics(hud,Format("%d",mID), color, overlay, order); + + if(marki->GetCaptureTeam()) color = GetTeamColor(marki->GetCaptureTeam()); + overlay += markerCount; + + SetDOMHudGraphics(hud,Format("Capture%d",mID), color, overlay, order); + } + + return(inherited(player)); +} + +private func SetDOMHudGraphics(object hud, string name, int color, int overlay, int position) +{ + hud->SetGraphics(name,0,DBAS,overlay,2,"Std"); + hud->SetObjDrawTransform(1000,0,35000+position*28000,0,1000,-66000,0,overlay); + hud->SetClrModulation(color,0,overlay); +} + +public func MarkerTeamChange() { + UpdateHUDs(); +} + +// Kann mittels des Spielzielauswählers konfiguriert werden +public func IsConfigurable() { return(1); } + +public func GetFriendlyMarkers(owner) { + var ret = CreateArray(); + for(var pMarker in FindObjects(Find_ID(DBAS))) + { + if(pMarker->GetTeam() == GetPlayerTeam(owner)) + ret[GetLength(ret)] = pMarker; + } + return(ret); +} + +public func GetNotFriendlyMarkers(owner) { + var ret = CreateArray(); + for(var pMarker in FindObjects(Find_ID(DBAS))) + { + if(pMarker->GetTeam() != GetPlayerTeam(owner)) + ret[GetLength(ret)] = pMarker; + } + return(ret); +} + +public func MaxMarkerGuardingDistance() { return(300); } + + +// KI Taktik +public func AITactic(object pAIPlayer) { + + var owner = pAIPlayer->GetOwner(); + var FM = GetFriendlyMarkers(owner); + var EM = GetNotFriendlyMarkers(owner); + var commandedCrew = CreateObject(L_OS,1,1,-1); + + // Clonks die in was drin sind wollen wir nicht befehligen + var commandableCrewcount = ObjectCount2( Find_OCF(OCF_CrewMember),Find_Owner(owner), Find_NoContainer()); + + // so lange Befehle erteilen bis alle bedient sind... + while(commandedCrew->GetItemCount() < commandableCrewcount) { + // das heisst also wenn es 4 marker gibt aber 12 KI-Clonks, stürmen + // auf alle Marker etwa 3 Leute zu + + // Diese Taktik ist ein bischen anders als die anderen: Hier wird nicht + // pro Clonk sondern pro Marker geplant + for(var pMarker in EM) { + var markerX = AbsX(GetX(pMarker)); + var markerY = AbsY(GetY(pMarker)); + // suche das nächste Crewmitglied + // und gehe zum nächsten Marker der mir nicht gehört und zu dem nicht gegangen wird + var crewArr = FindObjects( Find_OCF(OCF_CrewMember), + Find_Owner(owner), + Find_NoContainer(), + Sort_Distance(markerX, markerY) + ); + if(crewArr) { + for(var crew in crewArr ) { + // merke zu welchem gegangen wird + var notcommanded = commandedCrew->AddItem(crew); + // noch nicht befehligt? gut. + if(notcommanded) { + crew->CheckInventory(); + pAIPlayer->Run(crew,pMarker,Format("Running to marker at %d,%d!",markerX,markerY)); + break; + } + // ansonsten den nächsten Clonk befehligen dort hinzugehen... + } + } + // wenn es mehr zu erobernde Marker gibt als Clonks zu befehligen, + // kriegt ein Marker halt erstmal kein Clonk zugeteilt + } + // wenn allerdings ncoh Clonks übrig sind... + // alle Clonks die nahe an eroberten Punkten sind, können das mal bewachen + for(var pMarker in FM) { + var markerX = AbsX(GetX(pMarker)); + var markerY = AbsY(GetY(pMarker)); + + var crewArr = FindObjects( Find_OCF(OCF_CrewMember), + Find_Owner(owner), + Find_NoContainer(), + Sort_Distance(markerX, markerY) + ); + if(crewArr) { + for(var crew in crewArr ) { + // merke zu welchem gegangen wird + var notcommanded = commandedCrew->AddItem(crew); + if(ObjectDistance(crew,pMarker) > MaxMarkerGuardingDistance()) continue; + // noch nicht befehligt? gut. + if(notcommanded) { + crew->CheckInventory(); + pAIPlayer->Guard(crew,Format("Guarding marker at %d,%d!",markerX, markerY)); + break; + } + } + } + } + + } + return true; +} + +// Es könnte Probleme geben mit Find_Owner da wir das nicht überladen +// können - vielleicht werden KI-Spieler sonst nicht gefunden +global func CheckOwner(int owner) { return(owner == GetOwner()); } \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/StringTblDE.txt new file mode 100644 index 00000000..624f8b7c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Dominating=Team %s dominiert! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Domination.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/Domination.c4d/StringTblUS.txt new file mode 100644 index 00000000..58004c3b --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Domination.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Dominating=Team %s is dominating! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DefCore.txt new file mode 100644 index 00000000..7f82689f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=GLMS +Version=4,9,8,2 +Name=Last Man Standing +Category=C4D_StaticBack|C4D_Goal +MaxUserSelect=100 +Width=1 +Height=1 +Offset=-1,-1 +Value=100 +Components=GLMS=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DescDE.txt new file mode 100644 index 00000000..0456aa43 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DescDE.txt @@ -0,0 +1 @@ +Nur der Letzte kann gewinnen! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DescUS.txt new file mode 100644 index 00000000..ed91264f --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/DescUS.txt @@ -0,0 +1 @@ +Last man standing wins the match! \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Graphics.png new file mode 100644 index 00000000..b9c05b27 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Names.txt b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Names.txt new file mode 100644 index 00000000..8bcc934c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Last Man Standing +US:Last Man Standing \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Script.c b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Script.c new file mode 100644 index 00000000..b4bc1e12 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/Script.c @@ -0,0 +1,178 @@ +/*-- Last Man Standing --*/ + +#strict +#include TEAM + +local aPlayerLives, chooser; + +// Kann mittels des Spielzielauswählers konfiguriert werden +public func IsConfigurable() { return(1); } + +/* Initialisierungen */ + +protected func Initialize() { + // Anzahl Leben wird durch Anzahl Aktivierungen eingestellt + var pGoal; + if (pGoal = FindObject(GetID())) + { + LocalN("iWinScore", pGoal)++; + return(RemoveObject()); + } + iWinScore = 1; + aPlayerLives = CreateArray(); + if(FindObject(CHOS)) chooser = true; + return(_inherited()); +} + +public func GetHUDInfo(int player) { + + return(Format("$MsgHUD$",aPlayerLives[player])); + +} + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + aPlayerLives[iPlr] = iWinScore * GetCrewCount(iPlr) -1; + inherited(iPlr, iX, iY, pBase, iTeam); + + // anzeigen + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) > 1) + SetScoreboardData(iPlr, TEAM_GoalColumn, Format("%d",aPlayerLives[iPlr]), aPlayerLives[iPlr]); + else + SetScoreboardData(iPlr, TEAM_GoalColumn, Format("%d", GetPlrColorDw(iPlr),aPlayerLives[iPlr]), aPlayerLives[iPlr]); +} + +public func ChooserFinished() +{ + chooser = false; +} + +/* Relaunch */ + +public func RelaunchPlayer(int iPlr, object pClonk, int iMurdererPlr) { + if(iPlr == -1 || !GetPlayerName(iPlr)) return(); + if(GetPlayerType(iPlr) == C4PT_Script) + if(GetAlive(pClonk)) + { + aPlayerLives[iPlr] += iWinScore; + return(); + } + + if(iPlr == -1) + return(); + + aPlayerLives[iPlr]--; + var left = Format("%d", aPlayerLives[iPlr]); + + if(aPlayerLives[iPlr] < 0) + { + // Verloren + EliminatePlayer(iPlr); + left = "-"; + } + // richtige anzeigeart wählen + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) > 1) + SetScoreboardData(iPlr, TEAM_GoalColumn, left, aPlayerLives[iPlr]); + else + SetScoreboardData(iPlr, TEAM_GoalColumn, Format("%s", GetPlrColorDw(iPlr),left), aPlayerLives[iPlr]); + + inherited(iPlr, pClonk, iMurdererPlr); +} + +/* Siegbedingungen */ + +public func IsFulfilled() // Siegreiches Team? +{ + // Es werden noch Regeln (und KI) gewählt + if(chooser) return(); + + var iTeam; + for(var i = 0 ; i < GetPlayerCount() ; i++) + { + if(!iTeam) + iTeam = GetPlayerTeam(GetPlayerByIndex(i)); + // Spieler aus einem anderen Team leben noch? + if(GetPlayerTeam(GetPlayerByIndex(i)) != iTeam) + return(); + } + Message("@$WinMsg$", 0, GetTeamColor(iTeam), GetTeamName(iTeam)); + return(1); +} + +protected func Activate(iPlr) +{ + if (IsFulfilled()) + { + return(MessageWindow("$MsgGoalFulfilled$",iPlr)); + } + return(MessageWindow(Format("$MsgGoalUnfulfilled$", aPlayerLives[iPlr]), iPlr)); +} + +/* Überladungen für das Scoreboard */ + +private func InitMultiplayerTeam(int iTeam) +{ + inherited(iTeam); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_GoalColumn, "", iWinScore+1); + SortTeamScoreboard(); +} + +private func InitSingleplayerTeam(int iPlr) +{ + inherited(iPlr); + + SetScoreboardData(iPlr, TEAM_GoalColumn, Format("%d", GetPlrColorDw(iPlr), aPlayerLives[iPlr]), aPlayerLives[iPlr]); + SortTeamScoreboard(); +} + +private func InitPlayer(int iPlr) +{ + inherited(iPlr); + SetScoreboardData(iPlr, TEAM_GoalColumn, Format("%d", aPlayerLives[iPlr]), aPlayerLives[iPlr]); + SortTeamScoreboard(); +} + +private func UpdateScoreboard(int iTeam) +{ + return(); +} + +private func SortTeamScoreboard() +{ + // Nach Toden (Spieler) + SortScoreboard(TEAM_DeathColumn); + // Nach Kills (Spieler) + SortScoreboard(TEAM_KillColumn, true); + // Nach Punkten (Spieler & Teams) + SortScoreboard(TEAM_GoalColumn, true); + // Nach Teams (Spieler) + SortScoreboard(TEAM_TeamColumn); +} + +// KI Taktik +public func AITactic(object pAIPlayer) +{ + var owner = pAIPlayer->GetOwner(); + + for(var i=0, pCrew ; pCrew = GetCrew(owner, i) ; i++) { + if(pCrew->Contained()) continue; + pCrew->CheckInventory(); + // nix zu tun? + if(!(pCrew->GetCommand() || pCrew->GetMacroCommand())) + { + // Leute töten ist nicht so wichtig... such lieber nach guten Waffen + if(pCrew->CustomContentsCount("IsWeapon") < 2) { + if(pCrew->SearchWeapon(Aggro_Shoot)) { + return(true); + } + } + // Genug ausgerüstet (oder nix gefunden)... Krieg!! + pAIPlayer->TacticDefault(pCrew); + } + } + return(true); +} + +public func GetMoreScoreText() { return "$MoreRelaunch$"; } + +public func GetLessScoreText() { return "$LessRelaunch$"; } \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/StringTblDE.txt new file mode 100644 index 00000000..f8fc2832 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +MsgGoalFulfilled=Du bist der letzte Überlebende. +MsgGoalUnfulfilled=Du hast noch %d Relaunchs. +WinMsg=%s hat gewonnen! +MsgHUD=noch %d Clonks +MoreRelaunch=Mehr Leben +LessRelaunch=Weniger Leben \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/LastManStanding.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/StringTblUS.txt new file mode 100644 index 00000000..ba44cd8e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/LastManStanding.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +MsgGoalFulfilled=You're the last one. You won. +MsgGoalUnfulfilled=You have %d relaunchs left. +WinMsg=And the winner is: %s +MsgHUD=%d clonks left +MoreRelaunch=More lifes +LessRelaunch=Less lifes \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Names.txt new file mode 100644 index 00000000..161cc9f6 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spielziele +US:Goals diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/DefCore.txt new file mode 100644 index 00000000..9dbb1d0c --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=TEAM +Version=4,9,8,2 +Name=Teams +Category=C4D_StaticBack +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/DescDE.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/DescDE.txt new file mode 100644 index 00000000..14ca91c4 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Grundsteuerung für Teambasierende Spielziele. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/DescUS.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/DescUS.txt new file mode 100644 index 00000000..cb5e17ce --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/DescUS.txt @@ -0,0 +1 @@ +The basic controls for teambased goals. \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Teams.c4d/Graphics.png new file mode 100644 index 00000000..c28ab7b2 Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Teams.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/DefCore.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/DefCore.txt new file mode 100644 index 00000000..eab64b64 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=3HUD +Version=4,9,8,2 +Name=HUD Info +Category=C4D_StaticBack|C4D_Parallax|C4D_Foreground|C4D_MouseIgnore|C4D_IgnoreFoW +Width=32 +Height=32 +Offset=-16,-16 diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/Graphics.png b/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/Graphics.png new file mode 100644 index 00000000..faecbb2e Binary files /dev/null and b/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/Graphics.png differ diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/Script.c b/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/Script.c new file mode 100644 index 00000000..b50cc52e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/Hud.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Infoding --*/ + +#strict + +protected func Initialize() +{ + SetVisibility(VIS_Owner); +} diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/Names.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/Names.txt new file mode 100644 index 00000000..0cc2bcee --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Teamsteuerung +US:Teamcontrol \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/Script.c b/Hazard.c4d/Goals.c4d/Teams.c4d/Script.c new file mode 100644 index 00000000..c2f9a810 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/Script.c @@ -0,0 +1,661 @@ +/*-- Teams --*/ + +#strict +#include GOAL + +static const TEAM_TeamColumn = 0; +static const TEAM_PlayerColumn = 1; +static const TEAM_GoalColumn = 2; +static const TEAM_KillColumn = 3; +static const TEAM_DeathColumn = 4; +// 1024 Spieler werden maximal für das Scoreboard unterstützt! +static const TEAM_iRow = 1024; + +// Rückwärtskompatibilität +static const TEAM_GOAL_COLUMN = 2; + +local init, fNoTeamCheck; +local evaluation; + +protected func Activate(iPlr) // Defaultnachrichten +{ + if (IsFulfilled()) + { + if(aPoints[GetPlayerTeam(iPlr)] >= iWinScore) + return(MessageWindow("$MsgGoalFulfilled$",iPlr)); + else + return(MessageWindow("$MsgGoalLost$",iPlr)); + } + return(MessageWindow(Format("$MsgGoalUnfulfilled$", GetWinScore() - aPoints[GetPlayerTeam(iPlr)]),iPlr)); +} + +// Variablen zum Speichern des Punktestandes + +local aPoints; + +// Siegpunktzahl + +local iWinScore; + +// Spielerdinge + +local aKill, aDeath; + +protected func Initialize() +{ + aPoints = CreateArray(); + aKill = CreateArray(); + aDeath = CreateArray(); + ScheduleCall(this(),"InitScoreboard",1); + return(_inherited()); +} + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + if(!init) return(); + + if(!aPoints[iTeam]) aPoints[iTeam] = 0; + +// if(iPlr > -1) +// DoScoreboardShow(true, iPlr); + + //Verfeindung setzen + Hostility(iPlr); + // Ins Scoreboard eintragen + + var teamp = GetTeamPlayerCount(iTeam); + // Team ist neu + if(teamp == 1) + InitSingleplayerTeam(iPlr); + // Team wechselt von Einzelspieler auf Mehrspieler + if(teamp == 2) + { + InitMultiplayerTeam(iTeam); + RemoveSingleplayerTeam(iPlr); + var j = 0; + while(GetTeamPlayer(iTeam, ++j) != -1) + { + InitPlayer(GetTeamPlayer(iTeam, j)); + } + } + // Spieler normal einfügen + if(teamp > 2) + InitPlayer(iPlr); + // Sortieren + SortTeamScoreboard(); + + UpdateHUD(iPlr); +} + +/* HUD-Funktionen */ + +private func GetGoalHUD(player) { + if(player <= -1) return; + + var bar = FindObjectOwner(3HUD,player); + if(!bar) + { + // init the base hud object + bar = CreateObject(3HUD, 0,0, player); + bar->SetPosition(60,140); + bar->SetGraphics(0, 0, GetID(), 1,4); + bar->SetObjDrawTransform(1500,0,0,0,1500,-120000,0,1); + bar->SetVisibility(VIS_None); + } + return bar; +} + +private func UpdateHUDs() { + var player; + for(var i=0; i= 0) + UpdateHUD(player); + } +} + +private func UpdateHUD(int player) { + var hud = GetGoalHUD(player); + if(!hud) return; + + // display message under the hud + // if GetHUDInfo return "" or 0, the icon is made invisible + // to circumvent this even though you want to display no text, + // just return a whitespace. + var g = GetHUDInfo(player, hud); + if(g && !FindObject(CHOS)) { + hud->SetVisibility(VIS_Owner); + Message("@%s", hud,g); + + // now, display the icons... + } + else { + hud->SetVisibility(VIS_None); + } +} + +private func SetHUDGraphics(string szGfxName, object pObj, id idSrcDef, int iOverlay, int iOverlayMode, string szAction, int dwBlitMode, object pOvelayObject) { + SetGraphics(szGfxName,pObj,idSrcDef,iOverlay,iOverlayMode,szAction,dwBlitMode,pOvelayObject); + pObj->SetObjDrawTransform(1000,0,35000+(iOverlay-2)*28000,0,1000,-66000,0,iOverlay); +} + +public func GetHUDInfo(int player, object hud) { + var team = GetPlayerTeam(player); + + //eigenes Team immer vorne + if(team && team > 0) + var sting = Format("%d",GetTeamColor(team),TeamGetScore(team)); + + var anotherteam; + for(var i=0; i%d",sting,GetTeamColor(anotherteam),TeamGetScore(anotherteam)); + } + + return(sting); +} + +public func ChooserFinished() +{ + ScheduleCall(this(),"InitScoreboard",1); +} + +//Die Initialisierung des Scoreboards. Damit alle Spalten/Zeilen etc. angezeigt werden +private func InitScoreboard() +{ + UpdateHUDs(); + //bool SetScoreboardData (int iRowID, int iColID, string sText, int iData); + + //Überschriften + SetScoreboardData(SBRD_Caption, SBRD_Caption, Format("%d $Score$",iWinScore), SBRD_Caption); + SetScoreboardData(SBRD_Caption, TEAM_TeamColumn, "{{KILC}}", SBRD_Caption); + SetScoreboardData(SBRD_Caption, TEAM_PlayerColumn, "{{HZCK}}", SBRD_Caption); + SetScoreboardData(SBRD_Caption, TEAM_GoalColumn, Format("{{%i}}",GetID()), SBRD_Caption); + SetScoreboardData(SBRD_Caption, TEAM_KillColumn, "{{PIWP}}", SBRD_Caption); + SetScoreboardData(SBRD_Caption, TEAM_DeathColumn, "{{KAMB}}", SBRD_Caption); + + var teams = CreateArray(), team; + + //Daten + //erstmal rausfinden welche Teams wir anzeigen + for(var i = 0 ; i < GetPlayerCount() ; i++) + { + if(!GetPlayerName(GetPlayerByIndex(i))) + continue; + + var done=0, plrteam = GetPlayerTeam(GetPlayerByIndex(i)); + if(plrteam < 1) continue; + + for(var team in teams) + if(team == plrteam) + done++; + if(!done) + { + teams[GetLength(teams)] = plrteam; + } + } + + //so, jetzt wissen wir die Teams. Jetzt noch nach Teamnummern ordnen. %( + //Bubblesort! + var t1, t2; + for(t1 = 0; t1 < GetLength(teams); t1++) { + for(t2 = t1; t2 < GetLength(teams); t2++) + if(teams[t2] < teams[t1]) + { + var tmp = teams[t1]; + teams[t1] = teams[t2]; + teams[t2] = tmp; + } + } + //puh, ganz schön viel Aufwand für sowas.. + //aber jetzt müssen wir nur noch darstellen. :) + for(var x=0; x < GetLength(teams); x++) + { + var t = teams[x]; + // Team hat keinen Spieler -> Höh? + if(!GetTeamPlayerCount(t)) continue; + // Team hat nur einen Spieler -> "Einzelspielerteam" + if(GetTeamPlayerCount(t) == 1) + { + InitSingleplayerTeam(GetTeamPlayer(t, 1)); + continue; + } + // Team einfügen, 1024 Spieler werden maximal unterstützt! + InitMultiplayerTeam(t); + // Spieler aus dem Team einfügen + var j = 0; + while(GetTeamPlayer(t, ++j) != -1) + { + InitPlayer(GetTeamPlayer(t, j)); + } + } + // Sortieren + SortTeamScoreboard(); + // Fertig + init = true; +} + +/* Scoreboard */ + +// Funktionen zum Eintragen + +// Team eintragen, dass mehrere Spieler hat +private func InitMultiplayerTeam(int iTeam) +{ + if(iTeam < 1) return(); + + var col = GetTeamColor(iTeam); + + SetScoreboardData(TEAM_iRow + iTeam, SBRD_Caption, ""); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_TeamColumn, Format("%s", col, GetTeamName(iTeam)), iTeam); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_PlayerColumn, ""); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_GoalColumn, Format("%d", col, aPoints[iTeam]), aPoints[iTeam]); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_KillColumn, Format("%d", col, TeamGetKills(iTeam)), TeamGetKills(iTeam)+1); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_DeathColumn, Format("%d", col, TeamGetDeath(iTeam))); + SortTeamScoreboard(); +} + +// Mehrspielerteam austragen +private func RemoveMultiplayerTeam(int iTeam) +{ + if(iTeam < 1) return(); + + SetScoreboardData(TEAM_iRow + iTeam, TEAM_TeamColumn); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_PlayerColumn); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_GoalColumn); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_KillColumn); + SetScoreboardData(TEAM_iRow + iTeam, TEAM_DeathColumn); + SortTeamScoreboard(); +} + +// Team eintragen, dass nur einen Spieler hat +private func InitSingleplayerTeam(int iPlr) +{ + if(iPlr == -1) return(); + + var col = GetPlrColorDw(iPlr); + + SetScoreboardData(iPlr, SBRD_Caption, ""); + SetScoreboardData(iPlr, TEAM_TeamColumn, GetTaggedPlayerName(iPlr), GetPlayerTeam(iPlr)); + SetScoreboardData(iPlr, TEAM_PlayerColumn, ""); + SetScoreboardData(iPlr, TEAM_GoalColumn, Format("%d", col, aPoints[GetPlayerTeam(iPlr)]), aPoints[GetPlayerTeam(iPlr)]); + SetScoreboardData(iPlr, TEAM_KillColumn, Format("%d", col, TeamGetKills(GetPlayerTeam(iPlr))), TeamGetKills(GetPlayerTeam(iPlr))+1); + SetScoreboardData(iPlr, TEAM_DeathColumn, Format("%d", col, aDeath[iPlr]), aDeath[iPlr]); + SortTeamScoreboard(); +} + +// Einzelspielerteam austragen +private func RemoveSingleplayerTeam(int iPlr) +{ + if(iPlr == -1) return(); + + SetScoreboardData(iPlr, TEAM_TeamColumn); + SetScoreboardData(iPlr, TEAM_PlayerColumn); + SetScoreboardData(iPlr, TEAM_GoalColumn); + SetScoreboardData(iPlr, TEAM_KillColumn); + SetScoreboardData(iPlr, TEAM_DeathColumn); + SortTeamScoreboard(); +} + +// Spieler eintragen +private func InitPlayer(int iPlr) +{ + // Team 0 oder -1 können wir nicht behandeln + if(GetPlayerTeam(iPlr) < 1) return(); + if(iPlr == -1) return(); + + UpdateHUDs(); + + // Eintragen + SetScoreboardData(iPlr, SBRD_Caption, ""); + SetScoreboardData(iPlr, TEAM_TeamColumn, Format("\\",GetTeamColor(GetPlayerTeam(iPlr))), GetPlayerTeam(iPlr)); + SetScoreboardData(iPlr, TEAM_PlayerColumn, GetTaggedPlayerName(iPlr)); + SetScoreboardData(iPlr, TEAM_GoalColumn, "", aPoints[GetPlayerTeam(iPlr)]); + SetScoreboardData(iPlr, TEAM_KillColumn, Format("%d", aKill[iPlr]), aKill[iPlr]); + SetScoreboardData(iPlr, TEAM_DeathColumn, Format("%d", aDeath[iPlr]), aDeath[iPlr]); + SortTeamScoreboard(); +} + +// Spieler austragen +private func RemoveScoreboardPlayer(int iPlr) +{ + if(iPlr == -1) return(); + + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) == 1) return(RemoveSingleplayerTeam(iPlr)); + + SetScoreboardData(iPlr, TEAM_TeamColumn); + SetScoreboardData(iPlr, TEAM_PlayerColumn); + SetScoreboardData(iPlr, TEAM_GoalColumn); + SetScoreboardData(iPlr, TEAM_KillColumn); + SetScoreboardData(iPlr, TEAM_DeathColumn); + + SortTeamScoreboard(); + + // Team nicht prüfen + if(fNoTeamCheck) return(); + fNoTeamCheck = true; + + // Team wechselt zum Einzelspielerteam + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) == 2) // 2, weil der Spieler in diesem Moment noch im Spiel ist + { + var j = 0, p; + while(GetTeamPlayer(GetPlayerTeam(iPlr), ++j) != -1) + { + p = GetTeamPlayer(iPlr, j); + if(p == iPlr) continue; + //Log("%d", p); +// RemovePlayer(p, true); + RemoveMultiplayerTeam(GetPlayerTeam(iPlr)); + InitSingleplayerTeam(p); + } + } + fNoTeamCheck = false; +} + +// Engine-Call +public func RemovePlayer(int iPlr) +{ + if(iPlr == -1) return(); + + // Auswertungsdialog + DoEvaluation(iPlr); + + UpdateHUDs(); + RemoveScoreboardPlayer(iPlr); + aDeath[iPlr] = 0; + aKill[iPlr] = 0; +} + +// Sortieren +private func SortTeamScoreboard() +{ + // Nach Toden (Spieler) + SortScoreboard(TEAM_DeathColumn); + // Nach Kills (Spieler) + SortScoreboard(TEAM_KillColumn, true); + // Nach Teams (Spieler) + SortScoreboard(TEAM_TeamColumn); + // Nach Punkten (Teams) + SortScoreboard(TEAM_GoalColumn, true); +} + +/* Helferlein */ + +// Schaut, wie viele Spieler in einem Team sind +private func GetTeamPlayerCount(int iTeam) +{ + for(var i = GetPlayerCount()-1,j ; i > -1 ; i--) + if(GetPlayerTeam(GetPlayerByIndex(i)) == iTeam) + j++; + return(j); +} + +// Liefert nacheinander die einzelnen Spieler eines Teams (Parameter 1 - x) +private func GetTeamPlayer(int iTeam, int iNo) +{ + for(var i = GetPlayerCount()-1,j ; i > -1 ; i--) + if(GetPlayerTeam(GetPlayerByIndex(i)) == iTeam) + if(!--iNo) + return(GetPlayerByIndex(i)); + return(-1); + +} + +// Liefert alle Kills eines Teams +private func TeamGetKills(int iTeam) +{ + for(var i = GetPlayerCount()-1,j ; i > -1 ; i--) + if(GetPlayerTeam(GetPlayerByIndex(i)) == iTeam) + j += aKill[GetPlayerByIndex(i)]; + return(j); +} + +private func TeamGetScore(int iTeam) +{ + return(aPoints[iTeam]); +} + +private func BestTeamGetScore(int iExclude) +{ + var greatest = 0; + for(var i = 0; i -1 ; i--) + if(GetPlayerTeam(GetPlayerByIndex(i)) == iTeam) + j += aDeath[GetPlayerByIndex(i)]; + return(j); +} + +//aktualisiert den Punktestand +private func UpdateScoreboard(int iTeam) +{ + UpdateHUDs(); + + if(GetTeamPlayerCount(iTeam) > 1) + { + SetScoreboardData(TEAM_iRow + iTeam, TEAM_GoalColumn, Format("%d", GetTeamColor(iTeam), aPoints[iTeam]), aPoints[iTeam]); + var p, j=0; + while(GetTeamPlayer(iTeam, ++j) != -1) + { + p = GetTeamPlayer(iTeam, j); + SetScoreboardData(p, TEAM_GoalColumn, "", aPoints[iTeam]); + } + } + else + SetScoreboardData(GetTeamPlayer(iTeam, 1), TEAM_GoalColumn, Format("%d", GetPlrColorDw(GetTeamPlayer(iTeam, 1)), aPoints[iTeam]), aPoints[iTeam]); + + SortTeamScoreboard(); +} + +private func Hostility(int iPlr) +{ + for(var x; x < GetPlayerCount(); x++) + if(GetPlayerByIndex(x) && iPlr != x) { + if(GetPlayerTeam(iPlr) != GetPlayerTeam(GetPlayerByIndex(x))) + SetHostility(iPlr, GetPlayerByIndex(x), 1, 1); + else + SetHostility(iPlr, GetPlayerByIndex(x), 0, 1); + } +} + +public func Destruction() +{ + //Scoreboard löschen + for(var x=1; GetTeamName(x); x++) { + var iColID = 1; + SetScoreboardData(x, SBRD_Caption, 0); + SetScoreboardData(x, iColID, 0); + } +} + +/* Aufrufe */ + +public func WinScoreChange(int iNewScore) +{ + iWinScore = iNewScore; + UpdateHUDs(); + SetScoreboardData(SBRD_Caption, SBRD_Caption, Format("%d $Score$",iWinScore), SBRD_Caption); +} + +public func ScoreChange(int iTeam, int iChange) +{ + aPoints[iTeam] += iChange; + UpdateScoreboard(iTeam); + UpdateHUDs(); + CheckTime(); +} + +public func IsFulfilled() // Siegreiches Team? +{ + // leben noch menschliche spieler? + if(!GetPlayerCount(C4PT_User)) { + if(IsNetwork()) // nein - wenn wir im Netzwerk sind beenden. + { + EvaluationForAll(); + return(1); + } + } + + var team; + for(var iScore in aPoints) { + if(iScore >= iWinScore) + { + EliminateLosers(); + + Message("@$WinMsg$",0,GetTeamColor(team),GetTeamName(team)); + + //Leben noch Verlierer? -> Ligainkompatibilität! + if(LosersAlive()) + return(0); + + EvaluationForAll(); + return(1); + } + team++; + } + // Nur noch ein Team und das hat schon Punkte? -> Sieg (Verlierer sind rausgegangen) + team = OneTeam(); + if(team != -1) + if(aPoints[team] > 0) + { + Message("@$WinMsg$",0,GetTeamColor(team),GetTeamName(team)); + + EvaluationForAll(); + return(1); + } +} + +private func EvaluationForAll() { + // Auswertungsdialog + if(!evaluation) { + for(var i=0 ; i < GetPlayerCount() ; i++) + { + var plr = GetPlayerByIndex(i); + DoEvaluation(plr); + } + evaluation = true; + } +} + +func DoEvaluation(int plr) +{ + AddEvaluationData(Format("{{PIWP}}$Kills$: %d", aKill[plr]), GetPlayerID(plr)); + AddEvaluationData(Format("{{KAMB}}$Death$: %d", aDeath[plr]), GetPlayerID(plr)); +} + +private func OneTeam() // Nur noch ein einziges Team im Spiel? +{ + var plr, team; + for(var i = 0 ; i < GetPlayerCount() ; i++) + { + plr = GetPlayerByIndex(i); + if(!team) team = GetPlayerTeam(plr); + else if(GetPlayerTeam(plr) != team) + return(-1); + } + return(team); +} + +private func EliminateLosers() // Hier trennt sich die Spreu vom Weizen +{ + for(var i=0 ; i < GetPlayerCount() ; i++) + if(aPoints[GetPlayerTeam(GetPlayerByIndex(i))] < iWinScore) + EliminatePlayer(GetPlayerByIndex(i)); // HARHAR +} + +private func LosersAlive() +{ + for(var x = 0 ; x < GetPlayerCount() ; x++) + if(aPoints[GetPlayerTeam(GetPlayerByIndex(x))] < iWinScore) + if(GetPlayerByIndex(x) >= 0) + return(1); + + return(0); +} + +public func RelaunchPlayer(int iPlr, object pClonk, int iMurdererPlr) +{ + if(iPlr == -1 || !GetPlayerName(iPlr)) return(); + + UpdateHUDs(); + + //Tode++ + aDeath[iPlr]++; + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) > 1) + SetScoreboardData(iPlr, TEAM_DeathColumn, Format("%d", aDeath[iPlr]), aDeath[iPlr]); + else + SetScoreboardData(iPlr, TEAM_DeathColumn, Format("%d", GetPlrColorDw(iPlr), aDeath[iPlr]), aDeath[iPlr]); + if(GetTeamPlayerCount(GetPlayerTeam(iPlr)) > 1) + SetScoreboardData(TEAM_iRow + GetPlayerTeam(iPlr), TEAM_DeathColumn, Format("%d", GetTeamColor(GetPlayerTeam(iPlr)), TeamGetDeath(GetPlayerTeam(iPlr))), TeamGetDeath(GetPlayerTeam(iPlr))+1); + //kein Selfkill? kein Teamkill? + if(iMurdererPlr != -1 && GetPlayerTeam(iPlr) != GetPlayerTeam(iMurdererPlr)) + { + //kill++ + aKill[iMurdererPlr]++; + SetScoreboardData(iMurdererPlr, TEAM_KillColumn, Format("%d", GetPlrColorDw(iMurdererPlr), aKill[iMurdererPlr]), aKill[iMurdererPlr]); + //team: kill++ + if(GetTeamPlayerCount(GetPlayerTeam(iMurdererPlr)) > 1) + { + SetScoreboardData(TEAM_iRow + GetPlayerTeam(iMurdererPlr), TEAM_KillColumn, Format("%d", GetTeamColor(GetPlayerTeam(iMurdererPlr)), TeamGetKills(GetPlayerTeam(iMurdererPlr))), TeamGetKills(GetPlayerTeam(iMurdererPlr))+1); + SetScoreboardData(iMurdererPlr, TEAM_KillColumn, Format("%d", aKill[iMurdererPlr]), aKill[iMurdererPlr]); + } + } + SortTeamScoreboard(); + // Geld + Money(iPlr, pClonk, iMurdererPlr); +} + +// Default-Verhalten für Geld +public func Money(int iPlr, object pClonk, int iMurdererPlr) +{ + if(iMurdererPlr != NO_OWNER) + { + // Teamkill! Wert des Clonks wird abgezogen + if(GetPlayerTeam(iPlr) == GetPlayerTeam(iMurdererPlr)) + DoWealth(iMurdererPlr, - pClonk->GetValue(0,0,0, iMurdererPlr)); + // Regulärer Kill, Wert des Clonks wird vergeben + else + DoWealth(iMurdererPlr, + pClonk->GetValue(0,0,0, iMurdererPlr)); + } + // Geld für den getöteten, halber Wert des Clonks wird gegeben + DoWealth(iPlr, + pClonk->GetValue(0,0,0, iPlr) / 2); +} +// Hinweis: die Werte können in CalcValue-Aufrufe verändert werden + +/* Globale Funktionen */ + +global func DoTeamScore(int iTeam, int iChange) +{ + for(var pGoal in FindObjects(Find_Func("IsTeamGoal"))) + pGoal->~ScoreChange(iTeam, iChange); +} + +global func SetWinScore(int iNewScore, object pGoal) +{ + if(pGoal) + { + pGoal->~WinScoreChange(iNewScore); + return(0); + } + for(var goal in FindObjects(Find_Func("IsTeamGoal"))) + goal->~WinScoreChange(iNewScore); +} + +global func GetWinScore(object pGoal) +{ + return(LocalN("iWinScore", pGoal)); +} + +/* Status */ + +public func IsTeamGoal() { return(1); } diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/StringTblDE.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/StringTblDE.txt new file mode 100644 index 00000000..ed483b8e --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/StringTblDE.txt @@ -0,0 +1,7 @@ +MsgGoalFulfilled=Und wir haben einen Gewinner! +MsgGoalUnfulfilled=Dein Team muss noch %d Punkte erkämpfen. +Score=Punkte +MsgGoalLost=Leider verloren. +WinMsg=%s hat gewonnen! +Kills=Kills +Death=Tode \ No newline at end of file diff --git a/Hazard.c4d/Goals.c4d/Teams.c4d/StringTblUS.txt b/Hazard.c4d/Goals.c4d/Teams.c4d/StringTblUS.txt new file mode 100644 index 00000000..c2875f38 --- /dev/null +++ b/Hazard.c4d/Goals.c4d/Teams.c4d/StringTblUS.txt @@ -0,0 +1,7 @@ +MsgGoalFulfilled=We have a winner! +MsgGoalUnfulfilled=You still have to get %d points. +Score=Points +MsgGoalLost=Alas! You have lost. +WinMsg=And the winner is: %s +Kills=Kills +Death=Death \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DefCore.txt new file mode 100644 index 00000000..72ace426 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=STAM +Version=4,9,8,2 +Name=Standard Ammo +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DescDE.txt new file mode 100644 index 00000000..75ace899 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DescDE.txt @@ -0,0 +1 @@ +*bähm* *bähm* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DescUS.txt new file mode 100644 index 00000000..0fc31a85 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/DescUS.txt @@ -0,0 +1 @@ +*bang* *bang* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Graphics.png new file mode 100644 index 00000000..85aa5d88 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Names.txt new file mode 100644 index 00000000..d1a6cd48 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kugeln +US:Bullets \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Script.c new file mode 100644 index 00000000..e2057587 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Bullets.c4d/Script.c @@ -0,0 +1,5 @@ +#strict + +public func IsAmmo() { return(true); } +public func MaxAmmo() { return(300); } +public func AmmoPackID() { return(STAP); } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DefCore.txt new file mode 100644 index 00000000..acd4a361 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=STAP +Version=4,9,8,2 +Name=Standard Ammo +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=10 +Width=10 +Height=6 +Offset=-5,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=10 +Mass=5 +Components=METL=1 +Picture=10,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DescDE.txt new file mode 100644 index 00000000..7b18b5d0 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DescDE.txt @@ -0,0 +1 @@ +Diese Kiste enthält 100 Projektilmunition. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DescUS.txt new file mode 100644 index 00000000..8438f107 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/DescUS.txt @@ -0,0 +1 @@ +This pack contains 100 ammo for projectile weapons. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Graphics.png new file mode 100644 index 00000000..73fa3d9b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Names.txt new file mode 100644 index 00000000..f7c90cf2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Munitionspack +US:Ammo pack \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Script.c new file mode 100644 index 00000000..85c64403 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/Script.c @@ -0,0 +1,41 @@ +#strict + +public func IsAmmoPacket() { return(true); } +public func AmmoID() { return(STAM); } +public func AmmoCount() { return(100); } + +private func OnTransfer() {} + +protected func Activate(object pObj) { // Doppelgraben + return(TransferAmmo(pObj)); +} + +public func MayTransfer(object pObj) +{ + if(!pObj) return(false); + var MaxAmmo = AmmoID()->~MaxAmmo(); + if(MaxAmmo) + if(GetAmmo(AmmoID(),pObj) + AmmoCount() > MaxAmmo) + return(false); + return(true); +} + +public func TransferAmmo(object pObj) // Ammo dem Clonk geben +{ + if(!pObj) return(false); + if(NoAmmo()) return(false); + + // nicht wenn er schon zu viel hat + if(!MayTransfer(pObj)) { + PlayerMessage(GetOwner(pObj),"$NotMoreAmmo$",pObj,AmmoID()); + return(); + } + + // Nachricht ausgeben + HelpMessage(GetOwner(pObj),"$Collected$",pObj,AmmoCount(),AmmoID()); + DoAmmo(AmmoID(),AmmoCount(),pObj); + pObj->~AmmoTransferred(); + if(!OnTransfer()) RemoveObject(); + + return(true); +} diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/StringTblDE.txt new file mode 100644 index 00000000..1a8e1370 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +NotMoreAmmo=Kann nicht noch mehr|{{%i}} aufbewahren! +Collected=%dx {{%i}} aufgenommen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/StringTblUS.txt new file mode 100644 index 00000000..22bc5554 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Ammopack.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +NotMoreAmmo=Can not store more {{%i}}! +Collected=%dx {{%i}} collected. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DefCore.txt new file mode 100644 index 00000000..1a2f8bf9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=ENAP +Version=4,9,8,2 +Name=Energiezelle +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=10 +Width=8 +Height=8 +Offset=-4,-4 +Vertices=1 +VertexY=4 +VertexFriction=20 +Value=10 +Mass=5 +Components=CRYS=1 +Picture=8,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DescDE.txt new file mode 100644 index 00000000..6bf1268d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DescDE.txt @@ -0,0 +1 @@ +Diese Zelle speichert 75 Energie. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DescUS.txt new file mode 100644 index 00000000..ec2f5f91 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/DescUS.txt @@ -0,0 +1 @@ +This cell accumulates 75 energy. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DefCore.txt new file mode 100644 index 00000000..4512b7dd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=ENAM +Version=4,9,8,2 +Name=Energy +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DescDE.txt new file mode 100644 index 00000000..93bfe7b4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DescDE.txt @@ -0,0 +1 @@ +*brzzl* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DescUS.txt new file mode 100644 index 00000000..5de9a4f2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/DescUS.txt @@ -0,0 +1 @@ +*zap* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Graphics.png new file mode 100644 index 00000000..69cd0392 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Names.txt new file mode 100644 index 00000000..144e3861 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Energie +US:Energy \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Script.c new file mode 100644 index 00000000..96474a6c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Energy.c4d/Script.c @@ -0,0 +1,5 @@ +#strict + +public func IsAmmo() { return(true); } +public func MaxAmmo() { return(500); } +public func AmmoPackID() { return(ENAP); } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Graphics.png new file mode 100644 index 00000000..e284f021 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Names.txt new file mode 100644 index 00000000..32eae567 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Energiezelle +US:Energy cell \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Script.c new file mode 100644 index 00000000..ea00a8c6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Battery.c4d/Script.c @@ -0,0 +1,6 @@ +#strict +#include STAP + +public func IsAmmoPacket() { return(true); } +public func AmmoID() { return(ENAM); } +public func AmmoCount() { return(75); } diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/DescDE.txt new file mode 100644 index 00000000..57b2c77a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/DescDE.txt @@ -0,0 +1 @@ +Der Hazardclonk kann Munition per Doppelgraben in seinen Munitionsgurt stecken. Mit dieser Munition lädt er selbstständig seine Waffen nach. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/DescUS.txt new file mode 100644 index 00000000..751664a7 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/DescUS.txt @@ -0,0 +1 @@ +The hazardclonk can put ammo with double-dig in his ammunition belt. He will reload his weapons with this ammo autonomously. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DefCore.txt new file mode 100644 index 00000000..1e8623b1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=GRAP +Version=4,9,8,2 +Name=GrenadePack +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=5 +Width=12 +Height=8 +Offset=-6,-4 +Vertices=4 +VertexX=-5,5,5,-5 +VertexY=3,3,-3,-3 +VertexFriction=20,20,20,20 +Value=10 +Mass=5 +Components=METL=1 +Picture=12,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DescDE.txt new file mode 100644 index 00000000..de7f783b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DescDE.txt @@ -0,0 +1 @@ +Beinhaltet 12 Granaten. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DescUS.txt new file mode 100644 index 00000000..407a2228 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/DescUS.txt @@ -0,0 +1 @@ +Contains 12 grenades. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Graphics.png new file mode 100644 index 00000000..c07fc06a Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DefCore.txt new file mode 100644 index 00000000..f0e82d3d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=GRAM +Version=4,9,8,2 +Name=Grenades +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DescDE.txt new file mode 100644 index 00000000..173625a8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DescDE.txt @@ -0,0 +1 @@ +*Spring* *Spring* *Boom* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DescUS.txt new file mode 100644 index 00000000..5185f6a9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/DescUS.txt @@ -0,0 +1 @@ +*bounce* *bounce* *boom* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Graphics.png new file mode 100644 index 00000000..e89095b8 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Names.txt new file mode 100644 index 00000000..a89b6d24 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Granaten +US:Grenades diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Script.c new file mode 100644 index 00000000..50f255d8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Grenades.c4d/Script.c @@ -0,0 +1,5 @@ +#strict + +public func IsAmmo() { return(true); } +public func MaxAmmo() { return(60); } +public func AmmoPackID() { return(GRAP); } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Names.txt new file mode 100644 index 00000000..d6549efa --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Granatenpack +US:Grenade pack diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Script.c new file mode 100644 index 00000000..8d0751f4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/GrenadePack.c4d/Script.c @@ -0,0 +1,9 @@ +/*-- Granatenpack --*/ + +#strict +#include STAP + +public func IsAmmoPacket() { return(true); } +public func AmmoID() { return(GRAM); } +public func AmmoCount() { return(12); } + diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DefCore.txt new file mode 100644 index 00000000..6746dec8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=GSAP +Version=4,9,8,2 +Name=Jerrycan +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=10 +Width=10 +Height=12 +Offset=-5,-6 +Vertices=4 +VertexX=-5,4,-5,4 +VertexY=5,5,-5,-6 +VertexFriction=20,20,20,20 +Value=10 +Mass=5 +Components=OBRL=1 +Picture=10,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DescDE.txt new file mode 100644 index 00000000..c6ddcdae --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DescDE.txt @@ -0,0 +1 @@ +Gefüllt 100 Einheiten Benzin. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DescUS.txt new file mode 100644 index 00000000..ce23db8e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/DescUS.txt @@ -0,0 +1 @@ +Filled with 100 units of gasoline. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DefCore.txt new file mode 100644 index 00000000..07f2aaea --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=GSAM +Version=4,9,8,2 +Name=Gasoline +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DescDE.txt new file mode 100644 index 00000000..844728f3 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DescDE.txt @@ -0,0 +1 @@ +*Brenn* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DescUS.txt new file mode 100644 index 00000000..2a443555 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/DescUS.txt @@ -0,0 +1 @@ +*burn* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Graphics.png new file mode 100644 index 00000000..2fbbdb6f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Names.txt new file mode 100644 index 00000000..64bf02a1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Benzin +US:Gasoline \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Script.c new file mode 100644 index 00000000..934a3f9f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Gasoline.c4d/Script.c @@ -0,0 +1,5 @@ +#strict + +public func IsAmmo() { return(true); } +public func MaxAmmo() { return(500); } +public func AmmoPackID() { return(GSAP); } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Graphics.png new file mode 100644 index 00000000..0dc1539b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Names.txt new file mode 100644 index 00000000..0da0d539 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Benzinkanister +US:Jerrycan \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Script.c new file mode 100644 index 00000000..b2ffb37a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Jerrycan.c4d/Script.c @@ -0,0 +1,7 @@ +#strict +#include STAP + + +public func IsAmmoPacket() { return(true); } +public func AmmoID() { return(GSAM); } +public func AmmoCount() { return(100); } diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DefCore.txt new file mode 100644 index 00000000..7d2d0667 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=MIAP +Version=4,9,8,2 +Name=Missiles +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=10 +Width=14 +Height=15 +Offset=-7,-7 +Vertices=3 +VertexX=-7,7 +VertexY=7,7,-7 +VertexFriction=20,20,20 +Value=10 +Mass=5 +Components=METL=1 +Picture=14,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DescDE.txt new file mode 100644 index 00000000..e60aae5e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DescDE.txt @@ -0,0 +1 @@ +Vier Raketen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DescUS.txt new file mode 100644 index 00000000..3ba3701b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/DescUS.txt @@ -0,0 +1 @@ +Four missiles. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Graphics.png new file mode 100644 index 00000000..18df0ad0 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DefCore.txt new file mode 100644 index 00000000..9a1bc8f4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=MIAM +Version=4,9,8,2 +Name=Missile +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DescDE.txt new file mode 100644 index 00000000..a8f4cc49 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DescDE.txt @@ -0,0 +1 @@ +*Swuusch* *Kaboom* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DescUS.txt new file mode 100644 index 00000000..c7376fff --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/DescUS.txt @@ -0,0 +1 @@ +*swouush* *kaboom* \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Graphics.png new file mode 100644 index 00000000..70450945 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Names.txt new file mode 100644 index 00000000..7fb29262 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Raketen +US:Missiles diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Script.c new file mode 100644 index 00000000..fad56410 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Missile.c4d/Script.c @@ -0,0 +1,5 @@ +#strict + +public func IsAmmo() { return(true); } +public func MaxAmmo() { return(20); } +public func AmmoPackID() { return(MIAP); } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Names.txt new file mode 100644 index 00000000..f82f0f9f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Raketen +US:Missiles \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Script.c b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Script.c new file mode 100644 index 00000000..b48746dd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Missiles.c4d/Script.c @@ -0,0 +1,7 @@ +#strict +#include STAP + +public func IsAmmoPacket() { return(true); } +public func AmmoID() { return(MIAM); } +public func AmmoCount() { return(4); } + diff --git a/Hazard.c4d/Items.c4d/Ammo.c4d/Names.txt b/Hazard.c4d/Items.c4d/Ammo.c4d/Names.txt new file mode 100644 index 00000000..8db79016 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Ammo.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Munition +US:Ammo \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/DescDE.txt new file mode 100644 index 00000000..dd56f743 --- /dev/null +++ b/Hazard.c4d/Items.c4d/DescDE.txt @@ -0,0 +1 @@ +Die wichtigste Ausrüstung und Waffen für Elitekämpfer. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/DescUS.txt new file mode 100644 index 00000000..f0dffaad --- /dev/null +++ b/Hazard.c4d/Items.c4d/DescUS.txt @@ -0,0 +1 @@ +The most important equipment and weaponry for the elite fighter. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DefCore.txt new file mode 100644 index 00000000..4567ad72 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=AIRT +Version=4,9,8,2 +Name=AirTank +Category=C4D_Object +Width=6 +Height=12 +Offset=-3,-6 +Vertices=2 +VertexY=-5,5 +VertexFriction=50,50 +Value=5 +Mass=10 +Components=METL=2 +Picture=6,0,64,64 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DescDE.txt new file mode 100644 index 00000000..ac59764e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DescDE.txt @@ -0,0 +1 @@ +Damit kann man Unterwasser länger atmen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DescUS.txt new file mode 100644 index 00000000..0c8eb9fd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/DescUS.txt @@ -0,0 +1 @@ +Allows to breath longer underwater. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Graphics.png new file mode 100644 index 00000000..916dfc64 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Names.txt new file mode 100644 index 00000000..22c8e668 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Atemflasche +US:Air tank \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Script.c b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Script.c new file mode 100644 index 00000000..8e050e8d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/AirTank.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- Atemflasche --*/ + +#strict +#include GEAR + +/* Status */ + +public func GetGearType() { return(GEAR_Backpack); } +protected func Hit() { Sound("MetalHit*"); } +public func IsEquipment() { return(true); } + +/* Callbacks */ + +public func GearEffect(object pClonk) +{ + // add breath effect + AddEffect("AirTank", pClonk, 99, 3, this()); + Sound("Pshshsh"); +} + +public func GearEffectReset(object pClonk) +{ + // remove effect + RemoveEffect("AirTank", pClonk); +} + +/* Effect */ + +public func FxAirTankTimer(object pClonk) +{ + // clonk needs air? + if(Inside(pClonk->GetBreath(), 1, pClonk->GetPhysical("Breath")/1000-1)) + { + // Breath! + pClonk->DoBreath(1); + } +} diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DefCore.txt new file mode 100644 index 00000000..ba9853dd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=HARM +Version=4,9,8,2 +Name=HazardArmor +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=20 +Height=13 +Offset=-10,-7 +Vertices=3 +VertexX=-8,8 +VertexY=5,5,-5 +VertexFriction=80,80,80 +Value=42 +Mass=20 +Components=METL=3;ENAP=1 +Picture=0,13,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DescDE.txt new file mode 100644 index 00000000..edb0bac1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DescDE.txt @@ -0,0 +1 @@ +Starker Schutz, vor allem im bewaffneten Zweikampf und gegen Projektile. Anfällig gegen Energiewaffen. diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DescUS.txt new file mode 100644 index 00000000..51f4b2f6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/DescUS.txt @@ -0,0 +1 @@ +Strong protection, especially in armed melee and against projectiles. Vulnerable against energy weapons. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Graphics.png new file mode 100644 index 00000000..fef44634 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Names.txt new file mode 100644 index 00000000..1065ea62 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rüstung +US:Armor diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Script.c b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Script.c new file mode 100644 index 00000000..d3b7714d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/Script.c @@ -0,0 +1,97 @@ +/*-- Rüstung --*/ + +#strict +#include GEAR + + +local pNightVision; // saves the nightvision-light + + +/* Status */ + +public func GetGearType() { return(GEAR_Armor); } +protected func Hit() { Sound("ClonkHit*"); } +public func IsEquipment() { return(true); } + +/* Callbacks */ + +public func GearEffect(object pClonk) +{ + // Change graphics and portrait + var iPortraitCount = 3; + var strGraphics = "Armor"; + SetGraphics(strGraphics,pClonk); + SetPortrait(Format("%s%d", strGraphics, 1 + Random(iPortraitCount)), pClonk, GetID(pClonk), 0, 0); + Sound("Connect"); +} + +public func GearEffectReset(object pClonk) +{ + // reset graphics and portrait + SetGraphics("",pClonk); + ResetPortrait(pClonk,false); + if(pNightVision) RemoveObject(pNightVision); + Sound("Connect"); +} + + +/* Damage reduction */ + +public func OnClonkDmg(int iDamage, int iType, object pClonk) +{ + if(!pClonk) return(); + //Melee + if(iType == DMG_Melee) + return(60); // 60% Melee + //Projectile + if(iType == DMG_Projectile) + return(40); // 40% Projektile + //Flame + if(iType == DMG_Fire) + return(0); + //Explosion + if(iType == DMG_Explosion) + return(20); // 20% Explosion + //Energy + if(iType == DMG_Energy) + return(-20); // -20% Energy (!) + //Bio + if(iType == DMG_Bio) + return(25); // 15% Bio (the clonk has -10% sensivity) +} + + +/* Use per context menu of the hazard clonk */ + +public func ConDesc() { + if(pNightVision) return("$CtxNightVisionOff$"); + return("$CtxNightVisionOn$"); +} + +public func ConUseable() { + // without darkness, there is no need for nightvision + if(IsDark()) + return(true); +} + +public func ConUse(object pHazard) { + + // turn on + if(!pNightVision) { + pNightVision = AddLight(1200,RGBa(50,255,50,65),pHazard); + if(!pNightVision) + return(); + pNightVision->SetVisibility(VIS_Owner); + } + + // turn off + else { + RemoveObject(pNightVision); + } + + + // Attentioooon: Here comes the effect! + // .. + // .....! + Sound("Click"); // Ba-bum. +} diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/StringTblDE.txt new file mode 100644 index 00000000..30696b27 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +CtxNightVisionOn=Nachtsichtgerät einschalten +CtxNightVisionOff=Nachtsichtgerät ausschalten \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/StringTblUS.txt new file mode 100644 index 00000000..0be8b109 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Armor.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +CtxNightVisionOn=Turn nightvision on +CtxNightVisionOff=Turn nightvision off \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/DescDE.txt new file mode 100644 index 00000000..5a25d74b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/DescDE.txt @@ -0,0 +1 @@ +Die richtige Ausrüstung ist ein wesentlicher Beitrag zum Erfolg einer Mission. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/DescUS.txt new file mode 100644 index 00000000..5890de1b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/DescUS.txt @@ -0,0 +1 @@ +The right gear is an important contribution to the success of a mission. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/ActMap.txt new file mode 100644 index 00000000..8333696c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=On +Procedure=NONE +Delay=1 +FacetBase=1 +NextAction=On +StartCall=CheckRotation diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DefCore.txt new file mode 100644 index 00000000..8c35a24b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=FLSH +Version=4,9,8,2 +Name=Flashlight +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=4 +Width=12 +Height=4 +Offset=-6,-2 +Vertices=2 +VertexX=-6,6 +VertexFriction=30,30 +Value=7 +Mass=5 +Components=METL=1 +Picture=12,0,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DescDE.txt new file mode 100644 index 00000000..894726a9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DescDE.txt @@ -0,0 +1 @@ +Leuchtet dunkle Gänge aus. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DescUS.txt new file mode 100644 index 00000000..3912e46c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/DescUS.txt @@ -0,0 +1 @@ +Lights up dark walks. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Graphics.png new file mode 100644 index 00000000..6030146b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Names.txt new file mode 100644 index 00000000..698f3e9c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Taschenlampe +US:Flashlight \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Script.c b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Script.c new file mode 100644 index 00000000..ef93d25b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Flashlight.c4d/Script.c @@ -0,0 +1,38 @@ +/*-- Flashlight --*/ + +#strict +#include GEAR + +local light; +local user; + +/* Status */ + +public func GetGearType() { return(GEAR_Light); } +public func IsEquipment() { return(true); } +public func IsLamp() { return(true); } + +/* Callbacks */ + +public func GearEffect(object pClonk) +{ + user = pClonk; + light = AddLightCone(1000,RGBa(255,255,220,90),user); + light->ChangeSizeXY(1900,6000); + light->ChangeOffset(0,0, true); + SetAction("On"); + Sound("Click"); +} + +public func GearEffectReset(object pClonk) +{ + user = 0; + if(light) RemoveObject(light); + SetAction("Idle"); + Sound("Click"); +} + + +private func CheckRotation() { + light->ChangeR(user->~AimAngle(20,180)); +} diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DefCore.txt new file mode 100644 index 00000000..911ae2d1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=GEAR +Version=4,9,8,2 +Name=Gear +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DescDE.txt new file mode 100644 index 00000000..12522866 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DescDE.txt @@ -0,0 +1 @@ +Dieses Objekt stellt die Grundfunktionalität für Ausrüstung zur Verfügung. diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DescUS.txt new file mode 100644 index 00000000..6e1a5dfc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/DescUS.txt @@ -0,0 +1 @@ +This object provides basic control for gear. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Graphics.png new file mode 100644 index 00000000..126a385c Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Names.txt new file mode 100644 index 00000000..fc9ee2f5 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ausrüstung +US:Gear diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Script.c b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Script.c new file mode 100644 index 00000000..bd6e14b7 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/Script.c @@ -0,0 +1,64 @@ +/*-- Ausrüstung --*/ + +#strict + +// actually, only the first four are used... +static const GEAR_Armor = 1; +static const GEAR_Shield = 2; +static const GEAR_Light = 3; +static const GEAR_Backpack = 4; +static const GEAR_Boots = 5; +static const GEAR_Helmet = 6; +// ...feel free to add some + +/* Status */ + +public func IsHazardGear() { return(true); } + +/* Buckle */ +public func Activate(object pClonk) +{ + [$CtrlActivateDesc$] + // Can the clonk use this? + if (!(pClonk->~CanUse(GetID()))) return(0); + // Clonk doesn't already use gear of that type + if (pClonk->~HasGear(this()->GetGearType())) { + PlayerMessage(GetOwner(pClonk),"$AlreadyWears$",pClonk,GetName(pClonk)); + return(0); + } + // Buckle + if(pClonk->~EquipGear(this())) + GearBuckle(pClonk); + return(1); +} + +public func GearBuckle(object pClonk) +{ + // Nachricht für alle, die neu hier sind + HelpMessage(pClonk->GetOwner(), "$Buckled$", pClonk, GetName()); + // verstecken aber nicht löschen + Exit(); + SetCategory(1); + SetPosition(1,1); + SetVisibility(VIS_None); + + // Callback + GearEffect(pClonk); +} + +public func GearUnbuckle(object pClonk) +{ + // Nachricht für alle, die neu hier sind + HelpMessage(pClonk->GetOwner(), "$Unbuckled$", pClonk, GetName()); + // zurück zum Hazard + SetPosition(GetX(pClonk),GetY(pClonk)); + SetCategory(16); + SetVisibility(VIS_All); + + GearEffectReset(pClonk); +} + +/* Callbacks */ + +public func GearEffect(object pClonk) { } +public func GearEffectReset(object pClonk) { } diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/StringTblDE.txt new file mode 100644 index 00000000..bb0a3a33 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/StringTblDE.txt @@ -0,0 +1,4 @@ +CtrlActivateDesc=Anlegen +AlreadyWears=%s trägt schon|so eine Ausrüstung! +Buckled=%s angelegt +Unbuckled=%s abgelegt diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/StringTblUS.txt new file mode 100644 index 00000000..622367ee --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Gear.c4d/StringTblUS.txt @@ -0,0 +1,4 @@ +CtrlActivateDesc=Buckle +AlreadyWears=%s already wears|that kind of gear! +Buckled=%s buckled +Unbuckled=%s unbuckled \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DefCore.txt new file mode 100644 index 00000000..a905ad1a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=JTPK +Version=4,9,8,2 +Name=Jetpack +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=3 +Timer=1 +TimerCall=Update +Width=4 +Height=14 +Offset=-2,-7 +Vertices=2 +VertexY=6,-6 +VertexFriction=30,30 +Value=33 +Mass=10 +Components=METL=3;ENAP=1 +Picture=4,0,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DescDE.txt new file mode 100644 index 00000000..08804324 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DescDE.txt @@ -0,0 +1 @@ +Ermöglicht das Fliegen über kurze Strecken. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DescUS.txt new file mode 100644 index 00000000..dcec8ff1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/DescUS.txt @@ -0,0 +1 @@ +Allows the clonk to fly over short distances. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Graphics.png new file mode 100644 index 00000000..2aeb6385 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Names.txt new file mode 100644 index 00000000..34657e44 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Jetpack +US:Jetpack \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Script.c b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Script.c new file mode 100644 index 00000000..d322efac --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/Script.c @@ -0,0 +1,221 @@ +/*-- Jetpack --*/ + +#strict + +#include GEAR + +//wieviel Zeit bis zum nächsten Boost +local timeleft; +local pHazard; + +public func GetGearType() { return(GEAR_Backpack); } +public func IsEquipment() { return(true); } + + +public func GearEffect(object pH) { + pHazard = pH; +} + +public func GearEffectReset(object pH) { + pHazard = 0; +} +/* +public func GetFMData(int d) { + if(d == FM_AmmoLoad) return(5); + if(d == FM_AmmoID) return(GSAM); +} +*/ +//Commands, die vom Clonk übergeben werden. + +public func ControlUpDouble(object pCon) +{ + // nur als Gear + if(!( pCon->~HasGear(0,JTPK))) return(0); + + if(!CheckStart(pCon)) return(0); + //Clonk wird hochgechubst (Doppelsprung) + //Schub + SetJetpackAction(pCon); + pCon->SetXDir(GetXDir()/3-10 + 20 * pCon->GetDir()); + pCon->SetYDir(GetYDir()/3-60); +// AddEffect("Jumping", pCon, 1, 2, pCon); + pCon->JumpStart(); + + StartToFly(pCon); + + return(1); +} + +public func ControlRightDouble(object pCon) +{ + // nur als Gear + if(!( pCon->~HasGear(0,JTPK))) return(0); + + if(!CheckStart(pCon)) return(0); + //Nun noch herausfinden, ob rechts unsere Blickrichtung ist + if(pCon->GetDir() == DIR_Right) + FlyForward(pCon); + else + return(0); + + return(1); +} + +public func ControlLeftDouble(object pCon) +{ + // nur als Gear + if(!( pCon->~HasGear(0,JTPK))) return(0); + + if(!CheckStart(pCon)) return(0); + //Nun noch herausfinden, ob links unsere Blickrichtung ist + if(pCon->GetDir() == DIR_Left) + FlyForward(pCon); + else + return(0); + + return(1); +} + +public func FlyForward(object pClonk) +{ + //Aktion setzen + SetJetpackAction(pClonk); + pClonk->SetXDir(pClonk->GetXDir()/3-50 + 100 * pClonk->GetDir()); + pClonk->SetYDir(pClonk->GetYDir()/3-15); + + pClonk->JumpStart(); + + StartToFly(pClonk); +} + +private func StartToFly(object pClonk) { + //Zeugs fürs Fliegen hinzufügen + AddEffect("JetpackDelay", pClonk, 170, 5, this()); + AddEffect("Thrust", pClonk, 170, 1, this()); + timeleft = 15; + //DoAmmo(GetFMData(FM_AmmoID),-GetFMData(FM_AmmoLoad),this()); +} + +public func CheckStart(object pCon) { + if(!ReadyToFly(pCon)) return(0); +/* var ammoload = GetFMData(FM_AmmoLoad); + var ammoid = GetFMData(FM_AmmoID); + if(!CheckAmmo(ammoid,ammoload)) + if(!Reload()) + return(0);*/ + return(1); +} +/* +public func Reload(bool nomsg) { + if(!pHazard) return(false); + if(reload) return(false); + + //checken ob wir genug Sprit zum nochmal fliegen haben + if(!CheckAmmo(GetFMData(FM_AmmoID),GetFMData(FM_AmmoLoad),pHazard)) { + var ammoid = GetFMData(FM_AmmoID); + if(!nomsg) PlayerMessage(GetOwner(pHazard),"$NotEnoughAmmo$",pHazard,ammoid); + return(false); + } + //doch, haben wir, also Tank auffüllen: + DoAmmo(GetFMData(FM_AmmoID),-GetFMData(FM_AmmoLoad),pHazard); + DoAmmo(GetFMData(FM_AmmoID),+GetFMData(FM_AmmoLoad),this()); + reload=true; + return(true); +} +*/ +public func ReadyToFly(object pClonk) +{ + // So ist der Clonk in der Luft? + if(pClonk->GetAction() eq "JumpArmed" + || pClonk->GetAction() eq "Jump" + || pClonk->GetAction() eq "Dive" + || pClonk->GetAction() eq "JetpackFlight") { + // Dürfen wir überhaupt? + if(GetEffect("JetpackDelay", pClonk)) return(false); + + return(true); + } + return(false); +} + +public func FxThrustStart(object pTarget, int iEffectNumber) { + EffectVar(0,pTarget,iEffectNumber) = AddLight(75,RGB(255,127,0),pTarget,GLOW); + EffectVar(0,pTarget,iEffectNumber)->SetVertex(0,0,GetDir(pTarget)*10-5,0,2); + Sound("Flamer", false, pTarget, 100,0,+1); +} + +public func FxThrustTimer(object pTarget, int iEffectNumber, int iTime) { + + /* halb kopiert aus Missile.c4d -- */ + var dist = Distance(0,0,GetXDir(pTarget),GetYDir(pTarget)); + var angle = Angle(0,0,GetXDir(pTarget),GetYDir(pTarget)); + var maxx = +Sin(angle,dist/10); + var maxy = -Cos(angle,dist/10); + var ptrdist = 66; + + for(var i=0; i 20) + return(-1); +} + +public func FxThrustStop(object pTarget, int iEffectNumber) { + Sound("Flamer", false, pTarget, 100,0,-1); + if(EffectVar(0,pTarget,iEffectNumber)) + RemoveObject(EffectVar(0,pTarget,iEffectNumber)); + + // reload + //Reload(true); +} + +public func FxJetpackDelayTimer(object pTarget, int iEffectNumber) +{ + timeleft--; + if(timeleft <= 0) return(-1); +/* + if(pTarget->GetAction() ne "JetpackFlight" + && pTarget->GetAction() ne "BackFlip" + && pTarget->GetAction() ne "JumpArmed" + && pTarget->GetAction() ne "Jump") + { + return(-1); + }*/ +} + +public func FxJetpackDelayStop(object pTarget, int iEffectNumber) { +} + +protected func Update() { + // nicht angelegt + if(!pHazard) return(); + /* + if(reload) { + timeleft -= 15; + if(timeleft <= 0) { + timeleft = 0; + reload = false; + // echt nervig + //var ammoload = GetFMData(FM_AmmoLoad); + //var ammoid = GetFMData(FM_AmmoID); + //PlayerMessage(GetOwner(pHazard),"$Reloaded$",pHazard,ammoload,ammoid); + } + }*/ +} + +private func SetJetpackAction(object pCon) { + if(GetActMapVal("Name","JetpackFlight",GetID(pCon))) + pCon->SetAction("JetpackFlight"); + // ansonsten so lassen wie is. +} \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/StringTblDE.txt new file mode 100644 index 00000000..b0ac3b42 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +NotEnoughAmmo=Nicht genug {{%i}}! +Reloaded=%dx {{%i}} nachgefüllt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/StringTblUS.txt new file mode 100644 index 00000000..a4a7ef5e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Jetpack.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +NotEnoughAmmo=Not enough {{%i}}! +Reloaded=Refilled %dx {{%i}}. diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Names.txt new file mode 100644 index 00000000..fc9ee2f5 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ausrüstung +US:Gear diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DefCore.txt new file mode 100644 index 00000000..984a731a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=HSHD +Version=4,9,8,2 +Name=HazardShield +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=7 +Height=10 +Offset=-3,-5 +Vertices=3 +VertexX=-2,2 +VertexY=4,4,-4 +VertexFriction=80,80,80 +Value=38 +Mass=6 +Components=METL=1;ENAP=2 +Picture=0,10,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DescDE.txt new file mode 100644 index 00000000..fdbac7d1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DescDE.txt @@ -0,0 +1 @@ +Schützt ausschließlich aber effektiv gegen Energiewaffen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DescUS.txt new file mode 100644 index 00000000..bf5600e1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/DescUS.txt @@ -0,0 +1 @@ +Protects only but effectively against energy weapons. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/FxShield.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/FxShield.c4d/Graphics.png new file mode 100644 index 00000000..62d70616 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/FxShield.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/FxShield.c4d/Particle.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/FxShield.c4d/Particle.txt new file mode 100644 index 00000000..1c2024bc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/FxShield.c4d/Particle.txt @@ -0,0 +1,11 @@ +[Particle] +Name=FxShield +MaxCount=600 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,40,40,-20,-20 +RByV=2 +Additive=1 +AlphaFade=2 +Attach=1 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Graphics.png new file mode 100644 index 00000000..c4def2ec Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Names.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Names.txt new file mode 100644 index 00000000..bb8ae61f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schildgenerator +US:Shield generator diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Script.c b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Script.c new file mode 100644 index 00000000..7cab361e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Script.c @@ -0,0 +1,105 @@ +/*-- Schildgenerator --*/ + +#strict +#include GEAR +#include KLAS + +protected func Activate(object pByObj) { + [$CtrlActivateDesc$] + + var upgrade = GetUpgradeable(); + if(GetLength(upgrade)) { + // create menu + CreateMenu(GetID(),pByObj,this(),4,"$NothingUpgradeable$",0,0,0); + + for(var pObj in upgrade) { + var szName = Format("$Upgrade$",GetName(pObj)); + // fill the menu with menuitems + AddMenuItem(szName,"UpgradeObj",GetID(pObj),pByObj,0,pObj,pObj->IsUpgradeable(GetID())); + } + return(1); + } + + var pClonk = pByObj; + + // Can the clonk use this? + if (!(pClonk->~CanUse(GetID()))) return(0); + // Clonk doesn't already use gear of that type + if (pClonk->~HasGear(this()->GetGearType())) { + PlayerMessage(GetOwner(pClonk),"$AlreadyWears$",pClonk,GetName(pClonk)); + return(0); + } + // Buckle + if(pClonk->~EquipGear(this())) + GearBuckle(pClonk); + return(1); + +} + +/* Status */ + +public func GetGearType() { return(GEAR_Shield); } +protected func Hit() { Sound("MetalHit*"); } +public func IsEquipment() { return(true); } + +/* Callbacks */ + +public func GearEffect(object pClonk) +{ + AddEffect("HazardShield", pClonk, 99, 3, 0, HSHD,200); + Sound("Connect"); +} + +public func GearEffectReset(object pClonk) +{ + if(GetEffect("HazardShield", pClonk)) + return(RemoveEffect("HazardShield", pClonk)); + Sound("Connect"); +} + +public func FxHazardShieldStart(object pTarget, int iNo, int iTemp, var1) { + EffectVar(1,pTarget,iNo) = var1; +} + +public func FxHazardShieldTimer(object pTarget, int iNo, int iTime) +{ + var boom = EffectVar(0,pTarget,iNo)==2; + var alpha = 115; + if(boom) alpha = 15; + var angle = Random(360); + CreateParticle("FxShield", AbsX(GetX(pTarget)), AbsY(GetY(pTarget)), Sin(angle,250), -Cos(angle,250), EffectVar(1,pTarget,iNo)+(boom*30), RGBa(255,255,255, alpha), pTarget); + + if(EffectVar(0,pTarget,iNo)>0) + EffectVar(0,pTarget,iNo)--; +} + +public func FxHazardShieldBulletHit(object pTarget, int iNo) +{ + if(EffectVar(0,pTarget,iNo)==0) + EffectVar(0,pTarget,iNo) = 2; + Sound("Shield"); +} + +public func OnClonkDmg(int iDamage, int iType, object pClonk) +{ + //Energy + if(iType == DMG_Energy) + return(60); // 60% Energie +} + +public func OnClonkHit(int iDmg, int iType, object pClonk) +{ + if(!pClonk) return(); + + // nur Energie + if(iType != DMG_Energy) return(0); + + // # keine Energie abziehen, kann wie Rüstung getragen werden bis man tot ist + // -> betatest für balancing + // if(!DoAmmo(ENAM, -BoundBy(iDmg/3, 1, 500), pClonk) && !NoAmmo()) return(); + + // Schild flackert auf + EffectCall(pClonk, GetEffect("HazardShield", pClonk), "BulletHit"); + // Sound + Sound("Shield"); +} diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Shield.wav b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Shield.wav new file mode 100644 index 00000000..00d2dc07 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/Shield.wav differ diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/StringTblDE.txt new file mode 100644 index 00000000..0b9effbc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +CtrlActivateDesc=Anlegen +NothingUpgradeable=Nichts aufrüstbares verfügbar. +Upgrade=%s aufrüsten +AlreadyWears=%s trägt schon|so eine Ausrüstung! +Buckled=%s angelegt +Unbuckled=%s abgelegt diff --git a/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/StringTblUS.txt new file mode 100644 index 00000000..e838502d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Gear.c4d/Shield.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +CtrlActivateDesc=Buckle +NothingUpgradeable=Nothing upgradeable available. +Upgrade=Upgrade %s +AlreadyWears=%s already wears|that kind of gear! +Buckled=%s buckled +Unbuckled=%s unbuckled \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/DescDE.txt new file mode 100644 index 00000000..b7907258 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/DescDE.txt @@ -0,0 +1 @@ +Tödliche Fallen für jeden Eindringling. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/DescUS.txt new file mode 100644 index 00000000..06be22eb --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/DescUS.txt @@ -0,0 +1 @@ +Lethal traps for every intruder. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/ActMap.txt new file mode 100644 index 00000000..f9b3dffc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/ActMap.txt @@ -0,0 +1,19 @@ +[Action] +Name=Activate +Procedure=NONE +Length=5 +Delay=20 +FacetBase=1 +NextAction=Active +StartCall=OnActivate +PhaseCall=Warning +EndCall=OnActive + +[Action] +Name=Active +Procedure=NONE +Length=4 +Delay=5 +FacetBase=1 +NextAction=Active +EndCall=Warning \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DefCore.txt new file mode 100644 index 00000000..47df8597 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=LMIN +Version=4,9,8,2 +Name=Lasermine +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=10 +Height=6 +Offset=-5,-5 +Vertices=3 +VertexX=0,-4,4 +VertexY=-2 +VertexFriction=200,200,200 +Value=30 +Mass=5 +Components=MINE=1;KLAS=1 +Picture=0,6,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DescDE.txt new file mode 100644 index 00000000..7e439d3d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DescDE.txt @@ -0,0 +1 @@ +Stellt eine beinahe unsichtbare Barrieren auf, an der alle größeren Objekte durch eine Explosion zurückgeschleudert werden. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DescUS.txt new file mode 100644 index 00000000..a4bc0f6b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/DescUS.txt @@ -0,0 +1 @@ +Installs an almost invisible barrier on which every larger object is hurled away by an explosion. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Graphics.png new file mode 100644 index 00000000..df20a65f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/ActMap.txt new file mode 100644 index 00000000..310cc065 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/ActMap.txt @@ -0,0 +1,17 @@ +[Action] +Name=Laser +Procedure=FLOAT +NextAction=Laser +Facet=0,0,32,96 +Length=4 +Delay=1 +PhaseCall=Laser + +[Action] +Name=LaserEnd +Procedure=FLOAT +NextAction=LaserEnd +Facet=0,0,32,128 +Length=4 +Delay=1 +PhaseCall=Laser \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/DefCore.txt new file mode 100644 index 00000000..8aff08b3 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=LASR +Version=4,9,8,2 +Name=Laser +Category=C4D_Vehicle +Width=2 +Height=2 +Offset=-1,-1 +Vertices=1 +BorderBound=7 +IncompleteActivity=1 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Graphics.png new file mode 100644 index 00000000..6dca4036 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/ActMap.txt new file mode 100644 index 00000000..1dccc782 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Laser +Procedure=FLOAT +NextAction=Hold +Facet=0,0,64,192 +Length=1 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/DefCore.txt new file mode 100644 index 00000000..36e4ae7d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=LALI +Version=4,9,8,2 +Name=Laser +Category=C4D_Vehicle +Width=2 +Height=2 +Offset=-1,-1 +BorderBound=7 +IncompleteActivity=1 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/Graphics.png new file mode 100644 index 00000000..d238ca8f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/Script.c new file mode 100644 index 00000000..f3669f26 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Light.c4d/Script.c @@ -0,0 +1,9 @@ +#strict + +protected func Initialize() +{ + SetObjectBlitMode(1); + SetAction("Laser"); +} + +func NoWarp() {return(true);} diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/LsrSprk.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/LsrSprk.c4d/Graphics.png new file mode 100644 index 00000000..d04ab54d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/LsrSprk.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/LsrSprk.c4d/Particle.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/LsrSprk.c4d/Particle.txt new file mode 100644 index 00000000..7cc9a613 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/LsrSprk.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=LsrSprk +MaxCount=1000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=25 +Additive=1 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Script.c new file mode 100644 index 00000000..2bf34e92 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Laser.c4d/Script.c @@ -0,0 +1,326 @@ +#strict + +local w, l, r, c, iTime, pDmgCallback, pAttach, pLight, iMaxDist, dx, dy; +local reflections; + +protected func Initialize() +{ + SetObjectBlitMode(1); + SetClrModulation(RGB(255,0,0)); +} + +/* Interface (public functions) */ + +public func SetAngle(int iAngle) { + r = iAngle-180; +} +public func SetWidth(int iWidth) { + w = 1000*iWidth/GetActMapVal("Facet","Laser",0,2); +} +public func SetMaxDistance(int iDist) { + iMaxDist = iDist; +} +public func SetContinuous(int iDelay) { + if(!iDelay) iDelay = 1; + AddEffect("Continuous", this(), 1,iDelay, this()); +} + +public func Set(int iAngle, int iWidth, int iDist, int iT, object pDmg, object pAtt, int iReflect) +{ + // optional parameters + if(!iWidth) iWidth = 3; + if(!iDist) iDist = 300; + // iT = 0: no out-fading + iTime = iT; + reflections = iReflect; // how often the Ray should be reflected + + // reset fade-timer + c=0; + // new attach and damage callback objects (optional) + pDmgCallback = pDmg; + pAttach = pAtt; + if(pAttach) { + dx = GetX()-GetX(pAttach); + dy = GetY()-GetY(pAttach); + } + + // create light + pLight = CreateObject(LALI,0,0,-1); + + SetMaxDistance(iDist); + SetAngle(iAngle); + SetWidth(iWidth); + HitCheck(); + DrawTransform(); + + // we are stuck? + if(Stuck()) + RemoveObject(); +} + +public func GetAngle() { return(r+180); } +public func GetWidth() { return(w*GetActMapVal("Facet","Laser",0,2)/1000); } +public func GetLength() { + if(GetAction()eq"Idle") + return(l*GetActMapVal("Facet","Laser",0,3)/1000); + else + return(l*GetActMapVal("Facet",GetAction(),0,3)/1000); +} + +public func GetMaxDistance() { return(iMaxDist); } + +public func LaserEnd(&x, &y) { + x = +Sin(GetAngle(),GetLength()); + y = -Cos(GetAngle(),GetLength()); +} + +/* intern */ + +private func HitCheck() { + + // calculate length + var mx=-Sin(r,iMaxDist), + my=+Cos(r,iMaxDist), + ml=0; + while(++ml) { + if(GBackSolid(mx*ml/iMaxDist,my*ml/iMaxDist)) break; + if(ml>=iMaxDist) break; + } + // graphic + SetLaser(ml == iMaxDist); + + l = 1000*ml/GetActMapVal("Facet",GetAction(),0,3); + + LaserEnd(mx,my); + + // no hit check + if(!pDmgCallback) + return(); + + if(ml < iMaxDist) + pDmgCallback ->~ LaserHitLandscape(mx,my); + + // clonk = user of the weapon that fires (the shooter). Will be given with clonk + var clonk; + clonk = pDmgCallback->~GetUser(); + if(!clonk) clonk = pDmgCallback; + + var temp_l, hitobject; + + // search points on the line for clonks etc. + // step for step + for(pObj in FindObjects(Find_OnLine(0, 0, mx, my), Sort_Distance(0,0), + Find_Exclude(this()), + Find_Exclude(pAttach), + Find_Exclude(pDmgCallback), + Find_Exclude(Contained(pDmgCallback)), + Find_NoContainer(), + Find_Or( + Find_Func("IsBulletTarget",GetID(),this(),clonk), + Find_OCF(OCF_Alive)), + Find_Func("CheckEnemy",this()))) + { + // we have to save this before, if the object is removed on hit + temp_l = 1000*ObjectDistance(pObj)/GetActMapVal("Facet",GetAction(),0,3);; + if(pDmgCallback ->~ LaserStrike(pObj,c)) + { + SetLaser(0); + l = temp_l; + hitobject = true; + break; + } + } + if(ml>0 && ml != iMaxDist && reflections && !hitobject && !Stuck()) + CheckGround(ml); +} + +private func NotZero(int a) { + if(!a) return(1); + else return(a); +} + +private func SetLaser(bool end) { + if(end) { + if(GetAction() ne "LaserEnd") { + SetAction("LaserEnd"); + } + } + else { + if(GetAction() ne "Laser") { + SetAction("Laser"); + } + } +} + +protected func Laser() { // fade out + // attach to obj + if(pAttach) { + var wx,wy; + pAttach->~WeaponEnd(wx,wy); + if(wx || wy) + SetPosition(GetX(pAttach) + wx, GetY(pAttach) + wy); + else + SetPosition(GetX(pAttach)+dx,GetY(pAttach)+dy); + + SetPosition(GetX(),GetY(),pLight); + } + + // animation & effect + SetPhase(Random(4)); + if(GetAction() eq "Laser" && !reflections) { + var x,y; + LaserEnd(x,y); + var color = GetClrModulation(); + LaserLight(20+GetWidth()*2,color,x,y); + var a,r,g,b; + SplitRGBaValue(color,r,g,b,a); + a = BoundBy(a+64,180,255); + CreateParticle("PSpark",x,y,0,0,300+GetWidth()*30,RGBa(r,g,b,a)); + } + + if(!iTime) return(); + + // fade out (only if time != 0) + var a = 200*c/iTime; + var rgba = SetRGBaValue(GetClrModulation(),a,0); + SetClrModulation(rgba); + ++c; + + if(c >= iTime) + RemoveObject(); +} + +protected func Destruction() { + if(pLight) RemoveObject(pLight); +} + + +private func DrawTransform() { // draw line + + var cl = l; + cl = l*GetActMapVal("Facet","Laser",0,3)/GetActMapVal("Facet",GetAction(),0,3); + + var fsin = -Sin(r, 1000), fcos = Cos(r, 1000); + + var xoff = -(GetActMapVal("Facet",GetAction(),0,2)*w/1000)/2; + var yoff = 0; + + var width = +fcos*w/1000, height = +fcos*cl/1000; + var xskew = +fsin*cl/1000, yskew = -fsin*w/1000; + + var xadjust = +fcos*xoff + fsin*yoff; + var yadjust = -fsin*xoff + fcos*yoff; + + // set matrix values + SetObjDrawTransform ( + width, xskew, xadjust, + yskew, height, yadjust + ); + + // light + if(pLight) { + var alphamod, sizemod; + CalcLight(alphamod, sizemod); + + var light_width = w*(5+sizemod/100); + var light_height = cl/2; + xoff = -(GetActMapVal("Facet","Laser",LALI,2)*light_width/1000)/2; + xadjust = +fcos*xoff + fsin*yoff; + yadjust = -fsin*xoff + fcos*yoff; + width = +fcos*light_width/1000; + height = +fcos*light_height/1000; + xskew = +fsin*light_height/1000; + yskew = -fsin*light_width/1000; + + var a,r_,g,b; + SplitRGBaValue(GetClrModulation(),r_,g,b,a); + SetClrModulation(RGBa(r_,g,b,Min(a+160+alphamod,180)),pLight); + SetPosition(GetX(),GetY(),pLight); + + SetObjDrawTransform ( + width, xskew, xadjust, + yskew, height, yadjust, pLight + ); + } +} + +private func FxContinuousTimer(object target, int effect, int time) { + // ein bischen Hax: wenn der Laser bleibt, wird auch der Winkel + // angepasst, falls der Target AimAngle hat (Clonk hat das) + var angle; + if(pAttach) { + if(angle = (pAttach->~AimAngle(1))) + SetAngle(angle); + if((GetDir(pAttach) == DIR_Right) && (dx < 0)) dx *= -1; + if((GetDir(pAttach) == DIR_Left) && (dx > 1)) dx *= -1; + } + HitCheck(); + DrawTransform(); +} + + +// uber-cool reflection script +func CheckGround(int length) +{ + var x,y; + LaserEnd(x,y); + + var r = Normalize(LocalN("r"),0); + var angle1, angle2; // Winkel des Materials + var angle1set, angle2set; + var rout; //ausgangswinkel + var i; + + var oldx = x, oldy = y; + // Adjust position a little bit + for(i = 0; oldx == x && oldy == y; i++) + { + x = oldx+Sin(r, i); + y = oldy-Cos(r, i); + } + + // Search for the angle of the solid material + for(i = 0; i < 180; i++) + { + if(GBackSolid(x+Sin(r+i,5), y-Cos(r+i,5)) && !angle1set) + { + angle1set = true; + } + if(GBackSolid(x+Sin(r-i,5), y-Cos(r-i,5)) && !angle2set) + { + angle2set = true; + } + if(!angle2set) + { + angle1 = r-i; + } + if(!angle1set) + { + angle2 = r+i; + } + } + + //nichts gefunden? wir müssen im Material feststecken. + if(!angle1set || !angle2set) + return(); + + var angle = Normalize(Angle(Sin(angle1,5),-Cos(angle1,5),Sin(angle2,5),-Cos(angle2,5)),0); + + // calculate the angle of the new laser + rout = Normalize(angle*2 - (r+180),0); + + oldx = x; oldy = y; + // adjust position + for(i = 0; GBackSolid(x,y); i++) + { + x = oldx+Sin(rout, i); + y = oldy-Cos(rout, i); + if(x < 0 || x > LandscapeWidth()) return; + if(y < 0 || y > LandscapeHeight()) return; + } + + // create new laser + var newlaser = CreateObject(GetID(), x,y, GetOwner()); + newlaser->SetClrModulation(GetClrModulation()); + newlaser->Set(rout, GetWidth(), iMaxDist-length, iTime, pDmgCallback, pAttach, reflections-1); +} diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Names.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Names.txt new file mode 100644 index 00000000..48f05c02 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lasermine +US:Laser mine \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Script.c new file mode 100644 index 00000000..d9462368 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Lasermine.c4d/Script.c @@ -0,0 +1,69 @@ +#strict +#include MINE + +local pLaser, iLastExplode; + +protected func OnActivate() { + pLaser = CreateObject(LASR,0,0,-1); + SetClrModulation(RGBa(255,0,0,255),pLaser); + pLaser->SetPosition(GetX()+Sin(GetR(),3),GetY()-Cos(GetR(),3)); + pLaser->Set(GetR(),2,200,0,this(),this()); + pLaser->SetContinuous(3); + pLaser->SetController(-1); + // Laserminen haften und sollen bei Explosionen nicht wegfliegen + SetCategory(C4D_Vehicle); +} + +protected func OnActive() { // Mine ist nun aktiv + SetClrModulation(RGBa(255,255,255,100)); + SetClrModulation(RGBa(255,0,0,200),pLaser); +} + +public func WeaponEnd(int &x, int &y) +{ + x = Sin(GetR(),1); +// y = Cos(GetR(),1); +} + +public func LaserStrike(object pHit) { + // harmlos sein bis sie aktiviert ist + if(GetAction() ne "Active") return(0); + + if(GetActTime()-iLastExplode < 10) return(0); + + // wenn sich das Ziel nicht bewegt, ignorieren + if(pHit->GetXDir() == 0 && pHit->GetYDir() == 0) return(0); + + // ausrechnen in welche Richtung geschleudert wird + var rand = 5; + var angle = Angle(0,0,GetXDir(pHit),GetYDir(pHit))+GetR(); + while(angle >= 360) angle -= 360; + while(angle < 0) angle += 360; + if(angle >= 180) rand *= -1; + + Explode(15,CreateObject(WIPF,AbsX(GetX(pHit))+Cos(GetR(),rand),AbsY(GetY(pHit))-Sin(GetR(),rand),-1)); + DoDamage(5); + + iLastExplode = GetActTime(); + return(1); +} + +protected func Damage(int iChange) { // kriegt Schaden + if(GetAction() ne "Idle") { + SetClrModulation(RGBa(255,255,255,200-200*GetDamage()/MaxDamage())); + SetClrModulation(RGBa(255,0,0,220-220*GetDamage()/MaxDamage()),pLaser); + } + + if(GetDamage() >= MaxDamage()) + Explode(15); +} + +protected func Destruction() { + // nicht vergessen, den Laser zu löschen + if(pLaser) RemoveObject(pLaser); +} + +private func MaxDamage() { return(30); } +private func ExploDist() { return(10); } +// Status +public func IsEquipment() { return(1); } diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/ActMap.txt new file mode 100644 index 00000000..97633c91 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/ActMap.txt @@ -0,0 +1,19 @@ +[Action] +Name=Activate +Procedure=NONE +Length=5 +Delay=20 +FacetBase=1 +NextAction=Active +PhaseCall=Warning +EndCall=OnActive + +[Action] +Name=Active +Procedure=NONE +Length=4 +Delay=5 +FacetBase=1 +NextAction=Active +EndCall=Warning +PhaseCall=Check \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Bip.wav b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Bip.wav new file mode 100644 index 00000000..7f1e4124 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Bip.wav differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/BipBipBip.wav b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/BipBipBip.wav new file mode 100644 index 00000000..11de05b4 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/BipBipBip.wav differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DefCore.txt new file mode 100644 index 00000000..cbb41396 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=MINE +Version=4,9,8,2 +Name=Mine +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=2 +Width=10 +Height=6 +Offset=-5,-5 +Vertices=3 +VertexX=0,-4,4 +VertexY=-2 +VertexFriction=200,200,200 +Value=20 +Mass=5 +Components=METL=1;ENAP=1 +Picture=0,6,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DescDE.txt new file mode 100644 index 00000000..a694659f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DescDE.txt @@ -0,0 +1 @@ +Einmal aktiviert, bleibt die Mine beinahe unsichtbar solange liegen, bis sie entweder zerstört oder ausgelöst wird. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DescUS.txt new file mode 100644 index 00000000..91f9cfc1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/DescUS.txt @@ -0,0 +1 @@ +Once activated, the mine will remain almost invisible till it is destroyed or triggered. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Graphics.png new file mode 100644 index 00000000..3189a0e0 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/ActMap.txt new file mode 100644 index 00000000..b5193eb0 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Attach +Procedure=ATTACH +Directions=2 +Length=1 +Delay=0 +FlipDir=1 +FacetBase=1 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DefCore.txt new file mode 100644 index 00000000..53581f98 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=MFLG +Version=4,9,8,2 +Name=MineFlag +Category=C4D_StaticBack|C4D_Foreground|C4D_MouseIgnore +Width=10 +Height=10 +Offset=-5,-5 +Vertices=1 +VertexX=-1 +VertexY=3 +Components=MFLG=1 +Picture=0,10,10,10 +Rotate=1 +IncompleteActivity=1 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DescDE.txt new file mode 100644 index 00000000..cbbaa713 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DescDE.txt @@ -0,0 +1 @@ +Zeigt den Teamkollegen wo eine Mine ist. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DescUS.txt new file mode 100644 index 00000000..f68d8ace --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/DescUS.txt @@ -0,0 +1 @@ +Shows friends where mines lie. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Graphics.png new file mode 100644 index 00000000..09b4a1a6 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Names.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Names.txt new file mode 100644 index 00000000..7c017d48 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Minenflagge +US:Mineflag \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Script.c new file mode 100644 index 00000000..a42aded3 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Marker.c4d/Script.c @@ -0,0 +1,36 @@ +#strict 2 + +public func Set(object target) { + SetAction("Attach",target); + + SetR(GetR(target)); + SetDir(Random(2)); + + var plr = GetController(target); + SetOwner(plr); + SetNewOwner(); + + //So, wir kalkulieren uns jetzt aus den Positionen der Vertices und so weiter den Attachvertex. o_O + //var x = GetVertex(0,0,target), y = GetVertex(0,true,target); + //SetVertexXY(0,x,y+5); + // + // aber nur wenn wir zu doof sind einfach einen dritten Vertex zu definieren :P +} + +public func OnOwnerChanged() { + SetNewOwner(); +} + +private func SetNewOwner() { + + SetClrModulation(ModulateColor(GetPlrColorDw(GetOwner()),RGBa(255,255,255,30))); + + if(GetOwner() == -1) + SetVisibility(VIS_None); + else + SetVisibility(VIS_Allies | VIS_Owner); +} + +public func AttachTargetLost() { + RemoveObject(); +} diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Names.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Names.txt new file mode 100644 index 00000000..57bc5b92 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Mine +US:Mine \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Script.c new file mode 100644 index 00000000..9870d229 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/Script.c @@ -0,0 +1,152 @@ +#strict + +local triggered; + +protected func Activate(object pByClonk) { + [$Activate$] + ControlDigDouble(pByClonk); +} + +public func ControlDigDouble(object pByClonk) { // Clonk aktiviert Mine + + var szAct = GetAction(pByClonk); + SetOwner(pByClonk->GetOwner()); + // in welche Richtung soll die Mine angeheftet werden? + + if(szAct eq "Walk" || szAct eq "Fight") { + SetActive(0); + } + else if(szAct eq "Hangle") { + SetActive(180); + } + else if(szAct eq "Scale" || szAct eq "ScaleDown") { + if(GetDir(pByClonk) == DIR_Left) + SetActive(90); + else + SetActive(270); + } + + return(1); +} + +public func SetActive(int iAngle, int iMaxDist) { // Mine wird aktiviert + + triggered = false; + + if(!iMaxDist) iMaxDist = 20; + var x=GetX(),y=GetY(); + var mx=-Sin(iAngle,iMaxDist), my=+Cos(iAngle,iMaxDist); + + // nicht platzierbar: abbrechen + if(PathFree(x,y,x+mx,y+my)) + return(false); + + // ansonsten platzieren + var i=0; + Exit(); + SetR(iAngle); + while(!Stuck() && iMaxDist>++i) { + SetPosition(x+mx*i/iMaxDist,y+my*i/iMaxDist); + } + if(iAngle == 0) + SetPosition(GetX(),GetY()-1); + else { + SetVertex(1,1,2,0,2); + SetVertex(2,1,2,0,2); + } + SetAction("Activate"); + + CreateObject(MFLG,0,0,GetOwner())->Set(this()); + + return(true); +} + +protected func Warning() { + + var a = 64; + if(GetAction() eq "Active") + a = 160-120*GetDamage()/MaxDamage(); + else + Sound("Bip"); + CreateParticle("PSpark",Sin(GetR(),3),-Cos(GetR(),3),0,0, + 60,RGBa(255,64,0,a),this()); +} + +protected func OnActive() { // Mine ist nun aktiv + SetClrModulation(RGBa(255,255,255,100)); +} + +protected func Check() { // Nach opfern suchen + var obj; + for(obj in FindObjects( Find_Distance(ExploDist()), + Find_Exclude(this), + Find_NoContainer())) { + if(obj->~IsBulletTarget(GetID(),this,0) || GetOCF(obj) & OCF_Alive) { + // nur was sich bewegt (oder: Leiterklettert) + if(obj->GetXDir() || obj->GetYDir() || obj->GetAction() == "ScaleLadder") { + // und keine Mine ist + if(!(obj->~IsMine())) { + DoDamage(MaxDamage()); + return(); + } + } + } + } +} + +protected func Damage(int iChange) { // kriegt Schaden + if(GetAction() ne "Idle") + SetClrModulation(RGBa(255,255,255,200-200*GetDamage()/MaxDamage())); + if(GetDamage() >= MaxDamage()) + Trigger(); +} + +public func Trigger() { // Auslösen! + // schon ausgelöst: egal + if(triggered) return(); + triggered = true; + Sound("BipBipBip"); + ScheduleCall(0,"Triggered",ExploDelay()); +} + +protected func Triggered() { // ausgelöst (nach delay) + Explode(45); +} + +protected func RejectEntrance() { + if(GetAction() ne "Idle") return(true); +} + +private func MaxDamage() { return(30); } +private func ExploDist() { return(30); } +private func ExploDelay() { return(10); } + +public func IsBulletTarget() { return(true); } +// Status +public func IsEquipment() { return(1); } +public func IsMine() { return(1); } + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + if(GetID()!=MINE) return(); + + if(uid == KLAS) return("$KLASUpgradeDesc$"); + if(uid == KRFL) return("$KRFLUpgradeDesc$"); +} + +public func Upgrade(id uid) { + if(GetID()!=MINE) return(); + var own = GetOwner(Contained()); + + if(uid == KLAS) { + if(Contained()) HelpMessage(own,"$KLASUpgraded$",Contained()); + ChangeDef(LMIN); + return(true); + } + if(uid == KRFL) { + if(Contained()) HelpMessage(own,"$KRFLUpgraded$",Contained()); + ChangeDef(SMIN); + return(true); + } +} diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/StringTblDE.txt new file mode 100644 index 00000000..36fb0944 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +Activate=Mine aktivieren +KLASUpgradeDesc=Zur Lasermine aufrüsten. +KRFLUpgradeDesc=Zur Schwarmmine aufrüsten. + +KLASUpgraded=Zur Lasermine aufgerüstet. +KRFLUpgraded=Zur Schwarmmine aufgerüstet. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/StringTblUS.txt new file mode 100644 index 00000000..fece86ca --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Mine.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +Activate=Activate mine +KLASUpgradeDesc=Upgrade to laser mine. +KRFLUpgradeDesc=Upgrade to swarm mine. + +KLASUpgraded=Upgraded to laser mine. +KRFLUpgraded=Upgraded to swarm mine. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Names.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Names.txt new file mode 100644 index 00000000..369f5eef --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Minen +US:Mines diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/ActMap.txt new file mode 100644 index 00000000..80699b26 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/ActMap.txt @@ -0,0 +1,17 @@ +[Action] +Name=Activate +Procedure=NONE +Length=5 +Delay=20 +FacetBase=1 +PhaseCall=Warning +EndCall=OnActive + +[Action] +Name=Fly +Procedure=FLIGHT +Length=5 +Delay=15 +FacetBase=1 +PhaseCall=Warning +NextAction=Fly \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DefCore.txt new file mode 100644 index 00000000..5c9ad213 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=SMIN +Version=4,9,8,2 +Name=Swarmmine +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=10 +Height=6 +Offset=-5,-5 +Vertices=3 +VertexX=0,-4,4 +VertexY=-2 +VertexFriction=200,200,200 +Value=26 +Mass=5 +Components=MINE=1;METL=2 +Picture=0,6,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DescDE.txt new file mode 100644 index 00000000..01d86a4b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DescDE.txt @@ -0,0 +1 @@ +Setzt kleine schwebende Minen frei, die bei Kontakt mit Lebewesen explodieren. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DescUS.txt new file mode 100644 index 00000000..f3f815ad --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/DescUS.txt @@ -0,0 +1 @@ +Releases floating swarm mines which will explode on contact with a living. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Graphics.png new file mode 100644 index 00000000..b8e437e8 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Names.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Names.txt new file mode 100644 index 00000000..af1aa0dd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schwarmmine +US:Swarmmine \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Script.c new file mode 100644 index 00000000..07ea4a7c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Script.c @@ -0,0 +1,119 @@ +/* Schwarmmine */ + +#strict + +protected func Activate(object pByClonk) { + [$Activate$] + ControlDigDouble(pByClonk); +} + +public func ControlDigDouble(object pByClonk) { // Clonk aktiviert Mine + + var szAct = GetAction(pByClonk); + SetOwner(pByClonk->GetOwner()); + // in welche Richtung soll die Mine angeheftet werden? + + if(szAct eq "Walk" || szAct eq "Fight") { + SetActive(0); + } + else if(szAct eq "Hangle") { + SetActive(180); + } + else if(szAct eq "Scale" || szAct eq "ScaleDown") { + if(GetDir(pByClonk) == DIR_Left) + SetActive(90); + else + SetActive(270); + } + + return(1); +} + +public func SetActive(int iAngle, int iMaxDist) { // Mine wird aktiviert + + if(!iMaxDist) iMaxDist = 15; + var x=GetX(),y=GetY(); + var mx=-Sin(iAngle,iMaxDist), my=+Cos(iAngle,iMaxDist); + + // nicht platzierbar: abbrechen + if(PathFree(x,y,x+mx,y+my)) + return(false); + + // ansonsten platzieren + var i=0; + Exit(); + SetR(iAngle); + while(!Stuck() && iMaxDist>++i) { + SetPosition(x+mx*i/iMaxDist,y+my*i/iMaxDist); + } + if(iAngle == 0) + SetPosition(GetX(),GetY()-1); + else { + SetVertex(1,1,2,0,2); + SetVertex(2,1,2,0,2); + } + SetAction("Activate"); + + return(true); +} + +protected func Warning() { + + var a = 64; + if(GetAction() eq "Active") + a = 160-120*GetDamage()/MaxDamage(); + else + Sound("Bip"); + CreateParticle("PSpark",Sin(GetR(),3),-Cos(GetR(),3),0,0, + 60,RGBa(0,64,255,a),this()); +} + +protected func OnActive() { // Mine ist nun aktiv + SetVertex(1,1,0,0,2); + SetVertex(2,1,0,0,2); + var xdir, ydir, + xdir = Sin(GetR(), 30); + ydir = -Cos(GetR(), 30); + + SetAction("Fly"); // Hüpfen + SetSpeed(xdir, ydir); + SetRDir(RandomX(-50,50)); + ScheduleCall(this(), "Swarm", 10); +} + +protected func Swarm() { // Ordnungsgemäß aktiviert, gesprungen; jetzt schwärmen + for(var i = 0,swarmy ; i < 10 ; i++) + { + swarmy = CreateObject(SWRM, 0, 0, GetOwner()); + swarmy -> Activate(); + } + Sparks(10, RGB(255, 125, 0)); // Sound!!! + RemoveObject(); +} + +protected func Damage(int iChange) { // kriegt Schaden + if(GetAction() ne "Idle") + SetClrModulation(RGBa(255,255,255,200-200*GetDamage()/MaxDamage())); + if(GetDamage() >= MaxDamage()) + Trigger(); +} + +public func Trigger() { // Auslösen! + ScheduleCall(0,"Triggered",ExploDelay()); +} + +protected func Triggered() { // ausgelöst (nach delay) + Explode(10); +} + +protected func RejectEntrance() { + if(GetAction() ne "Idle") return(true); +} + +private func ExploDelay() { return(10); } +private func MaxDamage() { return(30); } + +public func IsBulletTarget() { return(true); } +// Status +public func IsEquipment() { return(1); } +public func IsMine() { return(1); } diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/StringTblDE.txt new file mode 100644 index 00000000..238e6568 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Activate=Mine aktivieren \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/StringTblUS.txt new file mode 100644 index 00000000..8f73661a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Activate=Activate mine \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/ActMap.txt new file mode 100644 index 00000000..248d2878 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Fly +Procedure=FLIGHT +Delay=1 +FacetBase=1 +NextAction=Fly +EndCall=DecreaseSpeed \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DefCore.txt new file mode 100644 index 00000000..2c0dba19 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SWRM +Version=4,9,8,2 +Name=Swarmer +Category=C4D_Object +Width=5 +Height=5 +Offset=-2,-2 +Vertices=1 +VertexFriction=20 +Components=SWRM=1 +Picture=5,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DescDE.txt new file mode 100644 index 00000000..39de3f19 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DescDE.txt @@ -0,0 +1 @@ +Explodiert, falls man ihm zu nahe kommt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DescUS.txt new file mode 100644 index 00000000..a156ac2a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/DescUS.txt @@ -0,0 +1 @@ +Explodes if one gets too near. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Graphics.png new file mode 100644 index 00000000..df2677b6 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Names.txt b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Names.txt new file mode 100644 index 00000000..35bb1255 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schwärmer +US:Swarmer \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Script.c b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Script.c new file mode 100644 index 00000000..4e72a5a4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Mines.c4d/Swarmmine.c4d/Swarmer.c4d/Script.c @@ -0,0 +1,52 @@ +/*-- Schwärmer --*/ + +#strict +#include MINE + +local xdir, ydir; + +func Activate() { + DoDamage(1); + + var speed = RandomX(0,50); + var angle = Random(360); + xdir = Sin(angle, speed); + ydir = -Cos(angle, speed); + + SetSpeed(xdir, ydir); + SetAction("Fly"); + + var tmp = CreateObject(MFLG,0,0,GetController()); + tmp->Set(this()); + tmp->SetR(Random(360)); + tmp->SetCon(70); +} + +protected func DecreaseSpeed() { + if(xdir > 0) + xdir--; + if(xdir < 0) + xdir++; + if(ydir > 0) + ydir--; + if(ydir < 0) + ydir++; + + SetSpeed(xdir, ydir); + if(!(GetActTime()%RandomX(20,22))) Warning(); + Check(); +} + +protected func Warning() { + CreateParticle("PSpark",0,0,0,0,40,RGBa(0,64,255,120),this()); +} + +protected func Triggered() { // ausgelöst (nach delay) + Explode(15); +} + +private func MaxDamage() { return(6); } +private func ExploDist() { return(16); } +private func ExploDelay() { return(5); } + +public func IsEquipment() { return(0); } diff --git a/Hazard.c4d/Items.c4d/Names.txt b/Hazard.c4d/Items.c4d/Names.txt new file mode 100644 index 00000000..1eadb614 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ausrüstung +US:Equipment \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/ActMap.txt new file mode 100644 index 00000000..95aba672 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Waiting +Directions=2 +Length=1 +Delay=0 +FacetBase=1 +FlipDir=1 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Airstrike1.wav b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Airstrike1.wav new file mode 100644 index 00000000..2d64b4bc Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Airstrike1.wav differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Airstrike2.wav b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Airstrike2.wav new file mode 100644 index 00000000..a16e3bb3 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Airstrike2.wav differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DefCore.txt new file mode 100644 index 00000000..5f5b17f9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=ABMB +Version=4,9,8,2 +Name=Bombe +Category=C4D_Object +MaxUserSelect=10 +Timer=1 +TimerCall=Traveling +Width=13 +Height=20 +Offset=-7,-10 +Vertices=2 +VertexY=10,-10 +VertexFriction=20,20 +Value=15 +Mass=100 +Components=FLNT=4;METL=1 +Picture=0,0,13,21 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DescDE.txt new file mode 100644 index 00000000..a0ff0b51 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DescDE.txt @@ -0,0 +1 @@ +Macht bumm. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DescUS.txt new file mode 100644 index 00000000..8819336d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/DescUS.txt @@ -0,0 +1 @@ +Boom. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Graphics.png new file mode 100644 index 00000000..23ad05d9 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Names.txt new file mode 100644 index 00000000..fbad7f04 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bombe +US:Bomb \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Script.c b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Script.c new file mode 100644 index 00000000..6392a42d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Bombe.c4d/Script.c @@ -0,0 +1,12 @@ +/*-- Bombe --*/ + +#strict +#include TBUL + +func Init(int dir) { + SetYDir(RandomX(4,6),this(),1); + SetXDir(dir*RandomX(4,6),this(),1); + SetR(dir*-20,this()); + //SetXDir(Sin(GetWind(0,0,1)/3,10),this(),1); + return(1); +} diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DefCore.txt new file mode 100644 index 00000000..424fec40 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=AIRS +Version=4,9,8,2 +Name=Airstrike +Category=C4D_Vehicle +MaxUserSelect=10 +Width=15 +Height=12 +Offset=-7,-6 +Vertices=3 +VertexX=7,-7,0 +VertexY=6,6,-6 +VertexFriction=50,50,50 +Value=10 +Mass=10 +Components=AIRS=1 +Picture=0,12,64,64 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DescDE.txt new file mode 100644 index 00000000..7ed3ebd6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DescDE.txt @@ -0,0 +1 @@ +Lässt einen Hagel tödlicher Bomben auf den Gegner fallen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DescUS.txt new file mode 100644 index 00000000..cd66f7b5 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/DescUS.txt @@ -0,0 +1 @@ +Drops a hail of deadly bombs on your enemy. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Graphics.png new file mode 100644 index 00000000..ae38172f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Morse.wav b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Morse.wav new file mode 100644 index 00000000..cbbd4e03 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Morse.wav differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Names.txt new file mode 100644 index 00000000..499fbb6e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Luftschlag +US:Airstrike \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Script.c b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Script.c new file mode 100644 index 00000000..a52b0b3f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Script.c @@ -0,0 +1,55 @@ +/*-- Airstrike --*/ + +#strict + +//wurde der Airstrike aktiviert? +local launched; + +//Someone set up us the bomb +func Activate(pObject) { + SetOwner(GetController(pObject),this()); + if(!PathFree(GetX(),GetY(),GetX(),0)) {return(Message("$RecievingBlocked$",this()));} + Exit(this()); + //Oh, we get Signal + Sound("Morse"); + + //All your base.. + launched = true; + SetVisibility(VIS_Allies()+VIS_Owner(),this()); + SetAction("Waiting"); + SetDir(GetDir(pObject)); + + ScheduleCall(this(),"CallSupport",50); + return(1); +} + +//..are belong to us +func CallSupport() +{ + Sound("Siren",1); + ScheduleCall(this(),"Boom",20); +} + +//You are on the way to destruction +func Boom() +{ + var dir = GetDir()*2-1; + Schedule(Format("CreateObject(ABMB,RandomX(-100,100)-100*%d,AbsY(20),%d)->Init(%d)",dir,GetOwner(),dir),30,15,this()); + FadeOut(this()); +} + +func RejectEntrance() +{ + return(launched); +} + +// KI-Behandlung +protected func AI_Inventory(object pClonk) +{ + // Nur benutzen, wenn es geht + if(!PathFree(GetX(),GetY(),GetX(),0)) return(); + // Benutzen (verzögert) + ScheduleCall(this, "Activate", 1, 0, pClonk); + // übernehmen wir + return(1); +} diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Siren.wav b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Siren.wav new file mode 100644 index 00000000..2cc2f847 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/Siren.wav differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/StringTblDE.txt new file mode 100644 index 00000000..fe1a3d98 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/StringTblDE.txt @@ -0,0 +1 @@ +RecievingBlocked=Hindernis blockiert|Empfang! \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/StringTblUS.txt new file mode 100644 index 00000000..308dde80 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Airstrike.c4d/StringTblUS.txt @@ -0,0 +1 @@ +RecievingBlocked=Obstacle inhibiting|Reception! \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/DescDE.txt new file mode 100644 index 00000000..2bcf51ce --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/DescDE.txt @@ -0,0 +1 @@ +Das richtige Werkzeug ist ein wesentlicher Beitrag zum Erfolg einer Mission. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/DescUS.txt new file mode 100644 index 00000000..6d8d1bc7 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/DescUS.txt @@ -0,0 +1 @@ +The right tools are an important contribution to the success of a mission. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DefCore.txt new file mode 100644 index 00000000..7055bf96 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=MEDI +Version=4,9,8,2 +Name=Medipack +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=3 +Width=8 +Height=6 +Offset=-4,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=18 +Mass=5 +Components=METL=1;OBRL=1 +Picture=8,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DescDE.txt new file mode 100644 index 00000000..971cd303 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DescDE.txt @@ -0,0 +1 @@ +Heilt den Benutzer. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DescUS.txt new file mode 100644 index 00000000..dbc064c4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/DescUS.txt @@ -0,0 +1 @@ +Heals the user. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Graphics.png new file mode 100644 index 00000000..e53e4650 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Medi.wav b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Medi.wav new file mode 100644 index 00000000..eb0e713d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Medi.wav differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Names.txt new file mode 100644 index 00000000..f9b8c587 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Medipack +US:Medipack \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Script.c b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Script.c new file mode 100644 index 00000000..c4789061 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Medipack.c4d/Script.c @@ -0,0 +1,88 @@ +/*-- Medipack --*/ + +#strict + +func Activate(object pByObj) { + if(pByObj->GetEnergy() >= pByObj->GetPhysical("Energy") / 1000) return(0); + + if(GetEffect("*Heal*", pByObj)) return(0); + + var healrate = HealRate(); + if(!ObjectSetAction(pByObj, "Heal")) healrate *= 4; + + AddEffect("MedipackHeal",pByObj,200,1,0,GetID(),HealAmount(),healrate); + Sound("Medi"); + RemoveObject(); + return(1); +} + +func HealRate() { return(3); } +func HealAmount() { return(100); } + +func FxMedipackHealStart(object pTarget, int iEffectNumber, int iTemp, int iHealAmount, int iHealRate) { + if(iTemp) + return(); + + EffectVar(0,pTarget,iEffectNumber) = iHealAmount; //Heilung Insgesamt + EffectVar(1,pTarget,iEffectNumber) = iHealRate; //1 Punkt Heilung alle iHealRate-Frames +} + +func FxMedipackHealTimer(object pTarget, int iEffectNumber, int iEffectTime) { + // Abbruch + if(pTarget->GetAction() ne "Heal") return(-1); + +//Log("*heil*"); +//Effekt + var width= GetDefCoreVal("Width",0,GetID(pTarget)), + height = GetDefCoreVal("Height",0,GetID(pTarget)); + width -= width/3; + height -= height/3; + width /= 2; + height /= 2; + CreateParticle("PxSpark",GetX(pTarget)+RandomX(-width, width),GetY(pTarget)+RandomX(-height,height),0,-10,Random(25)+10,RGBa(255,0,0,50)); +//*Heile mach* + if(!(iEffectTime % EffectVar(1,pTarget,iEffectNumber))) + { + DoEnergy(1,pTarget); + EffectVar(0,pTarget,iEffectNumber)--; + } + //Schon voll geheilt? + if(GetEnergy(pTarget) >= GetPhysical("Energy",0,pTarget)/1000) { + //Log("Geheilt!"); + return(-1); //Ja, Ende + } + //Och, schon aus? :( + if(!EffectVar(0,pTarget,iEffectNumber)) { + //Log("Timeout!"); + return(-1); //Heute ist nicht alle Tage, ich komm wieder, keine Frage! + } +} + +func FxMedipackHealDamage(object pTarget, int iEffectNumber, int iChange) +{ + if(iChange >= 0) return(iChange); + + RemoveEffect("MedipackHeal", pTarget); + + return(iChange); +} + +func FxMedipackHealStop(object pTarget, int iEffectNumber, int iReason, bool fTemp) +{ + if(fTemp) return(); + + if(pTarget->GetAction() eq "Heal") ObjectSetAction(pTarget, "Walk"); +} + +public func IsEquipment() { return(true); } + +// KI-Behandlung +protected func AI_Inventory(object pClonk) +{ + // Benutzen, wenn der Clonk weniger als 2/3 Leben hat + if(pClonk->GetEnergy() < pClonk->GetPhysical("Energy") * 2/3 / 1000) + // Benutzen (verzögert einsetzen) + ScheduleCall(this, "Activate", 1, 0, pClonk); + // übernehmen wir + return(1); +} diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Names.txt new file mode 100644 index 00000000..f7deabde --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Werkzeuge +US:Tools diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DefCore.txt new file mode 100644 index 00000000..9742b8a5 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=NLGT +Version=4,9,8,2 +Name=Neonlight +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=6 +Width=4 +Height=13 +Offset=-2,-6 +Vertices=2 +VertexY=6,-6 +VertexFriction=20,20 +Value=2 +Mass=3 +Picture=4,0,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 +ColorByOwner=1 diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DescDE.txt new file mode 100644 index 00000000..58cdf40c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DescDE.txt @@ -0,0 +1 @@ +Bringt temporär Licht ins Dunkel. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DescUS.txt new file mode 100644 index 00000000..abbe2148 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/DescUS.txt @@ -0,0 +1 @@ +Temporarily radiates a bright light. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Graphics.png new file mode 100644 index 00000000..6c792f5b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Names.txt new file mode 100644 index 00000000..07e7796e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Leuchtstab +US:Neonlight \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Overlay.png b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Overlay.png new file mode 100644 index 00000000..60cea322 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Overlay.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Script.c b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Script.c new file mode 100644 index 00000000..9889ebbe --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Neon Light.c4d/Script.c @@ -0,0 +1,73 @@ +/*-- Neonlicht --*/ + +#strict + +local pLight, // Das Lichtobjekt. + on, // Ob das Licht gezündet wurde + iH, iS, iL; // Die Farbwerte. + +func Initialize() +{ + //Kein Besitzer + SetOwner(-1); + + //Zufällige Farbgebung + iH = Random(256); + iS = 255; + iL = 128; + + //Nicht an, etwas dunkler + SetColorDw(HSL(iH, iS/2, iL-50)); +} + +public func Activate(object pByObj) +{ + if (on) // Nur einmal aktivierbar. + return; + else + on = true; + + AddEffect("NeonGlow", this(), 100, 5, this()); // Effekt starten und aus dem Clonk schmeißen + if(!(Contained()->~Throw())) + Exit(this(), GetDir(Contained())*12-6, 0, 0, GetDir(Contained())*6-3, -3, GetDir(Contained())*60-30); + return(1); +} + +protected func FxNeonGlowStart(pTarget, iEffectNumber, fTemp) +{ + if(fTemp) return; + + var iColor; + iColor = HSLa(iH,iS,iL,30); // Alpha einrechnen + SetColorDw(HSL(iH, iS, iL)); + pLight = AddLight(400, iColor, this()); + + // Effekte + CastParticles("PxSpark", 0, 0, 10, 40, 40, 90, GetColorDw(), GetColorDw()); + CastParticles("Smoke", 0, 0, 10, 40, 40, 90, GetColorDw(), GetColorDw()); +} + +protected func FxNeonGlowTimer(pTarget, iEffectNumber, iEffectTime) +{ + CreateParticle("PxSpark", RandomX(-3,3), RandomX(-3,3), RandomX(-5,5), RandomX(-4,-9), RandomX(40,90), GetColorDw()); + if(!Random(3)) CreateParticle("Smoke", RandomX(-3,3), RandomX(-3,3), RandomX(-5,5), RandomX(-4,-9), RandomX(140,190), GetColorDw()); + if(iEffectTime >= 4000 || !pLight) return(-1); + pLight->ChangeSize(Max(400-iEffectTime/10, 0)); +} + +protected func FxNeonGlowStop(pTarget, iEffectNumber, iReason, fTemp) +{ + if(fTemp) return; + if(pLight) pLight->RemoveObject(); // Licht entfernen, wenn noch nicht geschehen + SetColorDw(HSL(iH, iS/3, 30)); // Licht ist ausgebrannt. + FadeOut(); // ausfaden +} + +public func RejectEntrance() +{ + // Nicht mehr sammelbar wenn an + return(on); +} + +func IsEquipment() { return(1); } + diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DefCore.txt new file mode 100644 index 00000000..d5a49db5 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=NVDN +Version=4,9,8,2 +Name=Novodekan +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=2 +Width=8 +Height=8 +Offset=-4,-4 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=22 +Mass=2 +Components=METL=1;MEDI=1 +Picture=8,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DescDE.txt new file mode 100644 index 00000000..e2536c9d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DescDE.txt @@ -0,0 +1 @@ +Zum Preis einer temporären Lähmung können mit nur einer Dosis auch starke Verletzungen geheilt werden. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DescUS.txt new file mode 100644 index 00000000..c4121de9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/DescUS.txt @@ -0,0 +1 @@ +One dose will cause slight temporarily paralysis but heal even strong injuries. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Graphics.png new file mode 100644 index 00000000..85ec7273 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Names.txt new file mode 100644 index 00000000..5d7e7664 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Novodekan +US:Novodekan \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Script.c b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Script.c new file mode 100644 index 00000000..249c2f31 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Novodekan.c4d/Script.c @@ -0,0 +1,86 @@ +/*-- Novodekan --*/ + +#strict + +func Activate(object pByObj) { + if(pByObj->GetEnergy() >= pByObj->GetPhysical("Energy") / 1000) return(0); + + if(GetEffect("*Heal*", pByObj)) return(0); + + AddEffect("NovodekanHeal",pByObj,20,1,0,GetID(),HealAmount(),HealRate()); + Sound("Medi"); + RemoveObject(); + return(1); +} + +func HealRate() { return(7); } +func HealAmount() { return(100); } + +func FxNovodekanHealStart(object pTarget, int iEffectNumber, int iTemp, int iHealAmount, int iHealRate) { + if(iTemp) + if(GetPhysical("Walk", 2, pTarget) <= GetPhysical("Walk", 1, 0, GetID(pTarget))*5/10) + return(); + //Log("*HeilStart*"); + EffectVar(0,pTarget,iEffectNumber) = iHealAmount; //Heilung pro Frame + EffectVar(1,pTarget,iEffectNumber) = iHealRate; //Zeitdauer der Heilung + + // Lähmung + EffectVar(2, pTarget, iEffectNumber) = GetPhysical("Walk", 1, 0, GetID(pTarget))*3/10; + EffectVar(3, pTarget, iEffectNumber) = GetPhysical("Jump", 1, 0, GetID(pTarget))*3/10; + EffectVar(4, pTarget, iEffectNumber) = GetPhysical("Scale", 1, 0, GetID(pTarget))*3/10; + EffectVar(5, pTarget, iEffectNumber) = GetPhysical("Hangle", 1, 0, GetID(pTarget))*3/10; + + SetPhysical("Walk", GetPhysical("Walk", 0, pTarget)-EffectVar(2, pTarget, iEffectNumber), 2, pTarget); + SetPhysical("Jump", GetPhysical("Jump", 0, pTarget)-EffectVar(3, pTarget, iEffectNumber), 2, pTarget); + SetPhysical("Scale", GetPhysical("Scale", 0, pTarget)-EffectVar(4, pTarget, iEffectNumber), 2, pTarget); + SetPhysical("Hangle", GetPhysical("Hangle", 0, pTarget)-EffectVar(5, pTarget, iEffectNumber), 2, pTarget); +} + +func FxNovodekanHealTimer(object pTarget, int iEffectNumber, int iEffectTime) { +//Log("*heil*"); +//Effekt + var width= GetDefCoreVal("Width",0,GetID(pTarget)), + height = GetDefCoreVal("Height",0,GetID(pTarget)); + width -= width/3; + height -= height/3; + width /= 2; + height /= 2; + CreateParticle("PxSpark",GetX(pTarget)+RandomX(-width, width),GetY(pTarget)+RandomX(-height,height),0,-10,Random(25)+10,RGBa(255,0,255,50)); +//*Heile mach* + if(!(iEffectTime % EffectVar(1, pTarget, iEffectNumber))) + { + DoEnergy(1, pTarget); + EffectVar(0,pTarget,iEffectNumber)--; + } + //Schon voll geheilt? + if(GetEnergy(pTarget) >= GetPhysical("Energy",0,pTarget)/1000) { + //Log("Geheilt!"); + return(-1); //Ja, Ende + } + //Och, schon aus? :( + if(!EffectVar(0,pTarget,iEffectNumber)) { + //Log("Timeout!"); + return(-1); //Heute ist nicht alle Tage, ich komm wieder, keine Frage! + } +} + +public func FxNovodekanHealStop(target, no, reason, temp) +{ + SetPhysical("Walk", GetPhysical("Walk", 0, target)+EffectVar(2, target, no), 2, target); + SetPhysical("Jump", GetPhysical("Jump", 0, target)+EffectVar(3, target, no), 2, target); + SetPhysical("Scale", GetPhysical("Scale", 0, target)+EffectVar(4, target, no), 2, target); + SetPhysical("Hangle", GetPhysical("Hangle", 0, target)+EffectVar(5, target, no), 2, target); +} + +public func IsEquipment() { return(true); } + +// KI-Behandlung +protected func AI_Inventory(object pClonk) +{ + // Benutzen, wenn der Clonk weniger als 2/3 Leben hat + if(pClonk->GetEnergy() < pClonk->GetPhysical("Energy") * 2/3 / 1000) + // Benutzen (verzögert) + ScheduleCall(this, "Activate", 1, 0, pClonk); + // übernehmen wir + return(1); +} diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/ActMap.txt new file mode 100644 index 00000000..dcf9c8ca --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=Fly +Procedure=FLOAT +Facet=0,0,20,18 +Length=1 +Delay=1 +NextAction=Fly + +[Action] +Name=Idle +Procedure=NONE +Facet=0,0,20,18 +Length=1 +NextAction=Idle diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DefCore.txt new file mode 100644 index 00000000..3e0d0737 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DefCore.txt @@ -0,0 +1,29 @@ +[DefCore] +id=DRSU +Version=4,9,8,2 +Name=Support Drone +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=2 +Width=20 +Height=18 +Offset=-10,-9 +Vertices=1 +VertexX=0 +VertexY=5 +VertexFriction=40 +Value=40 +Mass=30 +Components=METL=3;KRFL=1 +Picture=0,18,64,64 +Rebuy=1 +Collectible=1 +Float=1 +BorderBound=7 +Pathfinder=1 +MoveToRange=5 +NoBreath=1 +NoTransferZones=1 + +[Physical] +Float=200 +CanFly=1 diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DescDE.txt new file mode 100644 index 00000000..779d0ce0 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Drone unterstützt, nachdem sie von diesem mit einer Waffe ausgerüstet worden ist, den Clonk im Kampf. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DescUS.txt new file mode 100644 index 00000000..675bb820 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/DescUS.txt @@ -0,0 +1 @@ +The support drone supports the clonk in battles if it is armed with a weapon. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Graphics.png new file mode 100644 index 00000000..db8a0d51 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Names.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Names.txt new file mode 100644 index 00000000..973e8ba2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Unterstützungsdrone +US:Support Drone \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Script.c b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Script.c new file mode 100644 index 00000000..f8260645 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/Script.c @@ -0,0 +1,388 @@ +/* ----------------------------- Support Drone ----------------------------- */ +// Newton: komplett neu gescriptet für Hazard 2.1 + +#strict 2 + +local guardedClonk; // the clonk to follow. Can be null if the drone should be autonomous +local usedWeapon; // weapon with which the drone is equipped +local currentTarget; // current enemy aimed at +local currentAim; // current aim angle +local targetAim; // angle at which the drone wants to shoot +local targetX, targetY; // target position where to go +local previousXDir; // previous X speed. Used for thruster effect +local isFollowing; // whether the drone follows the clonk +local isAutonomous; // whether the done has a guardedClonk at all. +local ammobag; // ammunition belt. Usually references to the clonks ammobag. Has an own ammobag if autonomous + +func Initialize() +{ + AddDamageEffect(this,30); + AddEffect("ShowWeapon", this, 1, 1, this, GetID()); + SetGraphics(0, this, GetID(), 3, 5, 0, 0, this); // für ShowWeapon + currentAim = targetAim = 160; + SetAction("Idle"); +} + +/** Heftet die Drone mit angegebener Waffe an den Clonk */ +public func ArmToClonk(object clonk, object weapon) +{ + if(!clonk || !weapon) return; + guardedClonk = clonk; + isFollowing = true; + GetArmed(0,weapon); +} + +/** Arm with weapon, without protecting a clonk. The drone will use its own + ammo storage then. If it is empty, it is empty. */ +public func Arm(object weapon) +{ + if(!weapon) return false; + if(!isFollowing) isAutonomous = true; + weapon->Exit(); + weapon->Enter(this); + SetCategory(C4D_Vehicle); + SetAction("Fly"); + usedWeapon = weapon; + AddEffect("Guard", this(), 1, 2, this, GetID()); + return true; +} + +/** Switch following the clonk (if any) on or off */ +public func FollowClonk(bool doFollow) +{ + isFollowing = doFollow; +} + +/** Set position at which the drone should go. While following a clonk, this + value will be re-set every few frames. */ +public func SetGuardPosition(int x, int y) +{ + targetX = x; + targetY = y; +} + +/** Liefert den beschützten Clonk zurück */ +public func GetGuardedClonk() { return(guardedClonk); } + + +/* -------- callbacks für den ShowWeapon Effekt -------- */ + +public func WeaponAt(&x, &y, &r) { + x = 0; + y = 8000; + r = 270-AimAngle(); + return true; +} + +public func WeaponEnd(&x, &y) { + var effectNumber = GetEffect("ShowWeapon",this); + if(!effectNumber) return; + x = EffectVar(4, this, effectNumber)/1000; // X-Ende des Laufs der Waffe + y = EffectVar(5, this, effectNumber)/1000; // Y-Ende des Laufs der Waffe +} + +public func WeaponBegin(&x, &y) { + var number = GetEffect("ShowWeapon",this()); + if(!number) return; + x = EffectVar(2, this(), number)/1000; + y = EffectVar(3, this(), number)/1000; +} + +public func AimAngle(int maxAngle, int range, bool mode) +{ + return(BoundBy(currentAim, 90, 270)); +} + +/* ------------- Schaden ------------ */ + +public func OnDmg(int damage, int type) +{ + if(type == DMG_Melee) return -30; + if(type == DMG_Projectile) return +20; + if(type == DMG_Fire) return +30; + if(type == DMG_Explosion) return -10; + if(type == DMG_Energy) return -40; + if(type == DMG_Bio) return +50; +} + +public func Damage() { + if(GetDamage() < MaxDamage()) return; + + TurnOff(); + Explode(20); +} + +/** Benutzen der Drone */ +public func Activate(object clonk) +{ + if(!(clonk->~CanUse(GetID()))) return true; + + // nur eine Drone pro Clonk + var pDrone; + for(pDrone in FindObjects( Find_Func("IsDrone"), Find_Action("Fly"), Find_Owner(clonk->GetOwner()))) + { + if(pDrone->GetGuardedClonk() != clonk) continue; + PlayerMessage(clonk->GetOwner(), "$JustOneDrone$", clonk); + Sound("Error"); + return true; + } + + if(EMPShocked()) + { + PlayerMessage(clonk->GetOwner(), "$Damaged$", clonk); + Sound("Error"); + return true; + } + + guardedClonk = clonk; + isFollowing = true; + + CreateMenu(DRSU, clonk, this,0,"$NoWeap$"); + for(var i = 0; i < clonk->ContentsCount(); ++i) + { + var weapon = clonk->Contents(i); + if(weapon->~IsWeapon()) + AddMenuItem("$ArmWith$", "GetArmed", weapon->GetID(), clonk, 0, weapon); + } + + return true; +} + +protected func GetArmed(id item, object weapon) +{ + if(!Arm(weapon)) return false; + HelpMessage(guardedClonk->GetOwner(),"$ArmedWith$",guardedClonk,GetName(weapon)); + return true; +} + +public func FxGuardStart(object target, int effectNumber, int temp) +{ + if(temp) return 0; + Exit(); + + //Schauen, ob Munition in der Waffe ist. Sonst nachladen. + var ammoid = usedWeapon->GetFMData(FM_AmmoID); + var ammoload = usedWeapon->GetFMData(FM_AmmoLoad); + + if(!CheckAmmo(ammoid, ammoload, usedWeapon)) + usedWeapon->Reload(); + + if(guardedClonk) + { + SetController(guardedClonk->GetController()); + SetOwner(guardedClonk->GetOwner()); + targetX = guardedClonk->GetX(); + targetY = guardedClonk->GetY(); + } + else + { + targetX = GetX(); + targetY = GetY(); + } +} + +public func FxGuardStop(object target, int effectNumber) +{ + SetAction("Idle"); + SetCategory(C4D_Object); + + if(usedWeapon) + { + usedWeapon->Exit(); + } + usedWeapon = guardedClonk = currentTarget = 0; + targetX = targetY = previousXDir = 0; + isAutonomous = isFollowing = 0; + if(ammobag) RemoveObject(ammobag); + currentAim = targetAim = 160; +} + +public func FxGuardTimer(object target, int effectNumber, int time) +{ + if(!usedWeapon) return -1; + + var xDiffDir = GetXDir()-previousXDir; + var thrustStrength = Min(Abs(xDiffDir)*50,200); + var thrustX = xDiffDir/Abs(xDiffDir); + if(thrustX) + CreateParticle("MuzzleFlash2",-10*thrustX,-3,-thrustX*500,0,thrustStrength,RGBa(64,128,255,0),this, true); + + CreateParticle("PSpark", RandomX(-3,3), 5, 0, RandomX(2,5), 220+Random(70), RGBa(128,196,255,160), this, true); + + previousXDir = GetXDir(); + + // adjust aim angle + var diffAngle = Normalize(targetAim - currentAim, -180); + var rotationSpeed = 4; + if(diffAngle > 0) currentAim += Min(diffAngle,rotationSpeed); + if(diffAngle < 0) currentAim += Max(diffAngle,-rotationSpeed); + + // other stuff only every 6th frame + if(time % 6) return 0; + + if(usedWeapon->IsReloading() && time % 30 == 0) + CreateParticle("PSpark", 0, 0, 0, 0, 40, RGB(255,0,0), this); + + //Lebt der Clonk noch? Oder noch da? :o + if(!isAutonomous && (!guardedClonk || !guardedClonk->GetAlive())) + { + TurnOff(); + return -1; + } + + if(isFollowing && guardedClonk) + { + targetX = guardedClonk->GetX(); + targetY = guardedClonk->GetY(); + } + + // Wenn Abstand zu gross müssen wir uns zum Beschützendem beamen + if(Distance(GetX(),GetY(), targetX, targetY) > GetBeamToClonkDistance()) + { + currentTarget = 0; + Beam(this, 0, targetX, targetY); + return 0; + } + + // Ziel suchen + currentTarget = AcquireTarget(); + + if(currentTarget) + { + targetAim = Angle(GetX(), GetY(), currentTarget->GetX(), currentTarget->GetY()); + var halfAimDelta = Abs(AngleDiff(targetAim,currentAim))/2; + var targetDistance = Distance(GetX(), GetY(), currentTarget->GetX(), currentTarget->GetY()); + var targetSize = Sqrt(Pow(currentTarget->GetDefHeight(),2) + Pow(currentTarget->GetDefWidth(),2)); + + if(1000 * targetSize/2 >= targetDistance * Sin(halfAimDelta, 1000)) + { + if(!usedWeapon->IsShooting()) usedWeapon->~ControlThrow(this); + } + } + else + { + if(usedWeapon->IsShooting()) usedWeapon->StopAutoFire(); + } + + // Drone versucht wenn möglich über dem Clonk zu schweben + var x = targetX; + var y = targetY; + var yoffset = GetFlightHeight(); + for(var i = 0 ; i < yoffset; ++i) + { + if(GBackSolid(AbsX(x),AbsY(y-i))) break; + } + y = y-i+25; + + if(!GetCommand(0) || time % 60 == 0) + { + SetCommand(0, "MoveTo", 0, x, y); + } +} + +private func WayFree(object enemy) +{ + //Schauen, ob das Schussfeld frei (von befreundeten Einheiten) ist. + if(FindObject2( + Find_OnLine(0,0,AbsX(enemy->GetX()),AbsY(enemy->GetY())), + Find_OCF( OCF_CrewMember), + Find_Not(Find_Hostile(GetOwner())))) + return false; + + return true; +} + +private func AcquireTarget() +{ + var range = Min(GetMaxTargetDistance(),usedWeapon->GetBotData(BOT_Range)); + var enemy; + for(enemy in FindTargets(this, range, 90, 180)) + { + if(enemy == guardedClonk) continue; + if(WayFree(enemy)) + { + + return enemy; + } + } +} + +public func TurnOff() +{ + if(GetEffect("Guard", this)) RemoveEffect("Guard", this); +} + +public func AmmoStoring() +{ + if(guardedClonk) return guardedClonk->~AmmoStoring(); + if(!ammobag) + { + ammobag = CreateObject(ABAG); + } + return ammobag; +} + +public func Destruction() +{ + if(ammobag) RemoveObject(ammobag); +} + +public func EMPShock() +{ + TurnOff(); + EMPShockEffect(15*35); + return true; +} + +public func RejectEntrance() +{ + return !!GetEffect("Guard", this); +} + +public func ReadyToFire() +{ + return !!GetEffect("Guard", this); +} + +public func IsBulletTarget() +{ + return !!GetEffect("Guard", this); +} + +public func IsAiming() { return true; } // can use weapons which have to aim +public func MaxDamage() { return 80; } +public func IsDrone() { return true; } +public func IsEquipment() { return true; } +public func IsMachine() { return true; } +public func IgnoreFriendlyFire() { return true; } + +public func GetArenaRemoveTime() { return 300; } +public func GetBeamToClonkDistance() { return 400; } +public func GetMaxTargetDistance() { return 250; } +public func GetFlightHeight() { return 80; } + +// KI-Behandlung +public func AI_Inventory(object clonk) +{ + + //Checken, ob der Clonk nicht schon eine hat. :Ooo + var drone; + + // Kann Ding nicht benutzen... + if(!(clonk->~CanUse(GetID()))) return false; + // Nur eine + for(var drone in FindObjects( Find_Func("IsDrone"), Find_Action("Fly"))) + if(clonk->GetOwner() == drone->GetOwner()) + if(drone->GetGuardedClonk() == clonk) + return false; + // Nicht, wenn kaputt + if(EMPShocked()) return false; + // Drohne ist zulässig. Nur einsetzen, wenn der Clonk mehr als 1 Waffe hat + if(clonk->CustomContentsCount("IsWeapon") < 2) return true; + // Waffen für Drohne ok? (FM_Aim und so) + var wpn = clonk->GetRandomDroneWeapon(); + if(!wpn) return true; + // Waffe nehmen (verzögert) + ScheduleCall(this, "ArmToClonk", 1, 0, clonk, wpn); + return true; +} diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/StringTblDE.txt new file mode 100644 index 00000000..951b1e96 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +ArmWith=Mit %s bewaffnen. +JustOneDrone=Nicht mehr als eine Drone gleichzeitig aktivierbar +Damaged=Die Drone ist beschädigt +ArmedWith=Drone bewaffnet mit %s. +NoWeap=Keine Waffe zum Ausrüsten. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/StringTblUS.txt new file mode 100644 index 00000000..329f27e6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Tools.c4d/Support Drone.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +ArmWith=Arm with %s +JustOneDrone=Can not use more than one drone at the same time +Damaged=This drone is damaged +ArmedWith=Drone armed with %s. +NoWeap=No weapon to arm. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/DescDE.txt new file mode 100644 index 00000000..97a024fb --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/DescDE.txt @@ -0,0 +1 @@ +Gewitzte Clonks sind in der Lage, mit bestimmten Hilfsmitteln ihre Waffen aufzurüsten. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/DescUS.txt new file mode 100644 index 00000000..830870cb --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/DescUS.txt @@ -0,0 +1 @@ +Shrewd clonks are able to upgrade their weapons with certain tools. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DefCore.txt new file mode 100644 index 00000000..287ef1b5 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=KLAS +Version=4,9,8,2 +Name=Laser +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=3 +Width=10 +Height=4 +Offset=-5,-2 +Vertices=2 +VertexX=-4,4 +VertexFriction=200,200 +Value=10 +Mass=5 +Components=METL=1;CRYS=1 +Picture=0,5,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DescDE.txt new file mode 100644 index 00000000..c5fc5c69 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DescDE.txt @@ -0,0 +1 @@ +Ermöglicht genauere Zieltechniken und verbesserte Waffentechnologie. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DescUS.txt new file mode 100644 index 00000000..f038a3dd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/DescUS.txt @@ -0,0 +1 @@ +Provides more accurate aim techniques and adcanced weapon technologies. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Graphics.png new file mode 100644 index 00000000..47ed1e8b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Names.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Names.txt new file mode 100644 index 00000000..c77f8218 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Laser +US:Laser diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Script.c b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Script.c new file mode 100644 index 00000000..2e5f4849 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/Script.c @@ -0,0 +1,51 @@ +#strict + +protected func Hit() { Sound("MetalHit*"); } + +protected func Activate(object pByObj) { + + // create menu + CreateMenu(GetID(),pByObj,this(),4,"$NothingUpgradeable$",0,0,0); + + for(var pObj in GetUpgradeable()) { + var szName = Format("$Upgrade$",GetName(pObj)); + // fill the menu with menuitems + AddMenuItem(szName,"UpgradeObj",GetID(pObj),pByObj,0,pObj,pObj->IsUpgradeable(GetID())); + } + return(1); +} + +public func GetUpgradeable() { + var result = CreateArray(); + + for(var i = 0; i < ContentsCount(0,Contained()); ++i) { + var pObj = Contents(i,Contained()); + if(pObj->~IsUpgradeable(GetID())) + result[GetLength(result)] = pObj; + } + for(var pObj in FindObjects(Find_Category(C4D_Vehicle),Find_AtPoint(0,-1))) { + if(pObj->~IsUpgradeable(GetID())) + result[GetLength(result)] = pObj; + } + + return(result); +} + +protected func UpgradeObj(id idObj, object pObj) { + UpgradeObject(pObj); +} + +public func UpgradeObject(object pObj) { + if(pObj->~Upgrade(GetID())) { + // Sound + Sound("Connect"); + // only remove if Upgrade() of pObj returns true + return(RemoveObject()); + } + +} + +// Status +public func IsUpgrade() { return(1); } + +public func GetUpgradeGraphicsIDBit() { return 1; } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/StringTblDE.txt new file mode 100644 index 00000000..05601b7c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +NothingUpgradeable=Nichts aufrüstbares verfügbar. +Upgrade=%s aufrüsten \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/StringTblUS.txt new file mode 100644 index 00000000..d927abf2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Laser.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +NothingUpgradeable=Nothing upgradeable available. +Upgrade=Upgrade %s \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Names.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Names.txt new file mode 100644 index 00000000..62aa6e4f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Upgrades +US:Upgrades diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DefCore.txt new file mode 100644 index 00000000..9469658c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=KSLM +Version=4,9,8,2 +Name=Slime +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectHomebase +MaxUserSelect=3 +Width=10 +Height=4 +Offset=-5,-2 +Vertices=2 +VertexX=-4,4 +VertexFriction=200,200 +Value=7 +Mass=5 +Components=KSLM=1 +Picture=0,5,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DescDE.txt new file mode 100644 index 00000000..1410118f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DescDE.txt @@ -0,0 +1 @@ +Mit diesem Aufsatz können einige Waffen den Bioschleim der Aliens selber verschießen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DescUS.txt new file mode 100644 index 00000000..7d39d6a8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/DescUS.txt @@ -0,0 +1 @@ +This attachment enables some weapons to fire alien bio slime. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Graphics.png new file mode 100644 index 00000000..d030d9d2 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Names.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Names.txt new file mode 100644 index 00000000..edd9045b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bioaufsatz +US:Bio upgrade diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Script.c b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Script.c new file mode 100644 index 00000000..522d177e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/Script.c @@ -0,0 +1,6 @@ +#strict +#include KLAS + +protected func Hit() { Sound("MetalHit"); } + +public func GetUpgradeGraphicsIDBit() { return 4; } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/SlimeHit.wav b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/SlimeHit.wav new file mode 100644 index 00000000..416d6f6d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/SlimeHit.wav differ diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/StringTblDE.txt new file mode 100644 index 00000000..05601b7c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +NothingUpgradeable=Nichts aufrüstbares verfügbar. +Upgrade=%s aufrüsten \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/StringTblUS.txt new file mode 100644 index 00000000..d927abf2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Slime.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +NothingUpgradeable=Nothing upgradeable available. +Upgrade=Upgrade %s \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DefCore.txt new file mode 100644 index 00000000..90fd5cff --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=KRFL +Version=4,9,8,2 +Name=Weaponpart +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=5 +Width=6 +Height=6 +Offset=-3,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=8 +Mass=5 +Components=METL=1 +Picture=6,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DescDE.txt new file mode 100644 index 00000000..0ac21f27 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DescDE.txt @@ -0,0 +1 @@ +Teil einer ehemaligen Waffe. Lässt sich an andere Waffen anbringen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DescUS.txt new file mode 100644 index 00000000..b010ba12 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/DescUS.txt @@ -0,0 +1 @@ +Part of something that once was a weapon. Combineable with other weapons. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Graphics.png new file mode 100644 index 00000000..4470dcc4 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Names.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Names.txt new file mode 100644 index 00000000..3835bd44 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffenteil +US:Weaponpart \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Script.c b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Script.c new file mode 100644 index 00000000..afb3b8de --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/Script.c @@ -0,0 +1,4 @@ +#strict +#include KLAS + +public func GetUpgradeGraphicsIDBit() { return 2; } \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/StringTblDE.txt new file mode 100644 index 00000000..05601b7c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +NothingUpgradeable=Nichts aufrüstbares verfügbar. +Upgrade=%s aufrüsten \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/StringTblUS.txt new file mode 100644 index 00000000..d927abf2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Upgrades.c4d/Weaponpart.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +NothingUpgradeable=Nothing upgradeable available. +Upgrade=Upgrade %s \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DefCore.txt new file mode 100644 index 00000000..c5142122 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=BZWP +Version=4,9,8,2 +Name=Bazooka +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=21 +Height=9 +Offset=-10,-5 +Vertices=2 +VertexX=-9,9 +VertexY=2,2 +VertexFriction=100,100 +Value=48 +Mass=20 +Components=METL=2;KLAS=1;ENAP=1;ENAP=1 +Picture=0,9,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DescDE.txt new file mode 100644 index 00000000..384a9ec9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DescDE.txt @@ -0,0 +1 @@ +Für die Bazooka existieren keine Hindernisse. Selbst bewegte Ziele stellen dank wärmesuchender Lenkraketen kein Problem dar. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DescUS.txt new file mode 100644 index 00000000..ef90b7b6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/DescUS.txt @@ -0,0 +1 @@ +For the bazooka, there does not exist such a thing as a barrier. Even moving targets are no problem due to heat seeking missiles. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Graphics.png new file mode 100644 index 00000000..62fb87ff Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade1.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade1.png new file mode 100644 index 00000000..461824d7 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade1.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade2.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade2.png new file mode 100644 index 00000000..7e3f0f05 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade2.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade3.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade3.png new file mode 100644 index 00000000..af0d7579 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/GraphicsUpgrade3.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DefCore.txt new file mode 100644 index 00000000..dedb31dc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=HMIS +Version=4,9,8,2 +Name=Homing Missle +Category=C4D_Vehicle +MaxUserSelect=10 +Width=6 +Height=11 +Offset=-3,-5 +Vertices=1 +VertexY=1 +VertexFriction=20 +Mass=10 +Picture=6,0,64,64 +Rotate=1 +NoStabilize=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DescDE.txt new file mode 100644 index 00000000..9fe699c3 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DescDE.txt @@ -0,0 +1 @@ +Zielsicherer als die reguläre Rakete. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DescUS.txt new file mode 100644 index 00000000..fcaef5d3 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/DescUS.txt @@ -0,0 +1 @@ +More unerring as a regular missile. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Graphics.png new file mode 100644 index 00000000..45398415 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Names.txt new file mode 100644 index 00000000..dfa413fc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lenkrakete +US:Homing missile diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Script.c new file mode 100644 index 00000000..551fbe8f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/HMissile.c4d/Script.c @@ -0,0 +1,74 @@ +/* Rakete */ + +#strict +#include MISS + +local pTarget; + +public func Acceleration() { return(4); } +public func MaxTime() { return(70); } +public func MaxSpeed() { return(160); } + +public func HomingBegin() { return(15); } +public func MaxHomingDist() { return(400); } +public func MaxHomingAngle() { return(60); } + +/* Timer */ + +private func Traveling() +{ + // kommt nich weiter + if(GetActTime() >= MaxTime()) return(Hit()); + + // Effekte + Smoking(); + + // beschleunigen + Accelerate(); + + // nur lenken wenn schon etwas fliegend + if(GetActTime() < HomingBegin()) return(); + + // lenken + if(pTarget) FollowTarget(); + + if(!pTarget) + if(pTarget = FindTarget()) { + // Effekt bei Zielfindung + Sound("BipBipBip"); + } +} + +private func FindTarget() { + + var targets = FindTargets(this,MaxHomingDist(),MaxHomingAngle(),GetR(),false); + var target; + + // teuerstes Objekt anivisieren + for(var t in targets) { + if(!target) { + target = t; + continue; + } + if(t->GetValue() > target->GetValue()) { + target = t; + break; + } + } + + return(target); +} + + +private func FollowTarget() { + + var iDAngle = Angle(GetX(),GetY(),GetX(pTarget),GetY(pTarget)); + var iAngle = GetR(); + + var iDiff = Normalize(iDAngle - iAngle,-180); + var iTurn = Min(Abs(iDiff),6); + + SetR(iAngle+iTurn*((iDiff > 0)*2-1)); +} + +public func NoDecoDamage() { return(true); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DefCore.txt new file mode 100644 index 00000000..c0e92272 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=MISS +Version=4,9,8,2 +Name=Missile +Category=C4D_Vehicle +MaxUserSelect=10 +Width=6 +Height=11 +Offset=-3,-5 +Vertices=1 +VertexY=1 +VertexFriction=20 +Mass=10 +Picture=6,0,64,64 +Rotate=1 +NoStabilize=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DescDE.txt new file mode 100644 index 00000000..eb2b4316 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DescDE.txt @@ -0,0 +1 @@ +Absolute Sprengkraft. Diesmal in fliegender Form. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DescUS.txt new file mode 100644 index 00000000..0450363d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/DescUS.txt @@ -0,0 +1 @@ +Absolute detonation force. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/ActMap.txt new file mode 100644 index 00000000..33e1c5ec --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Attach +Procedure=ATTACH +NextAction=Hold +FacetBase=1 +AbortCall=AttachTargetLost \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/DefCore.txt new file mode 100644 index 00000000..ee23c3ed --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/DefCore.txt @@ -0,0 +1,14 @@ +[DefCore] +id=GLOW +Version=4,9,8,2 +Name=Glow +Category=C4D_Vehicle|C4D_Foreground|C4D_MouseIgnore +Width=32 +Height=32 +Offset=-16,-16 +Vertices=1 +VertexCNAT=64 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 +BlitMode=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Graphics.png new file mode 100644 index 00000000..835bf58e Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Names.txt new file mode 100644 index 00000000..47d3345f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Leuchten +US:Glow \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Script.c new file mode 100644 index 00000000..d069c232 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Glow.c4d/Script.c @@ -0,0 +1,3 @@ +#strict + +#include LIGH diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Graphics.png new file mode 100644 index 00000000..fca4034f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Names.txt new file mode 100644 index 00000000..6e50e885 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rakete +US:Missile \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Script.c new file mode 100644 index 00000000..041085bc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Script.c @@ -0,0 +1,110 @@ +/* Rakete */ + +#strict + +local iSpeed, iDamage, exploding; +local shooter; + +public func Acceleration() { return(5); } +public func MaxTime() { return(60); } +public func MaxSpeed() { return(180); } + +func Construction(object byObj) { + // nichts? :C + if(!byObj) + return(); + // Waffe? + shooter = GetShooter(byObj); +} + +public func Launch(int iAngle, int iDmg, int speed) +{ + if(!speed) speed = 20; + iSpeed = speed; + iDamage = iDmg; + if(!iDamage) iDamage = 35; + + SetR(+iAngle); + SetXDir(+Sin(iAngle,iSpeed)); + SetYDir(-Cos(iAngle,iSpeed)); + SetAction("Travel"); + + AddLight(100,RGB(255,127,0),this(),GLOW); + + AddEffect("HitCheck", this(), 1,1, 0, SHT1,shooter,true); +} + +/* Timer */ + +private func Accelerate() { + if(iSpeed < MaxSpeed()) + iSpeed += Acceleration(); + + SetXDir(+Sin(GetR(),iSpeed)); + SetYDir(-Cos(GetR(),iSpeed)); +} + +private func Smoking() { + + var dist = Distance(0,0,GetXDir(),GetYDir()); + var maxx = +Sin(GetR(),dist/10); + var maxy = -Cos(GetR(),dist/10); + var ptrdist = 50; + + for(var i=0; i= MaxTime()) return(Hit()); + + // beschleunigen + Accelerate(); + + // Effekte + Smoking(); +} + +/* Treffer */ + +private func Hit() { + HitObject(); +} + +private func HitObject(object pObject) { + exploding = true; + BlastObjects(GetX(), GetY(), iDamage/2); + BlastObjects(GetX(), GetY(), iDamage/2); + Explode(iDamage,0,0,0,1); +} + +public func Damage() { + if(GetDamage() > 20 && !exploding) + Hit(); +} + +public func EMPShock() { + SetAction("Idle"); +} + +public func IsBulletTarget() { return(true); } +public func NoDecoDamage() { return(true); } +public func IsMachine() { return(true); } + +public func OnDmg(int iDmg, int iType) { + if(iType == DMG_Bio) return(100); + if(iType == DMG_Fire) return(100); +} \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Graphics.png new file mode 100644 index 00000000..e97ead7e Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Names.txt new file mode 100644 index 00000000..93df6ae4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schub +US:Thrust \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Particle.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Particle.txt new file mode 100644 index 00000000..348b16cd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Missile.c4d/Thrust.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=Thrust +MaxCount=300 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,16,16,-8,-8 +Delay=0 +Repeats=1 +Reverse=1 +Additive=1 +AlphaFade=40 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Names.txt new file mode 100644 index 00000000..50103472 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bazooka +US:Bazooka \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DefCore.txt new file mode 100644 index 00000000..8df1564c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=RMIS +Version=4,9,8,2 +Name=RC Missile +Category=C4D_Vehicle +MaxUserSelect=10 +Width=6 +Height=11 +Offset=-3,-5 +Vertices=1 +VertexY=1 +VertexFriction=20 +Mass=10 +Picture=6,0,64,64 +Rotate=1 +NoStabilize=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DescDE.txt new file mode 100644 index 00000000..457453d6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DescDE.txt @@ -0,0 +1 @@ +Die andere Kinder hatten ein ferngesteuertes Auto. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DescUS.txt new file mode 100644 index 00000000..63046419 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/DescUS.txt @@ -0,0 +1 @@ +The other kids used to play with R/C cars. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Graphics.png new file mode 100644 index 00000000..3e9da840 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Names.txt new file mode 100644 index 00000000..875390b4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ferngesteuerte Rakete +US:R/C Missile \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Script.c new file mode 100644 index 00000000..6d2fd2bd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RCMissile.c4d/Script.c @@ -0,0 +1,83 @@ +/* Rakete */ + +#strict 2 +#include MISS + +local turn; + +public func Acceleration() { return 2; } +public func MaxTime() { return 180; } +public func MaxSpeed() { return 75; } + +public func TurnSpeed() { return 15; } + +/* Timer */ + +private func Traveling() +{ + // kommt nich weiter + if(GetActTime() >= MaxTime()) + { + Hit(); + return; + } + + // Effekte + Smoking(); + + // beschleunigen + Accelerate(); + + // r drag + if(!(GetActTime()%3)) + SetRDir(GetRDir()*14/15); +} + +func ControlLeft() +{ + SetRDir(-TurnSpeed()); +} + +func ControlRight() +{ + SetRDir(TurnSpeed()); +} + +func ControlDown() +{ + SetRDir(0); +} + +func ControlUp() +{ + SetRDir(0); +} + +func ControlThrow() +{ + Hit(); +} + +func ControlDig() +{ + ReleaseControl(); +} + +public func ReleaseControl() +{ + SetPlrView(GetOwner(shooter),shooter); + SetCursor(GetOwner(shooter),shooter,1,0); +} + +public func ActivateControl(object user) +{ + shooter = user; + if(shooter == GetCursor(GetOwner())) + { + SetPlrView(GetOwner(shooter),this); + SetPlrViewRange(100,this); + SetCursor(GetOwner(shooter),this,1,0); + } +} + +public func NoDecoDamage() { return true; } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Rocket.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Rocket.wav new file mode 100644 index 00000000..395aa40f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Rocket.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RocketLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RocketLoad.wav new file mode 100644 index 00000000..1633fb09 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/RocketLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Script.c new file mode 100644 index 00000000..158a8129 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/Script.c @@ -0,0 +1,180 @@ +/*-- Bazooka --*/ + +#strict + +#include WEPN + +// Anzeige in der Hand +public func HandSize() { return(850); } +public func HandX() { return(3000); } +public func HandY() { return(0); } + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Missile$"); + if(data == FM_Icon) return(MISS); + if(data == FM_AmmoID) return(MIAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(160); + if(data == FM_Recharge) return(1); + + if(data == FM_Aim) return(1); + + if(data == FM_Condition) return(!GetUpgrade(KLAS)); + + if(data == FM_Damage) return(40); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(600); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Power) return(BOT_Power_LongLoad); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$HMissile$"); + if(data == FM_Icon) return(HMIS); + if(data == FM_AmmoID) return(MIAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(160); + if(data == FM_Recharge) return(1); + + if(data == FM_Aim) return(1); + + if(data == FM_Condition) return(GetUpgrade(KLAS)); + + if(data == FM_Damage) return(37); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(600); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Power) return(BOT_Power_LongLoad); + + return(Default(data)); +} + +public func FMData3(int data) +{ + if(data == FM_Name) return("$RCMissile$"); + if(data == FM_Icon) return(RMIS); + if(data == FM_AmmoID) return(MIAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(160); + if(data == FM_Recharge) return(1); + + if(data == FM_Aim) return(1); + + if(data == FM_Condition) return(GetUpgrade(KRFL)); + + if(data == FM_Damage) return(37); + + return(Default(data)); +} + +public func BotData3(int data) +{ + if(data == BOT_Range) return(600); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Power) return(BOT_Power_LongLoad); + + return(Default(data)); +} + +public func Fire1() { LaunchRocket(MISS,Contained()->~AimAngle(20), GetFMData(FM_Damage, 1)); } +public func Fire2() { LaunchRocket(HMIS,Contained()->~AimAngle(20), GetFMData(FM_Damage, 2)); } +public func Fire3() { LaunchRocket(RMIS,Contained()->~AimAngle(20), GetFMData(FM_Damage, 3)); } + +public func LaunchRocket(rid, angle, dmg) { + + var user = Contained(); + var x,y; + user->WeaponEnd(x,y); + // not too near to clonk + x = x*3/2; + y = y*3/2; + + var rocket = CreateObject(rid,x,y,GetController(user)); + rocket->SetPosition(user->GetX()+x,user->GetY()+y); + rocket->Launch(angle, dmg); + if(rid == RMIS) + rocket->ActivateControl(user); + + // Effekte + var ax, ay, xdir, ydir; + user->WeaponBegin(ax,ay); + xdir = ax-x; + ydir = ay-y; + + CreateParticle("Thrust",ax,ay,xdir/2,ydir/2,80,RGBa(255,200,200,0),0,0); + + for(var i=0; i<20; ++i) { + var rand = RandomX(-10,+10); + CreateParticle("Smoke2",ax+Sin(angle,rand),ay-Cos(angle,rand), + RandomX(0,2*xdir),RandomX(0,2*ydir), + RandomX(80,140),RGBa(220,200,180,0),0,0); + } + + // Sound + Sound("Rocket"); +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + if(GetUpgrade(uid)) + return(false); + + if(uid == KLAS) return("$KLASUpgradeDesc$"); + if(uid == KRFL) return("$KRFLUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + if(uid == KLAS) { + SetFireMode(2); + var own = GetOwner(Contained()); + if(Contained()) HelpMessage(own,"$KLASUpgraded$",Contained()); + return(true); + } + else if(uid == KRFL) { + SetFireMode(3); + var own = GetOwner(Contained()); + if(Contained()) HelpMessage(own,"$KRFLUpgraded$",Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KLAS) { + SetFireMode(1); + return(true); + } + if(uid == KRFL) { + if(GetUpgrade(KLAS)) + SetFireMode(2); + else + SetFireMode(1); + return(true); + } +} + +// Soundeffekte + +public func OnReload() +{ + Sound("RocketLoad"); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/StringTblDE.txt new file mode 100644 index 00000000..8468df35 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/StringTblDE.txt @@ -0,0 +1,11 @@ +Missile=Raketen +HMissile=Lenkraketen +RCMissile=Ferngesteuerte Raketen + +KLASUpgradeDesc=Rüstet die Raketen mit einem automatischen Zielverfolgungssystem aus. + +KLASUpgraded=Raketenwerfer mit automatischen|Zielverfolgungssystem ausgerüstet. + +KRFLUpgradeDesc=Ermöglicht optional ferngesteuerte Raketen zu verschießen. + +KRFLUpgraded=Raketenwerfer kann nun|ferngesteuerte Raketen verschießen \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/StringTblUS.txt new file mode 100644 index 00000000..8ecbe84a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Bazooka.c4d/StringTblUS.txt @@ -0,0 +1,11 @@ +Missile=Missiles +HMissile=Homing Missiles +RCMissile=R/C Missiles + +KLASUpgradeDesc=Equips the rockets with an automatic target-searching-system. + +KLASUpgraded=Rocket launcher is now equipped with an automatic target-searching-system. + +KRFLUpgradeDesc=Enabled to optionally shoot R/C missiles. + +KRFLUpgraded=Rocket launcher can now shoot|R/C missilies. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/ActMap.txt new file mode 100644 index 00000000..aa1c547c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/ActMap.txt @@ -0,0 +1,9 @@ + +[Action] +Name=Run +Procedure=NONE +Directions=1 +Length=1 +Delay=10 +FacetBase=1 +NextAction=Run \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DefCore.txt new file mode 100644 index 00000000..e196a1c6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=MEZL +Version=4,9,8,2 +Name=Chainsaw +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=20 +Height=9 +Offset=-10,-4 +Vertices=2 +VertexX=-8,8 +VertexY=3 +VertexFriction=70,70 +Value=12 +Mass=15 +Components=METL=5 +Picture=20,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DescDE.txt new file mode 100644 index 00000000..1966af49 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DescDE.txt @@ -0,0 +1 @@ +Hilfreiches Utensil zum Fällen und Zerlegen von Bäumen aller Art. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DescUS.txt new file mode 100644 index 00000000..1c3dcfbf --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/DescUS.txt @@ -0,0 +1 @@ +Handy tool for sawing and chopping down trees of all kind. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Graphics.png new file mode 100644 index 00000000..c8f4b336 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Names.txt new file mode 100644 index 00000000..45a161b8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Motorsäge +US:Chainsaw \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Script.c new file mode 100644 index 00000000..a5b4b470 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/Script.c @@ -0,0 +1,131 @@ +/*-- Motorsäge --*/ + +#strict + +#include WEPN + +local rot, imfiring; + +// Anzeige in der Hand +public func HandSize() { return(1000); } +public func HandX() { return(8000); } +public func HandY() { return(2000); } +public func HandR() { return(rot); } +public func BarrelXOffset(){return(2000);} +public func BarrelYOffset(){return(2000);} + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Saw$"); + if(data == FM_AmmoID) return(GSAM); + if(data == FM_AmmoLoad) return(20); + + if(data == FM_Reload) return(120); + if(data == FM_Recharge) return(4); + + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(10); + if(data == FM_Auto) return(true); + + if(data == FM_Damage) return(10); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(10); + if(data == BOT_DmgType) return(DMG_Melee); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func Fire1() // Wrrrrr +{ + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + + var treffer = false; + + for ( var i in FindObjects( + Find_NoContainer(), + Find_Or(Find_AtPoint(x,y), Find_AtPoint(x/2, y/2), Find_AtPoint(0,0)), + Find_Or( + Find_Func("IsBulletTarget",GetID(),this()), + Find_OCF(OCF_Alive)), + Find_Func("CheckEnemy", user), + Find_Exclude(user))) + { + if(CheckEnemy (i, user)) + { + DoDmg(GetFMData(FM_Damage,1), DMG_Melee, i); + //Unser gegner weg? (alienz zerplatze ja :<) + if(!i) + continue; + // kA, grad mal billiger Zappel-Effekt hier.. + i ->~ SetAction("Jump"); + + treffer = true; + + for ( var i = 3 ; i > 0; i--) + CreateParticle("MSpark", x, y, -RandomX(0, 2*x), -RandomX(0, 2*y), Random(25)+10, RGB(255,100+Random(155),Random(220))); + } + } + if(GBackSolid(x,y)) + { + treffer = true; + for ( var i = 3 ; i > 0; i--) + CreateParticle("MSpark", x, y, -RandomX(0, 2*x), -RandomX(0, 2*y), Random(25)+10, RGB(255,100+Random(155),Random(220))); + } + + if(treffer) + rot = Pulse(GetActTime()*35)/40-15; + else + rot = RandomX(2,7); +} + +public func OnAutoStart() +{ + imfiring = true; + Sound("chainsaw_start",0,this()); + ScheduleCall(this(),"ChainsawSound", 19); + SetAction("Run"); + SetPhysical("Walk", GetPhysical("Walk", 0, GetUser()) + 15000, PHYS_StackTemporary, GetUser()); +} + +public func ChainsawSound() +{ + if(imfiring) Sound("chainsaw",0,this(),0,0,+1); +} + +public func OnAutoStop() +{ + if(imfiring) Sound("chainsaw_stop",0,this()); + imfiring = 0; + rot = 0; + Sound("chainsaw",0,this(),0,0,-1); + ResetPhysical(GetUser(), "Walk"); +} + +// Soundeffekte + +public func OnSelect() +{ + Sound("chainsaw_idle",0,this(),0,0,+1); +} + +public func OnDeselect() +{ + Sound("chainsaw_idle",0,this(),0,0,-1); +} + +protected func Departure() { + _inherited(); + Sound("chainsaw_idle",0,this(),0,0,-1); +} + +public func OnReload() +{ + Sound("FlamerLoad"); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/StringTblDE.txt new file mode 100644 index 00000000..eb963a4b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Saw=Metzeln diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/StringTblUS.txt new file mode 100644 index 00000000..a5bb935f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Saw=Slaughter diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw.wav new file mode 100644 index 00000000..bea24be9 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_idle.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_idle.wav new file mode 100644 index 00000000..6ab6d1c5 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_idle.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_start.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_start.wav new file mode 100644 index 00000000..48d661e2 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_start.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_stop.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_stop.wav new file mode 100644 index 00000000..5446e84b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Chainsaw.c4d/chainsaw_stop.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/DescDE.txt new file mode 100644 index 00000000..f01983e1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/DescDE.txt @@ -0,0 +1 @@ +Die hochwertigsten Waffen der bekannten Welten. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/DescUS.txt new file mode 100644 index 00000000..54373805 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/DescUS.txt @@ -0,0 +1 @@ +The finest weapons of the known worlds. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DefCore.txt new file mode 100644 index 00000000..df03ec45 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=ENWP +Version=4,9,8,2 +Name=Energy rifle +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=17 +Height=8 +Offset=-9,-4 +Vertices=1 +VertexY=3 +VertexFriction=100 +Value=18 +Mass=10 +Components=METL=1;ENAP=1 +Picture=0,9,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DescDE.txt new file mode 100644 index 00000000..9574c4f1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DescDE.txt @@ -0,0 +1 @@ +Dieses vollautomatische Gewehr ist neben der Sturmpistole eine weitere beliebte Sturmwaffe. Sie wird hauptsächlich dafür benutzt, feindliche Vehikel außer Gefecht zu setzen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DescUS.txt new file mode 100644 index 00000000..e5b6d32b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/DescUS.txt @@ -0,0 +1 @@ +Amongst the assault pistol, this fully-automatic rifle is another popular assault weapon. It's primarily used to destroy enemy vehicles. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/EnergyRifle.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/EnergyRifle.wav new file mode 100644 index 00000000..01f7d31f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/EnergyRifle.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/EnergyRifleLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/EnergyRifleLoad.wav new file mode 100644 index 00000000..6d16e39d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/EnergyRifleLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Graphics.png new file mode 100644 index 00000000..7512dd08 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/GraphicsUpgrade1.png b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/GraphicsUpgrade1.png new file mode 100644 index 00000000..6406206b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/GraphicsUpgrade1.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Names.txt new file mode 100644 index 00000000..fe2c1a21 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Energiegewehr +US:Energy rifle diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Script.c new file mode 100644 index 00000000..b9e1fffd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Script.c @@ -0,0 +1,139 @@ +/*-- Energiegewehr --*/ + +#strict + +#include WEPN + +// Anzeige in der Hand +public func HandSize() { return(950); } +public func HandX() { return(5000); } +public func HandY() { return(2000); } +public func BarrelXOffset(){return(-2000);} +public func BarrelYOffset(){return(-2000);} + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Standard$"); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(20); + + if(data == FM_Reload) return(140); + if(data == FM_Recharge) return(8); + + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(1); + if(data == FM_Auto) return(true); + + if(data == FM_Condition) return(!GetUpgrade(KLAS)); + + if(data == FM_Damage) return(9); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(350); + if(data == BOT_DmgType) return(DMG_Energy); + if(data == BOT_Power) return(BOT_Power_2); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$Laser$"); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(25); + + if(data == FM_Reload) return(100); + if(data == FM_Recharge) return(12); + + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(2); + if(data == FM_Auto) return(true); + + if(data == FM_Condition) return(GetUpgrade(KLAS)); + + if(data == FM_Damage) return(12); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(250); + if(data == BOT_DmgType) return(DMG_Energy); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func Fire1() // Projektil-Dauerfeuer +{ + var user = GetUser(); + var angle = user->~AimAngle(10) + RandomX(-2,+2); + var x,y; user->WeaponEnd(x,y); + var ammo = CreateObject(SHT2,x,y,GetController(user)); + // int iAngle, int iSpeed, int iDist, int iSize, int iTrail, int iDmg, int iDmgPrec, int iGlowSize, int iAPrec + ammo->Launch(angle,180,400,6,80, GetFMData(FM_Damage, 1),0,80); + + // Effekte + MuzzleFlash(30,user,x,y,angle,RGBa(96,64,255,0)); + // Sound + Sound("EnergyRifle",0,ammo); +} + +public func Fire2() // Laserschuss +{ + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->AimAngle(8) + RandomX(-1,+1); + var laser = CreateObject(LASR,x,y,GetController(user)); + laser->SetClrModulation(RGB(50,100,255)); + laser->Set(angle,7,GetBotData(BOT_Range,2),15,this()); + // Effekte + MuzzleFlash(40,user,x,y,angle,RGBa(50,100,255,0)); + + // Sound + Sound("LaserShot",0,laser); +} + +public func LaserStrike(object pTarget) { // Laser trifft + DoDmg(GetFMData(FM_Damage, 2), DMG_Energy, pTarget); + return(1); +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + if(GetUpgrade(uid)) + return(false); + + if(uid == KLAS) return("$KLASUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + if(uid == KLAS) { + SetFireMode(2); + var own = GetOwner(Contained()); + if(Contained()) HelpMessage(own,"$KLASUpgraded$",Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KLAS) { + SetFireMode(1); + return(true); + } +} + +// Soundeffekte + +public func OnReload() +{ + Sound("EnergyRifleLoad"); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/DefCore.txt new file mode 100644 index 00000000..48b75665 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=SHT2 +Version=4,9,8,2 +Name=Shot +Category=C4D_Vehicle +Width=20 +Height=18 +Offset=-10,-9 +Vertices=1 +VertexFriction=1 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Graphics.png new file mode 100644 index 00000000..12b4ebb6 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Names.txt new file mode 100644 index 00000000..8db79016 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Munition +US:Ammo \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Script.c new file mode 100644 index 00000000..67263415 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/Shot.c4d/Script.c @@ -0,0 +1,54 @@ +#strict +#include SHT1 + +local glow; + +/* Schuss */ + +//Extern für Überladung +private func CreateTrail(int iSize, int iTrail) { + //glow = AddLight(100,RGB(128,64,255),this(),GLOW); + + pTrail = CreateObject(TRAI,0,0,-1); + if(pTrail) { + pTrail->Set(iSize+2,iTrail,this(),"Travel2"); + SetObjectBlitMode(GetObjectBlitMode(),pTrail); + } +} + +private func Traveling() +{ + // effect + if(glow) + glow->ChangeColor(Color(GetActTime())); + //CreateParticle("PSpark",0,0,-GetXDir()/4,-GetYDir()/4,RandomX(100,200)*GetCon()/100, + // RGBa(64,32,255,100+50*GetActTime()/iTime),this()); + return(_inherited()); +} + +/* Treffer */ + +private func HitObject(object pObject) { + if(BulletStrike(pObject)) { + LaserLight(RandomX(30,50), Color(GetActTime()),0,0,10); + Remove(); + } +} + +public func BulletStrike(object pObj) { + if(pObj) + DoDmg(iDamage, DMG_Energy, pObj, iPrec); + return(1); +} + +private func Color(int iATime) { + var iPrg = 100*iATime/iTime; + return(RGBa(127,127-iPrg,255,iPrg*2)); +} + +private func GlowColor(int iATime) { + var iPrg = 100*iATime/iTime; + return(RGBa(70,50,255-iPrg,130)); +} + +public func TrailColor(int iATime) { return(Color(iATime)); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/StringTblDE.txt new file mode 100644 index 00000000..32afab61 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +Standard=Dauerfeuer +Laser=Laser + +KLASUpgradeDesc=Ersetzt den Schussmechanismus durch einen Hochleistungslaser. + +KLASUpgraded=Schussmechanismus durch einen|Hochleistungslaser ersetzt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/StringTblUS.txt new file mode 100644 index 00000000..2db3c30b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/EnergyRifle.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +Standard=Continuous fire +Laser=Laser + +KLASUpgradeDesc=Replaces the fire mechanism with a high-performance laser. + +KLASUpgraded=Fire mechanism replaced with a high-performance laser. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/BioFlamer.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/BioFlamer.wav new file mode 100644 index 00000000..2bfd138f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/BioFlamer.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DefCore.txt new file mode 100644 index 00000000..610d8a42 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=FTWP +Version=4,9,8,2 +Name=FlameThrower +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=16 +Height=9 +Offset=-8,-4 +Vertices=2 +VertexX=-7,7 +VertexY=0,3 +VertexFriction=100,100 +Value=23 +Mass=12 +Components=METL=2;GSAP=1 +Picture=16,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DescDE.txt new file mode 100644 index 00000000..0000a632 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DescDE.txt @@ -0,0 +1 @@ +Gefürchtet im Nahkampf, röstet der Flammenwerfer jeden Feind der ihm zu nahe kommt gut durch. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DescUS.txt new file mode 100644 index 00000000..94297376 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/DescUS.txt @@ -0,0 +1 @@ +Feared in close combat, the flame thrower toasts any enemy who fails to get out of its range. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/ActMap.txt new file mode 100644 index 00000000..c20dd913 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Fly +Procedure=FLOAT +Length=1 +Delay=1 +Facet=0,0,4,4 +NextAction=Fly +StartCall=Flying \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/DefCore.txt new file mode 100644 index 00000000..849a0b12 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/DefCore.txt @@ -0,0 +1,14 @@ +[DefCore] +id=FFLM +Version=4,9,8,2 +Name=Flame +Category=C4D_Vehicle +Width=4 +Height=4 +Offset=-2,-2 +Vertices=1 +VertexY=1 +VertexFriction=200 + +[Physical] +Float=1000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Graphics.png new file mode 100644 index 00000000..a1c2d220 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Names.txt new file mode 100644 index 00000000..f5575b7a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flamme +US:Flame diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Script.c new file mode 100644 index 00000000..d4c4ed88 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flame.c4d/Script.c @@ -0,0 +1,237 @@ +/*-- Anzünderobjekt --*/ + +#strict 2 + +local slimy, iDamage; +local shooter; // Dingens/Clonk das den Schuss abgefeuert hat. +local hits; +local maxlifetime; + +func Construction(object byObj) { + // nichts? :C + if(!byObj) + return; + // Waffe? + shooter = GetShooter(byObj); + + maxlifetime = 50; + hits = 0; +} + + +public func MaxLifeTime() { return maxlifetime; } + +public func SetMaxLifetime(int max) { + maxlifetime = max; +} + +public func Launch(int xdir, int ydir, bool slime, int iDamagepar) +{ + slimy = slime; + iDamage = iDamagepar; + if(!iDamage) + iDamage = 1; + + SetSpeed(xdir,ydir); + SetAction("Fly"); + AddEffect("HitCheck", this(), 1,1, 0,GetID(this),shooter); + +} + + +protected func Flying() +{ + + if(InLiquid()) { + // Blubberblubber + for(var i=0; i<5; ++i) Bubble(RandomX(-5,+5),RandomX(-5,5)); + RemoveObject(); + return; + } + + if(GetActTime() > MaxLifeTime()-Random(5)) { + RemoveObject(); + return; + } + + if(!Random(4) && GetActTime() > MaxLifeTime()/4) + SetYDir(GetYDir()+RandomX(-4,2)); + + if(slimy) { + CastSlimeEffects(GetActTime()); + } else { + CastFireEffects(GetActTime()); + } +} + +public func HitObject(object pObj) +{ + var color = FIRE_Green; + // 100..70 + var schwaecher = Max(100 - hits*20,0); + //Message("@%d%",this,schwaecher); + if(!slimy) { + color = FIRE_Red; + DoDmg(iDamage*schwaecher/100, DMG_Fire, pObj,1); + } + else { + DoDmg(iDamage*schwaecher/100, DMG_Bio, pObj, 1); + } + + hits++; + + //anzündbares anzünden, aber nicht lebewesen. + if(pObj) //existiert es überhaupt noch? + if(pObj->GetOCF() & OCF_Inflammable) { + if(!(pObj->GetOCF() & OCF_Living)) + Incinerate(pObj); + else + AddFireEffect(pObj,50,color,1); + } +} + +protected func FireSize() +{ + return Min(180,20 + GetActTime()*6); +} + +protected func CastFireEffects(int time) +{ + var maxtime = MaxLifeTime(); + var dir = (GetXDir()>0)*2-1; + var angle = Angle(0,0,GetXDir(),GetYDir()); + var speed = Sqrt(GetXDir()*GetXDir()+GetYDir()*GetYDir()); + + var ntime = 40*time/maxtime; + + for (var i = 0; i < 3; i++) + { + var xoff = RandomX(-2,5)+ntime/2; + var yoff = RandomX(-ntime , ntime); + + var xdir = +Cos(angle,yoff)-Sin(angle,xoff); + var ydir = +Sin(angle,yoff)+Cos(angle,xoff); + + var size = FireSize(); + + var x = Sin(angle,(+10-2*i)); + var y = RandomX(-size,size)/20; + + var alpha = BoundBy(180 - speed/4 - time/2,0,255); + var color = RGBa(255, 255, 255, alpha); + + CreateParticle("Fire2", x, y, xdir, ydir, size, color); + } + +} + +protected func CastSlimeEffects(int time) +{ + var maxtime = MaxLifeTime(); + var dir = (GetXDir()>0)*2-1; + var angle = Angle(0,0,GetXDir(),GetYDir()); + + var ntime = 40*time/maxtime; + + for (var i = 0; i < 3; i++) + { + + var xoff = RandomX(-2,5); + var yoff = RandomX(-ntime , ntime)/2; + + var xdir = +Cos(angle,yoff)-Sin(angle,xoff); + var ydir = +Sin(angle,yoff)+Cos(angle,xoff); + + var size = 20 + ntime*8; + + var x = (+10-2*i)*dir; + var y = RandomX(-size,size)/20; + + var alpha = BoundBy(ntime ,0,255); + var color = RGBa(100, 255, 0, alpha); + + CreateParticle("AlienPlasma", x, y, xdir, ydir, size, color); + } +} + +/* Effekt für Trefferüberprüfung */ + +// weitgehend kopiert aus Schuss :( + +// EffectVars: +// 2 - Schütze (Objekt, das die Waffe abgefeuert hat, üblicherweise ein Clonk) +// 3 - ID des Schützen +// 4 - Scharf? Wenn true wird der Schütze vom Projektil getroffen + +private func FxHitCheckStart(object target, int effect, int temp, object byObj) +{ + if(temp) return; + if(!byObj) + byObj = target; + if(byObj->Contained()) + byObj = (byObj->Contained()); + EffectVar(2, target, effect) = byObj; + EffectVar(3, target, effect) = GetID(byObj); + EffectVar(4, target, effect) = false; +} + +private func FxHitCheckTimer(object target, int effect, int time) +{ + var obj; + // Oh man. :O + var x = GetX(target); + var y = GetY(target); + var angle = Angle(0,0,GetXDir(target),GetYDir(target)); + var wdt = target->~FireSize()/7; + var hgt = target->~FireSize()/7; + + target->SetObjDrawTransform(wdt*1000/4,0,0,0,hgt*1000/4); + + // Schuss schon Scharf? + var exclude = EffectVar(2, target, effect); + if(EffectVar(4, target, effect)) exclude = target; + + //DrawParticleLine("NoGravSpark",newx-oldx, newy-oldy,0,0,1,25,RGB(255,0,0),RGB(0,0,255)); + // Wir suchen nach Objekten entlang der Linie die wir uns seit dem letzten Check + // bewegt haben. Und sortieren sie nach Distanz (nähere zuerst) + + for(obj in FindObjects(Find_Or(Find_AtRect(x-wdt/2,y-hgt/2,wdt,hgt)),Find_NoContainer())) + { + // Excludes + if(obj == target) continue; + if(obj == exclude) continue; + + // CheckEnemy + if(!CheckEnemy(obj,target)) continue; + + // IsBulletTarget oder Alive + if(obj->~IsBulletTarget(GetID(target),target,EffectVar(2, target, effect)) || GetOCF(obj) & OCF_Alive) { + return target->~HitObject(obj); + } + } + + // OKOK, Ich hab sogar das Restzeug kommentiert. :P + if(!EffectVar(5,target,effect)) { + if(!EffectVar(4, target, effect)) { + // ready gibt an, ob wir schon "scharf" sind. True = Scharf + var ready = true; + // Wir suchen alle Objekte mit der ID unseres Schützens an unserer momentanen Stelle + for(var foo in FindObjects(Find_AtPoint(x,y),Find_ID(EffectVar(3, target, effect)))) + // und schauen, ob es der Schütze ist. + if(foo == EffectVar(2, target, effect)) + // wir haben den Schützen gefunden -> Er ist noch an unserer Position + ready = false; + // wir haben den Schützen nicht gefunden + if(ready) + // -> Wir treffen ihn ab jetzt. + EffectVar(4, target, effect) = true; + } + } +} + +protected func Hit() +{ + RemoveObject(); +} + +func NoWarp() { return true; } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/ActMap.txt new file mode 100644 index 00000000..c20dd913 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Fly +Procedure=FLOAT +Length=1 +Delay=1 +Facet=0,0,4,4 +NextAction=Fly +StartCall=Flying \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/DefCore.txt new file mode 100644 index 00000000..d8b06165 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=FLMB +Version=4,9,8,2 +Name=Flame +Category=C4D_Vehicle +Width=4 +Height=4 +Offset=-2,-2 +Vertices=1 +VertexY=1 +VertexFriction=200 +IncompleteActivity=1 + +[Physical] +Float=10000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Graphics.png new file mode 100644 index 00000000..cfe98523 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Names.txt new file mode 100644 index 00000000..09b988ce --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flammenball +US:Flameball diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Script.c new file mode 100644 index 00000000..3a1fa292 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flameball.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- Flammenfeuerball der Verdammnis!! --*/ + +#strict + +#include FFLM + +public func MaxLifeTime() { return 75; } + +protected func Flying() { + SetYDir(GetYDir(0,1000)+GetGravity()*2,0,1000); + + CreateParticle("Smoke2", GetXDir()/6, GetYDir()/6, RandomX(-15, 15), RandomX(-5,-20), + RandomX(120, 160), RGBa(150,150,150,80)); + + _inherited(); +} + diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flamer.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flamer.wav new file mode 100644 index 00000000..bb51fcd7 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Flamer.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/FlamerLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/FlamerLoad.wav new file mode 100644 index 00000000..08a31a77 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/FlamerLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Graphics.png new file mode 100644 index 00000000..62571720 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade2.png b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade2.png new file mode 100644 index 00000000..25da2df0 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade2.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade4.png b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade4.png new file mode 100644 index 00000000..7eb5a762 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade4.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade6.png b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade6.png new file mode 100644 index 00000000..e7d85ee1 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/GraphicsUpgrade6.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Names.txt new file mode 100644 index 00000000..26f85da1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flammenwerfer +US:Flame Thrower diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Script.c new file mode 100644 index 00000000..17d72980 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/Script.c @@ -0,0 +1,205 @@ +/*-- Flammenwefer --*/ + +#strict + +#include WEPN // Das Objekt ist eine Waffe + +// Anzeige in der Hand +public func HandSize() { return(1000); } +public func HandX() { return(5000); } +public func HandY() { return(500); } + +public func FMData1(int data) +{ + if(data == FM_Name) return("$FlameThrower$"); + if(data == FM_AmmoID) return(GSAM); + if(data == FM_AmmoLoad) return(50); + if(data == FM_Reload) return(60); + if(data == FM_Recharge) return(5); + if(data == FM_Auto) return(true); + if(data == FM_Condition) return(!GetUpgrade(KRFL)); + + if(data == FM_Damage) return(22); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(150); + if(data == BOT_DmgType) return(DMG_Fire); + if(data == BOT_Power) return(BOT_Power_2); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$SlimeThrower$"); + if(data == FM_AmmoID) return(GSAM); + if(data == FM_AmmoLoad) return(50); + + if(data == FM_Reload) return(60); + if(data == FM_Recharge) return(5); + if(data == FM_Auto) return(true); + + if(data == FM_Condition) return(GetUpgrade(KSLM) && !GetUpgrade(KRFL)); + + if(data == FM_Damage) return(29); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(150); + if(data == BOT_DmgType) return(DMG_Bio); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func FMData3(int data) +{ + if(data == FM_Name) return("$FlameThrower$"); + if(data == FM_Recharge) return(3); + if(data == FM_Condition) return(GetUpgrade(KRFL)); + return FMData1(data); +} + +public func BotData3(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Fire); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func FMData4(int data) +{ + if(data == FM_Name) return("$SlimeThrower$"); + if(data == FM_Recharge) return(3); + if(data == FM_Condition) return(GetUpgrade(KSLM) && GetUpgrade(KRFL)); + return FMData2(data); +} + +public func BotData4(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Bio); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func FireSpray(int fm, bool bio) +{ + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->~AimAngle(20); + var flame = CreateObject(FFLM, x,y, GetController(user)); + var xdir = +Sin(angle,35)+GetXDir(user); + var ydir = -Cos(angle,35); + + flame -> Launch(xdir,ydir,bio, GetFMData(FM_Damage, fm)); +} + +public func Fire1() +{ + FireSpray(1,false); +} + +public func Fire2() +{ + FireSpray(2,true); +} + +public func FireSuperSoaker(int fm, bool bio) +{ + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->AimAngle(5)+RandomX(-6,+6)-15*(GetDir(user)*2-1); + var flame = CreateObject(FLMB, x,y, GetController(user)); + var xdir = +Sin(angle,75); + var ydir = -Cos(angle,75); + + flame -> Launch(xdir,ydir, bio, GetFMData(FM_Damage, fm)); +} + +public func Fire3() +{ + FireSuperSoaker(3,false); +} + +public func Fire4() +{ + FireSuperSoaker(4,true); +} + +/* Sounds */ + +public func OnAutoStart(int i) +{ + if(i%2) Sound("Flamer",0,0,0,0,1); + else Sound("BioFlamer",0,0,0,0,1); +} + +public func OnAutoStop(int i) +{ + if(i%2) Sound("Flamer",0,0,0,0,-1); + else Sound("BioFlamer",0,0,0,0,-1); +} + +public func OnReload() +{ + Sound("FlamerLoad"); +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + if(GetUpgrade(uid)) + return(false); + + if(uid == KSLM) return("$KSLMUpgradeDesc$"); + if(uid == KRFL) return("$KRFLUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + var own = GetOwner(Contained()); + if(uid == KSLM) { + if(GetUpgrade(KRFL)) + SetFireMode(4); + else + SetFireMode(2); + if(Contained()) HelpMessage(own,"$KSLMUpgraded$",Contained()); + return(true); + } + if(uid = KRFL) { + if(GetUpgrade(KSLM)) + SetFireMode(4); + else + SetFireMode(3); + if(Contained()) HelpMessage(own,"$KRFLUpgraded$",Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KSLM) { + if(GetUpgrade(KRFL)) + SetFireMode(3); + else + SetFireMode(1); + return(true); + } + if(uid == KRFL) { + SetFireMode(1); + return(true); + } +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/StringTblDE.txt new file mode 100644 index 00000000..d30133f1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/StringTblDE.txt @@ -0,0 +1,8 @@ +FlameThrower=Flammenwerfer +SlimeThrower=Chemische Keule + +KSLMUpgradeDesc=Bringt eine Chemische Keule an +KRFLUpgradeDesc=Erhöht die Reichweite + +KSLMUpgraded=Chemische Keule angebracht! +KRFLUpgraded=Reichweite erhöht! \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/StringTblUS.txt new file mode 100644 index 00000000..b2d80c28 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/FlameThrower.c4d/StringTblUS.txt @@ -0,0 +1,9 @@ +FlameThrower=Flamethrower +FlameBall=Flameball +SlimeThrower=Chemical mace + +KSLMUpgradeDesc=Add a chemical mace +KRFLUpgradeDesc=Increases the range + +KSLMUpgraded=Chemical mace attached. +KRFLUpgraded=Range increased. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DefCore.txt new file mode 100644 index 00000000..9f07ee0d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=CGRN +Version=4,9,8,2 +Name=Cluster grenade +Category=C4D_Vehicle +MaxUserSelect=10 +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=2 +Components=CGRN=1 +Picture=5,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DescDE.txt new file mode 100644 index 00000000..2c9c0123 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Clustergranate richtet einen beachtlichen Flächenschaden an. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DescUS.txt new file mode 100644 index 00000000..fcca98ec --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/DescUS.txt @@ -0,0 +1 @@ +The cluster grenade does a formidable area damage. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/DefCore.txt new file mode 100644 index 00000000..3b20c107 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=CGFR +Version=4,9,8,2 +Name=Cluster grenade fragment +Category=C4D_Object +Timer=1 +TimerCall=GrenadeSmoke +Width=3 +Height=3 +Offset=-1,-1 +Vertices=1 +VertexY=1 +VertexFriction=20 +Mass=2 +Components=CGFR=1 +Picture=0,0,3,3 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Graphics.png new file mode 100644 index 00000000..18fe6c0e Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Names.txt new file mode 100644 index 00000000..bff367c4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Cluster +US:Cluster \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Script.c new file mode 100644 index 00000000..41819eeb --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Fragment.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- Splittergranaten-Fragment --*/ + +#strict + +local explode_size; + +func Construction(object byObj) +{ + var shooter; + // Waffe? + shooter = GetShooter(byObj); + + explode_size = 12; + AddEffect("HitCheck", this(), 1, 1, 0, SHT1,shooter); + ScheduleCall(0,"Hit",30+RandomX(-20,20)); +} + +public func SetExplodeSize(int iExplodeSize) { explode_size = iExplodeSize; } + +func Hit() +{ + BlastObjects(0,0, explode_size/2, Contained()); + Explode(explode_size,0,0,0,1); +} +func HitObject() { Hit(); } + +func GrenadeSmoke() +{ + var iX = -GetXDir()/6; + var iY = -GetYDir()/6; + var iSize = 10+RandomX(120,200); + + CreateParticle("Smoke2",iX,iY,RandomX(-4,4),RandomX(-3,5),iSize,RGBa(75,65,55,55)); + if(!Random(4)) + CreateParticle("Blast",iX,iY,0,0,iSize*2/3,RGBa(250,100+Random(100),100,160)); + +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Graphics.png new file mode 100644 index 00000000..77dd125f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Names.txt new file mode 100644 index 00000000..0f63cacd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Clustergranate +US:Cluster grenade \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Script.c new file mode 100644 index 00000000..3606a19c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/ClusterGrenade.c4d/Script.c @@ -0,0 +1,46 @@ +/*-- Splittergranate --*/ + +#strict + +// Ist eine Granate +#include GREN + +func Hit() +{ + Bounce(); + Explode(30); + CastClusters(); +} + +func HitObject(object clonk) +{ + // direkter Treffer -> normal explodieren weil ja noch nicht geclustert + Explode(30); + RemoveEffect("Grenade", this,0,1); +} + +func Destruct() +{ + HitObject(); +} + +func TimeIsUp() +{ + Hit(); +} + +func CastClusters() +{ + for(var i=RandomX(8,11); i>0; --i) + { + var obj=CreateObject(CGFR, 0, 0, GetController()); + var xdir = GetXDir()+RandomX(-20,20); + var ydir = GetYDir()+RandomX(-20,20); + var angle = Angle(0,0,xdir,ydir); + + obj->SetExplodeSize(iDamage); + SetSpeed(xdir, ydir, obj); + } +} + +func ExplodeDelay() { return(50); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DefCore.txt new file mode 100644 index 00000000..9deb55fe --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=GLWP +Version=4,9,8,2 +Name=Grenade launcher +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=15 +Height=7 +Offset=-7,-4 +Vertices=2 +VertexX=-6,6 +VertexY=2,2 +VertexFriction=100,100 +Value=34 +Mass=15 +Components=METL=2;KRFL=1;GRAP=1 +Picture=18,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DescDE.txt new file mode 100644 index 00000000..9a13483c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DescDE.txt @@ -0,0 +1 @@ +Der Granatenwerfer besitzt nicht nur eine große Durchschlagskraft, sondern kann mit etwas Übung selbst auf großer Entfernung genau treffen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DescUS.txt new file mode 100644 index 00000000..08b4f207 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/DescUS.txt @@ -0,0 +1 @@ +The grenade launcher does not only feature great firepower but also high accuracy even at long distances. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DefCore.txt new file mode 100644 index 00000000..d3d6d148 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=EGRN +Version=4,9,8,2 +Name=EMP Grenade +Category=C4D_Vehicle +MaxUserSelect=10 +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=3 +Picture=5,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DescDE.txt new file mode 100644 index 00000000..dc8b8921 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DescDE.txt @@ -0,0 +1 @@ +Beim Aufprall wird ein elektromagnetischer Puls erzeugt, der sämtliche elektrischen Anlagen im Umkreis stört und ausfallen lässt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DescUS.txt new file mode 100644 index 00000000..32ca8df8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/DescUS.txt @@ -0,0 +1 @@ +This grenade triggers an electromagnetic pulse which causes the blackout of all electric constructions in that area. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/EMP.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/EMP.wav new file mode 100644 index 00000000..e9cdf5a2 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/EMP.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Graphics.png new file mode 100644 index 00000000..2b2265d6 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Names.txt new file mode 100644 index 00000000..05a5b0c0 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:EMP Granate +US:EMP grenade \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Script.c new file mode 100644 index 00000000..e2dea8e6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Script.c @@ -0,0 +1,20 @@ +/*-- EMP Granate --*/ + +#strict + +// Ist eine Granate +#include GREN + +func HitObject() +{ + CreateEMPWave(); + RemoveObject(); +} + +func CreateEMPWave() +{ + Sound("EMP"); + CreateObject(SHCK, 0, 0, GetOwner())->SetMaxSize(iDamage); +} + +func ExplodeDelay() { return(20); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/ActMap.txt new file mode 100644 index 00000000..4231bd2c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/ActMap.txt @@ -0,0 +1,9 @@ +[Action] +Name=Exist +Procedure=FLOAT +Directions=1 +Length=1 +Facet=0,0,120,120 +Delay=1 +StartCall=Grow +NextAction=Exist \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DefCore.txt new file mode 100644 index 00000000..2334c4dd --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=SHCK +Version=4,9,8,2 +Name=Shockwave +Category=C4D_StaticBack +MaxUserSelect=10 +Width=1 +Height=1 +Offset=-1,-1 +Components=SHCK=1 +Picture=0,0,1,1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DescDE.txt new file mode 100644 index 00000000..a1085edf --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Schockwelle, die alle elektrischen Geräte ausfallen lässt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DescUS.txt new file mode 100644 index 00000000..f736ba35 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/DescUS.txt @@ -0,0 +1 @@ +A shockwave which leads every machine to a blackout. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/EMP.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/EMP.c4d/Graphics.png new file mode 100644 index 00000000..056a2934 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/EMP.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/EMP.c4d/Particle.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/EMP.c4d/Particle.txt new file mode 100644 index 00000000..87a8a931 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/EMP.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=EMPShock +MaxCount=350 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +GravityAcc=0 +RByV=1 +AlphaFade=5 +Delay=0 +Additive=1 +Repeats=1 \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Graphics.png new file mode 100644 index 00000000..116d94a7 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Names.txt new file mode 100644 index 00000000..577ae60a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schockwelle +US:Shockwave \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Script.c new file mode 100644 index 00000000..d989c712 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/EMPGrenade.c4d/Shockwave.c4d/Script.c @@ -0,0 +1,49 @@ +/*-- Schockwelle --*/ + +#strict + +local iR, iMax; + +protected func Initialize() +{ + // Standards + iR = 20; + iMax = 100; + SetAction("Exist"); +} + +public func SetMaxSize(int iSize) +{ + iMax = iSize; +} + +protected func Grow() +{ + // Größer werden + iR += 10; + //Bei gewisser Größe löschen + if(iR >= iMax) + return(ScanAndRemove()); + + // Partikelsichtbarkeit + CreateParticle("EMPShock", 0,0,0,0, (iR + RandomX(-iR/3,iR/2)) * 5, RGB(255,255,255)); + + //Ein wenig was rumcasten + for(var i=0; i<2; ++i) { + var pLaser = CreateObject(LASR, 0, 0, -1); + pLaser->SetClrModulation(RGBa(28, 143, 241, 128)); + pLaser->Set(Random(360), 10, iR/2, 3); + } + +} + +protected func ScanAndRemove() { + // 4 great performance: erst zum Schluss alles absuchen + // Nach Maschinen suchen + for(var obj in FindObjects( Find_Distance(iR/2+10), Find_NoContainer(), Find_Func("IsMachine") )) + { + if(ObjectDistance(obj) < iR) + obj->~EMPShock(); + } + RemoveObject(); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Graphics.png new file mode 100644 index 00000000..de67ecba Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade1.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade1.png new file mode 100644 index 00000000..4e71fa20 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade1.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade2.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade2.png new file mode 100644 index 00000000..699141e1 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade2.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade3.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade3.png new file mode 100644 index 00000000..efd8de0f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade3.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade4.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade4.png new file mode 100644 index 00000000..3d089e38 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade4.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade5.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade5.png new file mode 100644 index 00000000..b1db4078 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade5.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade6.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade6.png new file mode 100644 index 00000000..535063d0 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade6.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade7.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade7.png new file mode 100644 index 00000000..de0ec382 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GraphicsUpgrade7.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DefCore.txt new file mode 100644 index 00000000..6ddfd2e9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=GREN +Version=4,9,8,2 +Name=Grenade +Category=C4D_Vehicle +MaxUserSelect=10 +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=3 +Picture=5,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DescDE.txt new file mode 100644 index 00000000..5b8aad8a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DescDE.txt @@ -0,0 +1 @@ +Absolute Sprengkraft. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DescUS.txt new file mode 100644 index 00000000..d864e197 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/DescUS.txt @@ -0,0 +1 @@ +Absolute detonation force. diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Graphics.png new file mode 100644 index 00000000..49b2bfe7 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/GrenadeHit1.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/GrenadeHit1.wav new file mode 100644 index 00000000..ed93e043 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/GrenadeHit1.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/GrenadeHit2.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/GrenadeHit2.wav new file mode 100644 index 00000000..14963485 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/GrenadeHit2.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Names.txt new file mode 100644 index 00000000..58ab63d6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Granate +US:Grenade \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Script.c new file mode 100644 index 00000000..0293cadb --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Grenade.c4d/Script.c @@ -0,0 +1,109 @@ +/*-- Granate --*/ + +#strict + +local iDamage; +local shooter; + +func Construction(object byObj) { + // nichts? :C + if(!byObj) + return(); + // Waffe? + shooter = GetShooter(byObj); +} + +func Launch(int xdir, int ydir, int iDmg) +{ + AddEffect("HitCheck", this(), 1, 1, 0, SHT1,shooter); + AddEffect("Grenade", this(), 1, 1, this()); + SetSpeed(xdir, ydir); + iDamage = iDmg; + if(!iDamage) + // Standardexplosion + iDamage = 30; +} + +// Aufprall +func Hit() +{ + Bounce(); +} + +func Bounce() +{ + var x, y; + // Rechts angestoßen + if(GetContact(this(), -1) & CNAT_Right ) + x=-(Abs(GetXDir()/4)+Random(3)); + // Links angestoßen + else if(GetContact(this(), -1) & CNAT_Left ) x=Abs(GetXDir()/4)+Random(3); + // Nichts davon: Alte YDir + else x=GetXDir()/2; + + // Oben angestoßen + if(GetContact(this(), -1) & CNAT_Top) y=Abs(GetYDir()/3); + // Unten angestoßen + // Warum verlieren Objekte auf glattem Boden ihre YDir..? + // Hacken wir halt ein bisschen.. Zufall drauf. + // Ich kann nicht mehr so recht lesen was da steht und ich denke das hat einen gewissen Vorteil. + else if(GetContact(this(), -1) & CNAT_Bottom) y=-(Max(Abs(GetYDir()/4), Abs(GetXDir())/4)+Random(3)); + // Nichts davon: Alte YDir + else y=GetYDir()/2; + // Rumdopsen.. Komplizierter als man meint + SetXDir(x); + SetYDir(y); + // Letztendlich hört man den Aufprall auch noch + Sound("GrenadeHit*"); +} + +local noExplode; + +func HitObject() +{ + RemoveEffect("Grenade", this(),0,1); +// CastObjects(BRNH,Random(3)+6,30); + BlastObjects(GetX(), GetY(), iDamage/4); + Explode(iDamage); +} + +func Destruct() +{ + HitObject(); +} + +func TimeIsUp() +{ + HitObject(); +} + +func ExplodeDelay() { return(110); } + +func IsBulletTarget() +{ + return(true); +} + +public func NoDecoDamage() { return(true); } + +func FxGrenadeTimer(object target, int effect, int time) +{ + if(time > ExplodeDelay()) return(TimeIsUp()); + var vel=Abs(GetXDir())+Abs(GetYDir()); + var alpha=Max(0,100-vel); + + CreateParticle("Smoke2", -GetXDir()/6, -GetYDir()/6, RandomX(-15, 15), -5, + vel/2+RandomX(20, 60), RGBa(100,100,100,50+alpha)); +} + +func FxGrenadeDamage() +{ + Destruct(); +} + +func IsBouncy() { return(true); } + +public func OnDmg(int iDmg, int iType) { + if(iType == DMG_Bio) return(100); + if(iType == DMG_Fire) return(100); +} \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GrenadeFire.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GrenadeFire.wav new file mode 100644 index 00000000..01562bc9 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GrenadeFire.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GrenadeLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GrenadeLoad.wav new file mode 100644 index 00000000..38efafde Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/GrenadeLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/ActMap.txt new file mode 100644 index 00000000..b8269b42 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Float +Procedure=FLOAT +FacetBase=1 +Delay=1 +Length=10 +PhaseCall=Detonating +EndCall=Detonated \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DefCore.txt new file mode 100644 index 00000000..cf2920f0 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=LGRN +Version=4,9,8,2 +Name=Laser grenade +Category=C4D_Vehicle +MaxUserSelect=10 +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=3 +Picture=5,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DescDE.txt new file mode 100644 index 00000000..32c65003 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DescDE.txt @@ -0,0 +1 @@ +Feuert Laserstrahlen in alle Richtungen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DescUS.txt new file mode 100644 index 00000000..8221c5cc --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/DescUS.txt @@ -0,0 +1 @@ +Fires lasers in all directions. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Graphics.png new file mode 100644 index 00000000..99640d77 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/LaserGrenade.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/LaserGrenade.wav new file mode 100644 index 00000000..668b2b91 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/LaserGrenade.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Names.txt new file mode 100644 index 00000000..a4fce2ee --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lasergranate +US:Laser grenade \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Script.c new file mode 100644 index 00000000..d636619e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/LaserGrenade.c4d/Script.c @@ -0,0 +1,59 @@ +/*-- Lasergranate --*/ + +#strict + +// Ist eine Granate +#include GREN + +local alreadyhit; // was wir schon getroffen haben +local angle; // momentaner Schusswinkel + +func HitObject() +{ + RemoveEffect("Grenade", this(),0,1); + RemoveEffect("HitCheck", this(),0,1); + + CastLasers(); +} + +func CastLasers() +{ + alreadyhit = CreateObject(L_OS,0,0,NO_OWNER); + angle = Random(360); + + Sound("LaserGrenade"); + SetSpeed(0,0); + SetAction("Float"); +} + +func Detonating() +{ + CreateObject(LASR, 0,0, GetOwner())->Set(angle, 8, 200, 20, this(), 0, 3); + angle += RandomX(20,50) + 180; +} + +func Detonated() +{ + RemoveObject(); +} + +func LaserStrike(object pObj) +{ + if(!pObj) + return(); + + // Objekt wurde schon mal getroffen -> weniger schaden + if(alreadyhit->AddItem(pObj)) + DoDmg(iDamage, DMG_Energy, pObj); + else + DoDmg(iDamage/10, DMG_Energy, pObj); + + return(1); +} + +func Destruction() +{ + if(alreadyhit) RemoveObject(alreadyhit); +} + +func ExplodeDelay() { return(45); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Names.txt new file mode 100644 index 00000000..31951222 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Granatenwerfer +US:Grenadelauncher \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DefCore.txt new file mode 100644 index 00000000..8d33e3f9 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=NGRN +Version=4,9,8,2 +Name=Napalm Grenade +Category=C4D_Vehicle +MaxUserSelect=10 +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=3 +Picture=5,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DescDE.txt new file mode 100644 index 00000000..ae593120 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DescDE.txt @@ -0,0 +1 @@ +Bei Aufprall verursacht diese Granate ein wahres Inferno. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DescUS.txt new file mode 100644 index 00000000..c2c98094 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/DescUS.txt @@ -0,0 +1 @@ +On impact this grenade causes a true inferno. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/DefCore.txt new file mode 100644 index 00000000..af924866 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=NGFR +Version=4,9,8,2 +Name=Napalm grenade fragment +Category=C4D_Object +Timer=1 +TimerCall=GrenadeSmoke +Width=3 +Height=3 +Offset=-1,-1 +Vertices=1 +VertexY=1 +VertexFriction=20 +Mass=2 +Components=CGFR=1 +Picture=0,0,3,3 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Graphics.png new file mode 100644 index 00000000..18fe6c0e Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Names.txt new file mode 100644 index 00000000..bff367c4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Cluster +US:Cluster \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Script.c new file mode 100644 index 00000000..1ad0d593 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Fragment.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- Splittergranaten-Fragment --*/ + +#strict +#include CGFR + + +func Construction(object byObj) +{ + var shooter; + // Waffe? + shooter = GetShooter(byObj); + + explode_size = 12; + AddEffect("HitCheck", this(), 1, 1, 0, SHT1,shooter); + ScheduleCall(0,"Hit",70+RandomX(-20,20)); +} + +func Hit() +{ + var flames = 8; + var a = 180; + + for(var i = 0; i < flames ; ++i) { + a += 360/flames + RandomX(-30,30); + var strength = RandomX(30,40); + var x = +Cos(a,strength); + var y = -Sin(a,strength); + var flame = CreateObject(FFLM,x/10,y/10); + flame->SetMaxLifetime(40); + flame->Launch(x,y,0,explode_size); + } + + Sound("Inflame"); + //Explode(explode_size,0,0,0,1); + RemoveObject(); + //return(1); +} \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Graphics.png new file mode 100644 index 00000000..37c29a0e Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Names.txt new file mode 100644 index 00000000..d3e431ed --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Napalmgranate +US:Napalm grenade \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Script.c new file mode 100644 index 00000000..f2400409 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/NapalmGrenade.c4d/Script.c @@ -0,0 +1,23 @@ +/*-- Napalmgranate --*/ + +#strict + +// Ist eine Granate +#include GREN + +func HitObject(object pTarget) +{ + + for(var i=RandomX(5,6); i>0; --i) + { + var obj=CreateObject(NGFR, 0, 0, GetController()); + var xdir = GetXDir()+RandomX(-10,10); + var ydir = GetYDir()+RandomX(-10,10); + + SetSpeed(xdir, ydir, obj); + } + + return(_inherited()); +} + +func ExplodeDelay() { return(40); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Script.c new file mode 100644 index 00000000..689887cb --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/Script.c @@ -0,0 +1,270 @@ +/*-- Granatenwerfer --*/ + +#strict + +#include WEPN // Das Objekt ist eine Waffe + +// Anzeige in der Hand +public func HandSize() { return(1050); } +public func HandX() { return(5000); } +public func HandY() { return(1000); } + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Grenade$"); + if(data == FM_Icon) return(GREN); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(6); + + if(data == FM_Reload) return(160); + if(data == FM_Recharge) return(90); + + if(data == FM_Damage) return(30); + if(data == FM_Condition) return(!GetUpgrade(KRFL)); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$FragGrenade$"); + if(data == FM_Icon) return(CGRN); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(8); + if(data == FM_AmmoUsage)return(2); + if(data == FM_Reload) return(170); + if(data == FM_Recharge) return(90); + + if(data == FM_Condition) return(GetUpgrade(KRFL)); + + if(data == FM_Damage) return(14); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func FMData3(int data) +{ + if(data == FM_Name) return("$Napalm$"); + if(data == FM_Icon) return(NGRN); + if(data == FM_AmmoID) return(GSAM); + if(data == FM_AmmoLoad) return(60); + if(data == FM_AmmoUsage)return(20); + if(data == FM_Reload) return(180); + if(data == FM_Recharge) return(60); + + if(data == FM_Condition) return(GetUpgrade(KRFL)); + + if(data == FM_Damage) return(30); + + return(Default(data)); +} + +public func BotData3(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Fire); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_2); + + return(Default(data)); +} + +public func FMData4(int data) +{ + if(data == FM_Name) return("$Slime$"); + if(data == FM_Icon) return(SGRN); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(2); + + if(data == FM_Reload) return(180); + if(data == FM_Recharge) return(90); + + if(data == FM_Damage) return(8); + + if(data == FM_Condition) return(GetUpgrade(KSLM)); + return(Default(data)); +} + +public func BotData4(int data) +{ + if(data == BOT_Range) return(200); + if(data == BOT_DmgType) return(DMG_Bio); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func FMData5(int data) +{ + if(data == FM_Name) return("$EMP$"); + if(data == FM_Icon) return(EGRN); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(30); + if(data == FM_AmmoUsage)return(30); + if(data == FM_Reload) return(60); + + if(data == FM_Condition) return(GetUpgrade(KLAS)); + + if(data == FM_Damage) return(400); + + return(Default(data)); +} + +public func BotData5(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(0); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_1); + if(data == BOT_EMP) return(true); + + return(Default(data)); +} + +public func FMData6(int data) +{ + if(data == FM_Name) return("$Laser$"); + if(data == FM_Icon) return(LGRN); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(45); + if(data == FM_AmmoUsage)return(15); + if(data == FM_Reload) return(180); + if(data == FM_Recharge) return(100); + + if(data == FM_Condition) return(GetUpgrade(KLAS)); + + if(data == FM_Damage) return(50); + + return(Default(data)); +} + +public func BotData6(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Energy); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_2); + + return(Default(data)); +} + +public func Fire1() { LaunchGrenade(GREN, 90,Contained()->~AimAngle( 5)+RandomX( -5, 5),1); } +public func Fire2() { LaunchGrenade(CGRN, 70,Contained()->~AimAngle(10)+RandomX(-10,15),2); } +public func Fire3() { LaunchGrenade(NGRN, 80,Contained()->~AimAngle( 5)+RandomX( -5, 5),3); } +public func Fire4() { LaunchGrenade(SGRN,100,Contained()->~AimAngle( 5)+RandomX( -5, 5),4); } +public func Fire5() { LaunchGrenade(EGRN, 80,Contained()->~AimAngle( 5)+RandomX( -5, 5),5); } +public func Fire6() { LaunchGrenade(LGRN, 80,Contained()->~AimAngle( 5)+RandomX( -5, 5),6); } + +// verschießt eine Granate +// idg: ID der Granate +// speed: Geschwindigkeit +// angle: Winkel +public func LaunchGrenade(id idg, int speed, int angle, int mode) { + var user = Contained(); + var dir = GetDir(user)*2-1; + + // Adjust angle + // special on jetpack... + if(user->GetAction() ne "JetpackFlight") + angle = BoundBy(angle+GetYDir(user)*dir,-360,360); + // calculate speed + var xdir = Sin(angle,speed); + var ydir = -Cos(angle,speed); + + var x,y; + user->WeaponEnd(x,y); + + // create and launch + var grenade=CreateObject(idg, x+xdir/10, y+ydir/10, GetController(user)); + grenade->Launch(xdir+GetXDir(user)/2, ydir+GetYDir(user)/2, GetFMData(FM_Damage, mode)); + + // effect + Sound("GrenadeFire"); + + CreateParticle("Thrust",x,y,GetXDir(user),GetYDir(user),80,RGBa(255,200,200,0),0,0); + + for(var i=0; i<20; ++i) { + CreateParticle("Smoke2",x+RandomX(-5,+5),y+RandomX(-5,+5), + GetXDir(user)+RandomX(0,xdir/4),GetYDir(user)+RandomX(0,ydir/4), + RandomX(80,140),RGBa(200,200,200,0),0,0); + } +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + if(GetUpgrade(uid)) + return(false); + + if(uid == KSLM) return("$KSLMUpgradeDesc$"); + if(uid == KLAS) return("$KLASUpgradeDesc$"); + if(uid == KRFL) return("$KRFLUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + var own = GetOwner(Contained()); + if(uid == KSLM) { + // Feuermodus wechseln + SetFireMode(4); + if(Contained()) HelpMessage(own,"$KSLMUpgraded$",Contained()); + return(true); + } + if(uid == KLAS) { + // Feuermodus wechseln + SetFireMode(6); + if(Contained()) HelpMessage(own,"$KLASUpgraded$",Contained()); + return(true); + } + if(uid == KRFL) { + // Feuermodus wechseln + SetFireMode(2); + if(Contained()) HelpMessage(own,"$KRFLUpgraded$",Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KLAS) { + SetFireMode(1); + return(true); + } + if(uid == KSLM) { + SetFireMode(1); + return(true); + } + if(uid == KRFL) { + SetFireMode(1); + return(true); + } +} + + +// Soundeffekte + +public func OnReload() +{ + Sound("GrenadeLoad"); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DefCore.txt new file mode 100644 index 00000000..b72ed112 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=SGRN +Version=4,9,8,2 +Name=Slime Grenade +Category=C4D_Vehicle +MaxUserSelect=10 +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=3 +Picture=5,0,64,64 +BlitMode=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DescDE.txt new file mode 100644 index 00000000..70d3459c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DescDE.txt @@ -0,0 +1 @@ +Entfesselt beim Aufprall ein schleimiges Vergnügen. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DescUS.txt new file mode 100644 index 00000000..3daaf53b --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/DescUS.txt @@ -0,0 +1 @@ +Unleashes a slimy amusement on impact. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Graphics.png new file mode 100644 index 00000000..0daf262a Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Names.txt new file mode 100644 index 00000000..bb06f764 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleimgranate +US:Slime grenade \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Poff.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Poff.wav new file mode 100644 index 00000000..710c0a5d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Poff.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Script.c new file mode 100644 index 00000000..d14d4972 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/SlimeGrenade.c4d/Script.c @@ -0,0 +1,29 @@ +/*-- Schleimgranate --*/ + +#strict + +// Ist eine "Granate" +#include GREN + +func Initialize() { + _inherited(); + AddAlienFlareEffect(this(),300); +} + +func Hit() { inherited(); HitObject(); } + +func HitObject() +{ + for(var i = 7+Random(5), glob ; i ; i--) + { + glob = CreateObject(SLST, 0, 0, GetOwner()); + glob ->~ Launch(RandomX(-40,40), RandomX(-40,40), iDamage); + } + CastParticles("SlimeGrav", 10, 25, 0, 0, 20, 40, RGBa(0, 240, 0, 10), RGBa(20, 255, 20, 75)); + CastParticles("FrSprk", 30, 5, 0, 0, 70, 130, RGBa(0, 240, 0, 10), RGBa(20, 255, 20, 75)); + Sound("SlimeHit"); + Sound("Poff"); + RemoveObject(); +} + +func ExplodeDelay() { return(180); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/StringTblDE.txt new file mode 100644 index 00000000..2c5ec142 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/StringTblDE.txt @@ -0,0 +1,15 @@ +Grenade=Granate +FragGrenade=Splittergranate +Napalm=Napalmgranate +EMP=EMP Granate +Napalm=Napalmgranate +Slime=Bioschleimgranate +Laser=Lasergranate + +KSLMUpgradeDesc=Erweitert den Granatwerfer um Bioschleimgranaten +KLASUpgradeDesc=Erweitert den Granatwerfer um EMP- und Lasergranaten +KRFLUpgradeDesc=Erweitert den Granatwerfer um Splitter- und Napalmgranaten + +KSLMUpgraded=Granatwerfer kann jetzt|Bioschleimgranaten verschießen. +KLASUpgraded=Granatwerfer kann jetzt|EMP- und Lasergranaten verschießen. +KRFLUpgraded=Granatwerfer verschießt nun|Splitter- und Napalmgranaten. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/StringTblUS.txt new file mode 100644 index 00000000..c0dd7c06 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/GrenadeLauncher.c4d/StringTblUS.txt @@ -0,0 +1,15 @@ +Grenade=Grenade +FragGrenade=Frag grenade +Napalm=Napalm grenade +EMP=EMP grenade +Napalm=Napalm grenade +Slime=Bioslime grenade +Laser=Laser grenade + +KSLMUpgradeDesc=Add bioslime grenades +KLASUpgradeDesc=Add EMP and laser grenades +KRFLUpgradeDesc=Add fragment and napalm grenades + +KSLMUpgraded=Grenade launcher can now shoot bioslime grenades. +KLASUpgraded=Grenade launcher can now shoot EMP an laser grenades. +KRFLUpgraded=Grenade launcher can now shoot fragment and napalm grenades. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DefCore.txt new file mode 100644 index 00000000..3722c601 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=MIWP +Version=4,9,8,2 +Name=Minigun +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=22 +Height=7 +Offset=-11,-4 +Vertices=2 +VertexX=-10,10 +VertexY=3,3 +VertexFriction=100,100 +Value=38 +Mass=20 +Components=METL=2;ENAP=1;KRFL=1 +Picture=0,7,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DescDE.txt new file mode 100644 index 00000000..1252f1ae --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DescDE.txt @@ -0,0 +1 @@ +Hart an der Grenze zu einer Maschinenkanone, stellt die Minigun das non plus ultra der Maschinengewehre dar. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DescUS.txt new file mode 100644 index 00000000..f73a6ce7 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/DescUS.txt @@ -0,0 +1 @@ +The minigun is the ne plus ultra of the machine gun caliber. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Graphics.png new file mode 100644 index 00000000..336cdddd Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/GraphicsUpgrade4.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/GraphicsUpgrade4.png new file mode 100644 index 00000000..98c0f482 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/GraphicsUpgrade4.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniGun.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniGun.wav new file mode 100644 index 00000000..3f1a990c Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniGun.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniLoad.wav new file mode 100644 index 00000000..0ede9169 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniTurn.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniTurn.wav new file mode 100644 index 00000000..1ce856f0 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/MiniTurn.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Names.txt new file mode 100644 index 00000000..512cd53e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Minigun +US:Minigun \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Script.c new file mode 100644 index 00000000..09d26ad8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/Script.c @@ -0,0 +1,157 @@ +/*-- Minigun --*/ + +#strict + +#include WEPN + +// Anzeige in der Hand +public func HandSize() { return(900); } +public func HandX() { return(11000); } +public func HandY() { return(-3000); } +public func BarrelYOffset(){return(-1000); } + +// Daten für ersten Feuermodus +public func FMData1(int data) +{ + if(data == FM_Name) return("Standard"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(50); + + if(data == FM_Reload) return(260); + if(data == FM_Recharge) return(3); + + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(2); + if(data == FM_Auto) return(true); + if(data == FM_Aim) return(-1); + + if(data == FM_Condition) return(!GetUpgrade(KSLM)); + + if(data == FM_Damage) return(4); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(500); + if(data == BOT_Power) return(BOT_Power_LongLoad); + + return(Default(data)); +} + +// Daten für ersten Feuermodus +public func FMData2(int data) +{ + if(data == FM_Name) return("$Bouncing$"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(50); + + if(data == FM_Reload) return(220); + if(data == FM_Recharge) return(3); + + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(2); + if(data == FM_Auto) return(true); + if(data == FM_Aim) return(-1); + + if(data == FM_Condition) return(GetUpgrade(KSLM)); + + if(data == FM_Damage) return(4); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(500); + if(data == BOT_Power) return(BOT_Power_LongLoad); + + return(Default(data)); +} + +// Feuern im ersten Feuermodus +public func Fire1() // ungenaues aber heftiges Minigunfeuer +{ + var user = Contained(); + // Winkel: maximal 5° anvisieren, Streuung von 8° + var angle = user->AimAngle(5)+RandomX(-4,+4)-2*(GetDir(user)*2-1); + // Schuss an der Mündung der Waffe erstellen... + var x,y; + user->WeaponEnd(x,y); + var ammo = CreateObject(SHT1,x,y,GetController(user)); + ammo->Launch(angle,300,600,4,100,GetFMData(FM_Damage, 1)); + // Effekte + MuzzleFlash(RandomX(20,50),user,x,y,angle); + + user->~WeaponBegin(x,y); + var dir = GetDir(user)*2-1; + BulletCasing(x,y,-dir*Cos(angle-35*dir,40+Random(20)),-dir*Sin(angle-35*dir,40+Random(20)),5); +} + +// Feuern im zweiten Feuermodus +public func Fire2() // ungenaues aber heftiges Minigunfeuer mit Abpralleffekt +{ + var user = Contained(); + // Winkel: maximal 5° anvisieren, Streuung von 8° + var angle = user->AimAngle(5)+RandomX(-4,+4); + // Schuss an der Mündung der Waffe erstellen... + var x,y; + user->WeaponEnd(x,y); + var ammo = CreateObject(SHT1,x,y,GetController(user)); + ammo->Launch(angle,300,600,3,100,GetFMData(FM_Damage, 2), 0,0,0, 3); +//public func Launch(int iAngle, int iSpeed, int iDist, int iSize, int iTrail, int iDmg, int iDmgPrec, int iGlowSize, int iAPrec, int iReflections) + // Effekte + MuzzleFlash(RandomX(20,50),user,x,y,angle); + + user->~WeaponBegin(x,y); + var dir = GetDir(user)*2-1; + BulletCasing(x,y,-dir*Cos(angle-35*dir,40+Random(20)),-dir*Sin(angle-35*dir,40+Random(20)),5); +} + +// Soundeffekte + +public func OnReload() +{ + Sound("MiniLoad"); +} + +public func OnAutoStart() +{ + Sound("MiniGun",0,0,0,0,1); + Sound("MiniTurn",0,0,0,0,1); +} + +public func OnAutoStop() +{ + Sound("MiniGun",0,0,0,0,-1); + Sound("MiniTurn",0,0,0,0,-1); +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + //wir haben das Upgrade schon, bah. + if(GetUpgrade(uid)) + return(false); + + if(uid == KSLM) return("$KSLMUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + var own = GetOwner(Contained()); + if(uid == KSLM) { + SetFireMode(2); + if(Contained()) HelpMessage(own, "$KSLMUpgraded$", Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KSLM) { + SetFireMode(1); + return(true); + } +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/StringTblDE.txt new file mode 100644 index 00000000..fab9c0e4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +Bouncing=Abprallend + +KSLMUpgradeDesc=Ersetzt den Schussmechanismus durch abprallende Schüsse. + +KSLMUpgraded=Schussmodus durch|abprallende Schüsse ersetzt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/StringTblUS.txt new file mode 100644 index 00000000..ad3693e8 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Minigun.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +Bouncing=Bouncing shots + +KSLMUpgradeDesc=Replaces the fire mechanism with bouncing shots. + +KSLMUpgraded=Replaced the fire mechanism with bouncing shots. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DefCore.txt new file mode 100644 index 00000000..1859e593 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=GGWP +Version=4,9,8,2 +Name=ParticleCannon +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=18 +Height=8 +Offset=-9,-4 +Vertices=2 +VertexX=-8,8 +VertexY=0,4 +VertexFriction=20,20 +Value=42 +Mass=15 +Components=METL=2;ENAP=2 +Picture=18,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DescDE.txt new file mode 100644 index 00000000..c01308ed --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DescDE.txt @@ -0,0 +1,2 @@ +Die Partikelkanone feuert kleinste Partikel mit annähernd Lichtgeschwindigkeit ab. +Alternativ kann sie auch eine Ladungskugel abfeuern, die nahe gelegene elektrische Objekte lahmlegt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DescUS.txt new file mode 100644 index 00000000..49c960d2 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/DescUS.txt @@ -0,0 +1 @@ +The particle cannon accelerates tiny particles to a velocity nearly to the speed of light. Alternatively, it can shoot a powerful electric wave. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPLoad.wav new file mode 100644 index 00000000..a907cd2d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/DefCore.txt new file mode 100644 index 00000000..0f2e0508 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=SHKR +Version=4,9,8,2 +Name=Shocker +Category=C4D_Vehicle +Width=1 +Height=1 +Offset=-1,-1 +Vertices=1 +VertexFriction=1 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/EMPShock.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/EMPShock.wav new file mode 100644 index 00000000..5ee63333 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/EMPShock.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Graphics.png new file mode 100644 index 00000000..4d2b9222 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Names.txt new file mode 100644 index 00000000..5f816fff --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schocker +US:Shocker \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Script.c new file mode 100644 index 00000000..31aa32ad --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/Script.c @@ -0,0 +1,135 @@ +/* EMP */ + +#strict +#include SHT1 + +local Speed, Power, Ang; + +public func Launch(int iAngle, int iSpeed, int iDist, int iSize, int iTrail, int iDmg) +{ + _inherited(iAngle, iSpeed, iDist, iSize, iTrail, iDmg); + + Speed = iSpeed*100; + Power = iDist/5; + Ang = iAngle; + Sound("ShockerLoop",0,0,0,0,1); + + return(1); +} + +private func CreateTrail(int iSize, int iTrail) { + // no trail +} + +/* Fliegen */ + +private func Traveling() { + if(GetActTime() <1) + return(0); + + var laser = CreateObject(LASR, 0,0, GetOwner()); + laser->Set(Random(360), 5, BoundBy(Power + RandomX(-10,10), 5, 55), 5, laser, this()); + SetClrModulation(Color(GetActTime()), laser); + + CreateParticle("EMPShock", 0,0, GetXDir(), GetYDir(), Power * RandomX(200,500) / 70, SetRGBaValue(Color(GetActTime())), this()); + + //LaserLight(Power,RGB(255,255,255),RandomX(-Power/2,Power/2), RandomX(-Power/2,Power/2)); + + Power--; + if(!Power) return(Remove()); + + // Geschwindigkeit + SetSpeed(+Sin(Ang,Speed/100),-Cos(Ang,Speed/100)); + + return(_inherited()); +} + +/* Treffer */ + +private func HitObject(object pObject) { + var angle = Angle(GetX(),GetY(),GetX(pObject),GetY(pObject)); + var dist = Distance(GetX(),GetY(),GetX(pObject),GetY(pObject)); + + //Objekte schocken (Objekt auf schockbarkeit prüfen) + if(pObject->~IsMachine()) + if(pObject->~EMPShock()) + { + var laser = CreateObject(LASR, 0,0, GetOwner()); + laser->Set(angle, 10, dist, 20, pObject, pObject); + SetClrModulation(Color(GetActTime()), laser); + Sound("EMPShock"); + } + + if(GBackSolid()) + Remove(); +} + +private func Hit() { + Sparks(20,Color(GetActTime())); + for(var i = 0 ; i < 7 ; i++) + { + var laser = CreateObject(LASR, 0,0, GetOwner()); + laser->Set(Random(360), 5, RandomX(10,30), 5, laser, laser); + SetClrModulation(Color(GetActTime()), laser); + } + + Remove(); +} + +/* Effekt für Trefferüberprüfung aus SHT1 kopieren und für Schockwelle ändern weil alle Gegenstände*/ +public func FxHitCheckTimer(object target, int effect, int time) +{ + var obj; + // Oh man. :O + var oldx = EffectVar(0, target, effect); + var oldy = EffectVar(1, target, effect); + var newx = GetX(target); + var newy = GetY(target); + var dist = Distance(oldx, oldy, newx, newy); + EffectVar(0, target, effect) = GetX(target); + EffectVar(1, target, effect) = GetY(target); + + if(dist < 10) // Normal checken + { + while(obj=FindObject(0, newx-50, newy-50, 100, 100, 0, 0, 0, NoContainer(), obj)) + if(obj ->~IsMachine()) + if(PathFree(newx, newy, GetX(obj), GetY(obj))) + { + target-> ~HitObject(obj); + } + return(); + } + + var steps = Abs(Distance(oldx, oldy, newx, newy))/5; // Anzahl der Schritte, wenn wir 5 Pixel wollen + + var curx, cury; + // Schleife + for(var i = 1; i <= steps; ++i) + { + curx=oldx+(newx-oldx)*i/steps; + cury=oldy+(newy-oldy)*i/steps; + while(obj=FindObject(0, curx-50, cury-50, 100, 100, 0, 0, 0, NoContainer(), obj)) + if(obj->~IsMachine()) + if(PathFree(curx, cury, GetX(obj), GetY(obj))) + { + SetPosition(curx, cury, target); + target-> ~HitObject(obj); + } + } + EffectVar(0, target, effect) = GetX(target); + EffectVar(1, target, effect) = GetY(target); +} + +private func GlowColor() { + return(RGB(50,130,255)); +} + +private func Color(int iATime) { + var iPrg = 20*iATime/iTime; + return(RGBa(255-iPrg,255-iPrg,255,100+iPrg*3)); +} + +public func TrailColor(int iATime) { + var iPrg = 40*iATime/iTime; + return(RGBa(155+iPrg,155+iPrg,255,140+iPrg*2)); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/ShockerLoop.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/ShockerLoop.wav new file mode 100644 index 00000000..34ad5abc Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShocker.c4d/ShockerLoop.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShot.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShot.wav new file mode 100644 index 00000000..7dcd1dbd Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/EMPShot.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Graphics.png new file mode 100644 index 00000000..67e2961d Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/MoteGunLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/MoteGunLoad.wav new file mode 100644 index 00000000..c7c9f8a9 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/MoteGunLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Names.txt new file mode 100644 index 00000000..714896f6 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Partikelkanone +US:Particle cannon \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/RailGunShot.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/RailGunShot.wav new file mode 100644 index 00000000..34b82e17 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/RailGunShot.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Script.c new file mode 100644 index 00000000..3f1a3525 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/Script.c @@ -0,0 +1,126 @@ +/*-- Partikelkanone --*/ + +#strict + +#include WEPN + +local laser; //der Laserstrahl + +// Anzeige in der Hand +public func HandX() { return(5000); } +public func HandY() { return(500); } + +//RAILGUN!!!!! +func FMData1(int data) { + if(data == FM_Name) return("$Railgun$"); + + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(30); + if(data == FM_AmmoUsage) return(30); + + if(data == FM_Reload) return(130); + if(data == FM_Recharge) return(130); + + if(data == FM_Damage) return(240); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(600); + if(data == BOT_DmgType) return(DMG_Energy); + if(data == BOT_Power) return(BOT_Power_LongLoad); + + return(Default(data)); +} + +//Toller EMPschuss +func FMData2(int data) { + if(data == FM_Name) return("$Shockwave$"); + + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(20); + if(data == FM_AmmoUsage) return(20); + + if(data == FM_Reload) return(75); + + if(data == FM_Damage) return(450); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(400); + if(data == BOT_DmgType) return(0); + if(data == BOT_Power) return(BOT_Power_1); + if(data == BOT_EMP) return(true); + + return(Default(data)); +} + +//Railgun ist nur Lasergehaxxe. +public func Fire1() { + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->AimAngle(5); + laser = CreateObject(LASR,x,y,GetController(user)); + + laser->SetClrModulation(RGBa(255,255,255,64)); + laser->SetContinuous(1); + laser->Set(angle,8,700,30,this(),user); + + // Laser an einer ungültigen Position? + if(!laser) + return FM_Error; + + MuzzleFlash(300,user,x,y,angle,RGBa(64,64,255,0)); + Sound("RailGunShot"); +} + +//EMP! +public func Fire2() { + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->AimAngle(15); + var dir = GetDir(user)*2-1; + var ammo = CreateObject(SHKR,x,y,GetController(user)); + ammo->Launch(angle,50, GetFMData(FM_Damage, 2), 100, 60, 0); + + MuzzleFlash(50,user,x,y,angle,RGBa(40,40,255,0)); + Sound("EMPShot"); +} + +public func LaserStrike(object pObj, int iTime) { + //Schaden machen, natürlich tollen Energiebrazzelschaden! + DoDmg(Max(0,GetFMData(FM_Damage, 1)*10/30-iTime*4), DMG_Energy, pObj, 1); + + return(0); +} + +public func LaserHitLandscape(int x, int y) { + var a = laser->GetAngle(); + var x2 = Sin(a,2); + var y2 = -Cos(a,2); + laser->DigFree(laser->GetX()+x-x2,laser->GetY()+y-y2,5); + laser->CreateParticle("PSpark",x,y,0,0,200,RGBa(200,200,255,160)); +} + +public func IsFiring() { return(laser); } + +// Soundeffekte + +public func OnReload() +{ + if(firemode == 1) + Sound("MoteGunLoad"); + if(firemode == 2) + Sound("EMPLoad"); +} + +public func OnDeselect() { + if(laser) { + RemoveObject(laser); + } +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/StringTblDE.txt new file mode 100644 index 00000000..6a43c29c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +Railgun=Strahl +Shockwave=Schockwelle \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/StringTblUS.txt new file mode 100644 index 00000000..64eb043f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/MoteGun.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +Railgun=Beam +Shockwave=Shockwave \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Names.txt new file mode 100644 index 00000000..a576f94a --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffen +US:Weapons diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DefCore.txt new file mode 100644 index 00000000..911e6b11 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=PIWP +Version=4,9,8,2 +Name=Pistol +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=2 +Width=12 +Height=7 +Offset=-6,-4 +Vertices=1 +VertexY=2 +VertexFriction=100 +Value=10 +Mass=10 +Components=METL=1 +Picture=0,9,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DescDE.txt new file mode 100644 index 00000000..659d8013 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Sturmpistole gehört zur Standardausrüstung eines Hazardclonks. Für die nötige Durchschlagskraft sorgt der eingebaute kleine Granatenwerfer. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DescUS.txt new file mode 100644 index 00000000..6e8fcbde --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/DescUS.txt @@ -0,0 +1 @@ +The assault pistol is a part of the standard equipment of a Hazardclonk. Awesome firepower is granted through the small built-in grenade launcher. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Graphics.png new file mode 100644 index 00000000..a871df37 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade1.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade1.png new file mode 100644 index 00000000..13636a69 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade1.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade4.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade4.png new file mode 100644 index 00000000..79f982f7 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade4.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade5.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade5.png new file mode 100644 index 00000000..8a441184 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/GraphicsUpgrade5.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/LaserShot.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/LaserShot.wav new file mode 100644 index 00000000..5bcaf67f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/LaserShot.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Names.txt new file mode 100644 index 00000000..b3999a3c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sturmpistole +US:Assault pistol \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Pistol.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Pistol.wav new file mode 100644 index 00000000..abae7e8f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Pistol.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/PistolLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/PistolLoad.wav new file mode 100644 index 00000000..648cb09f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/PistolLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Script.c new file mode 100644 index 00000000..a8edf411 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Script.c @@ -0,0 +1,233 @@ +/*-- Pistole --*/ + +#strict + +#include WEPN + +// Anzeige in der Hand +public func HandSize() { return(800); } +public func HandX() { return(5500); } +public func HandY() { return(-1000); } +public func BarrelYOffset() { return(-2700); } + +public func OnReload(int i) +{ + if(i == 1) Sound("PistolLoad"); + if(i == 2) Sound("PistolLoad"); + if(i == 3) Sound("GrenadeLoad"); + if(i == 4) Sound("SlimeLoad"); +} + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Standard$"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(12); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(20); + if(data == FM_Condition) return(!GetUpgrade(KLAS)); + + if(data == FM_Damage) return(10); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(400); + if(data == BOT_Power) return(BOT_Power_1); + + return(Default(data)); +} + +//Laser +public func FMData2(int data) +{ + if(data == FM_Name) return("$Laser$"); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(10); + + if(data == FM_Reload) return(100); + if(data == FM_Recharge) return(16); + + if(data == FM_Condition) return(GetUpgrade(KLAS)); + + if(data == FM_Damage) return(18); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(300); + if(data == BOT_DmgType) return(DMG_Energy); + if(data == BOT_Power) return(BOT_Power_2); + + return(Default(data)); +} + +//Granate +public func FMData3(int data) +{ + if(data == FM_Name) return("$GrenadeLauncher$"); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(80); + + if(data == FM_Condition) return(!GetUpgrade(KSLM)); + + if(data == FM_Damage) return(30); + + return(Default(data)); +} + +public func BotData3(int data) +{ + if(data == BOT_Range) return(50); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_1); + + return(Default(data)); +} + +public func FMData4(int data) +{ + if(data == FM_Name) return("$Slime$"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(10); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(20); + + if(data == FM_Condition) return(GetUpgrade(KSLM)); + + if(data == FM_Damage) return(28); + + return(Default(data)); +} + +public func BotData4(int data) +{ + if(data == BOT_Range) return(50); + if(data == BOT_DmgType) return(DMG_Bio); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_1); + + return(Default(data)); +} + +public func Fire1() // Projektilschuss +{ + var user = GetUser(); + var angle = user->AimAngle(20) + RandomX(-1,+1); + var x,y; user->WeaponEnd(x,y); + var ammo = CreateObject(SHT1,x,y,GetController(user)); + ammo->Launch(angle,250,450,3,300,GetFMData(FM_Damage, 1)); + + // Effekte + MuzzleFlash(40,user,x,y,angle); + var dir = GetDir(user)*2-1; + BulletCasing(dir*6,3,-dir*5,-20,5); + + // Sound + Sound("Pistol",0,ammo); +} + +public func Fire2() // Laserschuss +{ + var user = GetUser(); + var angle = user->AimAngle(5); + var x,y; user->WeaponEnd(x,y); + var dir = GetDir(user)*2-1; + var laser = CreateObject(LASR,x,y,GetController(user)); + laser->Set(angle,8,300,15,this()); + // Effekte + MuzzleFlash(40,user,x,y,angle,RGB(255,32,0)); + + // Sound + Sound("LaserShot",0,laser); +} + +public func Fire3() // Granatenwerfer +{ + var user = GetUser(); + var dir = GetDir(user)*2-1; + var angle = user->AimAngle(5) + RandomX(-5,5); + var x,y; user->WeaponEnd(x,y); + + var xdir = Sin(angle,50); + var ydir = -Cos(angle,50); + + // Create & launch + var grenade=CreateObject(GREN, x+xdir/10,y+ydir/10, GetController(user)); + grenade->Launch(xdir+GetXDir(user)/2,ydir+GetYDir(user)/2, GetFMData(FM_Damage, 3)); + + Sound("GrenadeFire"); +} + +public func Fire4() // Schleimschuss +{ + var user = GetUser(); + var dir = GetDir(user)*2-1; + var angle = user->AimAngle(5) + RandomX(-5,5); + var x,y; user->WeaponEnd(x,y); + + var xdir = Sin(angle,50); + var ydir = -Cos(angle,50); + + // Create & launch + var slime=CreateObject(SLST, x+xdir/10,y+ydir/10, GetController(user)); + slime->Launch(xdir+GetXDir(user)/2,ydir+GetYDir(user)/2,GetFMData(FM_Damage, 4)); + + // Sound + Sound("SlimeShot*"); +} + +/* Treffer-Callbacks */ + +public func LaserStrike(object pTarget) { // Laser trifft + if(pTarget) + DoDmg(GetFMData(FM_Damage, 2), DMG_Energy, pTarget); + return(1); +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + //wir haben das Upgrade schon, bah. + if(GetUpgrade(uid)) + return(false); + + if(uid == KLAS) return("$KLASUpgradeDesc$"); + if(uid == KSLM) return("$KSLMUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + var own = GetOwner(Contained()); + if(uid == KLAS) { + SetFireMode(2); + if(Contained()) HelpMessage(own, "$KLASUpgraded$", Contained()); + return(true); + } + if(uid == KSLM) { + SetFireMode(4); + if(Contained()) HelpMessage(own, "$KSLMUpgraded$", Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KLAS) { + SetFireMode(1); + return(true); + } + if(uid == KSLM) { + SetFireMode(3); + return(true); + } +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeLoad.wav new file mode 100644 index 00000000..e9dd88db Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot1.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot1.wav new file mode 100644 index 00000000..25fa5b80 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot1.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot2.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot2.wav new file mode 100644 index 00000000..168d4b9b Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot2.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot3.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot3.wav new file mode 100644 index 00000000..44ed4834 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/SlimeShot3.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/ActMap.txt new file mode 100644 index 00000000..4496f8b1 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Travel +Procedure=NONE +NextAction=Hold +FacetBase=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/DefCore.txt new file mode 100644 index 00000000..d0b35fa4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=SLST +Version=4,9,8,2 +Name=SlimeShot +Category=C4D_Vehicle +Width=5 +Height=5 +Offset=-2,-2 +Vertices=1 +VertexX=-1 +VertexY=-1 +VertexFriction=100 +Picture=0,5,64,64 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 +BlitMode=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/ActMap.txt new file mode 100644 index 00000000..2d24b46f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=Globbing +Procedure=FLOAT +FacetBase=1 +Delay=4 +NextAction=Globbing +EndCall=Check + +[Action] +Name=AGlobbing +Procedure=ATTACH +FacetBase=1 +Delay=4 +NextAction=AGlobbing \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/DefCore.txt new file mode 100644 index 00000000..94e7b66d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=GLOB +Version=4,9,8,2 +Name=Glob +Category=C4D_Vehicle +Width=5 +Height=5 +Offset=-2,-2 +Vertices=1 +VertexX=1 +VertexY=1 +VertexFriction=100 +Picture=0,5,64,64 +ContactIncinerate=1 +BlastIncinerate=1 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Graphics.png new file mode 100644 index 00000000..d58715c8 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Names.txt new file mode 100644 index 00000000..8cf0a1d4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleimklumpen +US:Slime glob \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Script.c new file mode 100644 index 00000000..d3e15b43 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Glob.c4d/Script.c @@ -0,0 +1,131 @@ +/*-- Schleimklumpen --*/ + +#strict + +local target, // Klebezielobjekt + damage; // Evtl. Schaden + +func Initialize() { + SetR(Random(360)); + AddAlienFlareEffect(this(),100); +} + +/* Kleben am Clonk */ + +public func AttachTo(pClonk) // An einem Clonk heften +{ + //SetVertexXY(0, GetX()-GetX(pClonk)+GetVertex(0, 0, pClonk), GetY()-GetY(pClonk)+GetVertex(0, 1, pClonk)); + SetAction("AGlobbing", pClonk); + + if(!DecreasePhysical(pClonk)) return(RemoveObject()); +} + +private func DecreasePhysical(object pClonk) +{ + // Maximal 30% des Gesamtwertes von Walk ~!/$&)=%/ + if(GetPhysical("Walk", 2, pClonk) <= GetPhysical("Walk", 1, 0, GetID(pClonk))*7/10) + return(0); + // Effekt starten + AddEffect("Slimed", pClonk, 50, 800, 0, GetID()); + return(1); +} + +/* Kleben am Boden */ + +public func Glob2Ground(iDamage) +{ + damage = iDamage; + SetAction("Globbing"); +} + +protected func Check() +{ + var living; + while(living = FindObject(0, -5,-5, 10,10, OCF_Living(), 0,0, NoContainer(), living)) + if(GetAlive(living) && !(living)->~IsAlien()) + return(HitLiving(living)); + while(living = FindObject(0, 1,1, 0,0, OCF_Living(), 0,0, NoContainer(), living)) + if(GetAlive(living) && !(living)->~IsAlien()) + return(HitLiving(living)); + + if(GetActTime() >= 600) return(Boom()); + +} + +private func HitLiving(target) +{ + // Maximal 30% des Gesamtwertes von Walk ~!/$&)=%/ + if(!(GetPhysical("Walk", 2, target) <= GetPhysical("Walk", 1, 0, GetID(target))*7/10)) + // Effekt starten + AddEffect("Slimed", target, 101, 1500, 0, GetID()); + + // Schaden roflol + DoDmg(damage, DMG_Bio, target); + // Weg + Boom(); +} + +/* Schleimdingsis */ + +public func Boom() +{ + // Weg + RemoveObject(); +} + +protected func AttachTargetLost() +{ + RemoveObject(); +} + +/* Schleim-Effekt */ + +public func FxSlimedStart(target, no, temp,int iStrength) +{ + if(temp) + if(GetPhysical("Walk", 2, target) <= GetPhysical("Walk", 1, 0, GetID(target))*7/10) + return(0); + + // Variablen + // 0: Walk + // 1: Jump + // 2: Scale + // 3: Hangle + EffectVar(0, target, no) = GetPhysical("Walk", 1, 0, GetID(target))*1/10; + EffectVar(1, target, no) = GetPhysical("Jump", 1, 0, GetID(target))*1/10; + EffectVar(2, target, no) = GetPhysical("Scale", 1, 0, GetID(target))*1/10; + EffectVar(3, target, no) = GetPhysical("Hangle", 1, 0, GetID(target))*1/10; + + SetPhysical("Walk", GetPhysical("Walk", 0, target)-EffectVar(0, target, no), 2, target); + SetPhysical("Jump", GetPhysical("Jump", 0, target)-EffectVar(1, target, no), 2, target); + SetPhysical("Scale", GetPhysical("Scale", 0, target)-EffectVar(2, target, no), 2, target); + SetPhysical("Hangle", GetPhysical("Hangle", 0, target)-EffectVar(3, target, no), 2, target); + + // blar + SetClrModulation(RGB(200,255,200), target); +} + +public func FxSlimedTimer() +{ + return(-1); +} + +public func FxSlimedStop(target, no, reason, temp) +{ + SetPhysical("Walk", GetPhysical("Walk", 0, target)+EffectVar(0, target, no), 2, target); + SetPhysical("Jump", GetPhysical("Jump", 0, target)+EffectVar(1, target, no), 2, target); + SetPhysical("Scale", GetPhysical("Scale", 0, target)+EffectVar(2, target, no), 2, target); + SetPhysical("Hangle", GetPhysical("Hangle", 0, target)+EffectVar(3, target, no), 2, target); + + // blar + if(!GetEffect("*Slimed*", target)) SetClrModulation(RGB(0,0,0), target); + + if(temp) return(0); + + // Schleimklumpen entfernen + var glob = FindObject(GLOB, 0,0,0,0,0, "AGlobbing", target); + if(glob) glob->~Boom(); +} + +// Feuer! :o +protected func Incineration() { Boom(); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Graphics.png new file mode 100644 index 00000000..1858ff31 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Names.txt new file mode 100644 index 00000000..377bd503 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleimprojektil +US:Slimebullet \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Script.c new file mode 100644 index 00000000..9401910f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/Slimeshot.c4d/Script.c @@ -0,0 +1,36 @@ +#strict + +local iDamage; + +/* Schleim-Schuss */ + +public func Launch(int iXDir, int iYDir, int iDmg) +{ + //Standardwerte setzen + if(!iDmg) iDmg = 5+Random(5); + + //und zuweisen + iDamage = iDmg; + SetSpeed(iXDir, iYDir); + + var self = this(); + SetAction("Travel"); + if(!self) return(); // Kleiner Sicherheitscheck, ob die Kugel nicht sofort verschwindet + + AddAlienFlareEffect(this(),200); + AddEffect("HitCheck", this(), 1,1, 0, SHT1); + return(1); +} + +/* Treffer */ + +private func Hit() { + CreateObject(GLOB, 0, 0, GetOwner())->~Glob2Ground(iDamage); + RemoveObject(); +} + +private func HitObject(object pObject) { + CreateObject(GLOB, 0, 0, GetOwner())->~AttachTo(pObject); + DoDmg(iDamage, DMG_Bio, pObject); + RemoveObject(); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/StringTblDE.txt new file mode 100644 index 00000000..b665c3c7 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/StringTblDE.txt @@ -0,0 +1,10 @@ +Standard=Einzelschuss +GrenadeLauncher=Granatenwerfer +Laser=Laser +Slime=Biowerfer + +KLASUpgradeDesc=Ersetzt den Schussmechanismus durch einen Laser. +KSLMUpgradeDesc=Ersetzt den Granatenmechanismus durch einen Biowerfer. + +KLASUpgraded=Schussmechanismus durch|einen Laser ersetzt. +KSLMUpgraded=Granatenmechanismus durch|Biowerfer ersetzt. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/StringTblUS.txt new file mode 100644 index 00000000..54fc6901 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pistol.c4d/StringTblUS.txt @@ -0,0 +1,10 @@ +Standard=Single shots +GrenadeLauncher=Grenade launcher +Laser=Laser +Slime=Bio slime + +KLASUpgradeDesc=Replaces the fire mechanism with a laser. +KSLMUpgradeDesc=Replaces the grenade mechanism with a bio slime launcher. + +KLASUpgraded=Replaced the fire mechanism with a laser. +KSLMUpgraded=Replaced the grenade mechanism with a bio slime launcher. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/DefCore.txt new file mode 100644 index 00000000..31598d12 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=CLSH +Version=4,9,8,2 +Name=Shot +Category=C4D_Vehicle +Width=11 +Height=18 +Offset=-5,-9 +Vertices=1 +VertexFriction=0 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Graphics.png new file mode 100644 index 00000000..4f27af34 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Names.txt new file mode 100644 index 00000000..448bc792 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Projektil +US:Bullet \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Script.c new file mode 100644 index 00000000..d3c2aed7 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/ClusterShot.c4d/Script.c @@ -0,0 +1,22 @@ +#strict +#include SHT1 + +public func BulletStrike(object pObj) +{ + // nope,... stattdessen... + // | + // v +} + +private func HitObject(object pObject) { + Explode(iDamage,0,0,0,1); +} + +public func Remove() { + if(pTrail) { + pTrail->SetPosition(GetX(),GetY()); + pTrail->Remove(); + } + + Explode(iDamage,0,0,0,1); +} \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DefCore.txt new file mode 100644 index 00000000..96752add --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=PGWP +Version=4,9,8,2 +Name=Pumpgun +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=17 +Height=6 +Offset=-8,-3 +Vertices=1 +VertexY=2 +VertexFriction=100 +Value=20 +Mass=12 +Components=METL=1;KRFL=1 +Picture=17,0,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DescDE.txt new file mode 100644 index 00000000..0662b277 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DescDE.txt @@ -0,0 +1 @@ +Die Pumpgun feuert pro Ladung große Geschossmengen ab. Das macht sie im Nahkampf zu einer unübertroffenen Waffe. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DescUS.txt new file mode 100644 index 00000000..601a4399 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/DescUS.txt @@ -0,0 +1 @@ +The pumpgun shoots many shots at once. Because of that the pumpgun is the ultimate weapon in close-combat. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Graphics.png new file mode 100644 index 00000000..c4651712 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/GraphicsUpgrade2.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/GraphicsUpgrade2.png new file mode 100644 index 00000000..1513f477 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/GraphicsUpgrade2.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Names.txt new file mode 100644 index 00000000..07998c30 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pumpgun +US:Pumpgun diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/PumpgunFire.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/PumpgunFire.wav new file mode 100644 index 00000000..c6e170ba Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/PumpgunFire.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/PumpgunLoad.wav b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/PumpgunLoad.wav new file mode 100644 index 00000000..b10173cc Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/PumpgunLoad.wav differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Script.c new file mode 100644 index 00000000..0ec2ad77 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/Script.c @@ -0,0 +1,145 @@ +/*-- Pumpgun --*/ + +#strict + +#include WEPN + +local rifleupgrade; + +public func HandSize() { return(800); } +public func HandX() { return(6000); } +public func HandY() { return(500); } +public func BarrelYOffset(){return(-1000);} + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Standard$"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(30); + if(data == FM_AmmoUsage) return(6); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(30); + + if(data == FM_Damage) return(32); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(120); + if(data == BOT_Power) return(BOT_Power_2); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$Cluster$"); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(2); + if(data == FM_AmmoUsage) return(1); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(70); + + if(data == FM_Condition) return(GetUpgrade(KRFL)); + + if(data == FM_Damage) return(16); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(120); + if(data == BOT_DmgType) return(DMG_Explosion); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_3); + + return(Default(data)); +} + +public func Fire1() // Projektilschuss +{ + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->AimAngle(20); + var ammo; + + var dir = GetDir(user)*2-1; + + for(var i=0; i<15; i++) + { + ammo = CreateObject(SHT1, x, y, GetController(user)); + ammo -> Launch(angle+RandomX(-7, 7), 250+Random(100), 80+Random(150), 3, 400, GetFMData(FM_Damage, 1), 1); + + if(!(i%3)) + BulletCasing(dir*6, 3, -dir*(Random(15)+5), -Random(15)-15, 5); + } + + MuzzleFlash(RandomX(40,60), user,x,y,angle); + + // Sound + Sound("PumpgunFire"); +} + +public func Fire2() // Clusterschuss +{ + var user = GetUser(); + var x,y; user->WeaponEnd(x,y); + var angle = user->AimAngle(20); + var dir = GetDir(user)*2-1; + var ammo, xdir, ydir; + + // Effekte + for(var i=0; i<6; i++) + { + ammo = CreateObject(CLSH, x, y, GetController(user)); + ammo -> Launch(angle+RandomX(-7, 7), 250+Random(100), 80+Random(150), 3, 400, GetFMData(FM_Damage, 2), 1); + + if(!(i%3)) + BulletCasing(dir*6, 3, -dir*(Random(15)+5), -Random(15)-15, 5); + } + + MuzzleFlash(RandomX(40,60), user,x,y,angle); + + // Sound + Sound("PumpgunFire"); +} + +/* Upgrades */ + +public func IsUpgradeable(id uid) { + if(GetUpgrade(uid)) + return(false); + + if(uid == KRFL) return("$KRFLUpgradeDesc$"); +} + +public func OnUpgrade(id uid) { + SetUpgradeGraphic(); + if(uid == KRFL) { + SetFireMode(2); + var own = GetOwner(Contained()); + if(Contained()) HelpMessage(own,"$KRFLUpgraded$",Contained()); + return(true); + } +} + +public func OnDowngrade(id uid) { + SetUpgradeGraphic(); + if(uid == KRFL) { + SetFireMode(1); + return(true); + } +} + + +// Soundeffekte + +public func OnReload() +{ + Sound("PumpgunLoad"); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/StringTblDE.txt new file mode 100644 index 00000000..bad8c51c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +Standard=Streuschuss +Cluster=Explosionsschuss + +KRFLUpgradeDesc=Ermöglicht den Abschuss von Granatenfragmenten + +KRFLUpgraded=Granatenfragment-Aufsatz montiert! \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/StringTblUS.txt new file mode 100644 index 00000000..917a538d --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Pumpgun.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +Standard=Spread shots +Cluster= Cluster shot + +KRFLUpgradeDesc=Allows you to shoot grenadefragments + +KRFLUpgraded=grenadefragment attachment mounted! \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DefCore.txt new file mode 100644 index 00000000..3bf87c1f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=WEPN +Version=4,9,8,2 +Name=Waffe +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DescDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DescDE.txt new file mode 100644 index 00000000..740e155c --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DescDE.txt @@ -0,0 +1 @@ +Dieses Objekt stellt die Grundfunktionalität für Waffen zur Verfügung. diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DescUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DescUS.txt new file mode 100644 index 00000000..498106a0 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/DescUS.txt @@ -0,0 +1 @@ +This object provides basic control for weapons. \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Graphics.png new file mode 100644 index 00000000..29fbbf60 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Names.txt new file mode 100644 index 00000000..26ee4508 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffensteuerung +US:Weapon control \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Script.c new file mode 100644 index 00000000..21cf1e93 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Script.c @@ -0,0 +1,954 @@ +/*-- Waffe --*/ + +#strict + +/* Konstanten */ +//Feuermodi-Konstanten +static const FM_Name = 1; // Name des Feuermodus' + +static const FM_AmmoID = 2; // ID der benutzten Munition +static const FM_AmmoLoad = 3; // Menge der eingeladenen Munition +static const FM_AmmoUsage = 4; // Munitionsverbrauch pro AmmoRate Schüsse +static const FM_AmmoRate = 5; // s.o. + +static const FM_Reload = 6; // Nachladezeit der Waffe in Frames. +static const FM_Recharge = 7; // Zeitabstand zwischen zwei Schüssen in Frames. + +static const FM_Auto = 8; // Automatische Waffe. +static const FM_Aim = 9; // Waffe zielt +static const FM_Condition =10; // Vorraussetzung für den Schussmodus + +static const FM_Icon =11; // Icon das im Schussmodimenü angezeigt wird + +static const FM_Damage =12; // Schaden, den der Schussmodus anrichtet + +static const FM_Error =-1; // Für auftretende Fehler + +// Bot-Konstanten für Feuermodi +static const BOT_Range = 100; // Reichweite des Modus +static const BOT_DmgType = 101; // Schadenstyp, den der Modus hauptsächlich anrichtet + +static const BOT_Ballistic= 102; // Der Modus schießt ballistische Geschosse + +static const BOT_Power = 103; // Stärke der Waffe + static const BOT_Power_1 = 1; // geringe Stärke (Pistole, Pistolen-Granatwerfer, Pistole-Laser, Pistole-Schleim, EMP) + static const BOT_Power_2 = 2; // mittlere Stärke (Pumpgun, Energiegewehr, Flammenwerfer, Napalmgranate, Lasergranate) + static const BOT_Power_3 = 3; // hohe Stärke (Granatwerfer: Normal, Cluster & Schleim, Motorsäge, Energiegewehr mit Laser, Biowerfer, Clusterpumpgun, Feuerball) + static const BOT_Power_LongLoad = 4; + // Waffen, mit einer langen Nachladezeit (Partikelk., Bazooka, Minigun) + // Diese Waffen werden nur leer geschossen und dann erstmal nicht benutzt +static const BOT_EMP = 104; // EMP-Waffe. Wird nur gegen Maschinen eingesetzt + +public func Default(int data) // Standardeinstellungen +{ + if(data == FM_Name) return("Standard"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(1); + if(data == FM_Auto) return(false); + if(data == FM_Aim) return(0); + if(data == FM_Condition) return(true); + if(data == FM_AmmoLoad) return(5); + if(data == FM_Reload) return(100); + if(data == FM_Recharge) return(10); + if(data == FM_Icon) return(GetID()); + if(data == FM_Damage) return(0); + if(data == BOT_Range) return(100); + if(data == BOT_DmgType) return(DMG_Projectile); + if(data == BOT_Ballistic)return(0); + if(data == BOT_Power) return(BOT_Power_1); + if(data == BOT_EMP) return(false); +} + +public func HandX() { return(0); } // X-Position in der Hand +public func HandY() { return(0); } // Y-Position in der Hand +public func HandSize() { return(1000); } // Größe in der Hand, Standard: 1000 +public func HandBarrel(){return(0); } // Y-Offset des Laufs + +public func CanAim() { return(true); } // mit diesem Gegenstand kann man zielen + +/* Callbacks an Objekte die WEPN includieren */ +// i ist dabei firemode + +public func OnEmpty(int i) { } // wird aufgerufen wenn Waffe leer (keine Munition) +public func OnSelect(int i) { } // wird bei Anwahl im Inventar aufgerufen +public func OnDeselect(int i) { } // wird bei Abwahl im Inventar aufgerufen + +public func OnReload(int i) { } // wird bei Start des Nachladens aufgerufen +public func OnReloaded(int i) { } // wird nach erfolgreichem Nachladen aufgerufen + +public func OnAutoStart(int i) { } // wird beim Starten einer autom. Waffe aufgerufen (erster Schuss) +public func OnAutoStop(int i) { } // wird beim Stoppen einer atuom. Waffe aufgerufen + +public func OnAimStart(int i) { } // Anfangen zu zielen +public func OnAimStop(int i) { } // Stoppen zu zielen + +public func IsUpgradeable(id i){ } // Upgradebar? +public func OnUpgrade(id i) { } // Beim Upgraden +public func OnDowngrade(id i) { } // Beim Downgraden + +/* Lokale Variablen */ + +local firemode; // aktueller Feuermodus + +local ratecount, stopauto, shooting; // intern... + +local controller; // the object which controls the weapon (the hazard clonk) + +local upgrades; // Welche Upgrades wir haben + +protected func Initialize() { + firemode = 1; + ratecount = GetFMData(FM_AmmoRate); + stopauto = false; + upgrades = CreateArray(); + SetUser(); +} + +/* Feuern */ + +public func SetUser(object pObj) +{ + if(pObj != controller) + { + controller = pObj; + if(controller) UpdateHUD(); + } +} +public func GetUser() { return(controller); } + +public func ControlUpdate(object caller, int comdir, bool dig, bool throw) +{ + SetUser(caller); + + // autom. Schuss beenden, wenn Werfen losgelassen (JumpAndRun) + if(IsRecharging() && !throw) + StopAutoFire(); + // Nicht nachladen, wenn die Munition ausging und der Controller rechtzeitig + // werfen wieder loslässt. + else if(!throw) + ClearScheduleCall(this(), "Reload"); +} + +public func ControlThrow(caller) +{ + SetUser(caller); + + // autom. Schuss beenden, wenn erneut Werfen gedrückt (klassisch) + if(IsRecharging()) + { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + StopAutoFire(); + + return(1); + } + + // Unterstützt der Schussmodus Zielen, aber wir tuns nicht? + if(GetFMData(FM_Aim)>0 && !(GetUser()->~IsAiming()) && !(GetUser()->~AimOverride())) + { + // Können wir? + if(GetUser()->~ReadyToAim()) + // Auf gehts: + GetUser()->StartAiming(); + + // Nachladen? + var ammoid = GetFMData(FM_AmmoID); + var ammousage = GetFMData(FM_AmmoUsage); + // weil keine Muni mehr da war? -> nachladen wenn geht + if(!CheckAmmo(ammoid,ammousage,this())) + if(CheckAmmo(ammoid,ammousage,GetUser())) + { + Reload(); + } + // nicht genügend Munition + else { + PlayerMessage(GetOwner(caller), "$NotEnoughAmmo$", caller, ammoid); + } + // Sonst nix. + return(1); + } + + // Feuern! Fehlgeschlagen? + if(!Fire()) { + + var ammoid = GetFMData(FM_AmmoID); + var ammousage = GetFMData(FM_AmmoUsage); + // weil keine Muni mehr da war? -> nachladen wenn geht + if(!CheckAmmo(ammoid,ammousage,this())) + if(CheckAmmo(ammoid,ammousage,GetUser())) { + Reload(); + } + // nicht genügend Munition + else { + PlayerMessage(GetOwner(caller), "$NotEnoughAmmo$", caller, ammoid); + } + } + + return(1); +} + +public func Fire() +{ + + // bereit zum Schießen + if(!(GetUser()->~ReadyToFire())) return(false); + + // lädt grad nach... bitte nicht stören + if(IsReloading()) return(false); + + var ammoid = GetFMData(FM_AmmoID); + var ammousage = GetFMData(FM_AmmoUsage); + // leer? + if(!CheckAmmo(ammoid,ammousage,this())) { + OnEmpty(firemode); + return(false); + } + + // Callback + if(GetFMData(FM_Auto)) + OnAutoStart(firemode); + + // FEUAAA!!!1 OMGOMG + Shoot(); + + return(true); +} + +/* Waffenmenü */ + +public func ControlDigDouble(caller) +{ + SetUser(caller); + + var name; + // Das Menü für die Schussmodiauswahl + CreateMenu(GetID(), GetUser(), 0, 0, "$FireMode$", C4MN_Extra_Info, 0, true); + // Solang suchen, bis keine Schussmodi mehr da sind + for(var i = 1; name=GetFMData(FM_Name, i); i++ ) + { + // Vorraussetzung muss erfüllt sein + if(GetFMData(FM_Condition, i)) + { + var id = GetFMData(FM_AmmoID, i); + var iconid = GetFMData(FM_Icon, i); + var obj = CreateObject(iconid); + // Wir haben ein Objekt fürs Menü und legen die Ammografik drauf + SetGraphics(0, obj, id, 1, GFXOV_MODE_Picture); + SetObjDrawTransform(650,0,5000,0,650,5000, obj, 1); + + // Eintragstext + var entryname=Format("%s (%s)", name, GetName(0, id)); + + // Genug Ammo für zumindest einen Schuss vorhanden sein + if(!CheckAmmo(id,GetFMData(FM_AmmoUsage,i),GetUser(),this())) + { + // Name des Eintrags wird grau + entryname=Format("%s", RGB(100,100,100), entryname); + // Eintrag grau + obj->SetClrModulation(RGB(100,100,100)); + } + // Eintrag hinzufügen. + AddMenuItem(entryname, "ChangeFireMode", GetID(this()), GetUser(), 0, i, Format("$DescFireMode$", name), 4, obj); + // Objekte natürlich wieder löschen + RemoveObject(obj); + } + } + return(true); +} + +/* Nachladen/Feuermodus ändern */ + +private func Failure(dummy, i) +{ + // Geht nicht: Bescheidsagen + var id2=GetFMData(FM_AmmoID, i); + PlayerMessage(GetOwner(GetUser()), "$NotEnoughAmmo$", GetUser(),id2); + OnEmpty(i); +} + +public func GetFireMode() { return(firemode); } + +private func ChangeFireMode(dummy, i) +{ + // Immer noch genügend Munition da? + if(!CheckAmmo(GetFMData(FM_AmmoID, i),GetFMData(FM_AmmoUsage,i),GetUser(),this())) + { + // Nein. Mecker. + Failure(dummy, i); + // Menü will geupdatet werden, wahrscheinlich + var item=GetMenuSelection(GetUser()); + CloseMenu(GetUser()); + ControlDigDouble(GetUser()); + SelectMenuItem (item, GetUser()); + // Fertig. + return(); + } + CloseMenu(GetUser()); + var old = GetFireMode(); + // Schussmodus umstellen + if(SetFireMode(i)) + { + OnAutoStop(old); + // Danach neue Munition einladen. + Reload(); + } +} + +private func SetFireMode(int i) { + if(i == 0) return(); + + // Gleicher Modus: Nur nachladen wenn nicht mehr voll und lädt nicht nach + if(i == firemode) { + if(CheckAmmo(GetFMData(FM_AmmoID, i),GetFMData(FM_AmmoLoad),this())) return(); + if(IsReloading()) return(); + } + // Alte Munition ausladen + Empty(); + // Schussmodus umstellen + firemode=i; + stopauto=false; + ratecount = GetFMData(FM_AmmoRate, i); + + // Helpmessage + if(GetUser()) + HelpMessage(GetUser()->GetOwner(),"$FireModeChanged$",GetUser(),GetFMData(FM_Name),GetFMData(FM_AmmoID)); + + return(1); +} + +public func Reload() // Waffe nachladen +{ + ResumeReload(); + if(IsReloading()) return(false); + + // Verzögerung? Abbrechen + if(IsRecharging()) RemoveEffect("Recharge", this()); + + // nicht genug Ammo um nachzuladen + var ammoid = GetFMData(FM_AmmoID); + var ammousage = GetFMData(FM_AmmoUsage); + if(!CheckAmmo(ammoid,ammousage,GetUser())) + return(false); + + // entleeren falls noch voll + if(CheckAmmo(ammoid,ammousage,this())) + Empty(); + + if(GetFMData(FM_Auto)) + OnAutoStop(firemode); + OnReload(firemode); + var reloadtime = GetFMData(FM_Reload)*MaxReloadAmount(GetUser())/GetFMData(FM_AmmoLoad); + + // Mit dem Nachladen beginnen + AddEffect("Reload", this(), 1, 1, this(), 0, Max(1, reloadtime)); + return(true); +} + +public func CancelReload() // Nachladen abbrechen +{ + if(!IsReloading()) return(false); + RemoveEffect("Reload", this(),0,true); + return(true); +} + +public func PauseReload() // Nachladen pausieren +{ + if(!IsReloading()) return(false); + if(EffectVar(1,this(),GetEffect("Reload",this())) == 0) return(false); + EffectVar(1,this(),GetEffect("Reload",this())) = 0; + return(true); +} + +public func ResumeReload() // Nachladen wiederaufnehmen (wenn pausiert) +{ + if(!IsReloading()) return(false); + if(EffectVar(1,this(),GetEffect("Reload",this())) == 1) return(false); + EffectVar(1,this(),GetEffect("Reload",this())) = 1; + return(true); +} + +private func Recharge() // Wartezeit zwischen zwei Schüssen +{ + var rechargetime = GetFMData(FM_Recharge); + AddEffect("Recharge", this(), 1, 1, this(),0,1+Max(1, rechargetime)); +} + +public func Empty() // Waffe ausleeren +{ + // Laden wir nach? Abbrechen. + if(IsReloading()) RemoveEffect("Reload", this()); + if(IsRecharging()) RemoveEffect("Recharge", this()); + + // Munitionsart wo raus muss + var ammoid = GetFMData(FM_AmmoID); + // Zu schiebende Munitionsmenge + var ammoamount = GetAmmo(ammoid, this()); + // Clonk wiedergeben + DoAmmo(ammoid, ammoamount, GetUser()); + // Hier entfernen + DoAmmo(ammoid, -ammoamount, this()); +} + +private func Reloaded(caller) // Waffe nachgeladen +{ + + // Munitionsart wo rein muss + var ammoid = GetFMData(FM_AmmoID); + var ammoamount = MaxReloadAmount(caller); + + // zwischendurch Ammo zuviel ammo verbraucht? Fehlschlag. + if(!CheckAmmo(ammoid,ammoamount,caller)) + return(false); + + // Hier einfügen + DoAmmo(ammoid, ammoamount, this()); + // Dem Clonk abziehen + DoAmmo(ammoid, -ammoamount, caller); + + HelpMessage(caller->GetOwner(),"$Reloaded$",caller,ammoamount,ammoid); + + + // Callback + OnReloaded(firemode); +} + +/* Upgradezeug */ + +// ‬Waffe mit uid Upgraden +public func Upgrade(id uid) +{ + // ist die Waffe damit überhaupt upgradebar? + if(!IsUpgradeable(uid)) + // nichts tun + return(false); + + upgrades[GetLength(upgrades)] = uid; + OnUpgrade(uid); + return(true); +} + +public func SetUpgradeGraphic(int bitsWithGraphic) +{ + var myBits = GetUpgradeGraphicBitmask(); + if(bitsWithGraphic) myBits &= bitsWithGraphic; + + var graphicsString = 0; + if(myBits) graphicsString = Format("Upgrade%d",myBits); + + SetGraphics(graphicsString); +} + +public func GetUpgradeGraphicBitmask() +{ + var bitmask = 0; + for(var upgradeId in upgrades) + { + bitmask += upgradeId->~GetUpgradeGraphicsIDBit(); + } + return bitmask; +} + +// Upgrade uid entfernen +public func Downgrade(id uid) +{ + // haben wir das Upgrade überhaupt? + if(!GetUpgrade(uid)) + return(false); + + for(var i = 0; i < GetLength(upgrades); i++) + if(upgrades[i] == uid) + { + upgrades[i] = 0; + for(var j = i; j < GetLength(upgrades)-1; j++) + upgrades[j] = upgrades[j+1]; + + OnDowngrade(uid); + if(Contained()) + CreateContents(uid,Contained()); + else + CreateObject(uid); + return(true); + } + + return(false); +} + +// Ist waffe mit uid upgegradet? +public func GetUpgrade(id uid) +{ + for(var upg in upgrades) + if(upg == uid) + return(true); + + return(false); +} + +/* Feuern */ + +private func Shoot(object caller) { // Feuern mit Feuermodus + //User da? :S + if(!GetUser()) + return(stopauto=true); + + var ammoid = GetFMData(FM_AmmoID); + //soll er zielen, zielt aber nicht? + if(!(GetUser()->~IsAiming()) && GetFMData(FM_Aim)>0 && !(GetUser()->~AimOverride())) + return(stopauto=true); //abbrechen + // user hat sich irgendwo reinbewegt + if(GetUser()->Contained() && GetUser() == Contained()) + return(stopauto=true); + // Feuern... + if(Call(Format("Fire%d",firemode)) == FM_Error) + return(stopauto=true); + + if(GetFMData(FM_Auto)) + shooting = true; + + if(!GetUser()) return(); + + // Munition abziehen + if(ratecount == 1) { + var muni = GetFMData(FM_AmmoUsage); + DoAmmo(ammoid,-muni); + ratecount = GetFMData(FM_AmmoRate); + } + else { --ratecount; } + + // Pause nach einem Schuss + if(GetAmmo(ammoid)) Recharge(); + else { + shooting = false; + OnEmpty(); + if(GetFMData(FM_Auto)) OnAutoStop(firemode); + + // Automatisch nachladen, wenn die Feuertaste nach 5 Frames noch gedrückt ist + if(GetPlrCoreJumpAndRunControl(GetUser()->GetController())) + if(!IsReloading()) + ScheduleCall(this(), "Reload", 5); + } + // HZCK soll Munition doch bitte neu anschauen + UpdateHUD(); +} + +public func IsShooting() { return(shooting); } + +public func GetFMData(int data, int i) +{ + // Vom Feuermodus i Information holen + // i nicht angegeben? Muss nicht, ist aktueller dann + if(!i) i=firemode; + var value = ObjectCall(this(), Format("FMData%d",i), data); + // Modifikationen + var effect,user = GetUser(),j; + while(effect = GetEffect("*Bonus*",this(),j) || j == 0) { + j++; + if(!GetEffect("*Bonus*",this(),effect,1)) + continue; + var tval = EffectCall(this(),effect,"FMData",data,value); + if(tval) + value = tval; + } + if(user) + { + for(var i; i <= GetEffectCount("*Bonus*",user); i++) { + var tval = EffectCall(user,GetEffect("*Bonus*",user,i-1),"FMData",data,value,i); + if(tval) + value = tval; + } + /* + while(effect = GetEffect("*Bonus*", user, j) || j == 0) + { + j++; + if(!GetEffect("*Bonus*",user,effect,1)) + continue; + Log("%s",GetEffect("*Bonus*",user,effect,1)); + var tval = EffectCall(user,effect,"FMData",data,value); + if(tval) + value = tval; + }*/ + } + return(value); +} + +// Informationen für Bots (je nach Feuermodus) +public func GetBotData(int data, int i) +{ + // Vom Feuermodus i Information holen + if(!i) i=firemode; + return(ObjectCall(this(), Format("BotData%d",i), data)); +} + +protected func Deselection(object pContainer) +{ + // Callback + OnDeselect(firemode); + // Laden stoppen + PauseReload(); + //Automatischen Schuss stoppen + if(GetFMData(FM_Auto)) + { + if(IsRecharging()) stopauto=true; + OnAutoStop(); + } +} + +protected func Selection(object pContainer) +{ + // Callback + OnSelect(firemode); + // Laden wiederaufnehmen + ResumeReload(); +} + +public func StopAutoFire() { + stopauto = true; +} + +public func AimStart() { OnAimStart(firemode); } + +public func AimStop() { + // automatisch feuern aus + if(IsRecharging()) + StopAutoFire(); + OnAimStop(firemode); +} + +protected func Departure() // Waffe weggeworfen: Nachladen abbrechen. :( +{ + if(GetFMData(FM_Auto)) + if(!stopauto) + OnAutoStop(firemode); + if(IsReloading()) + RemoveEffect("Reload", this(), 0, true); + + SetUser(); +} + +protected func Entrance(object pContainer) +{ + SetUser(pContainer); +} + +public func IsWeapon() { return(true); } +public func NoWeaponChoice() { return(GetID() == WEPN); } + +public func GetCharge() { // wie voll ist die Waffe + var charge; + var ammoid = GetFMData(FM_AmmoID); + // lädt nach: Nachladestatus anzeigen + if(IsReloading()) { + // Nachladestatus in % + charge = 1000*(EffectVar(0, this(), GetEffect("Reload", this())))/GetFMData(FM_Reload); + } + // ansonsten: Ladestand anzeigen + else { + charge = 1000*GetAmmo(ammoid)/GetFMData(FM_AmmoLoad); + } + + return(charge); +} + +private func MaxReloadAmount(object pAmmostore) { + var ammoid = GetFMData(FM_AmmoID); + var ammoload = GetFMData(FM_AmmoLoad); + var ammousage = GetFMData(FM_AmmoUsage); + // Zu erwartende Munitionsmenge errechnen... + if(!CheckAmmo(ammoid,ammoload,pAmmostore)) + ammoload = GetAmmo(ammoid,pAmmostore); + ammoload /= ammousage; + ammoload *= ammousage; + + return(ammoload); +} + +public func IsReloading() { return(GetEffect("Reload",this())); } +public func IsRecharging() { return(GetEffect("Recharge", this())); } + +public func GetRecharge() { + if(!IsRecharging()) + return(100); + var time = GetEffect("Recharge",this(),0,6); + return((100*time)/GetFMData(FM_Recharge)); +} + +/* Effekte */ + +public func OnAmmoChange() +{ + UpdateHUD(); +} + +public func FxReloadStart(object pTarget, int iNumber, int iTemp, int iTime) { + if(iTemp) return; + + UpdateHUD(); + + // Nachladen aktiv: + EffectVar(1,pTarget,iNumber) = 1; + + // Zeit speichern + EffectVar(2,pTarget,iNumber) = iTime; +} + +public func FxReloadTimer(object pTarget, int iNumber, int iTime) { + + if(EffectVar(1,pTarget,iNumber)) + { + UpdateHUD(); + if(EffectVar(0,pTarget,iNumber)++ >= EffectVar(2,pTarget,iNumber)) return(-1); + } +} + +public func FxReloadStop(object pTarget, int iNumber, int iReason, bool fTemp) { + // nicht nachladen + if(!GetAlive(GetUser()) && GetCategory(GetUser())&C4D_Living) return(0); + // temporäre Aufrufe ignorieren + if(fTemp) return(); + Message(" ",pTarget); + // nur erfolgreich nachgeladen wenn Timer abgelaufen + if(iReason == 0) + pTarget->Reloaded(GetUser()); + + UpdateHUD(); +} + +public func FxRechargeStart(object pTarget, int iNumber, int iTemp, int iTime) { + if(iTemp) return; + + UpdateHUD(); + + // Rechargetime speichern + EffectVar(0,pTarget,iNumber) = iTime; +} + +public func FxRechargeTimer(object pTarget, int iNumber, int iTime) { + UpdateHUD(); + if(iTime >= EffectVar(0,pTarget,iNumber)) return -1; +} + +public func FxRechargeStop(object pTarget, int iNumber, int iReason, bool fTemp) { + // Waffenträger weg? + if(!GetUser()) return(0); + if(!GetAlive(GetUser()) && GetCategory(GetUser())&C4D_Living) return(0); + // automatisch weiterschießen, mit JnR-Control auch bei normalen Waffen + if(GetFMData(FM_Auto) || GetPlrCoreJumpAndRunControl(pTarget->GetController())) { + // ... außer wenn abgebrochen oder keine Munition mehr (!) + if(stopauto || (GetUser()->Contents() != this() && GetUser() == Contained(this())) || !(GetUser()->ReadyToFire()) || !CheckAmmo(GetFMData(FM_AmmoID), GetFMData(FM_AmmoUsage))) { + // Callback bei AutoFire + if(GetFMData(FM_Auto)) + OnAutoStop(firemode); + + stopauto = false; + shooting = false; + } + else { + Shoot(pTarget); + } + } + UpdateHUD(); +} + +private func UpdateHUD() +{ + if(GetUser()) GetUser()->~UpdateCharge(); +} + +/* globale Funktionen */ + +global func HelpMessage(int iPlr, string szMsg, object pTarget, a,b,c,d,e,f,g) +{ + // Nur ausgeben, wenn auch erwünscht + if(GetPlrExtraData(iPlr, "Hazard_NoHelpMsg")) return(0); + // Hallo Neuling! Hier deine Info! + return(PlayerMessage(iPlr, szMsg, pTarget, a,b,c,d,e,f,g)); +} + +/* Waffenrotationszeugs und so :) */ + +/* Von Sven kopiertes und geändertes Zeugs */ +// Edit: Inzwischen selbst neu gecodet. Sven2->RemoveObject(); +// mit Extravielen Kommentaren für Nachtschatten aka Clonk Nukem!!!! +// jede Zeile nen Kommentar?? Hälst du CN für doof, boni? ^^ - newton +// er hat gesagt er will viele Kommentare, also bekommt er sie. ;) - boni + +// EffectVars: +// 0 - ID der Waffe +// 1 - Aktuelle Drehung +// 2 - X-Position des Anfangs der Waffe +// 3 - Y-Position des Anfangs der Waffe +// 4 - X-Position des Ende des Laufs +// 5 - Y-Position des Ende des Laufs +// 6 - Aktuelle Waffe + +// 7 - Dir für Performance-Einsparungs-Zwecke +// 8 - Winkel für Performance-Einsparungs-Zwecke + +// 9 - Skalierungsfaktor der Waffe (HandSize) +// 10 - ObjektBreite/2 +// 11 - BarrelXOffset +// 12 - BarrelXOffset + +global func FxShowWeaponStart(object pTarget, int iNumber, int iTemp) +{ + if (iTemp) return(FX_OK); + // Erste Grafikaktualisierung + FxShowWeaponTimer(pTarget, iNumber); + return (FX_OK); +} + +global func FxShowWeaponTimer(object pTarget, int iNumber, int iTime) +{ + // Waffe aktualisieren: + var xoff, yoff, r; // Offset, Winkel + // kein Inventar oder falsche Aktion + if(!Contents(0,pTarget)) { + EffectCall(pTarget,iNumber,"Reset"); + return(FX_OK); + } + + //Die Waffe momentan überhaupt anzeigen? + if(!(pTarget->~WeaponAt(xoff, yoff, r))) + { + EffectCall(pTarget,iNumber,"Reset"); + return(FX_OK); + } + + var obj = Contents(0,pTarget), id=GetID(obj); + // Waffe nicht mehr aktuell + if(EffectVar(0, pTarget, iNumber) != id) { + // neues Objekt ist Waffe, oder ein Objekt, das gezeichnet werden soll + if(obj->~IsWeapon() || obj->~IsDrawable()) + { + SetGraphics(0, pTarget,id, WeaponDrawLayer, GFXOV_MODE_Object,0,GFX_BLIT_Parent,obj); + + // neue Daten + EffectVar(0, pTarget, iNumber) = id; + EffectVar(6, pTarget, iNumber) = obj; + EffectVar(7, pTarget, iNumber) = 0; + EffectVar(8, pTarget, iNumber) = 0; + EffectVar(9, pTarget, iNumber) = id->~HandSize(); + EffectVar(10, pTarget, iNumber) = GetDefCoreVal("Width",0,id)/2; + EffectVar(11, pTarget, iNumber) = DefinitionCall(id,"BarrelXOffset"); + EffectVar(12, pTarget, iNumber) = DefinitionCall(id,"BarrelYOffset"); + + if(!EffectVar(9, pTarget, iNumber)) + EffectVar(9, pTarget, iNumber) = 1000; + } + // neues Objekt ist keine Waffe + else { + EffectCall(pTarget,iNumber,"Reset"); + return(FX_OK); + } + } + + id = EffectVar(0, pTarget, iNumber); + obj = EffectVar(6, pTarget, iNumber); + + // Ausrichtung nach Blickrichtung des Clonks + // Variablen für die Transformation + + var width, height; // Breiten- und Höhenverzerrung der Waffe + var xskew, yskew; // Zerrung der Waffe, wird zur Rotation gebraucht + var size; // Größe der Waffe in der Hand: 1000 = 100% + // Variablen für die Position + var xaim, yaim; // Offset, dass sich durch zielen ergibt + var dir; // Richtung in die das Objekt schaut + + //schnell noch Rotation dazurechnen oder so! + r += ObjectCall(obj,"HandR"); + + // Variablen mit Werten versehen + dir = GetDir()*2-1; + if(r > 180 || r < -180) + dir *= -1; + r *= dir; + + // Müssen wir überhaupt updaten? Wir gehen davon aus, dass sich HandX/Y nicht ändert, wenn sich die Rotation auch nicht ändert. + if(EffectVar(8, pTarget, iNumber) == r && EffectVar(7, pTarget, iNumber) == dir) + return(FX_OK); + else + { + EffectVar(8, pTarget, iNumber) = r; + EffectVar(7, pTarget, iNumber) = dir; + } + + + width = height = xskew = yskew = 1; + size = EffectVar(9, pTarget, iNumber); + + + var xfact = size * ObjectCall(obj,"HandX"); // Attachpunkte dazurechnen + var yfact = size * ObjectCall(obj,"HandY"); + + xoff += Cos(r,xfact)/1000 + dir*Sin(r,yfact)/1000; + yoff -= Cos(r,yfact)/1000 - dir*Sin(r,xfact)/1000; + + if(dir == 1) + { + height = -1; + xskew = -1; + yskew = -1; + } + + r = -90*dir-r-90; + height *= width *= Cos(r, size); + xskew *= Sin(r, size); + yskew *= -xskew; + xoff *= dir; + + SetObjDrawTransform(1000,xskew,xoff,yskew,1000,yoff, pTarget, WeaponDrawLayer); //position + SetObjDrawTransform(width,xskew,0,yskew,height,0, obj); //Größe und Rotation + + // abspeichern, damit abrufbar + r = -r-90; +// var w,brly,brlx,r2,dist; + var w = EffectVar(10, pTarget, iNumber); + var brlx = EffectVar(11, pTarget, iNumber); + var brly = EffectVar(12, pTarget, iNumber); + var r2 = (Angle(0,0,w-brlx/1000,brly/1000)-90)*dir; + var dist = Distance(0,0,w*1000-brlx,brly); + //Log("%d - %d - %d - %d",w,brl,r2,dist); + + var v2 = xoff-Sin(r,size*w); + var v3 = yoff+Cos(r,size*w); + var v4 = xoff+Sin(r+r2,size*(dist))/1000; + var v5 = yoff-Cos(r+r2,size*(dist))/1000; + if(EffectVar(1, pTarget, iNumber) != r) + EffectVar(1, pTarget, iNumber) = r; + if(EffectVar(2, pTarget, iNumber) != v2) + EffectVar(2, pTarget, iNumber) = v2; + if(EffectVar(3, pTarget, iNumber) != v3) + EffectVar(3, pTarget, iNumber) = v3; + if(EffectVar(4, pTarget, iNumber) != v4) + EffectVar(4, pTarget, iNumber) = v4; + if(EffectVar(5, pTarget, iNumber) != v5) + EffectVar(5, pTarget, iNumber) = v5; + + //EffectVar(4, pTarget, iNumber) = xoff+Sin(r,size*(w)); + //EffectVar(5, pTarget, iNumber) = yoff-Cos(r,size*(w)); + //Log("%d / %d",EffectVar(4, pTarget, iNumber),EffectVar(5, pTarget, iNumber)); +} + +global func FxShowWeaponReset(object pTarget, int iNumber) +{ + if(EffectVar(0, pTarget, iNumber) != 0) + { + EffectVar(0, pTarget, iNumber) = 0; + SetGraphics(0, pTarget, 0, WeaponDrawLayer); + } + if(EffectVar(6, pTarget, iNumber)) + { + SetObjDrawTransform(1000,0,0,0,1000,0,EffectVar(6,pTarget,iNumber)); + EffectVar(6, pTarget, iNumber) = 0; + } +} + +global func FxShowWeaponStop(object pTarget, int iNumber, int iReason, bool fTemp) +{ + if (fTemp) return(FX_OK); + // Grafik entfernen + SetGraphics(0, pTarget, 0, WeaponDrawLayer); + + if(EffectVar(6,pTarget,iNumber)) + SetObjDrawTransform(1000,0,0,0,1000,0,EffectVar(6,pTarget,iNumber)); +} diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/DefCore.txt new file mode 100644 index 00000000..18cf464f --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=SHT1 +Version=4,9,8,2 +Name=Shot +Category=C4D_Vehicle +Width=11 +Height=18 +Offset=-5,-9 +Vertices=1 +VertexFriction=0 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Graphics.png new file mode 100644 index 00000000..1d6e7104 Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Names.txt new file mode 100644 index 00000000..448bc792 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Projektil +US:Bullet \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Script.c new file mode 100644 index 00000000..edf60610 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Script.c @@ -0,0 +1,327 @@ +#strict + +/* Schuss */ + +local iTime, lx, ly, pTrail, iDamage, iPrec, iRefl, iTrailLength, iTrailSize, iXDir, iYDir; +local shooter; // Dingens/Clonk das den Schuss abgefeuert hat. +local bGlow; + + +func Construction(object byObj) { + // nichts? :C + if(!byObj) + return(); + // Waffe? + shooter = GetShooter(byObj); + // Team? + if(shooter->GetTeam()) + SetTeam(shooter->GetTeam()); +} + +public func Initialize() { + SetObjectBlitMode(1); +} + +public func Launch(int iAngle, int iSpeed, int iDist, int iSize, int iTrail, int iDmg, int iDmgPrec, int iGlowSize, int iAPrec, int iReflections) +{ + // Standardwerte setzen + if(!iSize) iSize = 8; + //if(!iGlowSize) + // iGlowSize = iSize; + if(!iTrail) iTrail = 300; + if(!iDmg) iDamage = 3; + else iDamage = iDmg; + + // und zuweisen + iSize = Min(iSize+2,GetDefWidth()); + iPrec = iDmgPrec; + + // Positionieren + SetPosition(GetX(),GetY()+GetDefHeight()/2); + + DoCon(100*iSize/GetDefWidth()-100); + + lx = GetX(); + ly = GetY(); + + iTime = 10*iDist/iSpeed; + + if(!iTime) + return(RemoveObject()); + + var self = this(); + SetAction("Travel"); + if(!self) return(); // Kleiner Sicherheitscheck, ob die Kugel nicht sofort verschwindet + + SetXDir(+Sin(iAngle,iSpeed, iAPrec)); + SetYDir(-Cos(iAngle,iSpeed, iAPrec)); + SetR(+iAngle); + + // Trail erzeugen + CreateTrail(iSize, iTrail); + + bGlow = false; + // Tolles Leuchten erzeugen + if(iGlowSize) { + bGlow = true; + SetGraphics(0,this(),LIGH,1,GFXOV_MODE_Base, 0, 1); + SetObjDrawTransform(100+35*iGlowSize,0,0, 0,100+35*iGlowSize,0, this(),1); + SetClrModulation(GlowColor(1),this(),1); + } + + AddEffect("HitCheck", this(), 1,1, 0,GetID(),shooter); + + // Werte für Reflektionen speichern + iRefl = iReflections; + iTrailSize = iSize; + iTrailLength = iTrail; + iXDir = GetXDir(0, 100); + iYDir = GetYDir(0, 100); + +} + +// Extern für Überladung +private func CreateTrail(int iSize, int iTrail) { + pTrail = CreateObject(TRAI,0,0,-1); + if(pTrail) { + pTrail->Set(iSize-2,iTrail,this()); + SetObjectBlitMode(GetObjectBlitMode(),pTrail); + } +} + +/* Timer */ + +private func Traveling() +{ + SetPosition(GetX(), GetY(), pTrail); + var iATime = GetActTime(); + + // ausfaden + SetClrModulation(Color(iATime)); + if(bGlow) { + SetClrModulation(GlowColor(iATime),0,1); + } + // löschen + if(iATime >= iTime) return(Remove()); + + // außerhalb der Landschaft: löschen + if(GetY()<0) return(Remove()); +} + +/* Treffer */ + +private func Hit() +{ + // Reflektion an Wänden (Eintrittswinkel = Austrittwinkel) + if(iRefl) + { + if(iXDir != 0) + { + // Positive XDir -> Rechts auf Material prüfen + if(iXDir > 0) + { + if(GBackSolid(1,0)) + iXDir *= -1; + // Und andersrum das gleiche Spiel + } + else + if(GBackSolid(-1,0)) + iXDir *= -1; + } + if(iYDir != 0) + { + // Positive YDir -> Unten auf Material prüfen + if(iYDir > 0) + { + if(GBackSolid(0,1)) + iYDir *= -1; + } + // Und andersrum das gleiche Spiel + else + if(GBackSolid(0,-1)) + iYDir *= -1; + } + // Geschwindigkeit gehört neu gesetzt + SetXDir(iXDir, 0, 100); + SetYDir(iYDir, 0, 100); + SetR(Angle(0, 0, iXDir, iYDir)); + // Trail wird entfernt! + pTrail->SetPosition(GetX(), GetY()); + pTrail->SetSpeed(0,0); + pTrail->Remove(); + // Und neu erzeugt + CreateTrail(iTrailSize, iTrailLength); + + // Eine Reflektion weniger + iRefl--; + // Und erstmal nicht auftreffen + return; + } + + // umliegende Objekte beschädigen. + var objs = FindObjects( Find_AtPoint(), + Find_NoContainer(), + Find_Or( + Find_Func("IsBulletTarget",GetID(),this(),shooter), + Find_OCF(OCF_Alive) + ), + Find_Func("CheckEnemy",this()) + /*Find_Not(Find_Func("HitExclude"))*/); + + for(var pTarget in objs) { + BulletStrike(pTarget); + } + + HitObject(); +} + +private func HitObject(object pObject) { + BulletStrike(pObject); + Sparks(40*GetCon()/100,Color(GetActTime())); + var x = iXDir/500; + var y = iYDir/500; + var mat = GetMaterial(x,y); + if(CheckDust(mat)) + { + var rand = Random(3); + var r = GetMaterialColor(mat,rand,0); + var g = GetMaterialColor(mat,rand,1); + var b = GetMaterialColor(mat,rand,2); + var alpha = 190; + + var xdir = -iXDir/500; + var ydir = -iYDir/500; + for(var i=0; i<4; ++i) + CreateParticle("Dust",x,y,xdir+RandomX(-2,2),ydir+RandomX(-3,3),GetCon()*3,RGBa(r,g,b,alpha)); + } + DigFree(GetX(),GetY(),GetCon()/10); + Remove(); +} + +public func BulletStrike(object pObj) { + if(pObj) + DoDmg(iDamage,DMG_Projectile,pObj,iPrec); +} + +private func Color(int iATime) { + var iPrg = 100*iATime/iTime; + return(RGBa(255,255-iPrg*2,255-iPrg*2,iPrg*2)); +} + +public func TrailColor(int iATime) { + var iPrg = 100*iATime/iTime; + return(RGBa(255,255-iPrg*2,255-iPrg*2,iPrg*2)); +} + +public func GlowColor(int iATime) { + return(RGBa(255,190,0,50)); +} + +// Dummy-func +func HitExclude() +{ + +} + +public func Remove() { + if(pTrail) { + pTrail->SetPosition(GetX(),GetY()); + pTrail->Remove(); + } + + RemoveObject(); +} + +/* Effekt für Trefferüberprüfung */ + +// EffectVars: +// 0 - alte X-Position +// 1 - alte Y-Position +// 2 - Schütze (Objekt, das die Waffe abgefeuert hat, üblicherweise ein Clonk) +// 3 - ID des Schützen +// 4 - Scharf? Wenn true wird der Schütze vom Projektil getroffen +// 5 - niemals den Schützen treffen + +public func FxHitCheckStart(object target, int effect, int temp, object byObj, bool neverShooter) +{ + if(temp) return(); + EffectVar(0, target, effect) = GetX(target); + EffectVar(1, target, effect) = GetY(target); + if(!byObj) + byObj = target; + if(byObj->Contained()) + byObj = (byObj->Contained()); + EffectVar(2, target, effect) = byObj; + EffectVar(3, target, effect) = GetID(byObj); + EffectVar(4, target, effect) = false; + EffectVar(5, target, effect) = neverShooter; +} + +public func FxHitCheckTimer(object target, int effect, int time) +{ + var obj; + // Oh man. :O + var oldx = EffectVar(0, target, effect); + var oldy = EffectVar(1, target, effect); + var newx = GetX(target); + var newy = GetY(target); + var dist = Distance(oldx, oldy, newx, newy); + EffectVar(0, target, effect) = GetX(target); + EffectVar(1, target, effect) = GetY(target); + + // Schuss schon Scharf? + var exclude = EffectVar(2, target, effect); + // Ja, wir treffen nur uns selbst nicht (ja, Workaround .) + if(EffectVar(4, target, effect)) exclude = target; + + //DrawParticleLine("NoGravSpark",newx-oldx, newy-oldy,0,0,1,25,RGB(255,0,0),RGB(0,0,255)); + // Wir suchen nach Objekten entlang der Linie die wir uns seit dem letzten Check + // bewegt haben. Und sortieren sie nach Distanz (nähere zuerst) + for(obj in FindObjects(Find_OnLine(oldx,oldy,newx,newy), + Find_NoContainer(), + Sort_Distance(oldx, oldy))) + { + // Excludes + if(obj == target) continue; + if(obj == exclude) continue; + + // CheckEnemy + if(!CheckEnemy(obj,target)) continue; + + // IsBulletTarget oder Alive + if(obj->~IsBulletTarget(GetID(target),target,EffectVar(2, target, effect)) || GetOCF(obj) & OCF_Alive) { + DebugLog("%s IsBulletTarget: %i, %s, %s","HitCheck",GetName(obj),GetID(target),GetName(target),GetName(EffectVar(2, target, effect))); + return(target-> ~HitObject(obj)); + } + } + + EffectVar(0, target, effect) = GetX(target); + EffectVar(1, target, effect) = GetY(target); + + //verdammt, kommentier doch mal... Also: + // Der Schuss wird erst "scharf gemacht", d.h. kann den Schützen selbst treffen, wenn + // der Schuss einmal die Shape des Schützen verlassen hat. + + // OKOK, Ich hab sogar das Restzeug kommentiert. :P + if(!EffectVar(5,target,effect)) { + if(!EffectVar(4, target, effect)) { + // ready gibt an, ob wir schon "scharf" sind. True = Scharf + var ready = true; + // Wir suchen alle Objekte mit der ID unseres Schützens an unserer momentanen Stelle + for(var foo in FindObjects(Find_AtPoint(GetX(target),GetY(target)),Find_ID(EffectVar(3, target, effect)))) + // und schauen, ob es der Schütze ist. + if(foo == EffectVar(2, target, effect)) + // wir haben den Schützen gefunden -> Er ist noch an unserer Position + ready = false; + // wir haben den Schützen nicht gefunden + if(ready) + // -> Wir treffen ihn ab jetzt. + EffectVar(4, target, effect) = true; + } + } +} + +// Ist ein Schuss! Nicht warpen! +func NoWarp() { return(true); } +// Ist ein Schuss! +func IsBullet() { return(true); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/ActMap.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/ActMap.txt new file mode 100644 index 00000000..b3effb1e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/ActMap.txt @@ -0,0 +1,17 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +Facet=0,0,20,100 +Length=1 +Delay=1 +StartCall=Traveling + +[Action] +Name=Travel2 +Procedure=FLOAT +NextAction=Travel2 +Facet=20,0,20,100 +Length=4 +Delay=1 +PhaseCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/DefCore.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/DefCore.txt new file mode 100644 index 00000000..6dec8421 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=TRAI +Version=4,9,8,2 +Name=Trail +Category=C4D_Vehicle +Width=2 +Height=2 +Offset=-1,-1 +BorderBound=7 +IncompleteActivity=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Graphics.png b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Graphics.png new file mode 100644 index 00000000..a6fa0c1f Binary files /dev/null and b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Graphics.png differ diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Names.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Names.txt new file mode 100644 index 00000000..90a3bb32 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spur +US:Trail \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Script.c b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Script.c new file mode 100644 index 00000000..0647ec5e --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/Shot.c4d/Trail.c4d/Script.c @@ -0,0 +1,85 @@ +#strict + +local fRemove, iSpeed, pShot, w, l, r, x, y; + +public func Set(int iWidth, int iLength, object pSht, string actionName) +{ + pShot = pSht; + if(!actionName) actionName = "Travel"; + + w = 1000*iWidth/20; + l = 1000*iLength/100; + + var iXDir = GetXDir(pShot,100); + var iYDir = GetYDir(pShot,100); + + iSpeed = Sqrt(iXDir*iXDir/100+iYDir*iYDir/100); + + SetAction(actionName); + SetXDir(iXDir,0,100); + SetYDir(iYDir,0,100); + + r = Angle(0,0,iXDir,iYDir); + x = GetX(); + y = GetY(); + + // richtig positionieren + SetPosition(GetX(pShot),GetY(pShot)); + Traveling(); +} + +/* Timer */ + +private func Traveling() +{ + // The shot is gone -> remove + if(!fRemove) + if(!pShot) + Remove(); + + // Display + DrawTransform(); + if(pShot) + if(pShot->~TrailColor()) + SetClrModulation(pShot->~TrailColor(GetActTime())); + + if(l == 0) return(RemoveObject()); +} + +public func Remove() { + SetXDir(); + SetYDir(); + l = Min(l,10*Distance(x,y,GetX(),GetY())); + fRemove = true; +} + +public func DrawTransform() { + + // skip because nothing has to be transformed + if(!fRemove && l < 10*Distance(x,y,GetX(),GetY())) return(0); + + // stretch >-< + if(fRemove) l = Max(0,l-iSpeed); + + // stretch <-> + var h = Min(l,10*Distance(x,y,GetX(),GetY())); + + var fsin = -Sin(r, 1000), fcos = Cos(r, 1000); + + var xoff = -(GetActMapVal("Facet",GetAction(),0,2)*w/1000)/2-1; + var yoff = 0; + + var width = +fcos*w/1000, height = +fcos*h/1000; + var xskew = +fsin*h/1000, yskew = -fsin*w/1000; + + var xadjust = +fcos*xoff + fsin*yoff; + var yadjust = -fsin*xoff + fcos*yoff; + + // set matrix values + SetObjDrawTransform ( + width, xskew, xadjust, + yskew, height, yadjust + ); +} + +func NoWarp() { return(true); } diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/StringTblDE.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/StringTblDE.txt new file mode 100644 index 00000000..c3a74480 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +FireMode=Schussmodus wechseln: +DescFireMode=Auf %s schalten +NotEnoughAmmo=Nicht genug {{%i}}! +Reloaded=%dx {{%i}} nachgeladen. +FireModeChanged=Feuermodus:|%s ({{%i}}) \ No newline at end of file diff --git a/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/StringTblUS.txt b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/StringTblUS.txt new file mode 100644 index 00000000..11419ff4 --- /dev/null +++ b/Hazard.c4d/Items.c4d/Weapons.c4d/Weapon.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +FireMode=Switch fire mode: +DescFireMode=Switch to %s +NotEnoughAmmo=Not enough {{%i}}! +Reloaded=Reloaded %dx {{%i}}. +FireModeChanged=Fire mode: %s ({{%i}}) \ No newline at end of file diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/DefCore.txt new file mode 100644 index 00000000..0b7116e4 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_GR +Name=Graph +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/Script.c new file mode 100644 index 00000000..1f63c7df --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Classes.c4d/Graph.c4d/Script.c @@ -0,0 +1,88 @@ +/* Vertex */ + +// This is a vertex of a directed graph +// The edges may have properties and only one edge may go from +// one vertex to another + +#strict +// uses attach info... +#include L_AI + +local pVertices; + +protected func Initialize() { + pVertices = CreateObject(L_OS); +} + +protected func Destruction() { + pVertices->RemoveObject(); +} + +// A vertex of a graph +public func IsVertex() { return(true); } + +// add an edge. If fReconnect = true, there'll be an edge back +public func AddEdge(object pTarget, bool fReconnect) { + // ein Pfad ohne Target ist nix + if(!pTarget) return(false); + + // new edge + // addItem returns false in an object set if item already + // existant + var ret = pVertices->AddItem(pTarget); + + if(fReconnect) { + // same goes for the other side + ret = (ret && pTarget->AddEdge(this())); + } + + // will return false if the connection is already there + return(ret); +} + +// remove an edge +public func RemoveEdge(object pTarget, bool fBoth) { + if(!pTarget) return(false); + var ret = pVertices->RemoveItem(pTarget); + ClearEdgeData(pTarget); + + if(fBoth) { + ret = (ret || pTarget->RemoveEdge(this())); + } + // will return true if at least one edge has been removed + return(ret); +} + +// get a connected vertex +// attention: no guarantee that the order will stay... +// so dont safe the edge by number but rather by object +public func GetVertex(int iNum) { + return(pVertices->GetItem(iNum)); +} + +// count +public func GetEdgeCount() { + return(pVertices->GetItemCount()); +} + + +// sets the iPos data for the edge to pTarget +public func SetEdgeData(object pTarget, int iPos, data) { + if(!pTarget) return(false); + if(iPos < 0) return(false); + + return(SetInfo(pTarget,iPos, data)); +} + +// gets the iPos data for the edge to pTarget +public func GetEdgeData(object pTarget, int iPos) { + if(!pTarget) return(false); + if(iPos < 0) return(false); + + return(GetInfo(pTarget,iPos)); +} + +public func ClearEdgeData(object pTarget) { + if(!pTarget) return(false); + return(ClearInfo(pTarget)); +} diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/DefCore.txt new file mode 100644 index 00000000..e0b98dfa --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_BG +Name=Bag +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/Script.c new file mode 100644 index 00000000..73efa561 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Classes.c4d/IDBag.c4d/Script.c @@ -0,0 +1,170 @@ +/* Generic ID bag */ + +#strict +#include L_AI + +// This object contains a number of IDs. + +// The IDs have no properties. For example the Hazard-Munition-System and the +// Alchemy-Ingredient-System uses these kind of ID bags. +// It is faster than storing a number of (icon)-objects in it but doesn't +// allow non-definition properties. + +// Attention: The bag should only contain Items. All contents are considered +// as items. + +// Is a bag +public func IsBag() { return(true); } + +// Add one item +public func AddItem(id idItem) { return(AddItems(idItem,1)); } + +// Delete on item +public func RemoveItem(id idItem) { return(RemoveItems(idItem,1)); } + +// Add items +public func AddItems(id idItem, int iNum) { + if(iNum < 0) return( false ); + + var obj; + // if no object yet... + if(!(obj=FindContents(idItem))) { + obj = CreateContents(idItem); + } + // still no object (id not existant) + if(!obj) return(false); + + // increase.. + var newinfo = GetInfo(obj,0)+iNum; + SetInfo(obj,0,newinfo); + return (true); +} + +// Delete items +public func RemoveItems(id idItem, int iNum) { + if(iNum < 0) return(false); + + var obj; + if(!(obj=FindContents(idItem))) + return( false ); + + // decrease.. + var newinfo = GetInfo(obj,0)-iNum; + SetInfo(obj,0,newinfo); + + // delete ID object if empty + if(GetInfo(obj,0) <= 0) { + obj->RemoveObject(); + } + + return (true); +} + +// Get item (like Contents only that each ID only comes one time) +public func GetItem(int i) { + var c = Contents(i); + if(!c) return(false); + return(c->GetID()); +} + +// bag is empty +public func IsEmpty() { + return(!Contents(0)); +} + +// Remove all of idItem. If idItem = 0, remove all +public func RemoveAllItems(id idItem) { + // none to remove: return false + if(IsEmpty()) return(false); + + // no id: remove all + if(!idItem) { + var obj; + while(obj=Contents(0)) + obj->RemoveObject(); + } + // id: remove id + else { + var obj; + if(obj=FindContents(idItem)) + obj->RemoveObject(); + else + return(false); + } + return (true); +} + +// Get item count. If idItem = 0, get all +public func GetItemCount(id idItem) { + // recursive add... + if(!idItem) { + var sum = 0; + for(var i=0; Contents(i); ++i) { + sum += GetItemCount(GetID(Contents(i))); + } + return (sum); + } + // number of the contents + else { + var obj = FindContents(idItem); + if(!obj) return(0); + + return(GetInfo(obj,0)); + } +} + +// Transfer items to another bag +// if iCount = 0, transfer all +// if bStrict, only transfer if iCount is not more than actually in bag +public func TransferItems(object pBag, id idItem, int iCount, bool bStrict) { + // All parameters must be given + if(!pBag) return(false); + if(!idItem) return(false); + if(iCount < 0) return(false); + + var top = GetItemCount(idItem); + // no sense in transfer if it is 0 + if(top == 0) return( true ); + + // transfer all + if(!iCount) { + // just displace the object (no calls) + //obj->Exit(); + //obj->Enter(pBag); + // could produce problems with RejectEntrance etc... + + iCount = top; + } + // iCount is too big? + if(iCount > top) { + if(bStrict) { + return(false); + } + else { + iCount = top; + } + } + + // transfer... + pBag->AddItems(idItem,iCount); + RemoveItems(idItem,iCount); + + return(true); +} + +// Transfer all items into another bag +public func TransferAllItems(object pBag) { + if(!pBag) return(false); + + var obj; + while(obj = Contents(0)) + TransferItems(obj, GetID(obj), 0); + + return(true); +} + +// Destruction +// protected func Destruction() { +// RemoveAllItems(); +//} +// Contents are removed automatically \ No newline at end of file diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/DefCore.txt new file mode 100644 index 00000000..1d3e2350 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_OS +Name=Object Pseudo-Set +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/Script.c new file mode 100644 index 00000000..0ab5d0b7 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Classes.c4d/ObjectPseudoSet.c4d/Script.c @@ -0,0 +1,145 @@ +/* Object Set */ + +#strict +#include L_ST +#include L_AI + +// This object is a object set. It contains only objects. It is faster than +// the generic set for object since it attaches info to all objects +// that are in the set. It removes nullpointers automatically and immediately +// It is, again, a pseudo set because: +// * one has numbered access through GetItem(i) (no guarantee for the order, though) +// (which is against the standard in other programming languages) +// +// A pointer to an object can not be in here twice - as opposed to the generic pseudo +// set + + +protected func Initialize() { + // The array starts at 1 (with real values) + // why: Because the info on each object which points to the position in the + // array might point at the zero position. Since "info not set" == 0 in Clonk + // this is a problem + aItems = CreateArray(1); + aItems[0] = -1; +} + + +// Is a set +public func IsSet() { return(true); } + +// Add an item +public func AddItem(object item) { + if(!item) return(false); + // already in list? return false + if(GetInfo(item,0)) return(false); + + var length = GetLength(aItems); + aItems[length] = item; + SetInfo(item,0,length); + return(true); +} + +// Remove an item +public func RemoveItem(object item, bool fRemove) { + // to prevent nulls in the array + var ret = ReorderArray(item); + + // delete info of the object that is out of the set + ClearInfo(item); + + if(fRemove) item->RemoveObject(); + + // will return false if item is not existant + return(ret); +} + +// Get iPos item of ID idObj +public func GetItemByID(id idObj, int iPos) { + if(!idObj) return(false); + if(iPos < 0) return(false); + + // search for objects of that id + var item; + for(var i=0; item = GetItem(i); ++i) { + // found one of this id + if(GetID(item) == idObj) { + if(!iPos) return(item); + else iPos--; + } + } + // not found + return(false); +} + +// Remove all +public func Clear(bool fRemove) { + // remove object infos + var length = GetLength(aItems); + for(var i=1; iRemoveObject(); + } + + aItems = CreateArray(1); + aItems[0] = -1; + return(true); +} + +// get item +public func GetItem(int i) { + if(i < 0) return( false ); + // see Initialize for reason. array starts at 1 + if(i >= GetLength(aItems)-1) return(false); + return(aItems[i+1]); +} + +// automatically remove objects out of set on removal +public func FxIntInfoStop(object pObj, int iNum, int iReason) { + // if object is removed + if(iReason == 3) { + this()->ReorderArray(0,EffectVar(0,pObj,iNum)); + } +} + +// count. If id is given, count objects of that ID +public func GetItemCount(id idObj) { + if(!idObj) return(GetLength(aItems)-1); + + var sum = 0; + // search for objects of that id + var length = GetLength(aItems); + for(var i=1; i= GetLength(aItems)-1) return(false); + return(aItems[i]); +} + +private func GetItemPosition(item, int iPos) { + if(iPos < 0) return(-1); + + // gets iPos position... + // .. there may be other positions too + var length = GetLength(aItems); + var num = 0; + for(var i=0; i~IsAiming()); + + return(WildcardMatch(GetAction(), "Aim*")); +} + +public func ReadyToAim() { // bereit zum Zielen + // In Gebäude + if(Contained()) return(Contained()->~ReadyToAim()); + // Nur beim Laufen + if(GetProcedure(this) == "WALK") return true; +} + +public func ControlConf(int conf) +{ + // Feineres Zielen mit JnR-Steuerung möglich + if(GetPlrCoreJumpAndRunControl(GetController())) + DoAiming(conf * AimStep() / 3); + else + DoAiming(conf * AimStep()); +} + +public func DoAiming(int iChange) { + //zielen wir überhaupt? + if(!IsAiming()) + return; + + var angle = Abs(crosshair->GetAngle()) + iChange; + + // Winkel anpassen, wenn keine freie Auswahl (klassische Steuerung) + if(!GetPlrCoreJumpAndRunControl(GetController())) + angle = angle-angle%AimStep(); + + // Winkel wird zu groß? + if(angle > AimMax() || angle < 0) + return; + + if(GetDir() == DIR_Left) + angle = 360-angle; + crosshair->SetAngle(angle); + + UpdateAiming(); +} + +public func DoMouseAiming(int iTx, int iTy) { + if(!Contained()) { + + var iAngle = Normalize(Angle(GetX(),GetY(),iTx,iTy),-180); + + if(iAngle > 0) + SetDir(DIR_Right); + else + SetDir(DIR_Left); + + //Winkel wird zu groß? + iAngle = BoundBy(iAngle,-AimMax(),+AimMax()); + + crosshair->SetAngle(iAngle); + UpdateAiming(); + //Wichtig: Waffe updaten + EffectCall(this,LocalN("wpneffect",this),"Timer"); + + // Fertig, Feuern! + if(!(Contents()->~IsRecharging()) && !(Contents()->~IsShooting())) + FireAimWeapon(); + return true; + } + return false; +} + +public func UpdateAiming() { + if(!IsAiming()) + return; + + var a = crosshair->GetAngle(); + + //Position des Attachvertex so verschieben, dass das Kreuz von der Waffe aus ist + UpdateVertices(); + + if((GetDir() == DIR_Left && a > 0) || + (GetDir() == DIR_Right && a < 0)) + crosshair->ChangeDir(); + + SetPhase(AimAngle2Phase(a)); +} + +public func StopAiming() { // Zielen beenden + SetComDir(COMD_Stop); + SetAction("Walk"); + this()->~CheckArmed(); + Sound("Grab"); + + DeleteCrosshair(); + RemoveEffect("UpdateAiming", this); + + //Vertices zurücksetzen + ResetVertices(); + + // Callback + if(Contents(0)) Contents(0)->~AimStop(); + return(1); +} + +public func FxUpdateAimingTimer(object pTarget, int iNr) +{ + UpdateAiming(); + return true; +} + +public func StartAiming() { // Anfangen zu zielen + if(Contained()) return(Contained()->~StartAiming()); + + SetXDir(0); + + SetAction("Aim"); + + // Aim low if possble + if(Contents(0)->~GetFMData(FM_Aim) == 2 || Contents(0)->~GetFMData(FM_Aim) == -1) + if(GetActMapVal("Name","AimLow",GetID())) + SetAction("AimLow"); + + SetPhase(AimAngle2Phase(90)); + SetComDir(COMD_Stop); + + InitCrosshair(); + + if(!GetEffect("UpdateAiming", this)) + AddEffect("UpdateAiming", this, 1, 1, this); + + // Callback + if(Contents(0)) Contents(0)->~AimStart(); +} + +/* Interne Funktionen */ + +private func InitCrosshair() { + crosshair = CreateObject(HCRH,0,0,GetOwner()); + crosshair->Init(this()); + crosshair->SetAngle(90); +} + +private func DeleteCrosshair() { + if(crosshair) crosshair->RemoveObject(); +} + +private func UpdateVertices() { + var x,y,r; + this->~WeaponAt(x,y,r); + SetVertex(0,0,x/1000 * (GetDir()*2-1),0,2); + SetVertex(0,1,y/1000,0,2); +} + +private func ResetVertices() { + SetVertex(0,0,0); + SetVertex(0,1,0); +} + +private func AimAngle2Phase(int angle) { + angle = Normalize(angle,-180); + var phases = GetActMapVal("Length",GetAction()); + var newphase = Min( phases-1, phases*Abs(angle)/AimMax() ); + return (newphase); +} + +private func FireAimWeapon() { + this->~Control2Contents("ControlThrow"); +} + +private func ChangeWeapon(object pTarget) { + // Zielaktion abbrechen (Spezial: außer wenn mit anwählbarem + // Objekt auch gezielt werden kann...) + // Zielaktion anpassen + if(pTarget->~IsWeapon()) { + var phase = GetPhase(); + if(pTarget->~GetFMData(FM_Aim) > 0) + SetAction("AimLow"); + else + SetAction("Aim"); + + SetPhase(phase); + } + else { + StopAiming(); + } +} + +/* Overloads */ + +public func Destruction() { + DeleteCrosshair(); + return _inherited(...); +} + +public func ReadyToFire() { + + if(WildcardMatch(GetAction(), "Aim*")) return(true); + + return(_inherited()); +} + +public func AimAngle(int iMaxAngle, int iRange) { // Zielwinkel bestimmen + var angle; + var x,y,r; + this->~WeaponAt(x,y,r); + + if(!IsAiming()) + angle = (90+r)*(GetDir()*2-1); + else + angle = crosshair->GetAngle(); + + if(iMaxAngle) { + var target = this->~GetTarget(angle,iMaxAngle,iRange); + if(target) + angle = Angle(GetX(),GetY(),GetX(target),GetY(target)); + } + + return(angle); +} diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/DefCore.txt new file mode 100644 index 00000000..4cf74522 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_AG +Name=Has Agility +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/Script.c new file mode 100644 index 00000000..c951d003 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/HasAgility.c4d/Script.c @@ -0,0 +1,219 @@ +/* Has agility functionality */ + +#strict + +/* Dieses Script bietet die Grundfunktionalität der Beweglichkeit des + Hazardclonks. Um diese Funktionalität zu bedienen, im inkludierenden + Script in folgenden Control*-Funktionen eine Zeile an der geeigneten + Stelle hinzufügen. Und zwar bei + + -Up, -Left, -Right, -LeftDouble, -RightDouble, -UpDouble. + + Im Beispiel von ControlLeftSingle: + + if(ControlAgility("ControlLeftSingle")) return(1); + + Außerdem muss im StartCall von Jump-Aktionen die Funktion JumpStart(); + aufgerufen werden bzw. wenn diese schon im Script vorhanden ist am Ende + _inherited aufgerufen werden. + + Agility kann mit der Leiterklettern-Funktionalität zusammenarbeiten. +*/ + +/* Control from the clonk */ + +private func ControlAgility(string strControl) { + // return 0 if the rest of the clonks script should be executed + + // left + if(strControl eq "ControlLeft") { + if(this()->IsJumping()) { + SetDir(DIR_Left); + SetComDir(COMD_Left); + } + + var iEff = AddEffect("ControlStack", this, 110, 5, this); + EffectVar(0, this, iEff) = COMD_Left; + return 0; + } + + // right + if(strControl eq "ControlRight") { + if(this()->IsJumping()) { + SetDir(DIR_Right); + SetComDir(COMD_Right); + } + + var iEff = AddEffect("ControlStack", this, 110, 5, this); + EffectVar(0, this, iEff) = COMD_Right; + return 0; + } + + // left double + if(strControl eq "ControlLeftDouble") { + if(MayFlip()) + { + if(GetDir() == DIR_Left) + ForwardFlip(-30); + else + BackFlip(-30); + + return 1; + } + } + + // right double + if(strControl eq "ControlRightDouble") { + if(MayFlip()) + { + if(GetDir() == DIR_Right) + ForwardFlip(-30); + else + BackFlip(-30); + + return 1; + } + } + + // up + if(strControl eq "ControlUp") { + if(WildcardMatch(GetAction(), "Scale*") && GetActTime() < 5) + EffectVar(2, this, AddEffect("ControlStack", this, 110, 5, this)) = true; + + if(GetEffect("ControlStack", this)) + EffectVar(1, this, GetEffect("ControlStack", this)) = COMD_Up; + + return 0; + } + + if(strControl eq "ControlUpDouble") { + if(this()->IsJumping() && !GetEffect("ExtraJump", this)) + if(GetYDir() <= 5) + return ExtraJump(); + + return 0; + } + +} + +private func MayFlip() { + if(this()->IsJumping()) + if(!GetEffect("ExtraJump", this)) + return(true); +} + +/* JumpStart */ + +// Jump-StartCall: Spezialsprung? +// overloaded by Clonk +public func JumpStart(bool bBackflip) +{ + // Clonk auf festem Boden? + if (!GetEffect("ExtraJump", this)) { + var iEff, iComd, iStr = 0, iYDir = 0; + if(iEff = GetEffect("ControlStack", this)) + { + if(EffectVar(1, this, iEff) != COMD_Up && !bBackflip) return; + if(EffectVar(2, this, iEff)) { iYDir = -60; iStr = -40; } + iComd = EffectVar(0, this, iEff); + + RemoveEffect(0, this, iEff); + if(iComd == COMD_Left) + { + if(GetDir() == DIR_Left) + ForwardFlip(iStr, 0, iYDir); + else + BackFlip(iStr, 0, iYDir); + } + if(iComd == COMD_Right) + { + if(GetDir() == DIR_Left) + BackFlip(iStr, 0, iYDir); + else + ForwardFlip(iStr, 0, iYDir); + } + } + } + // für ladder + _inherited(bBackflip); +} + +// Leiter-Funktionalität benutzend + +// NOTE: this overloads ladder functionality. So this one needs to be included +// after the ladder functionality +public func ReleaseLadderStop() { + //Backflip! :D + if(this()->ReleaseLadder(-20*(GetDir()*2-1))) { + SetAction("BackFlip"); + ScheduleCall(0, "BackFlipBoost", 1, 1); + AddEffect("ExtraJump", this, 111, 5, this); + } +} + +/* Jump functions */ + +protected func ExtraJump() +{ + var jump = GetPhysical("Jump", 0) * 100 / GetPhysical("Jump", 0,0, GetID()); + SetYDir(-40 * jump / 100); + SetXDir(GetXDir() / 2); + AddEffect("ExtraJump", this, 111, 5, this); +} + +protected func FxExtraJumpTimer() +{ + if(!WildcardMatch(GetAction(), "Jump*") + && !WildcardMatch(GetAction(), "*Flip") + && !WildcardMatch(GetAction(), "*Flight") + && GetAction() ne "Dive") + return -1; +} + +protected func BackFlip(int iStr, bool fNoJumpCalc, int iYDir) +{ + SetAction("BackFlip"); + ScheduleCall(0, "FlipBoost", 1, 1, !GetDir(), iStr, fNoJumpCalc, iYDir); + AddEffect("ExtraJump", this, 111, 5, this); +} + +protected func ForwardFlip(int iStr, bool fNoJumpCalc, int iYDir) +{ + if(!iStr && !iYDir) { iStr = -20; iYDir = -45; } + SetAction("ForwardFlip"); + ScheduleCall(0, "FlipBoost", 1, 1, GetDir(), iStr, fNoJumpCalc, iYDir); + AddEffect("ExtraJump", this, 111, 5, this); +} + +protected func FlipBoost(int iDir, int iStr, bool fNoJumpCalc, int iYDir) +{ + if(!iYDir) iYDir = -24; + iDir = iDir *2 -1; + var jump = GetPhysical("Jump", 0) * 100 / GetPhysical("Jump", 0,0, GetID()); + jump = BoundBy(jump + iStr, 0, 300); + if(fNoJumpCalc) jump = iStr; + SetXDir(40 * iDir * jump / 100); + SetYDir(iYDir * jump / 100); +} + +// Alte Funktion wird noch von ReleaseLadderStop benutzt +// | +// v + +protected func BackFlipBoost() +{ + // Wenn die Sprungkraft gerade verändert ist, gilt das auch für den Backflip + var jump = GetPhysical("Jump", 0) * 100 / GetPhysical("Jump", 0,0, GetID()); + SetXDir(40*((GetXDir()>0)*2-1) * jump / 100); // SetXDir(GetXDir()/*<-20*/* 3/2); + SetYDir(-24 * jump / 100); +} + +// ^ +// | + +public func FxControlStackEffect(string newEffect, object pTarget, int iNo) +{ + if(newEffect ne "ControlStack") return; + ChangeEffect(0, pTarget, iNo, 0, -1); + return -2; +} diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/DefCore.txt new file mode 100644 index 00000000..592efc64 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_TK +Name=Tank physics +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/Script.c new file mode 100644 index 00000000..1fc9818d --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/TankPhysics.c4d/Script.c @@ -0,0 +1,469 @@ +/* Tank functionality */ + +#strict + +/* Adds the tanks physics to the vehicle ---- + +The vehicle may not have any vertices. There are only four virtual vertices + (see below). The line + return(_inherited()); + has to be added as the last line of the function Initialize to get it working. + + The control, when the vehicle should stop, go, jump, turn (SetDir) is up to you. + For a player controlled vehicle, it could look like this: + + public func ContainedLeft() { + if(GetDir() != DIR_Left) { + SetDir(DIR_Left); + } + else if(!IsDriving()) Go(); +} + + The rest of the configuration is explained below. + +Interface: +Jump() - Jumps if it is driving on the ground +Go() - Drives on +Stop() - Stops +For changing the direction just use SetDir(); + +*/ + +/* Physics */ +/* ------------------------------------------------------------------------- */ + +// Jumping - Jump() +public func JumpStrengthX() { return(40); } // Strength +public func JumpStrengthY() { return(30); } +public func JumpDelay() { return(50); } // minimum Delay until next Jump + +// The vehicle has 4 virtual vertices. One left, one right, one on top, one on bottom +public func VertexLeft() { return(24); } +public func VertexRight() { return(24); } +public func VertexTop() { return(12); } +public func VertexBottom() { return(20); } +// VertexBottom should be bigger than XOffsetToWheels otherwise +// the vehicle may loose contact all the time + +// X- and Y-Offset to wheels (which are 2) from the center: assumes that the distance +// to the wheels are the same from the center. +public func XOffsToWheels() { return(18); } +public func YOffsToWheels() { return(15); } + +public func MaxSpeed() { return(1800); } // maximum speed +public func BrakeStrengh() { return(200); } // speed of braking +public func Acceleration() { return(200); } // speed of speeding up + +public func TurnAction() { return("Turn"); } // name of turning-action. Leave out if there is none. + +//public func CatLanding() { return(5); } + +public func SpiderMode() { return(true);} //experimental drive-on-walls and ceiling +public func MaxRotation() { return(70); } // max. rotation of landscape it can stand (0 for no max rotation) + +/* Callbacks */ +/* ------------------------------------------------------------------------- */ + +public func OnGo() {} +public func OnStop() {} +public func OnJumpStart() {} +public func OnJumpEnd() {} + +/* Initialization */ + +local stop; +local speed; + +local left, right, top; +local groundl, groundm, groundr; +local xr,yr, xm, ym, xl, yl; +local falling; +// more precise r (*rp) +local rpos; +// rotation precision +local rp; + +protected func Initialize() { + stop = true; + speed = 0; + falling = false; + rp = 100; + + AddEffect("Physics",this(),1,1,this()); + + return(_inherited()); +} + + +/* Jumping */ + +public func IsJumping() { return(GetEffect("JumpDelay",this())); } + +public func Jump() { + if(!IsTurning()) + if(IsDriving()) + if(!TopContact() && !LeftContact() && !RightContact()) + if(BottomContact()) + if(!IsJumping()) { + var dir = (GetDir()*2-1)*1; + + var strx = JumpStrengthX() * dir; + var stry = JumpStrengthY(); + var r = GetR(0,rp); + + SetXDir(+Sin(r,stry,rp)+Cos(r,strx,rp)); + SetYDir(-Cos(r,stry,rp)+Sin(r,strx,rp)); + SetRDir(dir); + AddEffect("JumpDelay",this(),1,1,this(),0,JumpDelay()); + + OnJumpStart(); + + return(true); + } +} + +protected func FxJumpDelayTimer(object pTarget, int iEffectNumber, int iEffectTime) { + // Effekt + pTarget->~ThrustEffect(iEffectTime); + + EffectVar(0,pTarget,iEffectNumber)--; + if(EffectVar(0,pTarget,iEffectNumber) <= 0) return(-1); +} + +protected func FxJumpDelayStart(object pTarget, int iEffectNumber, int iTemp, int iTime) { + EffectVar(0,pTarget,iEffectNumber) = iTime; +} + +public func ThrustEffect(int iEffectTime) { } + +protected func FxPhysicsTimer(object pTarget, int iEffectNumber, int iEffectTime) { + + SetR(GetR(0,rp),0,rp); + + ContactCheck(); // Kontakt prüfen + + // on ground? + if(IsStuck()) { + StuckStop(); + falling = false; + } + else if(BottomContact()) { + if(falling) { + falling = false; + OnJumpEnd(); + } + // driving + if(IsDriving()) Drive(); + // Fix rotation and pos + Stand(); + } + else { + // else fall + Fall(); + falling = true; + } + +} + +/* Find ground/walls */ + +public func BottomContact() { + if(IsJumping()) { + if(GetEffect("JumpDelay",this(),0,6) < 10) + return(false); + } + return(groundm < VertexBottom() || groundl < VertexBottom() || groundr < VertexBottom()); +} +public func TopContact() { return(top < VertexTop()); } +public func LeftContact() { return(left < VertexLeft()); } +public func RightContact() { return(right < VertexRight()); } +public func IsStuck() { return(groundm < VertexBottom()-15); } + +private func ContactCheck() { + + right = FindGround(-4,2); + top = FindGround(0,1); + left = FindGround(-4,3); + + groundm = GroundPos(0,0,xm,ym); + groundl = GroundPos(-12,0,xl,yl); + groundr = GroundPos(+12,0,xr,yr); +} + +protected func FindGround(int x, int dir, bool downisdown) { + var xpos, ypos; + return(GroundPos(x,dir,xpos,ypos,downisdown)); +} + +protected func GroundPos(int x, int dir, &xpos, &ypos, bool downisdown) { + + var startx, starty, distx, disty, rev; + + var r = GetR(0,rp); + if(downisdown) r = 0; + + // Ground that is further away than about 30px is not relevant for the tank + var dist; + // down = 0, up = 1, right = 2, left = 3 + if(dir == 0) { dist = VertexBottom()*2; rev = 0; } + if(dir == 2) { dist = VertexRight()*2; rev = 0; } + if(dir == 1) { dist = -VertexTop()*2; rev = 1; } + if(dir == 3) { dist = -VertexLeft()*2; rev = 1; } + + // up or down + if(dir == 0 || dir == 1) { + startx = Cos(r,x,rp); + starty = Sin(r,x,rp); + distx = Sin(r,-dist,rp); + disty = Cos(r,dist,rp); + } + // left or right + if(dir == 2 || dir == 3) { + // a bit further down + startx = Sin(r,-x,rp); + starty = Cos(r,+x,rp); + distx = Cos(r,dist,rp); + disty = Sin(r,dist,rp); + } + + var i = 0; + var phase = 0; + // search... + while(Abs(i) <= Abs(dist)) { + var newx = startx+distx*i/dist; + var newy = starty+disty*i/dist; + + // landscape borders + if(GetX()+newx < 0 || GetX()+newx >= LandscapeWidth() || GetY()+newy >= LandscapeHeight()) { + if(phase == 0) { phase = 1; continue; } + else break; + } + // sky found... keh + if(phase == 0) { + if(rev ^ GBackSolid(newx,newy)) { phase = 1; continue; } + ++i; + } + // solid found... keh + if(phase == 1) { + if(rev ^ !GBackSolid(newx,newy)) break; + --i; + } + } + + // i is our man! + var groundx = startx+distx*i/dist; + var groundy = starty+disty*i/dist; + + xpos = groundx; + ypos = groundy; + + if(rev) i = -i; + + // if at the bottom and it is open: fall down + if(GetScenBottomOpen()) + if(groundy+GetY()==LandscapeHeight()) + return(1000); + + // returns the y-pos where there is ground ... 1000 if not found + return(i); +} + +/* Rotation and Position */ + +public func SetRAt(int angle, int xoffs, int offs, int prec) { + if(!prec) prec = 1; + var r = GetR(0,prec); + //rotate + var ox = Sin(r,offs,prec)-Cos(r,xoffs,prec); + var oy = Cos(r,offs,prec)+Sin(r,xoffs,prec); + SetR(angle,0,prec); + r = GetR(0,prec); + var nx = Sin(r,offs,prec)-Cos(r,xoffs,prec); + var ny = Cos(r,offs,prec)+Sin(r,xoffs,prec); + + var xpos = nx-ox; + var ypos = -ny+oy; + + SetPosition(GetX()+xpos,GetY()+ypos); +} + +private func FixPosition() { + var gp = YOffsToWheels(); + // set the distance to ground to YOffsToWheels + //var ground, xr,yr, xm, ym, xl, yl; + //var groundm = GroundPos(0,0,xm,ym)-gp; + //var groundl = GroundPos(-XOffsToWheels(),0,xl,yl)-gp; + //var groundr = GroundPos(+XOffsToWheels(),0,xr,yr)-gp; + var ground; + + // which point + var min = Min(groundl,Min(groundm,groundr)); + var best = 0; + if(min == groundm) { ground = groundm-gp; best = 0; } + if(min == groundl) { ground = groundl-gp; best = -1; } + if(min == groundr) { ground = groundr-gp; best = +1;} + + var groundx = Sin(GetR(0,rp),-ground,rp); + var groundy = Cos(GetR(0,rp),ground,rp); + + SetPosition(GetX()+groundx,GetY()+groundy); + + // set r at the highest + /*var angle = 0; + var max = Max(groundl,Max(groundm,groundr)); + if(max == groundm) angle = Angle(xl,yl,xr,yr,rp)-90*rp; + if(max == groundl) angle = Angle(xm,ym,xr,yr,rp)-90*rp; + if(max == groundr) angle = Angle(xl,yl,xm,ym,rp)-90*rp; + + SetRAt(angle,best*XOffsToWheels(),YOffsToWheels(),rp); + */ + //Message("best: %d - angle: %d - %d,%d,%d",this(),best,angle,groundl,groundm,groundr); + +} + +private func GetLandscapeAngle() { + var x1, y1, x2, y2; + var left = GroundPos(-XOffsToWheels(),0,x1,y1); + var right = GroundPos(+XOffsToWheels(),0,x2,y2); + var angle = Angle(x1,y1,x2,y2,rp)-90*rp; + angle = Normalize(angle,-180*rp,rp); + return(angle); +} + +private func CheckRotation(int angle) { + // checks desired rotation against max rotation + var mrot = MaxRotation()*rp; + + if(GetDir() == DIR_Left) { + if(angle > mrot || angle < Min(-90*rp,-mrot)) return(false); + } + else { + if(angle < -mrot || angle > Max(90*rp,mrot)) return(false); + } + return(true); +} + +private func FixR(bool d) { + var angle = GetLandscapeAngle(); + + if(!d || CheckRotation(angle)) { + + // max rotation + var mrot = MaxRotation()*rp; + if(mrot) { + if(GetDir() == DIR_Left) { + var buntstift = Min(-90*rp,-mrot); + if(angle > mrot) angle = mrot; + else if(angle < buntstift) angle = buntstift; + } + else { + var buntstift = Max(90*rp,mrot); + if(angle < -mrot) angle = -mrot; + else if(angle > buntstift) angle = buntstift; + } + } + SetRAt(angle,0,YOffsToWheels(),rp); + + } +} + +/* Standing */ + +private func Stand() { + SetRDir(0); + + FixR(true); + + FixPosition(); + + FixR(true); + +} + +/* Falling */ + +protected func Fall() { + // Y Dir + // jumping into ceiling + if(TopContact()) { + var num; + if(num = GetEffect("JumpDelay",this(),0)) + RemoveEffect(0,this(),num); + SetYDir(Max(GetYDir(0,1000),500),0,1000); + } + SetYDir(GetYDir(0,1000)+GetGravity()*2,0,1000); + + if(LeftContact() || RightContact()) { + SetXDir(0); + } + + FixR(true); +} + +/* Driving */ + +public func IsDriving() { return(!stop || speed); } +public func Go() { stop = false; OnGo(); } +public func Stop() { stop = true; OnStop(); } + +public func IsTurning() { return(GetAction() eq TurnAction()); } + +private func Drive() { + + if(!CheckRotation(GetLandscapeAngle())) + { + Fall(); + return; + } + + // stopping + if(stop) speed = Max(speed-BrakeStrengh(),0); + // driving + else speed = Min(speed+Acceleration(),MaxSpeed()); + + // when turning + var curspeed = speed; + if(IsTurning()) { + var len = GetActMapVal("Length",TurnAction()); + var turn = Abs((GetPhase()-len/2)); + curspeed = Sin(turn*180/len,speed); + } + + // drive faster down, slower up + //speed = Sin((GetR(0,rp)*(GetDir()*2-1)+45),2*speed,rp); + + // drive + var dir = (GetDir()*2-1); + SetXDir(Cos(GetR(0,rp),curspeed,rp)*dir,0,1000); + SetYDir(Sin(GetR(0,rp),curspeed,rp)*dir,0,1000); + + // should we stop? + // stop if driving into a wall + if(LeftContact()) if(GetDir() == DIR_Left) StuckStop(); + if(RightContact()) if(GetDir() == DIR_Right) StuckStop(); + // on the ceiling?? + if(TopContact()) if(BottomContact()) StuckStop(); +} + +private func StuckStop() { + Stop(); + speed = 0; + SetXDir(); + SetYDir(); +} + +// interface to outside + +public func SetR(int r, object obj, int prec) +{ + if(!prec) prec = 1; + if(obj == this || !obj) rpos = r*rp/prec; + return inherited(r/prec,obj); +} + +public func GetR(object obj, int prec) +{ + if(!prec) prec = 1; + if(obj == this || !obj) return rpos*prec/rp; + return inherited(obj); +} diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/DefCore.txt new file mode 100644 index 00000000..11ce1634 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_DR +Name=Use Drone +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/Script.c new file mode 100644 index 00000000..0cf2796a --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/Script.c @@ -0,0 +1,58 @@ +/* Context Use drone functionality */ + +#strict 2 + +// Enables object to use drones (with context menu/double dig) + +protected func ContextSupportDrone() +{ + [$CtxDrone$|Image=DRSU|Condition=GetSupportDrone] + var pDrone = GetSupportDrone(); + if(pDrone) + { + CreateMenu(DRSU,0,0,0,0,0,1); + AddMenuItem("$CtxDroneTurnOff$", "TurnOffDrone", DRSU); + AddMenuItem("$CtxDroneGuard$", "DroneGuardHere", DRSU); + AddMenuItem("$CtxDroneFollow$", "DroneFollowMe", DRSU); + } +} + +public func TurnOffDrone() +{ + var pDrone = GetSupportDrone(); + if(pDrone) pDrone->TurnOff(); +} + +public func DroneGuardHere() +{ + var pDrone = GetSupportDrone(); + if(pDrone) + { + pDrone->SetGuardPosition(GetX(),GetY()); + pDrone->FollowClonk(false); + } +} + +public func DroneFollowMe() +{ + var pDrone = GetSupportDrone(); + if(pDrone) pDrone->FollowClonk(true); +} + + +public func GetSupportDrone() +{ + for( pDrone in FindObjects(Find_Func("IsDrone"), Find_Action("Fly"), Find_Owner(GetOwner()))) + { + if(pDrone->GetGuardedClonk() == this) + return pDrone; + } +} + +// Kann Ausrüstung benutzen +public func CanUse(id idObj) +{ + // Das Objekt kann natürlich Ausnahmen vornehmen.... + if(DefinitionCall(idObj, "IsDrone")) return true; + return _inherited(idObj); +} \ No newline at end of file diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/StringTblDE.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/StringTblDE.txt new file mode 100644 index 00000000..79b10484 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/StringTblDE.txt @@ -0,0 +1,4 @@ +CtxDrone=Drone +CtxDroneTurnOff=Ausschalten +CtxDroneGuard=Hier bewachen +CtxDroneFollow=Folge mir \ No newline at end of file diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/StringTblUS.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/StringTblUS.txt new file mode 100644 index 00000000..ecd0e65f --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseDrone.c4d/StringTblUS.txt @@ -0,0 +1,4 @@ +CtxDrone=Drone +CtxDroneTurnOff=Turn off +CtxDroneGuard=Guard here +CtxDroneFollow=Follow me \ No newline at end of file diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/DefCore.txt new file mode 100644 index 00000000..4cb0764e --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_GE +Name=Use Gear +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/Script.c new file mode 100644 index 00000000..5bc5f869 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/Script.c @@ -0,0 +1,224 @@ +/* Context Use equipment functionality */ +/* Ausrüstungssteuerung */ + +/* + Objekte die die volle Funktionalität benutzen wollen müssen folgende Dinge + sicherstellen... Bis auf das erste sind alle optional. Falls definiert: + + * In "Construction" _inherited() aufrufen + + * In "OnDmg" _inherited() aufrufen und den Rückgabewert zum eigenen + Rückgabewert hinzuaddieren + [falls die Ausrüstung genommenen Schaden modifizieren können soll + z.B. die Rüstung] + + * In "OnHit" _inherited() aufrufen + [falls Ausrüstung Effekte nach Schaden machen können soll + (z.B. Aufblinken des Schildgenerators)] + + * In "Death" _inherited() aufrufen + [falls der Clonk bei Tod die Ausrüstung fallen lassen soll] + +*/ + +#strict + +local aGear; + +/* An Objekt ranhängen... */ + +// Array erstellen +protected func Construction() +{ + _inherited(); + aGear = CreateArray(); +} + +// Ausrüstung fallenlassen +protected func Death() +{ + if(HasGear()) TakeOffGear(); + _inherited(); +} + +// Ermöglicht die Modifikation des Schadens für das Objekt durch die Ausrüstung +public func OnDmg(int iDamage, int iType) { + var before = _inherited(iDamage,iType); + + var add = before; + var gear; + for(gear in aGear) { + // not null... + if(gear) { + add += (gear->~OnClonkDmg(iDamage, iType, this())); + } + } + return(add); +} + +// Effekte o.Ä. anzeigen +public func OnHit(int iDmg, int iType, object pFrom) +{ + _inherited(iDmg, iType, pFrom); + + // Ausrüstung will vielleicht mitreden... + for(var gear in aGear) + // not null... + if(gear) + gear->~OnClonkHit(iDmg, iType, this()); +} + +/* Kontext menü */ + +// Ausrüstung benutzen +protected func ContextUseEquipment(object pCaller) { + [$CtxUseEquipmentDesc$|Image=HARM|Condition=HasUsableGear] + if(!HasUsableGear()) return(); + CreateMenu(HARM,0,0,0,0,0,1); + // nutzbare Ausrüstung anzeigen + for(var i=0; i~ConUseable()) + AddMenuItem(gear->ConDesc(), "UseEquipment", GetID(gear), 0, 0, i); + } + + return(1); +} + +// Ausrüstung ablegen +protected func ContextUnbuckle(object pCaller) +{ + [$CtxUnbuckleDesc$|Image=HARM|Condition=FunnyBug] + if(!HasGear()) return(); + CreateMenu(HARM,0,0,0,0,0,1); + // alle Ausrüstung anzeigen + for(var i; i~ConUseable()) + return(1); + } +} + +// Objekt hat eine Ausrüstung des Typs iGearType angelegt +// alternativ kann man per idGear auch nach einer bestimmten +// Ausrüstung suchen. Ohne Parameter = irgendeine ausrüstung angelegt +public func HasGear(int iGearType, id idGear) +{ + // nach bestimmter ID suchen + var gear; + if(idGear) { + for(gear in aGear) + if(gear) + if(GetID(gear) == idGear) + return(gear); + return(false); + } + + // nach bestimmtem Typ suchen + if(iGearType) { + if(aGear[iGearType]) + return(true); + return(false); + } + + // keine Parameter: allgemein ob Ausrüstung da ist + for(gear in aGear) + if(gear) + return(true); + + return(false); +} + +// Kann Ausrüstung benutzen +public func CanUse(id idObj) +{ + // Das Objekt kann natürlich Ausnahmen vornehmen.... + if(DefinitionCall(idObj, "IsHazardGear")) return(1); + return(_inherited(idObj)); +} + + + +/* Benutzen */ + +// Ausrüstung benutzen +protected func UseEquipment(id bla, int i) +{ + if(aGear[i]) + aGear[i]->ConUse(this()); +} + +// Ausrüstung ablegen +public func TakeOffGear(object pGear, int iGearType) +{ + var geartype = iGearType; + + // man kann auch statt iGearType das konkrete Objekt angeben + if(!geartype) { + + // ohne Parameter = alles runter + if(!pGear) { + var i; + for(var i=0; iGetGearType(); + // das Objekt ist nicht angelegt + if(aGear[geartype] != pGear) return(0); + } + else { + // angegebener geartype garnicht angelegt + if(!HasGear(geartype)) return(0); + } + + // er ist angelegt: ok, ablegen + aGear[geartype]->GearUnbuckle(this()); + + // aufsammeln wenn möglich + if(aGear[geartype]) + Collect(aGear[geartype]); + + // und löschen + aGear[geartype] = 0; +} + +// Ausrüstung anlegen +public func EquipGear(object pGear) +{ + // überhaupt benutzbar + if(!pGear) return(0); + if(!(pGear->~IsHazardGear())) return(0); + // schon eine Ausrüstung dieses Typs am Clonk + var geartype = pGear->GetGearType(); + if(HasGear(geartype)) return(0); + + // ok: + // speichern + aGear[geartype] = pGear; + // Auslösen + return(1); +} + +protected func FunnyBug() { return(HasGear()); } diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/StringTblDE.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/StringTblDE.txt new file mode 100644 index 00000000..d75d64ad --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +CtxUnbuckleDesc=Ausrüstung ablegen +CtxUnbuckleItem=%s ablegen +CtxUseEquipmentDesc=Ausrüstung benutzen diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/StringTblUS.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/StringTblUS.txt new file mode 100644 index 00000000..e3fb2038 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseGear.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +CtxUnbuckleDesc=Unbuckle equipment +CtxUnbuckleItem=Unbuckle %s +CtxUseEquipmentDesc=Use equipment diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/DefCore.txt new file mode 100644 index 00000000..f2f9dfcf --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_JP +Name=Use Jetpack +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/Script.c new file mode 100644 index 00000000..a7f02df2 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseJetpack.c4d/Script.c @@ -0,0 +1,64 @@ +/*-- Use Jetpack --*/ + +#strict 2 + +/* Der Clonk kann das Jetpack mit dieser Funktionalität benutzen + Dazu in ControlUpDouble, ControlRightDouble und ControlLeftDouble + jeweils die Funktion + if(ControlJetpack("ControlUpDouble")) return(1); + aufrufen (hier am Beispiel von ControlUpDouble). + + Damit während des JetpackFlight geschossen werden kann muss in ReadyToFire() + und AimOverride() am Ende return(_inherited()); aufgerufen werden. +*/ + +public func HasJetpack() +{ + return this->HasGear(0,JTPK); +} + +protected func ControlJetpack(string strControl) { + + var jetpack = this->HasJetpack(); + if(!jetpack) return false; + + var ret = false; + + // up double + if(strControl == "ControlUpDouble") { + ret = jetpack->ControlUpDouble(this()); + } + + // right double + if(strControl == "ControlRightDouble") { + ret = jetpack->ControlRightDouble(this()); + } + + // left double + if(strControl == "ControlLeftDouble") { + ret = jetpack->ControlLeftDouble(this()); + } + + return ret; +} + +/* Overloads */ + +private func IsJumping() { + if(WildcardMatch(GetAction(),"JetpackFlight*")) + return true; + return _inherited(); +} + +public func ReadyToFire() { + + if(GetAction() == "JetpackFlight") return true; + + return _inherited(); +} + +public func AimOverride() { + if(GetAction() == "JetpackFlight") return true; + + return _inherited(); +} \ No newline at end of file diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/DefCore.txt b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/DefCore.txt new file mode 100644 index 00000000..1a7c5158 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/DefCore.txt @@ -0,0 +1,5 @@ +[DefCore] +id=L_LA +Name=Use Ladder +Version=4,9,5 +Category=1 diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/Graphics.png b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/Graphics.png new file mode 100644 index 00000000..eedfd5f5 Binary files /dev/null and b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/Graphics.png differ diff --git a/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/Script.c b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/Script.c new file mode 100644 index 00000000..253c585c --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Functionalities.c4d/UseLadder.c4d/Script.c @@ -0,0 +1,433 @@ +/* Use ladder functionality */ + +#strict + + +/* Dieses Script bietet die Grundfunktionalität des an Leitern kletterns. Damit + der Clonk auch wirklich daran klettern kann, muss folgendes noch hinzugefügt + werden. In der ActMap die Aktion hinzufügen: + +[Action] +Name=ScaleLadder +Procedure=NONE +Directions=2 +FlipDir=1 +Length=16 +Facet=0,20,16,20,0,0 +NextAction=ScaleLadder + + In allen Jump-Aktionen wie "Jump", "JumpArmed" oder "Dive" + +StartCall=JumpStart + + hinzufügen. Sowie in allen Control*-Funktionen eine Zeile an der geeigneten + Stelle hinzufügen. Im Beispiel von ControlUp: + +if(ControlLadder("ControlUp")) return(1); + + Und zwar für Up, Down, Right, Left, Dig, Throw, Command (für "MoveTo") +*/ + +local lastladder; + +/* Zum Klettern an Leitern und Co. */ + +// Funktionen: +// GetLadderSpeed - Gibt Leiterklettergeschwindigkeit zurück +// FindLadder - Findet kletterbares in der Umgebung +// GrabLadder - Clonk greift angegebene Leiter +// ReleaseLadder - Clonk lässt Leiter los +// ReleaseLadderUp - Clonk klettert nach oben und lässt los +// ReleaseLadderDown - Clonk klettert nach unten und lässt los +// ReleaseLadderStop - Clonk klettert nicht und lässt los +// LadderThrow - Werfen beim Klettern +// LadderDig - Graben beim Klettern +// +// ClimbLadder - Mauskontrolle +// ControlLadder - Steuern des Leiterkletterns +// AdjustLadderOffset - Lässt den Clonk an der Leiter kleben +// +// FxScalingLadderStart-Effekt fürs Klettern +// FxScalingLadderTimer-... +// +// JumpStart - StartCall von Jump +// IsJumping - Einfacher Callback ob der Clonk springt +// +// FxJumpingTimer - Effekt fürs Springen (checkt ob Leiter da) + + +// Um wieviel der Clonk an Leitern schneller klettert +// Wert/10 = Wand/Leiter; 10 = 1.0, 15 = 1.5,... +// Abwärtskompatibilität! +static const HZCK_LADDERSPEED = 12; +public func GetLadderSpeed() { return(HZCK_LADDERSPEED); } + +//Ladder wird hier nur so gebraucht, alle Objekte, bei denen IsClimbable true zurückgibt können bestiegen werden! +public func FindLadder() +{ + var iOffset = 6; + if (GetDir() == DIR_Left()) + iOffset = -6; + var tmp; + while(tmp = FindObject(0, iOffset, 0,0,0,0,0,0,0,tmp)) + if(Abs(GetX() - GetX(tmp)) < 6) + if(tmp->~IsClimbable()) + return(tmp); + return(0); +} + +public func GrabLadder(object pLadder) +{ + if(lastladder == pLadder) + return(0); + // Kletteraktion +// SetAction("ScaleLadder", pLadder); + if(!GetPlrCoreJumpAndRunControl(GetController())) + SetComDir(COMD_Stop); + + //erstmal checken ob Backflip 4 great Specialeffects! + if((GetAction() S= "BackFlip" && !Stuck())) { + //Sound, weil Geschwindigkeit oder so + Sound("Kime*"); + } + + SetXDir(); + SetYDir(); + + //Position anpassen (in der Luft klettern ist doch weird ;)) + AdjustLadderOffset(pLadder); + + //nö, dann eben normal anhalten + SetAction("ScaleLadder", pLadder); + + // Klettereffekt + AddEffect("ScalingLadder", this(), 1, 1, this()); +} + +public func ReleaseLadder(int iXDir, int iYDir) +{ + var dir; + + var diffx, pLadder = GetActionTarget(), xpos = GetX(pLadder); + // von was loslassen..? + if(!pLadder) + return(0); + + lastladder = pLadder; + + // Klettereffekt beenden + RemoveEffect("ScalingLadder", this()); + + //und runter von der Leiter + if(dir < 0 || GetContact(0,1,CNAT_Bottom)) { + SetAction("Walk"); + } + if(dir > 0) { + SetAction("Hangle"); + } + else if(GetAction() ne "Tumble") + SetAction("Jump"); + + SetXDir(iXDir); + SetYDir(iYDir); + return(1); +} + +public func ReleaseLadderUp() { + //Normal runterspringen + ReleaseLadder(-10*(GetDir()*2-1)); +} + +public func ReleaseLadderDown() { + //Normal runterspringen + ReleaseLadder(-10*(GetDir()*2-1)); +} + +public func ReleaseLadderStop() { + //Normal runterspringen + ReleaseLadder(-10*(GetDir()*2-1)); +} + +public func LadderThrow() { + // Ablegen + SetComDir(COMD_Stop); + SetCommand(0, "Drop"); +} + +public func LadderDig() { + +} + +protected func ClimbLadder() +{ + if(!GetCommand()) return(); + // Testen, ob wir noch klettern + if(GetAction() ne "ScaleLadder") return(); + // Feststellen, ob nach oben oder unten + var targetx = GetCommand(this(), 2); + var targety = GetCommand(this(), 3); + + if(targety < GetY()) SetComDir(COMD_Up); + if(targety > GetY()) SetComDir(COMD_Down); + + // Wegpunkt oben? früher abspringen. + if(Inside(GetY()-targety,5,15) && Abs(GetX()-targetx) < 30) + { + var comd = GetComDir(); + if(targetx < GetX()) + { + ControlLadder("ControlLeft"); + if(GetDir() == DIR_Left) + SetComDir(comd); + } + if(targetx > GetX()) + { + ControlLadder("ControlRight"); + if(GetDir() == DIR_Right) + SetComDir(comd); + } + } + + // Sind wir ungefähr da? + if(Inside(GetY(), targety-5, targety+5) && PathFree(GetX(), GetY(), targetx, targety)) + { + // Wir versuchen mal, abzuspringen (das klappt spätestens beim 2. Mal(theoretisch)) + + //wenn Ziel weiter oben: immer nach oben abspringen + if(GetY() > targety) + SetComDir(COMD_Up); + //Ziel weiter unten? Nach unten abspringen. + else if(Abs(GetY()-targety) > 50) + SetComDir(COMD_Down); + //Ziel weiter weg? Backflip! :D + else if(Abs(GetX()-targetx) > 80) + SetComDir(COMD_Stop); + + var comd = GetComDir(); + if(targetx < GetX()) + { + ControlLadder("ControlLeft"); + if(GetDir() == DIR_Left) + SetComDir(comd); + } + if(targetx > GetX()) + { + ControlLadder("ControlRight"); + if(GetDir() == DIR_Right) + SetComDir(comd); + } + } +} + +private func ControlLadder(string strControl, par1) // par1 is comdir for ControlUpdate +{ + + // Wenn man schnell genug ist, kann man sich so sogar wieder an der Leiter anhalten! + if(lastladder) + { + lastladder = 0; + } + + // Nicht an einem kletterbaren Objekt. + if (GetAction() ne "ScaleLadder") return(0); + + // Klettert an der Leiter + if(strControl S= "ControlCommand") { + ClimbLadder(); + return(1); + } + + //Log("%s: %s",GetName(),strControl); //DEBUGZ! + + // JnR + if (strControl S= "ControlUpdate") + { + var comdir = par1; + // Strip away COMD_Left/COMD_Right, this is handled via ControlLeft/ControlRight + if(ComDirLike(comdir, COMD_Left)) comdir = ComDirTransform(comdir, COMD_Right); + if(ComDirLike(comdir, COMD_Right)) comdir = ComDirTransform(comdir, COMD_Left); + SetComDir(comdir); + } + + // Rauf + if (strControl S= "ControlUp" && !GetPlrCoreJumpAndRunControl(GetController())) + SetComDir(COMD_Up); + // Runter + if (strControl S= "ControlDown" && !GetPlrCoreJumpAndRunControl(GetController())) + SetComDir(COMD_Down); + // Rechts + if (strControl S= "ControlRight") + { + // Richtung wechseln + if (GetDir() == DIR_Right) { + SetDir(DIR_Left); + SetComDir(COMD_Stop); + if (!AdjustLadderOffset(GetActionTarget())) //können wir überhaupt? + SetDir(DIR_Right()); + } + // Abspringen + else { + if(GetComDir() == COMD_Up) ReleaseLadderUp(); + else if(GetComDir() == COMD_Stop) ReleaseLadderStop(); + else ReleaseLadderDown(); + } + } + // Links + if (strControl S= "ControlLeft") + { + // Richtung wechseln + if (GetDir() == DIR_Left) { + SetDir(DIR_Right); + SetComDir(COMD_Stop); + if (!AdjustLadderOffset(GetActionTarget())) + SetDir(DIR_Left); + } + // Loslassen + else { + if(GetComDir() == COMD_Up) ReleaseLadderUp(); + else if(GetComDir() == COMD_Stop) ReleaseLadderStop(); + else ReleaseLadderDown(); + } + } + + // Werfen + if (strControl S= "ControlThrow") LadderThrow(); + + //Graben + if (strControl S= "ControlDig") LadderDig(); + + return(1); +} + +// Lässt den Clonk an der Leiter kleben +private func AdjustLadderOffset(object pLadder) +{ + //keine Leiter übergeben? An wtf soll dann adjustiert werden..? + if(!pLadder) + return(0); + // Abstand nach Kletterrichtung + var iLastX = GetX(); + var iChangeX; + if(!(iChangeX = pLadder->~LocalN("SizeX",pLadder)/2)) + iChangeX = GetDefCoreVal("Width",0,GetID(pLadder))/4; + + if(GetDir() == DIR_Left()) + SetPosition(GetX(pLadder) + iChangeX, GetY()); + else + SetPosition(GetX(pLadder) - iChangeX, GetY()); + // Nicht in festes Material klettern + if(Stuck()) + { + SetPosition(iLastX, GetY()); + return(0); + } + // Ausrichtung erfolgreich + return(1); +} + +protected func FxScalingLadderStart(object pTarget, int iEffectNumber, int iTemp) { + if(iTemp) + return(); + + EffectVar(0, pTarget, iEffectNumber) = GetY()*100; +} + +//Oke, das hier ist wohl großteils aus dem Urwaldclonk *hidez* +protected func FxScalingLadderTimer(object pTarget, int iEffectNumber, int time) +{ + var pLadder; + // Clonk hat aus irgendeinem Grund seine Kletteraktion verloren + if (GetAction() ne "ScaleLadder") + { + // Klettern beenden + return(ReleaseLadder(0)); + } + + // Keine Leiter mehr: klettern beenden + if (!(pLadder = FindLadder())) + { + // Oberes Ende: versuchen, die Wand zu erreichen + if (GetComDir() == COMD_Up()) { + return(ReleaseLadder(-15 + GetDir() * 30,-20)); + } + // Unteres Ende: einfach fallen lassen + else + return(ReleaseLadder(0)); + } + + // Ggf. neues Objekt zum dran klettern speichern + SetActionTargets(pLadder); + // Abstand zum Objekt + AdjustLadderOffset(pLadder); + + // Klettergeschwindigkeit + var iStep = Max(1,(GetPhysical("Scale")*4*GetLadderSpeed())/20000); + + // Kletterbewegung + var iPosY = EffectVar(0, pTarget, iEffectNumber); + var iLastY = GetY(); + var iPhase = GetPhase(); + if (GetComDir() == COMD_Up()) { iPosY -= iStep; iPhase += iStep*14/1000; } + if (GetComDir() == COMD_Down()) { iPosY += iStep; iPhase -= iStep*14/1000; } + + // stecken wir fest? + if (Stuck()) + { + // Nicht in festes Material klettern + if(GetComDir() == COMD_Up) + { + ReleaseLadder(0,-2); + SetAction("Hangle"); + } + if(GetComDir() == COMD_Down) + { + ReleaseLadder(0,2); + SetAction("Walk"); + } + else + { + SetPosition(GetX(), iLastY); + SetComDir(COMD_Stop()); + } + + return(); + } + + if (iPhase < 0) iPhase = 15; if (iPhase > 15) iPhase = 0; + SetPhase(iPhase); + SetPosition(GetX(), iPosY/100); + SetXDir(0); SetYDir(0); + + EffectVar(0, pTarget, iEffectNumber) = iPosY; + + if(!(time%10)) ClimbLadder(); +} + +public func JumpStart(bool bBackflip) +{ + _inherited(bBackflip); + + // Spezielle Funktionen während des Sprungs (An Kletterzeugs festhalten) + AddEffect("Jumping", this(), 1, 2, this()); +} + +protected func FxJumpingTimer() +{ + // Springt er? + if (this->IsJumping() || WildcardMatch(GetAction(), "*Flip")) + { + // Schaun ob ein kletterbares Objekt da ist (Leiter z.b.) + //var pVine; ...äh, falsch + var pLadder; //Leiter natürlich! + if (pLadder = FindLadder()) + GrabLadder(pLadder); + } + // ke, springt er halt nicht. *Effekt wegtun* + else + { + lastladder = 0; + return (-1); + } +} + + diff --git a/Hazard.c4d/Libraries.c4d/Names.txt b/Hazard.c4d/Libraries.c4d/Names.txt new file mode 100644 index 00000000..166e9534 --- /dev/null +++ b/Hazard.c4d/Libraries.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bibliotheken +US:Libraries diff --git a/Hazard.c4d/Names.txt b/Hazard.c4d/Names.txt new file mode 100644 index 00000000..3606b599 --- /dev/null +++ b/Hazard.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hazard +US:Hazard diff --git a/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DefCore.txt new file mode 100644 index 00000000..d5618946 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=ALAR +Version=4,9,8,2 +Name=AlienArmy +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DescDE.txt new file mode 100644 index 00000000..b5430a6b --- /dev/null +++ b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DescDE.txt @@ -0,0 +1 @@ +Wenn diese Regel aktiviert ist lassen sich Aliens übers Regelwähler auswählen. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DescUS.txt new file mode 100644 index 00000000..83a9f82c --- /dev/null +++ b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/DescUS.txt @@ -0,0 +1 @@ +When this rule is active you can add some aliens to the map. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Graphics.png new file mode 100644 index 00000000..9d7bdc11 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Names.txt b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Names.txt new file mode 100644 index 00000000..7348b21d --- /dev/null +++ b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Alienschwarm +US:Aliens \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Script.c b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Script.c new file mode 100644 index 00000000..c2ee97b1 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/AlienArmy.c4d/Script.c @@ -0,0 +1,62 @@ +/*-- Aliens! --*/ + +#strict 2 + +local maxAliens; + +protected func Activate(iPlr) +{ + if(GetID()==ALAR) + MessageWindow(GetDesc(),iPlr); + else + _inherited(iPlr,...); +} + +public func GetMaxAliens() { return maxAliens; } + +public func SetMaxAliens(val) { maxAliens = val; } + +// Kann nicht mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return false; } + +public func Init(int iAliens, int iAliensNestSize) +{ + Log("Aliens: %d",iAliens); + var pAlien, pHive, iX, iY, aReturn, iSize; + while(iAliens--) + { + if(!(aReturn = GameCall("HivePos", iAliens))) { + pAlien = PlaceAnimal(ALN2); + iX = pAlien -> GetX(); + iY = pAlien -> GetY(); + } + else { + iX = aReturn[0]; + iY = aReturn [1]; + CreateObject(ALN2, iX, iY, NO_OWNER); + } + iSize = RandomX(10+iAliensNestSize/4, 50+iAliensNestSize*3); + pHive = CreateObject(HCON, iX, iY, NO_OWNER); + if(!pHive) continue; + pHive -> Init(RandomX(15+iSize, 45+RandomX(iSize*2,iSize*4)), 75, 75, RandomX(20, 30)); + + for(var i2 = Random(iSize/8); i2; i2--) + CreateObject(ALN2,GetX(pHive),GetY(pHive),-1); + + // Taktiksetup + pHive -> AlienClear(); + pHive -> AlienAdd(ALN2, 60, 10+Random(iSize/5)); + pHive -> AlienAdd(ALN4, 25, 5+Random(iSize/10)); + pHive -> AlienAdd(ALN1, 15, 1+Random(iSize/30)); + if(Random(iSize/10+1)>3) + pHive -> AlienAdd(ALN5, 10+Random(iSize/10-3), RandomX(1,1+iSize/100)); + + ScheduleCall(pHive, "SetSpreadRate", RandomX(1000-iAliensNestSize*10, 5000-iAliensNestSize*20), 0, RandomX(10+iAliensNestSize/2, 50+iAliensNestSize*2)); + ScheduleCall(pHive, "SetFertility", RandomX(1000-iAliensNestSize*10, 5000-iAliensNestSize*20), 0, RandomX(10+iAliensNestSize/4, 50+iAliensNestSize)); + + //for(i2 = Random(5); i2; i2--) + // PlaceAnimal(ALN6); + //if(!Random(10)) + // PlaceAnimal(ALN5); + } +} diff --git a/Hazard.c4d/Rules.c4d/Arena.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/Arena.c4d/DefCore.txt new file mode 100644 index 00000000..eb39a62c --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Arena.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=NODR +Version=4,9,8,2 +Name=Arena +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +TimerCall=Timer +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/Arena.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/Arena.c4d/DescDE.txt new file mode 100644 index 00000000..a06490be --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Arena.c4d/DescDE.txt @@ -0,0 +1,2 @@ +Diese Regel sorgt dafür, dass keine Objekte frei herumliegen. +Dazu wird das Inventar eines Clonks beim Tod gelöscht und fallen gelassene Objekte verschwinden nach kurzer Zeit. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Arena.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/Arena.c4d/DescUS.txt new file mode 100644 index 00000000..dbbbb773 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Arena.c4d/DescUS.txt @@ -0,0 +1,2 @@ +This rule takes care that no objects lie around. +Therefore the inventory of a dieing clonk is removed and other dropped objects vanish after a short time. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Arena.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/Arena.c4d/Graphics.png new file mode 100644 index 00000000..e40c8b48 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/Arena.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/Arena.c4d/Names.txt b/Hazard.c4d/Rules.c4d/Arena.c4d/Names.txt new file mode 100644 index 00000000..5d644ed4 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Arena.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Arena +US:Arena \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Arena.c4d/Script.c b/Hazard.c4d/Rules.c4d/Arena.c4d/Script.c new file mode 100644 index 00000000..17ce8746 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Arena.c4d/Script.c @@ -0,0 +1,79 @@ +/*-- Arena --*/ + +#strict 2 + +protected func Activate(player) { + MessageWindow(GetDesc(),player); +} + +/* Zeugs, das herumliegt, soll verschwinden */ + +protected func Timer() +{ + // Zeugs suchen + for(var stuff in FindObjects(Find_Category(C4D_Object), + Find_NoContainer(), + Find_Or(Find_Func("IsWeapon"), + Find_Func("IsEquipment"), + Find_Func("IsUpgrade")), + Find_Not(Find_Func("IsMine")), + Find_Not(Find_Func("NoArenaRemove"))) + ) + { + var fadeoutTime = stuff->~GetArenaRemoveTime(); + if(!fadeoutTime) fadeoutTime = GetDefaultArenaRemoveTime(); + AddEffect("Arena_Remove", stuff, 1, fadeoutTime, this); + } +} + +public func GetDefaultArenaRemoveTime() +{ + return 170; +} + +public func FxArena_RemoveTimer(object target) +{ + //Abbruch bei neuer Aktion (Drohne) + if(!target->ActIdle()) + return -1; + //Oder wenn aufgehoben + if(target->Contained()) + { + return -1; + } + + target->RemoveObject(); + return -1; +} + +public func FxArena_RemoveEffect(string szNewEffectName) +{ + // Nochmal entfernen brauchen wir nicht + if(szNewEffectName == "Arena_Remove") + return -1; +} + +/* Zeugs aus dem Inventar soll beim Tod verschwinden */ + +public func OnClonkRecruitment(object pClonk) { + // Effekt erzeugen + AddEffect("RemoveInvOnDeath", pClonk, 99, 0, this()); +} + +public func FxRemoveInvOnDeathStop(target, no, reason) { + if(reason == 4) + { + for(var i = 0 ; Contents(i, target) ; i++) + if(Contents(i, target)->~IsWeapon() || Contents(i, target)->~IsEquipment()) + Schedule("RemoveObject();", 1, 0, Contents(i, target)); + for(var pGear in LocalN("aGear", target)) + if(pGear) + { + pGear->GearUnbuckle(target); + pGear->RemoveObject(); + } + } +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return true; } diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/Chooser.c4d/DefCore.txt new file mode 100644 index 00000000..c3fdd55b --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=CHOS +Version=4,9,8,2 +Name=Chooser +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/Chooser.c4d/DescDE.txt new file mode 100644 index 00000000..7ef7d253 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/DescDE.txt @@ -0,0 +1 @@ +Wenn aktiviert kann der erste Spieler zu Beginn einer Runde die zu benutzenden Spielregeln einstellen und das Spielziel konfigurieren. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/Chooser.c4d/DescUS.txt new file mode 100644 index 00000000..88d1e382 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/DescUS.txt @@ -0,0 +1 @@ +The first player may choose the rules at the beginning and configures the goal if activated. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/Chooser.c4d/Graphics.png new file mode 100644 index 00000000..813800ec Binary files /dev/null and b/Hazard.c4d/Rules.c4d/Chooser.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/Names.txt b/Hazard.c4d/Rules.c4d/Chooser.c4d/Names.txt new file mode 100644 index 00000000..b43236fa --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spielregelwahl +US:Rule chooser \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/Script.c b/Hazard.c4d/Rules.c4d/Chooser.c4d/Script.c new file mode 100644 index 00000000..35e99afa --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/Script.c @@ -0,0 +1,554 @@ +/*-- Spielzielauswahl --*/ + +#strict + +//C4D_Goal | C4D_Rule | C4D_Environment +static const Chooser_Cat = 524384; + +/* Nur eine Mitteilung für Neugierige */ + +protected func Activate(iPlr) +{ + if(iPlr == iChoosingPlr) return(OpenMenu()); + MessageWindow(Format("$Choosing$", GetPlayerName(iChoosingPlr)),iPlr); +} + +/* Initialisierung */ + +local aRules, pGoal, aGoals, Death, iDarkCount, aAI, iAliens; +local aTempGoalSave; +local iChoosingPlr; + +protected func Initialize() +{ + SetPosition(); + aRules = CreateArray(); + aGoals = CreateArray(); + aTempGoalSave = CreateArray(); + aAI = CreateArray(); + // Spielziele bald entfernen + ScheduleCall(this(), "RemoveGoals", 1); + if(IsDark()) + SetDarkness(0); + iDarkCount = 0; + + iAliens = 8; + + //Host identifizieren + iChoosingPlr = -1; + ScheduleCall(this, "ChoosePlayer", 15); +} + +/* Host-Identifizierung */ + +private func ChoosePlayer() +{ + var lowest = [0x7FFFFFFF, -1]; + for(var i = 0; i < GetPlayerCount(C4PT_User); i++) + { + var plr = GetPlayerByIndex(i, C4PT_User); + if(GetPlrClientNr(plr) < lowest[0]) + lowest = [GetPlrClientNr(plr), plr]; + } + + return iChoosingPlr = lowest[1]; +} + +public func RemovePlayer(int iPlr) +{ + //Neuen Host identifizieren und Menü öffnen + if(iChoosingPlr == iPlr) + { + iChoosingPlr = -1; + ScheduleCall(this, "ChoosePlayer", 15); + ScheduleCall(this, "OpenMenu", 16); + } + + return true; +} + +protected func RemoveGoals() +{ + // Spielziele entfernen + for(var goal in FindObjects(Find_Category(C4D_Goal))) + { + aGoals[GetLength(aGoals)] = GetID(goal); + aTempGoalSave[GetLength(aTempGoalSave)] = GetWinScore(goal); + goal->RemoveObject(); + } + + // Einmal doof hacken (wo wir das hier ja sonst schon nicht gemacht haben °-°) + OpenGoalChooseMenu(); + // Menü wird einfach nochmal geöffnet, diesmal richtig! +} + +/* Spielerinitialisierung */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam, id idExtra) +{ + if(!aAI) aAI = CreateArray(); // Rückwärtskompatibilität + + if(GetPlayerType(iPlr) == C4PT_Script) + for(var i=1 ; i < aAI[iTeam] ; i++) + CreateClonk(iPlr); + aAI[iTeam] = 0; + if(Death) return(); + // Alle Clonks des Spielers verstauen + for(var i=0, pCrew, tmp ; pCrew = GetCrew(iPlr, i) ; i++) + { + tmp = CreateObject(TIM1, GetX(pCrew), GetY(pCrew), -1); + SetCategory(GetCategory(tmp) | C4D_Foreground,tmp); + SetGraphics(0, tmp, GetID(pCrew), 1, 5, 0, 1, pCrew); + Enter(tmp, pCrew); + Eastern(tmp); + } + // Spieler 1? Dann Menü öffnen + if(!iPlr) + { + Log("$ChoosingPlayer$", GetPlayerName(iPlr)); + return(OpenMenu()); + } +} + +private func CreateClonk(int iPlr) +{ + /* + var bot = CreateObject(HZCK, 0,0, iPlr); + MakeCrewMember(bot, iPlr); + //GameCallEx("RelaunchPlayer", iPlr, bot, -1); + GameCall("RelaunchPlayer", iPlr, bot, -1); + */ + AddBot(GetPlayerTeam(iPlr)); +} + +/* Hauptmenü */ + +protected func OpenMenu() +{ + if(GetLength(aGoals)) return(OpenGoalChooseMenu()); + + var pClonk = GetCursor(iChoosingPlr); + if(!pClonk) return(ScheduleCall(this(), "OpenMenu", 1)); + + if(GetMenu(pClonk)) + CloseMenu(pClonk); + + Message("", pClonk); + + CreateMenu(GetID(), pClonk, 0, 0, 0, 0, 1); + // Spielregeln + AddMenuItem("$CreateRules$", "OpenRuleMenu", CTFL, pClonk, 0,0, "$RuleInfo$"); + // Dunkelheit + if(IsDark()) + AddMenuItem("%s", "OpenDarknessMenu", DARK, pClonk,0,0,"$DarknessChose$"); + // Spielziel + if(GoalIsCompatible()) AddMenuItem("%s", "OpenGoalMenu", GetID(pGoal), pClonk,0,0,"$GoalChose$"); + // KI + if(ObjectCount(WAYP) && !GetLeague()) AddMenuItem("$AIMenu$", "OpenAIMenu", HZCK, pClonk, 0,0, "$AIInfo$"); + // Aliens + if(ObjectCount(ALAR)) AddMenuItem("$AlienMenu$", "OpenAlienMenu", ALAR, pClonk, 0,0, "$AlienInfo$"); + // Fertig + AddMenuItem("$Finished$", "ConfigurationFinished", CHOS, pClonk,0,0,"$Finished$",2,3); +} + +/* Regelmenü */ + +protected func OpenRuleMenu(id dummy, int iSelection) +{ + var pClonk = GetCursor(iChoosingPlr); + // Menü aufmachen + CreateMenu(GetID(), pClonk); + // Regeln einfügen + for(var i=0, idR, def, j, check ; idR = GetDefinition(i, Chooser_Cat) ; i++) + if(DefinitionCall(idR, "IsChooseable") && !GetLength(FindObjects(Find_ID(idR)))) + { + def = CreateObject(idR, 0,0, -1); + if(aRules[i]) + { + SetGraphics("Chosen", def, WPCH, 1, GFXOV_MODE_Picture); + SetObjDrawTransform(650,0,5000,0,650,5000, def, 1); + } + AddMenuItem("%s", "ChangeRuleConf", idR, pClonk, 0, i, 0, 4, def); + if(i == iSelection) + check = true; + if(!check) + j++; + RemoveObject(def); + } + // Fertig + AddMenuItem("$Finished$", "OpenMenu", CHOS, pClonk,0,0,0,2,3); + // Menüeintrag auswählen + SelectMenuItem(j, pClonk); +} + +protected func ChangeRuleConf(id dummy, int i) +{ + // Regel wurde ausgewählt + if(!aRules[i]) + aRules[i] = true; + // Regel wurde abgewählt + else + aRules[i] = false; + // Geräusch + Sound("Grab", 1,0,0,iChoosingPlr+1); + // Regelmenü wieder aufmachen + OpenRuleMenu(0, i); +} + +/* Sondermenü: Dunkelheit */ + +protected func OpenDarknessMenu(id dummy, int iSelection) +{ + var pClonk = GetCursor(iChoosingPlr); + // Menü aufmachen + CreateMenu(GetID(), pClonk, 0,0,0,0, 1); + // Anzeige + AddMenuItem(" ", "OpenDarknessMenu", DARK, pClonk, iDarkCount, 0, " "); + // Zähler erhöhen + AddMenuItem("$MoreDarkness$", "ChangeDARKConf", CHOS, pClonk, 0, +1, "$MoreDarkness$",2,1); + // Zähler senken + AddMenuItem("$LessDarkness$", "ChangeDARKConf", CHOS, pClonk, 0, -1, "$LessDarkness$",2,2); + // Fertig + AddMenuItem("$Finished$", "OpenMenu", CHOS, pClonk,0,0, "$Finished$",2,3); + // Letzten Eintrag auswählen + SelectMenuItem(iSelection, pClonk); +} + +protected func ChangeDARKConf(id dummy, int iChange) +{ + // Stand verändern + iDarkCount = BoundBy(iDarkCount+iChange, 0, 10); + FadeDarkness(iDarkCount,100); + // Geräusch + Sound("Grab", 1,0,0,iChoosingPlr+1); + // Menü wieder öffnen + var iSel = 1; + if(iChange == -1) iSel = 2; + OpenDarknessMenu(0, iSel); +} + +/* Spielzielmenü */ + +protected func OpenGoalChooseMenu() +{ + var pClonk = GetCursor(iChoosingPlr); + if(!pClonk) return(ScheduleCall(this(), "OpenMenu", 1)); + if(!GetLength(aGoals)) return(ScheduleCall(this(), "OpenMenu", 1)); + + CloseMenu(pClonk); + + if(GetLength(aGoals) == 1) { + return(CreateGoal(aGoals[0], aTempGoalSave[0])); + } + + CreateMenu(GetID(), pClonk, 0, 0, 0, 0, 1); + + var i; + for(var goal in aGoals) + { + AddMenuItem("%s", "CreateGoal", goal, pClonk, 0, aTempGoalSave[i]); + i++; + } +} + +protected func CreateGoal(id idGoal, int iScore) +{ + // Spielziel erstellen + var goal = CreateObject(idGoal, 0,0, -1); + // Alten Wert setzen + SetWinScore(iScore, goal); + // Alle benachrichtigen + Log("$Goal$", GetName(0, idGoal)); + // Array leeren, damit das Menü nicht nochmal kommt + aGoals = CreateArray(); + + GameCallEx("GoalChosen"); + + // Normales Menü öffnen + OpenMenu(); +} + +private func GoalIsCompatible() +{ + // Schon eines gefunden? + if(pGoal) return(1); + // Mehr als ein Spielziel wird nicht unterstützt + if(GetLength(FindObjects(Find_Category(C4D_Goal()))) != 1) return(); + // Ist das Spielziel kompatibel mit diesem Objekt? + if(!(FindObject2(Find_Category(C4D_Goal()))->~IsConfigurable())) return(); + // Gut + pGoal = FindObject2(Find_Category(C4D_Goal())); + return(1); +} + +protected func OpenGoalMenu(id dummy, int iSelection) +{ + if(!pGoal) return(OpenMenu()); + var pClonk = GetCursor(iChoosingPlr); + // Menü aufmachen + CreateMenu(GetID(), pClonk, 0,0,0,0, 1); + // Anzeige + AddMenuItem(" ", "OpenGoalMenu", GetID(pGoal), pClonk, GetWinScore2(), 0, " "); + + var moreWinScore = "$MoreWinScore$"; + var lessWinScore = "$LessWinScore$"; + if(pGoal->~GetMoreScoreText()) moreWinScore = pGoal->~GetMoreScoreText(); + if(pGoal->~GetLessScoreText()) lessWinScore = pGoal->~GetLessScoreText(); + + // Zähler erhöhen + AddMenuItem(moreWinScore, "ChangeGoalConf", CHOS, pClonk, 0, +1, moreWinScore,2,1); + // Zähler senken + AddMenuItem(lessWinScore, "ChangeGoalConf", CHOS, pClonk, 0, -1, lessWinScore,2,2); + // Fertig + AddMenuItem("$Finished$", "OpenMenu", CHOS, pClonk,0,0,"$Finished$",2,3); + // Letzten Eintrag auswählen + SelectMenuItem(iSelection, pClonk); +} + +protected func ChangeGoalConf(id dummy, int iChange) +{ + // Stand verändern + SetWinScore(GetWinScore(pGoal)+iChange,pGoal); + if(GetWinScore(pGoal) <= 0) SetWinScore(1,pGoal); + // Geräusch + Sound("Grab", 1,0,0,iChoosingPlr+1); + // Menü wieder öffnen + var iSel = 1; + if(iChange == -1) iSel = 2; + OpenGoalMenu(0, iSel); +} + +private func GetWinScore2() +{ + var pGoal = FindObject2(Find_Category(C4D_Goal())); + return(GetWinScore(pGoal)); +} + +/* Sondermenü: KI */ + +protected func OpenAIMenu(id dummy, int iSelection) +{ + var pClonk = GetCursor(iChoosingPlr); + var pGoal = FindObject2(Find_Category(C4D_Goal())); + // Menü aufmachen + CreateMenu(GetID(), pClonk, 0,0,0,0, 1); + // Kein Teamspielziel + + if(!(pGoal->~IsTeamGoal())) + { + var botCount = 0; + if(aAI && aAI[0]) botCount = aAI[0]; + // Zahl + AddMenuItem(Format("%d $Bots$ ",botCount), Format("OpenAIMenu(0,%d)",i*3-3), HZCK, pClonk, 0, 0, " "); + AddMenuItem("$OneAIMore$", "AIConfig(0,+1,2)", CHOS, pClonk, 0,0, "$OneAIMore$",2,1); + AddMenuItem("$OneAILess$", "AIConfig(0,-1,3)", CHOS, pClonk, 0,0, "$OneAILess$",2,2); + } + else // Teamspielziel + { + for(var i=1 ; GetTeamName(i) ; i++) + { + var botCount = 0; + if(aAI && aAI[i]) botCount = aAI[i]; + + AddMenuItem(Format("%s: %d $Bots$ ",GetTeamName(i),botCount), Format("OpenAIMenu(0,%d)",i*3-3), HZCK, pClonk, 0, 0, " "); + AddMenuItem("$OneAIMore$", Format("AIConfig(%d,+1,%d)", i,i*3-2), CHOS, pClonk, 0,0, "$OneAIMore$",2,1); + AddMenuItem("$OneAILess$", Format("AIConfig(%d,-1,%d)", i,i*3-1), CHOS, pClonk, 0,0, "$OneAILess$",2,2); + } + if(GetLength(aAI) > i) + while(i < GetLength(aAI)) + { + var botCount = 0; + if(aAI && aAI[i]) botCount = aAI[i]; + + AddMenuItem(Format("%s: %d $Bots$ ",Format("Team %d", i),botCount), Format("OpenAIMenu(0,%d)",i*3-3), HZCK, pClonk, 0, 0, " "); + AddMenuItem("$OneAIMore$", Format("AIConfig(%d,+1,%d)", i,i*3-2), CHOS, pClonk, 0,0, "$OneAIMore$",2,1); + AddMenuItem("$OneAILess$", Format("AIConfig(%d,-1,%d)", i,i*3-1), CHOS, pClonk, 0,0, "$OneAILess$",2,2); + i++; + } + // Autoteams -> Neue Teams einstellbar + if(GetTeamConfig(TEAM_AutoGenerateTeams)) + AddMenuItem("$NewTeam$", Format("AIConfig(%d,+1,%d)", i, i*3), HZCK, pClonk, 0,0, "$NewTeam$"); + // Faire Teams + AddMenuItem("$FairTeams$", "FairTeams", MEL2, pClonk, 0,0, "$FairTeamsInfo$"); + } + // Fertig + AddMenuItem("$Finished$", "OpenMenu", CHOS, pClonk,0,0,"$Finished$",2,3); + // Letzten Eintrag auswählen + SelectMenuItem(iSelection, pClonk); +} + +protected func AIConfig(int iTeam, int iChange, int iSel) +{ + // Kein Team + if(iChange == +1) aAI[iTeam]++; + if(iChange == -1 && iTeam <= GetLength(aAI)) + { + if(aAI[iTeam] > 0) + aAI[iTeam]--; + if(iTeam == GetLength(aAI) && aAI[iTeam] <= 0) + { + for(var i=0, newArray = CreateArray() ; i < GetLength(aAI)-1 ; i++) + newArray[i] = aAI[i]; + aAI = newArray; + } + } + // Menü wieder öffnen + OpenAIMenu(0, iSel); +} + +protected func FairTeams() +{ + // Rausfinden, welches Team am stärksten ist + var maxTeam = Max(GetTeamCount(), GetLength(aAI)-1)+1; + for(var i=1,str,mstr ; i < maxTeam ; i++) + { + str = GetTeamStrength(i); + if(str > mstr) + mstr = str; + } + // Andere Teams auffüllen + for(i=1 ; i < maxTeam ; i++) + while(GetTeamStrength(i) < mstr) + aAI[i]++; + // Menü + OpenAIMenu(); +} + +protected func GetTeamCount() +{ + var i=1; + while(GetTeamName(i)) + i++; + return(i-1); +} + +private func GetTeamStrength(int iTeam) +{ + if(!iTeam) return(); + + for(var i=0,j,str ; i < GetPlayerCount() ; i++) + { + j = GetPlayerByIndex(i); + if(GetPlayerTeam(j) == iTeam) + { + // KI + if(GetPlayerType(j) == C4PT_Script) str += GetCrewCount(j); + // Normaler Spieler + else str++; + } + } + if(iTeam < GetLength(aAI)) str += aAI[iTeam]; + return(str); +} + +/* Sondermenü: Aliens */ + +protected func OpenAlienMenu(id dummy, int iSelection) +{ + var pClonk = GetCursor(); + var pGoal = FindObject2(Find_Category(C4D_Goal)); + // Menü aufmachen + CreateMenu(GetID(), pClonk, 0,0,0,0, 1); + + AddMenuItem(Format("$AlienInfo2$", iAliens), "OpenAlienMenu(0,0)", ALN2, pClonk); + // Einer mehr! + AddMenuItem("$OneAlienMore$", "AlienConfig(+1,1)", ALN1, pClonk, 0,0, "$OneAlienMore$"); + // Einer weniger! + AddMenuItem("$OneAlienLess$", "AlienConfig(-1,2)", ALN2, pClonk, 0,0, "$OneAlienLess$"); + + // Fertig + AddMenuItem("$Finished$", "OpenMenu", CHOS, pClonk,0,0,"$Finished$",2,3); + // Letzten Eintrag auswählen + if(!iSelection) + iSelection = 1; + SelectMenuItem(iSelection, pClonk); +} + +protected func AlienConfig(int iChange, int iSel) +{ + iAliens += iChange; + iAliens= BoundBy(iAliens,1,FindObject(ALAR)->GetMaxAliens()); + // Menü wieder öffnen (verzögert) + OpenAlienMenu(0, iSel); +} + +/* Konfiguration abschließen */ + +protected func ConfigurationFinished() +{ + // KI-Spieler erzeugen + var i=0; + for(var ai in aAI) + { + if(ai) + AddAI(i); + i++; + } + + // Init Aliens + if(ObjectCount(ALAR)) + { + FindObject(ALAR)->Init(iAliens,5); + } + + ScheduleCall(this(), "ConfigurationFinished2", 5); +} + +protected func ConfigurationFinished2() +{ + Death = true; + // Regeln erzeugen + var i = 0, j, pCrew, tmp, log = "$Rules$", cnt = 0, comma = ""; + for(var check in aRules) + { + if(check) + { + if(cnt) comma = ", "; + CreateObject(GetDefinition(i, Chooser_Cat), 10, 10, -1); + log = Format("%s%s%s", log, comma, GetName(0, GetDefinition(i, Chooser_Cat))); + cnt++; + } + i++; + } + // Dunkelheit erzeugen + log = Format("%s%s%s x%d", log, comma, GetName(0, DARK), iDarkCount); + Log(log); + // ein schneller GameCall für Einstellungen + GameCallEx("ChooserFinished"); + + // Spieler freilassen + for(i = 0 ; i < GetPlayerCount() ; i++) + { + for(j = 0 ; pCrew = GetCrew(GetPlayerByIndex(i), j) ; j++) + { + tmp = Contained(pCrew); + RemoveObject(tmp, 1); + + pCrew->~Recruitment(pCrew->GetOwner()); + } + for(var rule in FindObjects(Find_Category(Chooser_Cat), Find_Exclude(this()))) + rule->~InitializePlayer(GetPlayerByIndex(i)); + } + + // Überschüssiges TIM1-Objekte entfernen (falls Spieler ziwschenzeitlich geflogen sind) + for(tmp in FindObjects(Find_ID(TIM1))) + if(!(tmp->Contents())) + RemoveObject(tmp, 1); + // Selber entfernen + RemoveObject(); +} + +/* Generelles */ + +public func MenuQueryCancel() { return(1); } + +private func Eastern(object P) +{ + var rand = Random(6); + if(!rand) SetName(GetPlayerName(GetPlayerByIndex(Random(GetPlayerCount()))), P); + if(rand == 1) SetName("$Emptiness$", P); + if(rand == 2) SetName("$YourBrain$", P); + if(rand == 3) SetName("$Nothing$", P); + if(rand == 4) SetName("$Freezer$", P); + if(rand == 5) SetName("$Space$", P); +} diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/StringTblDE.txt b/Hazard.c4d/Rules.c4d/Chooser.c4d/StringTblDE.txt new file mode 100644 index 00000000..bdedd739 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/StringTblDE.txt @@ -0,0 +1,41 @@ +ChoosingPlayer=%s wählt jetzt die Spielkonfiguration, bitte noch etwas Geduld +Choosing=%s sucht gerade die Regeln aus, noch ein wenig Geduld... +Goal=Das Spielziel wurde gewählt: %s +Rules=Regelwahl abgeschlossen: +CreateRules=Spielregeln +DarknessChose=Intensität der Dunkelheit +GoalChose=Spielziel konfigurieren +AIMenu=KIs einstellen +RuleInfo=Spielregel einstellen +AIInfo=Diverse Einstellungen für KIs +Finished=Fertig + +MoreWinScore=Punktzahl erhöhen +LessWinScore=Punktzahl senken + +MoreDarkness=Dunkelheit erhöhen +LessDarkness=Dunkelheit senken + +Bots=Bots +OneAIMore=Mehr +OneAILess=Weniger +NewTeam=Neues Team +FairTeams=Faire Teams +FairTeamsInfo=Alle Teams auffüllen, so dass überall die gleiche Anzahl Clonks vorhanden ist +OnlyDeleteLastTeam=Das letzte Team muss als erstes entfernt werden! + +#nix weiter +Emptiness=Die Leere +YourBrain=Dein Gehirn +Nothing=Nichts +Freezer=Der Kühlschrank +Space=Die unendliche Weite + +AlienMenu=Aliens einstellen +AlienInfo=Diverse Einstellungen für Aliens +Finished=Fertig + +AlienInfo2=%d Nest(er) + +OneAlienMore=Ein Nest mehr +OneAlienLess=Ein Nest weniger \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/Chooser.c4d/StringTblUS.txt b/Hazard.c4d/Rules.c4d/Chooser.c4d/StringTblUS.txt new file mode 100644 index 00000000..ac1ebef6 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Chooser.c4d/StringTblUS.txt @@ -0,0 +1,41 @@ +ChoosingPlayer=%s configures the game, please be patient... +Choosing=%s configures the rules, please be patient... +Goal=The goal has been chosen: %s +Rules=Rules chosen: +CreateRules=Rules +DarknessChose=Configure darkness +GoalChose=Configure goal +AIMenu=AI setup +RuleInfo=Configure rules +AIInfo=Option to configure AI players +Finished=Finished + +MoreWinScore=Increase score +LessWinScore=Decrease score + +MoreDarkness=Darker +LessDarkness=Brighter + +Bots=Bots +OneAIMore=More +OneAILess=Less +NewTeam=New Team +FairTeams=Fair Teams +FairTeamsInfo=Fair match +OnlyDeleteLastTeam=The last team has to be removed first! + +#never mind +Emptiness=The emptiness +YourBrain=Your brain +Nothing=Nothing +Freezer=The freezer +Space=The space + +AlienMenu=Alien setup +AlienInfo=Option to configure Aliens +Finished=Finished + +AlienInfo2=%d hive(s) + +OneAlienMore=One hive more +OneAlienLess=One hive less \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/DescDE.txt new file mode 100644 index 00000000..bf4504d1 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/DescDE.txt @@ -0,0 +1 @@ +Regelobjekte bestimmen den Spielablauf und bieten in Einzelfällen Sonderoptionen. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/DescUS.txt new file mode 100644 index 00000000..022d0bfc --- /dev/null +++ b/Hazard.c4d/Rules.c4d/DescUS.txt @@ -0,0 +1 @@ +Rule objects affect general game play and in some cases offer special options. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DefCore.txt new file mode 100644 index 00000000..7e1cafbc --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=IGIB +Version=4,9,8,2 +Name=Insta GIB +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DescDE.txt new file mode 100644 index 00000000..21942461 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DescDE.txt @@ -0,0 +1 @@ +Jeder bekommt immer eine Waffe, die mit einem Treffer tötet. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DescUS.txt new file mode 100644 index 00000000..d5290f32 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/DescUS.txt @@ -0,0 +1 @@ +Everyone gets a weapon which kills instantly with only one hit. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DefCore.txt new file mode 100644 index 00000000..778fa8ef --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=IGWP +Version=4,9,8,2 +Name=Energy rifle +Category=C4D_Object +MaxUserSelect=1 +Width=17 +Height=8 +Offset=-9,-4 +Vertices=1 +VertexY=3 +VertexFriction=100 +Value=150 +Mass=10 +Components=METL=1;ENAP=7 +Picture=0,9,64,64 +Rebuy=1 +Collectible=1 diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DescDE.txt new file mode 100644 index 00000000..98fcf822 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DescDE.txt @@ -0,0 +1 @@ +Neuste Technik aus den Waffenlaboren. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DescUS.txt new file mode 100644 index 00000000..ae2f88a8 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/DescUS.txt @@ -0,0 +1 @@ +Newest technology from the weapon labs. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Graphics.png new file mode 100644 index 00000000..0e0dc918 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Names.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Names.txt new file mode 100644 index 00000000..899cffe4 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hochenergiegewehr +US:High energy rifle diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Script.c b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Script.c new file mode 100644 index 00000000..2391bc6f --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Script.c @@ -0,0 +1,53 @@ +/*-- Hochenergiegewehr --*/ + +#strict + +#include WEPN + +public func HandSize() { return(950); } +public func HandX() { return(5000); } +public func HandY() { return(2000); } +public func BarrelXOffset(){return(-3000);} +public func BarrelYOffset(){return(-2000);} + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Standard$"); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(50); + + if(data == FM_AmmoUsage) return(1); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(400); + if(data == BOT_DmgType) return(DMG_Energy); + + return(Default(data)); +} + +public func Fire1() // Einzelschuss +{ + var user = GetUser(); + var angle = user->~AimAngle(10) + RandomX(-1,1); + var x,y; user->WeaponEnd(x,y); + var ammo = CreateObject(SHT3,x,y,GetController(user)); + ammo->Launch(angle,180,400,20,1000); + + // Effekte + MuzzleFlash(30,user,x,y,angle,RGB(255,64,96)); + // Sound + Sound("EnergyRifle",0,ammo); +} + +public func OnEmpty() +{ + Reload(); +} + +public func NoWeaponChoice() { return(1); } // Waffe kann nicht gekauft werden diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/ActMap.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/ActMap.txt new file mode 100644 index 00000000..cb934c75 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Travel +Procedure=FLOAT +NextAction=Travel +FacetBase=1 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/DefCore.txt new file mode 100644 index 00000000..15e5408e --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=SHT3 +Version=4,9,8,2 +Name=Shot +Category=C4D_Vehicle +Width=20 +Height=18 +Offset=-10,-9 +Vertices=1 +VertexFriction=1 +Rotate=1 +StretchGrowth=1 +IncompleteActivity=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Graphics.png new file mode 100644 index 00000000..12b4ebb6 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Names.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Names.txt new file mode 100644 index 00000000..448bc792 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Projektil +US:Bullet \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Script.c b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Script.c new file mode 100644 index 00000000..0ae3214b --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/Shot.c4d/Script.c @@ -0,0 +1,43 @@ +#strict +#include SHT1 + + +/* Schuss */ + +//Extern für Überladung +private func CreateTrail(int iSize, int iTrail) { + + pTrail = CreateObject(TRAI,0,0,-1); + if(pTrail) { + pTrail->Set(iSize+2,iTrail,this(),"Travel2"); + SetObjectBlitMode(GetObjectBlitMode(),pTrail); + } +} + +/* Treffer */ + +private func HitObject(object pObject) { + if(BulletStrike(pObject)) { + LaserLight(60, Color(GetActTime()),0,0,10); + Remove(); + } +} + +public func BulletStrike(object pObj) { + if(pObj) { + DoDmg(10000, DMG_Energy, pObj); + if(GetAlive(pObj)) Kill(pObj); + } + return(1); +} + +private func Color(int iATime) { + var iPrg = 100*iATime/iTime; + return(RGBa(255,127-iPrg,127,iPrg*2)); +} + +private func GlowColor() { + return(RGB(255,90,110)); +} + +public func TrailColor(int iATime) { return(Color(iATime)); } diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/StringTblDE.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/StringTblDE.txt new file mode 100644 index 00000000..fef8371b --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Standard=Einzelschuss \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/StringTblUS.txt b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/StringTblUS.txt new file mode 100644 index 00000000..50586798 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/EnergyRifle.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Standard=Single shots \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/Graphics.png new file mode 100644 index 00000000..2d473c30 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/InstaGIB.c4d/Script.c b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/Script.c new file mode 100644 index 00000000..36ddec06 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/InstaGIB.c4d/Script.c @@ -0,0 +1,43 @@ +/*-- Insta GIB --*/ + +#strict + +protected func Activate(iPlr) +{ + MessageWindow(GetDesc(),iPlr); +} + +protected func Initialize() +{ + ScheduleCall(this(), "Initialized", 1); +} + +protected func Initialized() +{ + // Keine-Munition-Regel muss da sein + if(!FindObject(NOAM)) CreateObject(NOAM, 0,0, -1); +} +/* +public func InitializePlayer(int iPlr) +{ + for(var i=0 ; GetCrew(iPlr, i) ; i++) + CreateContents(IGWP, GetCrew(iPlr, i)); +} + +public func RelaunchPlayer(int iPlr, object pClonk) +{ +if(!GetAlive(pClonk)) return(ScheduleCall(0,"RelaunchPlayer",1,0,iPlr,pClonk)); +// if(!pClonk || !GetAlive(pClonk)) + if(!(pClonk = GetCursor(iPlr))) + return(ScheduleCall(0,"RelaunchPlayer",1,0,iPlr,pClonk)); + + CreateContents(IGWP, pClonk); +}*/ + +public func OnClonkRecruitment(object pClonk, int iPlr) +{ + CreateContents(IGWP, pClonk)->DoAmmo(ENAM, 1); +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return(1); } diff --git a/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DefCore.txt new file mode 100644 index 00000000..87b06aa7 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=NOAM +Version=4,9,8,2 +Name=NoAmmo +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DescDE.txt new file mode 100644 index 00000000..c950a8f8 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DescDE.txt @@ -0,0 +1 @@ +Mit dieser Regel brauchen Waffen keine Munition. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DescUS.txt new file mode 100644 index 00000000..04ad5fc7 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/DescUS.txt @@ -0,0 +1 @@ +With this rule weapons do not need ammo. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Graphics.png new file mode 100644 index 00000000..db336896 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Names.txt b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Names.txt new file mode 100644 index 00000000..5e609fa6 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Keine Munition +US:No ammo \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Script.c b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Script.c new file mode 100644 index 00000000..8e6e3121 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoAmmo.c4d/Script.c @@ -0,0 +1,12 @@ +#strict + +protected func Activate(iPlr) { + MessageWindow(GetDesc(),iPlr); +} + +global func NoAmmo() { + return(ObjectCount(NOAM)); +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return(1); } diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/DefCore.txt new file mode 100644 index 00000000..1525a76f --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=AFKH +Version=4,9,8,2 +Name=Helper +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Graphics.png new file mode 100644 index 00000000..c4c63cc1 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Names.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Names.txt new file mode 100644 index 00000000..f028b0f5 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:AFK +US:AFK \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Script.c b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Script.c new file mode 100644 index 00000000..6ce148f5 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/AFK-Helper.c4d/Script.c @@ -0,0 +1,31 @@ +/*-- AFK --*/ + +#strict + +/* Steuerung */ + +protected func ControlLeft() { return(Remove()); } +protected func ControlRight() { return(Remove()); } +protected func ControlDown() { return(Remove()); } +protected func ControlUp() { return(Remove()); } +protected func ControlThrow() { return(Remove()); } +protected func ControlDig() { return(Remove()); } + +protected func ControlCommand() { return(Remove()); } +protected func CrewSelection(bool fDeselect) { if(fDeselect) return(Remove()); } + +private func Remove() +{ + var rule = FindObject(NOCA); + if(!rule) + { + SetCursor(GetOwner(), GetCrew(GetOwner())); + RemoveObject(); + return(1); + } + else + { + rule->AFK(GetOwner(), false); + return(1); + } +} diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/DefCore.txt new file mode 100644 index 00000000..30f1d8bf --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=NOCA +Version=4,9,8,2 +Name=NoCamping +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/DescDE.txt new file mode 100644 index 00000000..50b219db --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/DescDE.txt @@ -0,0 +1 @@ +Ist diese Regel aktiviert, werden "Camper", also Leute, die längere Zeit an der selben Stelle hocken, bestraft. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/DescUS.txt new file mode 100644 index 00000000..ee44549c --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/DescUS.txt @@ -0,0 +1 @@ +With this rule "campers" (people who sit only at the same place) were punished after some time. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/NoCamping.c4d/Graphics.png new file mode 100644 index 00000000..c27fc7bc Binary files /dev/null and b/Hazard.c4d/Rules.c4d/NoCamping.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/Names.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/Names.txt new file mode 100644 index 00000000..56423b30 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kein Camping +US:No camping \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/Script.c b/Hazard.c4d/Rules.c4d/NoCamping.c4d/Script.c new file mode 100644 index 00000000..7a0e87a3 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/Script.c @@ -0,0 +1,158 @@ +/*-- Arena --*/ + +#strict + +local aAFK, aCursors, aPlrAFKDeaths; + +protected func Activate(iPlr) { + // AFK-Menü + CreateMenu(GetID(), GetCursor(iPlr), this(),0, GetName()); + if(aAFK[iPlr]) + AddMenuItem("$Back$", Format("AFK(%d,%d)",iPlr,0), CLNK, GetCursor(iPlr), 0,0, "$Back$"); + else + AddMenuItem("$AFK$", Format("AFK(%d,%d)",iPlr,1), CLNK, GetCursor(iPlr), 0,0, "$AFK$"); +} + +public func AFK(int iPlr, bool afk) { + aAFK[iPlr] = afk; + + if(afk) + { + aCursors[iPlr] = GetCursor(iPlr); + var obj = CreateObject(AFKH, AbsX(aCursors[iPlr]->GetX()), AbsY(aCursors[iPlr]->GetY()), iPlr); + SetCursor(iPlr, obj, 1,1); + SetPlrView(iPlr, aCursors[iPlr]); + Log("$isAFK$", GetPlayerName(iPlr)); + } + else + { + aPlrAFKDeaths[iPlr] = 0; + var obj = FindObjectOwner(AFKH, iPlr); + if(obj) obj->RemoveObject(); + SetCursor(iPlr, aCursors[iPlr], 1,1); + SetPlrView(iPlr, aCursors[iPlr]); + aCursors[iPlr] = false; + Log("$isBack$", GetPlayerName(iPlr)); + } +} + +protected func Initialize() { + aAFK = CreateArray(GetPlayerCount()); + aCursors = CreateArray(GetPlayerCount()); + aPlrAFKDeaths = CreateArray(GetPlayerCount()); + Schedule("Log(\"$Intro$\");", 1); +} + +/* Alle Clonks bekommen einen Effekt, der ihr Verhalten überprüft */ + +public func OnClonkRecruitment(object pClonk) { + // Effekt erzeugen + Schedule(Format("AddEffect(\"CampingCheck\", Object(%d), 20, 20, this());", ObjectNumber(pClonk)), 1); +} + +public func FxCampingCheckStart(object pClonk, int iNo, int iTemp) +{ + if(iTemp) return(); + + EffectVar(0, pClonk, iNo) = pClonk->GetX(); + EffectVar(1, pClonk, iNo) = pClonk->GetY(); + EffectVar(5, pClonk, iNo) = pClonk->GetX(); + EffectVar(6, pClonk, iNo) = pClonk->GetY(); +} + +// Effektvariablen +// EffectVar 0 und 1 speichern die Position des Clonks +// EffectVar 2 ist ein Check, für minimale Bewegungsänderung und führt sehr schnell zur Bestrafung +// EffectVar 3 checkt auf weitere Entfernungen. Auch Clonks, die ständig an der selben Stelle rumturnen, bekommen eine Bestrafung +// EffectVar 4,5,6 helfen Nr. 3 + +public func FxCampingCheckTimer(object pClonk, int iNo, int iTime) +{ + // Clonk ist kein Cursor -> kein Campen + // Spieler ist AFK -> kein Campen + if(GetCursor(pClonk->GetOwner()) != pClonk || aAFK[pClonk->GetOwner()]) + { + if(EffectVar(2, pClonk, iNo)) EffectVar(2, pClonk, iNo)--; + if(EffectVar(3, pClonk, iNo)) EffectVar(3, pClonk, iNo)--; + return(); + } + // Clonk befindet sich in TIM1 oder TIM2 -> kein Campen + if(pClonk->Contained()) + if(pClonk->Contained()->GetID() == TIM1 || pClonk->Contained()->GetID() == TIM1) + { + if(EffectVar(2, pClonk, iNo)) EffectVar(2, pClonk, iNo)--; + if(EffectVar(3, pClonk, iNo)) EffectVar(3, pClonk, iNo)--; + return(); + } + // Spieler starb 2x durch "Campen" -> auto-AFK + if(aPlrAFKDeaths[pClonk->GetOwner()] >= 2) + return(AFK(pClonk->GetOwner(), 1)); + // Check, damit nur einmal die Warnnachricht erscheint + var warn = true; + if(EffectVar(2, pClonk, iNo) >= 25 || + EffectVar(3, pClonk, iNo) >= 50) + warn = false; + // Clonk hat sich nur minimal bewegt? + var inc; + if(Inside(EffectVar(0,pClonk,iNo), pClonk->GetX()-5, pClonk->GetX()+5)) + if(Inside(EffectVar(1,pClonk,iNo), pClonk->GetY()-5, pClonk->GetY()+5)) + { + if(EffectVar(2, pClonk, iNo) < 25) + EffectVar(2, pClonk, iNo)++; + inc = true; + } + // Clonk hat sich doller bewegt? -> Abbauen + if(!inc && EffectVar(2, pClonk, iNo)) + EffectVar(2, pClonk, iNo)--; + // Größerer Check + inc = false; + if(Inside(EffectVar(5,pClonk,iNo), pClonk->GetX()-75, pClonk->GetX()+75)) + if(Inside(EffectVar(6,pClonk,iNo), pClonk->GetY()-75, pClonk->GetY()+75)) + { + if(EffectVar(3, pClonk, iNo) < 50) + EffectVar(3, pClonk, iNo)++; + inc = true; + } + EffectVar(4, pClonk, iNo)++; + // Clonk hat sich bewegt -> Camp-Tode wegmachen, da kein auto-AFK (ist nicht 100%ig sicher, aber besser als nichts) + if(!inc && aPlrAFKDeaths[pClonk->GetOwner()]) + aPlrAFKDeaths[pClonk->GetOwner()] = 0; + // Die Großflächenposition wird nur alle 10 Checks erneuert -> Clonk muss sich in diesem Zeitraum mindestens 100 Pixel weit bewegen + if(EffectVar(4, pClonk, iNo) >= 10) + { + EffectVar(4, pClonk, iNo) = 0; + EffectVar(5, pClonk, iNo) = pClonk->GetX(); + EffectVar(6, pClonk, iNo) = pClonk->GetY(); + } + // Clonk hat sich doller bewegt? -> Abbauen + if(!inc && EffectVar(3, pClonk, iNo)) + EffectVar(3, pClonk, iNo)--; + + // Neue Position speichern + EffectVar(0, pClonk, iNo) = pClonk->GetX(); + EffectVar(1, pClonk, iNo) = pClonk->GetY(); + +// Log("%d", EffectVar(2, pClonk, iNo)); +// Log("%d", EffectVar(3, pClonk, iNo)); + // Bestrafung + if(EffectVar(2, pClonk, iNo) >= 25 || + EffectVar(3, pClonk, iNo) >= 50) + { + // Warnmeldung, erst danach kommen Strafen + if(warn) + { + PlayerMessage(pClonk->GetOwner(), "$CampingAlert$", pClonk); + Sound("Ding", 1, 0,0, pClonk->GetOwner()+1); + } + else + { + // Tod durch Campen -> wird gezählt + if(pClonk->GetEnergy() <= 5) aPlrAFKDeaths[pClonk->GetOwner()]++; + pClonk->DoEnergy(-5); + Sound("Punch*", 1, 0,0, pClonk->GetOwner()+1); + } + } +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return(1); } diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/StringTblDE.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/StringTblDE.txt new file mode 100644 index 00000000..18ef7fec --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +Intro=Anti-Camping-Regel aktiviert. Achtung, 'Kein Camping'-Regel im Regelmenü aktivieren, um sich selbst als AFK zu markieren! +CampingAlert=Achtung!|Du wurdest als Camper identifiziert! +Back=Wieder an der Tastatur +AFK=Nicht an der Tastatur +isAFK=%s wurde als AFK markiert +isBack=%s wurde als nicht mehr AFK markiert \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoCamping.c4d/StringTblUS.txt b/Hazard.c4d/Rules.c4d/NoCamping.c4d/StringTblUS.txt new file mode 100644 index 00000000..2960e55f --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoCamping.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +Intro=Anti-Camping-Rule activated. Attention, select the 'No Camping'-rule in the rule menu to mark yourself as being AFK! +CampingAlert=Warning!|You are camping! +Back=Back +AFK=Away +isAFK=%s has been marked as being AFK +isBack=%s has been marked as no longer being AFK \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DefCore.txt new file mode 100644 index 00000000..575657a7 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=NOFF +Version=4,9,8,2 +Name=No Friendly Fire +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DescDE.txt new file mode 100644 index 00000000..5d322ba0 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DescDE.txt @@ -0,0 +1 @@ +Falls aktiviert treffen Projektile Freunde nicht. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DescUS.txt new file mode 100644 index 00000000..53c5dc3d --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/DescUS.txt @@ -0,0 +1 @@ +Projectiles do not hit friends if activated. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Graphics.png new file mode 100644 index 00000000..5cec285b Binary files /dev/null and b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Names.txt b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Names.txt new file mode 100644 index 00000000..88381972 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kein Friendly Fire +US:No friendly fire \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Script.c b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Script.c new file mode 100644 index 00000000..818d2a9a --- /dev/null +++ b/Hazard.c4d/Rules.c4d/NoFriendlyFire.c4d/Script.c @@ -0,0 +1,18 @@ +/*-- No Friendly Fire --*/ + +#strict + +protected func Activate(iPlr) { + MessageWindow(GetDesc(),iPlr); +} + +global func NoFriendlyFire() { + return(ObjectCount(NOFF)); +} + +global func FriendlyFire() { + return(!NoFriendlyFire()); +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return(1); } diff --git a/Hazard.c4d/Rules.c4d/Title.txt b/Hazard.c4d/Rules.c4d/Title.txt new file mode 100644 index 00000000..0cec1dc5 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/Title.txt @@ -0,0 +1,2 @@ +DE:Regeln +US:Rules diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DefCore.txt new file mode 100644 index 00000000..a77d25e1 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=WPCH +Version=4,9,8,2 +Name=Weapon Choice +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,64,64 +TimerCall=Spawntimer diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DescDE.txt new file mode 100644 index 00000000..3f0e925b --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DescDE.txt @@ -0,0 +1 @@ +Diese Regel erlaubt es beim Start oder Relaunch Waffen zu kaufen. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DescUS.txt new file mode 100644 index 00000000..4c8ba4d5 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/DescUS.txt @@ -0,0 +1 @@ +With this rule you can buy weapons at the start/after a relaunch. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Graphics.png new file mode 100644 index 00000000..e2d71772 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/GraphicsChosen.png b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/GraphicsChosen.png new file mode 100644 index 00000000..27e634ed Binary files /dev/null and b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/GraphicsChosen.png differ diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Names.txt b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Names.txt new file mode 100644 index 00000000..dae2ed9a --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffenwahl +US:WeaponChoice \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Script.c b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Script.c new file mode 100644 index 00000000..a6648796 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/Script.c @@ -0,0 +1,236 @@ +/*-- WeaponChoice --*/ + +#strict +#include WPVM + +local WeaponChoice; +local spawntimer; +local spawnclonk; + +protected func Activate(iPlr) { + MessageWindow(GetDesc(),iPlr); +} + +func Initialize() { + SetPosition(); + WeaponChoice = CreateArray(0); + inherited(); + AddWares("IsWeapon",-1); + AddWares("IsEquipment",-1); + AddWares("IsUpgrade",-1); + SortWare("IsWeapon","IsEquipment","IsUpgrade"); +} + +func InitializePlayer(int iPlayer) { + if(!GetLength(WeaponChoice[iPlayer])) + WeaponChoice[iPlayer] = CreateArray(0); + var pClonk = GetCursor(iPlayer); + if(!pClonk || FindObject(CHOS)) { + ScheduleCall(0,"InitializePlayer",1,0,iPlayer); + } + + //Startgeld! :) +// SetWealth(iPlayer,GetWealth(iPlayer)+75); Nöö + // Für KIs aber schon (verzögert, damit die Crew erst beitreten kann): + if(GetPlayerType(iPlayer) == C4PT_Script) + Schedule(Format("SetWealth(%d, GetWealth(%d) * GetCrewCount(%d));", iPlayer, iPlayer, iPlayer), 1); + ScheduleCall(0,"CreateWpnMenu",1,0,pClonk); +} + +func RelaunchPlayer(int iPlr, object pClonk) { + if(!pClonk) + if(!(pClonk = GetCursor(iPlr))) + return(ScheduleCall(this(),"RelaunchPlayer",1,0,iPlr,pClonk)); + if(!GetAlive(pClonk)) + return(ScheduleCall(this(),"RelaunchPlayer",1,0,iPlr)); + + if(FindObject(GLMS)) { + spawntimer = 10; + spawnclonk = pClonk; + } + + CreateWpnMenu(pClonk); + return(); +} + +protected func Spawntimer() { + if(spawntimer) { + spawntimer--; + PlayerMessage(GetOwner(spawnclonk),"@$TimeTillRespawn$",0,spawntimer); + if(!spawntimer) { + Finish(0,spawnclonk); + } + } +} + +//Erzeugt das ganze Waffenmenü +func CreateWpnMenu(object pClonk) { + //Parameter vergessen? + if(!pClonk) + return(0); + var iPlayer = GetOwner(pClonk); + + //Stuff damit man nicht Angreifbar ist in der Zwischenzeit + if(GetID(Contained(pClonk)) != TIM1) { + var tmp = CreateObject(TIM1,AbsX(GetX(pClonk)),AbsY(GetY(pClonk)),iPlayer); + SetCategory(GetCategory(tmp) | C4D_Foreground,tmp); + SetGraphics(0,tmp,GetID(pClonk),1,5,0,1,pClonk); + SetVisibility(VIS_Owner,tmp); + Enter(tmp,pClonk); + } + + if(GetPlayerType(iPlayer) == C4PT_Script) return; + + //Schon ein Menü offen? + if(GetMenu(pClonk)) { + CloseMenu(pClonk); //zumachen. + } + + if(!GetLength(WeaponChoice[iPlayer])) { + var i,tmp; + while(tmp = (pClonk->Contents(i))) { + var cid = GetID(tmp); + if(FindIn(WeaponChoice[iPlayer],cid)) + continue; + if(FindWare(cid)) + AddToArray(WeaponChoice[iPlayer],GetID(tmp)); + i++; + } + } + + //absicherung! + SetWare(0,-1); + + CreateBuyMenu(pClonk); + + //Ende -> Menü + AddMenuItem("$End$","Finish",WEPN,pClonk,0,pClonk); +} + +//gewähltes Zeugs markieren +private func AdaptMenuItem(object pObj,int iPlayer) { + if(FindIn(WeaponChoice[iPlayer],GetID(pObj))) { + SetGraphics("Chosen", pObj, WPCH, 1, GFXOV_MODE_Picture); + pObj->SetClrModulation(RGB(200,200,200)); + SetObjDrawTransform(650,0,5000,0,650,5000, pObj, 1); + } +} + +//Die Kauffunktion überladen +private func BuyItem(id id, object pClonk) { + var iPlayer = GetController(pClonk); + var done; + + for(var i in WeaponChoice[iPlayer]) + if(i == id) + if(FindIn(WeaponChoice[iPlayer],id)) { + Uncheck(id,iPlayer,pClonk); + done = true; + } + if(!done) + Check(id,iPlayer,pClonk); + + Sound("Click",1,0,0,iPlayer+1); + + //Menü updaten + var sel = GetMenuSelection(pClonk); + CloseMenu(pClonk); + CreateWpnMenu(pClonk); + SelectMenuItem(sel,pClonk); +} + +private func Uncheck(id ID, int iPlayer, object pClonk) { + if(!ID) + return(); + + if(FindContents(ID,pClonk)) + RemoveObject(FindContents(ID,pClonk)); + + for(var x; x < GetLength(WeaponChoice[iPlayer]); x++) + if(WeaponChoice[iPlayer][x] == ID) + WeaponChoice[iPlayer][x] = 0; + SetWealth(iPlayer,GetWealth(iPlayer)+GetDefValue(ID)); +} + +private func Check(id ID, int iPlayer, object pClonk) { + if(!ID) + return(); + //genug Geld? + if(GetDefValue(ID) > GetWealth(iPlayer)) + return(Sound("Error",1,0,0,iPlayer+1)); + //testen ob wir das Objekt überhaupt noch aufnehmen dürfen + var tmp = CreateObject(ID,0,0,iPlayer); + if(pClonk->~RejectCollect(ID,tmp)) { + RemoveObject(tmp); + return(Sound("Error",1,0,0,iPlayer+1)); + } + else + Enter(pClonk,tmp); + AddToArray(WeaponChoice[iPlayer],ID); + SetWealth(iPlayer,GetWealth(iPlayer)-GetDefValue(ID)); +} + +func FindIn(array a, b) { + for(var c in a) + if(b == c) + return(true); + return(false); +} + +func Finish(id unused, object pClonk, bool bRight) { + if(bRight) + return(MenuQueryCancel(0,pClonk)); + + PlayerMessage(GetOwner(spawnclonk),""); + spawnclonk = 0; + spawntimer = 0; + + var iPlayer = GetOwner(pClonk); + + //Auswahl löschen + WeaponChoice[iPlayer] = CreateArray(); + //Menü schließen + CloseMenu(GetCursor(iPlayer)); + //Sound! :D + Sound("Cash",1,0,0,iPlayer+1); + + //Alle Waffen auffüllen + for(var wpn in FindObjects(Find_Container(pClonk), Find_Func("IsWeapon"))) { + var ammo = wpn->GetFMData(FM_AmmoID); + var load = wpn->GetFMData(FM_AmmoLoad); + //erst entladen + DoAmmo(ammo,-load, wpn); + //dann neu reinladen + DoAmmo(ammo, load, wpn); + //und noch zusätzliche Muni für den Clonk + DoAmmo(ammo, load, pClonk); + } + + //Wieder angreifbar machen + RemoveObject(Contained(pClonk),1); +} + +func MenuQueryCancel(int iSelection, object pMenuObj) { + var owner = GetOwner(pMenuObj); + //Auswahl löschen + for(var x in WeaponChoice[owner]) { + Uncheck(x,owner,pMenuObj); + } + WeaponChoice[owner] = CreateArray(0); + + var sel = GetMenuSelection(pMenuObj); + CloseMenu(pMenuObj); + CreateWpnMenu(pMenuObj); + SelectMenuItem(sel,pMenuObj); + + return(true); +} + +public func GetWareCount(id ID) { + for(var x; x < GetLength(aWare); x++) + if(aWare[x] == ID) + return -1; +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return(1); } diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/StringTblDE.txt b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/StringTblDE.txt new file mode 100644 index 00000000..af105e83 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +NoWeapons=Es wurden keine Waffen gefunden. +End=Ende +TimeTillRespawn=Noch %d Sekunden bis zum Respawn \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/StringTblUS.txt b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/StringTblUS.txt new file mode 100644 index 00000000..c4f57ff4 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponChoice.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +NoWeapons=No Weapons found. +End=Finish +TimeTillRespawn=%d seconds until respawn \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DefCore.txt b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DefCore.txt new file mode 100644 index 00000000..f12b5b21 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=WPST +Version=4,9,8,2 +Name=Weapon Stay +Category=C4D_StaticBack|C4D_Rule +MaxUserSelect=1 +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DescDE.txt b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DescDE.txt new file mode 100644 index 00000000..d427d871 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DescDE.txt @@ -0,0 +1 @@ +Wenn aktiviert, haben Spawnpunkte nicht immer nur ein Objekt zur Verfügung, sondern pro Spieler eines, so dass jeder immer eines bekommt. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DescUS.txt b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DescUS.txt new file mode 100644 index 00000000..e8fbaecf --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/DescUS.txt @@ -0,0 +1 @@ +Every spawnpoint contains an object for every player not only for one if activated. \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Graphics.png b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Graphics.png new file mode 100644 index 00000000..daacdbf6 Binary files /dev/null and b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Graphics.png differ diff --git a/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Names.txt b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Names.txt new file mode 100644 index 00000000..078d7c97 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffen bleiben +US:Weapon stay \ No newline at end of file diff --git a/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Script.c b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Script.c new file mode 100644 index 00000000..00407127 --- /dev/null +++ b/Hazard.c4d/Rules.c4d/WeaponStay.c4d/Script.c @@ -0,0 +1,25 @@ +/*-- Weapon Stay --*/ + +#strict + +protected func Activate(iPlr) { + MessageWindow(GetDesc(),iPlr); +} + +protected func Initialize() { + for(var pSpawn in FindObjects(Find_ID(SPNP))) + pSpawn->Initialized(); +} + +protected func InitializePlayer(int iPlr) +{ + for(var pSpawn in FindObjects(Find_ID(SPNP))) + { + if(GetPlayerType(iPlr)) + if(!(Local(0,pSpawn) & 1 << iPlr)) + Local(0,pSpawn) += 1 << iPlr; + } +} + +// Kann mittels des Spielzielauswählers ausgewählt werden +public func IsChooseable() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/ActMap.txt new file mode 100644 index 00000000..3dd2eff4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/ActMap.txt @@ -0,0 +1,4 @@ +[Action] +Name=Be +Length=4 +Facet=0,0,64,30 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DefCore.txt new file mode 100644 index 00000000..55612678 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=CON1 +Version=4,9,8,2 +Name=Container +Category=C4D_Structure +MaxUserSelect=10 +Width=64 +Height=30 +Offset=-32,-15 +Vertices=2 +VertexX=33,-33 +VertexY=13,13 +VertexFriction=100,100 +Value=70 +Mass=2000 +Components=METL=10 +SolidMask=0,0,64,29,0,0 +Picture=0,30,64,64 +ColorByOwner=1 + + + diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DescDE.txt new file mode 100644 index 00000000..4b2f87bf --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DescDE.txt @@ -0,0 +1 @@ +Wird benutzt um Waren zu lagern, oder einfach um auf ihm rumzulaufen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DescUS.txt new file mode 100644 index 00000000..a431b856 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/DescUS.txt @@ -0,0 +1 @@ +Used to store ware or just to walk around on top of it. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Graphics.png new file mode 100644 index 00000000..642a3260 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Names.txt new file mode 100644 index 00000000..5f033589 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Container +US:Container \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Overlay.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Overlay.png new file mode 100644 index 00000000..7b480c19 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Overlay.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Script.c new file mode 100644 index 00000000..18a1237d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Container.c4d/Script.c @@ -0,0 +1,36 @@ +/*-- Container --*/ + +#strict + +public func Initialize() { + SetAction("Be"); + SetPerspective(1); + SetColorDw(HSL(Random(255), Random(100)+25, 88+40)); +} + +public func IsCraneGrabable() { return(1); } + +public func Hit() { Sound("ClonkHit*"); } + +public func SetPerspective(int pers) { + SetPhase(pers); + SetSolidMask(pers*64,0,64,29); + if(pers == 2) { + SetVertexXY(0,+15,13); + SetVertexXY(0,-15,13); + } + else { + SetVertexXY(0,+28,13); + SetVertexXY(1,-28,13); + } +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetPhase() != 1) { + extra[GetLength(extra)] = Format("SetPerspective(%d)", GetPhase()); + } + extra[GetLength(extra)] = Format("SetColorDw(%d)", GetColorDw()); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DefCore.txt new file mode 100644 index 00000000..3480c14d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=CRAT +Version=4,9,8,2 +Name=Crate +Category=C4D_Vehicle +Width=35 +Height=30 +Offset=-17,-15 +Vertices=4 +VertexX=-16,-16,16,16 +VertexY=-14,14,-14,14 +VertexFriction=80,80,80,80 +Value=10 +Mass=50 +Components=WOOD=1 +SolidMask=1,0,33,30,0,1 +Picture=0,30,64,64 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DescDE.txt new file mode 100644 index 00000000..132b63ad --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DescDE.txt @@ -0,0 +1 @@ +Kiste. Steht toll herum. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DescUS.txt new file mode 100644 index 00000000..5cba0a8a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/DescUS.txt @@ -0,0 +1 @@ +A Crate. It's special ability is standing around. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Graphics.png new file mode 100644 index 00000000..8981790e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Names.txt new file mode 100644 index 00000000..c21824f9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kiste +US:Crate \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Script.c new file mode 100644 index 00000000..e24cfcb9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Script.c @@ -0,0 +1,18 @@ +/*-- Crate --*/ + +#strict + +public func IsBulletTarget() { return(!Random(5)); } +public func IsCraneGrabable() { return(1); } +public func CanBeLaserRecycled() { return(2); } + +func Damage() { + if(GetDamage() > 20) + { + CastParticles("Splinter", 5, 100, 0,0, 50, 75, RGBa(255,255,255,0), RGBa(255,255,255,0)); + Sound("CrateCrack"); + while(Contents()) + Exit(Contents(), 0, 0, Random(360), RandomX(-5,5), RandomX(-5,5), RandomX(-15,15)); + RemoveObject(); + } +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Graphics.png new file mode 100644 index 00000000..4367e43e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Names.txt new file mode 100644 index 00000000..82bd2e75 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Splitter +US:Splinter \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Particle.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Particle.txt new file mode 100644 index 00000000..72a96cfe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Crate.c4d/Splinter.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=Splinter +MaxCount=300 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +CollisionFn=Stop +Face=0,0,13,13,-6,-6 +Delay=0 +RByV=1 +GravityAcc=100 +VertexCount=1 +VertexY=50 +AlphaFade=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/ActMap.txt new file mode 100644 index 00000000..ea272481 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Exist +Length=2 +Delay=0 +Facet=0,0,50,30,0,0 +NextAction=Exist + + diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DefCore.txt new file mode 100644 index 00000000..8ccc84c0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=DEB1 +Version=4,9,8,2 +Name=Debris1 +Category=C4D_Structure +Width=50 +Height=30 +Offset=-25,-15 +Vertices=2 +VertexX=-24,24 +VertexY=13,13 +VertexFriction=100,100 +Mass=100 +Components=METL=5 +SolidMask=0,0,50,30,0,0 +Picture=0,0,50,30 +Rotate=1 +RotatedSolidmasks=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DescDE.txt new file mode 100644 index 00000000..54b26868 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DescDE.txt @@ -0,0 +1 @@ +Liegt in der Gegend herum. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DescUS.txt new file mode 100644 index 00000000..f12b6bae --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/DescUS.txt @@ -0,0 +1 @@ +Lies around. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Graphics.png new file mode 100644 index 00000000..06582042 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Names.txt new file mode 100644 index 00000000..856f6e08 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schutt +US:Debris \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Script.c new file mode 100644 index 00000000..e571d0a0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Debris.c4d/Script.c @@ -0,0 +1,21 @@ +/*-- Schutt --*/ + +#strict + +// Überladen +public func SetDir(int iDir) +{ + iDir = BoundBy(iDir, 0, 1); + SetAction("Exist"); + SetPhase(iDir); + SetSolidMask(50 * iDir, 0, 50, 30, 0, 0); + return(1); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetDir(%d)", GetDir()); + +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Names.txt new file mode 100644 index 00000000..7c3d541e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Barrieren +US:Barriers diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DefCore.txt new file mode 100644 index 00000000..16da31fa --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=SBBA +Version=4,9,8,2 +Name=Sandbag Barrier +Category=C4D_Structure|C4D_SelectKnowledge +MaxUserSelect=1 +Width=32 +Height=15 +Offset=-16,-7 +Vertices=2 +VertexX=-15,15 +VertexY=6,6 +VertexFriction=100,100 +Value=5 +Mass=100 +Components=ERTH=2;SAND=2;LOAM=2 +SolidMask=0,0,32,15,0,0 +Picture=0,15,64,64 +Exclusive=1 +BlastIncinerate=25 +Construction=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DescDE.txt new file mode 100644 index 00000000..1f1cb9ac --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DescDE.txt @@ -0,0 +1 @@ +Simple Sandsäcke. Projektile werden effektiv aufgehalten, aber wenige Explosionen können den Haufen zerstören. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DescUS.txt new file mode 100644 index 00000000..9e1dcdf2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/DescUS.txt @@ -0,0 +1 @@ +Simple sandbags. Protects from projectiles but is weak to explosions. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Graphics.png new file mode 100644 index 00000000..346422fd Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Names.txt new file mode 100644 index 00000000..4f7cb75a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sandsäcke +US:Sandbags \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Graphics.png new file mode 100644 index 00000000..efcaf042 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Names.txt new file mode 100644 index 00000000..0ceea632 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sandsack +US:Sandbag \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Particle.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Particle.txt new file mode 100644 index 00000000..1b676413 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Sandbag.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=Sandbag +MaxCount=100 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,8,8,-4,-4 +Delay=0 +RByV=1 +GravityAcc=100 +VertexCount=1 +VertexY=75 +AlphaFade=3 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Script.c new file mode 100644 index 00000000..7a3d8f23 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Barriers.c4d/Sandbags.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- Sandsackbarriere --*/ + +#strict + +protected func Incineration() +{ + // Kaputt! + CastParticles("Sandbag", 10, 100, 0,0, 35, 45, RGBa(228,228,228,0), RGBa(250,250,250,50)); + RemoveObject(); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetDir(%d)", GetDir()); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DefCore.txt new file mode 100644 index 00000000..0334e01b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=CONS +Version=4,9,8,2 +Name=Console +Category=C4D_Structure +MaxUserSelect=1 +TimerCall=Lights +Width=22 +Height=10 +Offset=-11,-5 +Vertices=3 +VertexX=-10,10 +VertexY=12,12,-4 +VertexFriction=100,100,100 +Value=150 +Mass=50 +Components=METL=3;MONI=1 +Picture=0,10,64,64 +Grab=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DescDE.txt new file mode 100644 index 00000000..fc01a9c8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DescDE.txt @@ -0,0 +1 @@ +Steuert etwas. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DescUS.txt new file mode 100644 index 00000000..a1996411 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/DescUS.txt @@ -0,0 +1 @@ +Controls something. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Graphics.png new file mode 100644 index 00000000..c74ac5f5 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/GraphicsBroken.png b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/GraphicsBroken.png new file mode 100644 index 00000000..f99a4c2b Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/GraphicsBroken.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Names.txt new file mode 100644 index 00000000..aaa3c122 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Konsole +US:Console \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Script.c new file mode 100644 index 00000000..de7eec65 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/Script.c @@ -0,0 +1,91 @@ +/*-- Konsole --*/ + +#strict + +local smashed, target; + +// Effekte +protected func Lights() +{ + if(smashed || GetEffect("EMPShock", this())) + { + if(!Random(10)) CastObjects(SPRK, 1, 30, RandomX(-15,15)); + } + else + { + if(!Random(8)) CreateParticle("NoGravSpark", 3, 1, 0, 0, 50, RGBa(250, 10, 10, 50)); + if(!Random(8)) CreateParticle("NoGravSpark", 3, 3, 0, 0, 50, RGBa(10, 10, 250, 50)); + } +} + +// Bumm :o +protected func Damage() +{ + if(smashed) return(CastObjects(SPRK, 1, 30, RandomX(-15,15))); + if(GetDamage() >= 40) + { + CastObjects(SPRK, 4, 50); + Sparks(15, RGB(210, 210, 0)); + CreateSmokeTrail(RandomX(15,20), Random(360), 0,0, this()); + CreateSmokeTrail(RandomX(15,20), Random(360), 0,0, this()); + Sound("Blast1"); + Sound("CrystalHit*"); + SetGraphics("Broken"); + smashed = true; + } +} + +/* Bedienung */ + +protected func ControlDig(pClonk) +{ + [$Control$] + if(smashed || GetEffect("EMPShock", this())) + { + Sound("Electric"); + Fling(pClonk, RandomX(-2,2), -2); + return(); + } + + if(!target) return(Sound("CatapultSet")); + + CreateMenu(GetID(target), pClonk, target, 0, Format("$Control$: %s", GetName(target)), 0, 1); + for(var i = 1, desc ; desc = target->~ConsoleControl(i) ; i++) + { + //Aufrufenden Clonk und uns selbst dem Zielobjekt übergeben. Dies kann es in ConsoleController abrufen +// target->~ConsoleController(this(), pClonk); + // Zielobjekt muss für ConsoleControl(i) jeweils den Namen der Aktion zurückgeben, wichtig: i beginnt bei 1 + AddMenuItem(desc, Format("ConsoleControlled(%d, %d, %d)", i, ObjectNumber(pClonk), ObjectNumber(this())), GetID(), pClonk, 0, 0, "$Control$"); + // Zielobjekt bekommt Aufruf: ConsoleControll(i) und muss das dann verarbeiten + } + return(1); +} + +//EMP-Angriff +public func EMPShock() +{ + //Nock Schockbar? + if(GetEffect("EMPShock", this()) || smashed) return(0); + + //Ansonsten knallt's + AddEffect("EMPShock", this(), 180, 650, this(), GetID()); +} + +// ist ne Steuereinheit! +public func IsConsole() { return(1); } +public func IsMachine() { return(1); } + +public func Set(pTarget) +{ + target = pTarget; +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (target) + extra[GetLength(extra)] = ["Set(Object(%d))", target]; + if (smashed) + extra[GetLength(extra)] = "LocalN(\"smashed\")=true"; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/StringTblDE.txt new file mode 100644 index 00000000..e3f1dfc3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Control=Bedienen diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/StringTblUS.txt new file mode 100644 index 00000000..860b7933 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Control=Control diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DefCore.txt new file mode 100644 index 00000000..30c9f915 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=CNS2 +Name=Console2 +Version=4,9,5 +Category=C4D_Structure +MaxUserSelect=1 +TimerCall=Lights +Width=25 +Height=30 +Offset=-12,-15 +Vertices=3 +VertexX=-10,10,0 +VertexY=14,14,-15 +VertexFriction=100,100,100 +Value=150 +Mass=75 +Components=METL=3;MONI=1 +Picture=25,0,64,64 +Grab=2 + \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DescDE.txt new file mode 100644 index 00000000..fc01a9c8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DescDE.txt @@ -0,0 +1 @@ +Steuert etwas. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DescUS.txt new file mode 100644 index 00000000..a1996411 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/DescUS.txt @@ -0,0 +1 @@ +Controls something. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Graphics.png new file mode 100644 index 00000000..221fd21d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Names.txt new file mode 100644 index 00000000..aaa3c122 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Konsole +US:Console \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Script.c new file mode 100644 index 00000000..3c01b281 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Konsole2 --*/ + +#strict +#include CONS + +func IsMachine() { return(false); } +func Damage() {} +func Lights() {} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/StringTblDE.txt new file mode 100644 index 00000000..e3f1dfc3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Control=Bedienen diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/StringTblUS.txt new file mode 100644 index 00000000..860b7933 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Console2.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Control=Control diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DefCore.txt new file mode 100644 index 00000000..bbc2d742 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=LKEY +Version=4,9,8,2 +Name=Console +Category=C4D_Structure +Width=15 +Height=13 +Offset=-7,-6 +Vertices=1 +VertexY=12 +Picture=0,13,64,64 +Grab=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DescDE.txt new file mode 100644 index 00000000..dddee231 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DescDE.txt @@ -0,0 +1 @@ +Zuverlässiges Sicherheitssystem. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DescUS.txt new file mode 100644 index 00000000..77598853 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/DescUS.txt @@ -0,0 +1 @@ +Reliable security system. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Graphics.png new file mode 100644 index 00000000..e6a36650 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DefCore.txt new file mode 100644 index 00000000..bb7d5e2f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=KCRD +Version=4,9,8,2 +Name=Keycard +Category=C4D_Object +MaxUserSelect=10 +Width=8 +Height=5 +Offset=-4,-3 +Vertices=2 +VertexX=-4,4 +VertexFriction=60,60 +Value=10 +Mass=10 +Components=METL=1 +Picture=8,0,64,64 +Rebuy=1 +Collectible=1 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DescDE.txt new file mode 100644 index 00000000..cf8c0b1e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DescDE.txt @@ -0,0 +1 @@ +Zum Öffnen von verschlossenen Türen. Zu einer Tür gehört immer nur eine Karte. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DescUS.txt new file mode 100644 index 00000000..869b8de9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/DescUS.txt @@ -0,0 +1 @@ +Used to open locked doors. One card can always just open one door. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics.png new file mode 100644 index 00000000..15598e82 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics2.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics2.png new file mode 100644 index 00000000..813af07f Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics2.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics3.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics3.png new file mode 100644 index 00000000..bbe2dca8 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics3.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics4.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics4.png new file mode 100644 index 00000000..b98cb5da Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics4.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics5.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics5.png new file mode 100644 index 00000000..2e4df5e3 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Graphics5.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Names.txt new file mode 100644 index 00000000..e8c13fee --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schlüsselkarte +US:Key card \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Script.c new file mode 100644 index 00000000..1d960445 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Keycard.c4d/Script.c @@ -0,0 +1,27 @@ +/*-- Keycard --*/ + +#strict + +local Keynumber; + +protected func Initialize() +{ + var i = Random(5)+1; + if(i != 1) + SetGraphics(Format("%d", i)); +} + +public func SetKeyNumber(int iBits) +{ + Keynumber = iBits; +} + +public func GetKeyNumber() +{ + return(Keynumber); +} + +public func IsKeycard() +{ + return(true); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Names.txt new file mode 100644 index 00000000..2ffb414a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kartenleser +US:Card reader \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Script.c new file mode 100644 index 00000000..71e2e875 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/Script.c @@ -0,0 +1,76 @@ +/*-- Keycard-Terminal --*/ + +#strict + +local cardid, target; + +/* Bedienung */ + +protected func ControlThrow(object pClonk) +{ + [$Control$] + + var kc = Contents(0,pClonk); + // Sonst Nullpointer -_- + if(!kc) { + Sound("CommandFailure1"); + return(Message("$Keycard$",pClonk)); + } + + if(!(kc->~IsKeycard())) { + Sound("CommandFailure1"); + Message("$Keycard$",pClonk); + } + else { + // erstmal annehmen + kc->Exit(); + kc->Enter(this()); + ScheduleCall(0,"CheckCard",40); + } + return(1); +} + +public func CheckCard() { + if(!Contents()) return(); + + if(Contents()->GetKeyNumber() & cardid) { + // es ist die richtige! + if(target) target->~Access(); + + // Effekt + Sound("Beep"); + CreateParticle("NoGravSpark", 5, -7, 0, 0, 50, RGBa(0, 255, 0, 50)); + + // der Einfachheit halber werden Karten nach Gebrauch zerstört + // if(Contents()) RemoveObject(Contents()); + // doch nicht + } + else { + // die falsche... :( + Sound("Error"); + CreateParticle("NoGravSpark", 5, -7, 0, 0, 50, RGBa(255, 0, 0, 50)); + + // ausspucken + if(Contents()) Contents()->Exit(); + } +} + +public func CreateKeyCard() { + var kc = CreateObject(KCRD,0,0,GetOwner()); + kc -> SetKeyNumber(cardid); + return(kc); +} + +public func Set(object pTarget, int iNumber) +{ + cardid = iNumber; + target = pTarget; +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (target) + extra[GetLength(extra)] = [Format("Set(Object(%%d),%i)", cardid), target]; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/StringTblDE.txt new file mode 100644 index 00000000..e16ecbd2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +Control=Bedienen +Keycard=Hier passt eine Schlüsselkarte rein. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/StringTblUS.txt new file mode 100644 index 00000000..0fe6248b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/CardReader.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +Control=Control +Keycard=This slot is for key cards. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Names.txt new file mode 100644 index 00000000..8df7406f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bedienelemente +US:Controls diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DefCore.txt new file mode 100644 index 00000000..b109d0d6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=PKEY +Version=4,9,8,2 +Name=Console +Category=C4D_Structure +Width=20 +Height=11 +Offset=-6,-6 +Vertices=2 +VertexX=-6,6 +VertexY=12,12 +Picture=0,11,64,64 +Grab=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DescDE.txt new file mode 100644 index 00000000..ab124025 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DescDE.txt @@ -0,0 +1 @@ +Nichts für vergessliche Clonks. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DescUS.txt new file mode 100644 index 00000000..83db0e1a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/DescUS.txt @@ -0,0 +1 @@ +Not the right thing for forgetful clonks. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Graphics.png new file mode 100644 index 00000000..e829d125 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Names.txt new file mode 100644 index 00000000..834c9004 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:PIN Eingabe +US:PIN input \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Script.c new file mode 100644 index 00000000..494b093f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Script.c @@ -0,0 +1,109 @@ +/*-- PIN-Terminal --*/ + +#strict + +local target, input, number, clonk; + +/* Eingabe */ + + +protected func ControlThrow(object pClonk) { + clonk = pClonk; + Menu(0); +} + + +protected func Menu(int iSel) { + var string_in; + if(!input) string_in = "$InputCode$"; + else string_in = Format("$Input$: %d",input); + + // Menü erstellen + CreateMenu (GetID(), clonk, this(), 0, 0, 0, 0, 1); + // weil das Clonkmenü 4 breit ist, machen wir halt Hexadezimal... + for(var i=1; i<10; ++i) { + AddMenuItem(string_in,Format("Input(%d)",i),PCSO,clonk,0,0,0,2,i); + } + AddMenuItem(string_in,"StartOver()",PCSO,clonk,0,0,0,2,10); + AddMenuItem(string_in,"Input(0)",PCSO,clonk,0,0,0,2,0); + AddMenuItem("$Cancel$","Cancel()",PCSO,clonk,0,0,0,2,11); + + SetMenuSize(3,4,clonk); + Schedule(Format("SetMenuSize(3,4,Object(%d));", ObjectNumber(clonk)), 2, 0, this()); + SelectMenuItem(iSel,clonk); +} + +protected func StartOver() { + var menusel = GetMenuSelection(clonk); + Cancel(); + Menu(menusel); +} + +protected func Cancel() { + Sound("Bip"); + CloseMenu(clonk); + input = 0; +} + +protected func Input(int i) { + var menusel = GetMenuSelection(clonk); + input = input*10+i; + CloseMenu(clonk); + + + // freundlich beepen + Sound("Bip"); + + // fertig + if(Length(input) == Length(number)) { + if(!CheckInput()) Menu(menusel); + input = 0; + } + else { + Menu(menusel); + } + +} + +private func Length(int a) { + var i = 1; + while(a>9) { + a /= 10; + ++i; + } + return(i); +} + +private func CheckInput() { + // success! + if(input == number) { + if(target) { + target->~Access(); + + // Effekt + Sound("BipBipBip"); + CreateParticle("NoGravSpark", 5, 1, 0, 0, 50, RGBa(0, 255, 0, 50)); + return(true); + } + } + // wrong code! + else { + Sound("Error"); + CreateParticle("NoGravSpark", 5, 1, 0, 0, 50, RGBa(255, 0, 0, 50)); + return(false); + } +} + +public func Set(object pTarget, int i) +{ + number = i; + target = pTarget; +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (target) + extra[GetLength(extra)] = [Format("Set(Object(%%d),%i)", number), target]; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/StringTblDE.txt new file mode 100644 index 00000000..95b3c97f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +Input=Eingegeben +InputCode=Code eingeben +Cancel=Abbrechen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/StringTblUS.txt new file mode 100644 index 00000000..afd37805 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +Input=Input +InputCode=Input code +Cancel=Cancel \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/DefCore.txt new file mode 100644 index 00000000..08c926ac --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=PCSO +Version=4,9,8,2 +Name=PassCodeSymbolObject +Category=C4D_Vehicle +Picture=0,0,35,35 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/Graphics.png new file mode 100644 index 00000000..1ca2a13d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/Names.txt new file mode 100644 index 00000000..eac2f570 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/PasscodeInput.c4d/Symbols.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Symbole +US:Symbols diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Actmap.txt new file mode 100644 index 00000000..ad4715e7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Actmap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Switch +Procedure=NONE +Facet=0,0,18,12 +Length=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DefCore.txt new file mode 100644 index 00000000..5542d433 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=SWTH +Version=4,9,8,2 +Name=Switch +Category=C4D_Structure +Width=18 +Height=12 +Offset=-9,-6 +Vertices=1 +VertexY=11 +VertexFriction=100 +Mass=1 +Components=SWTH=1 +Picture=0,12,64,64 +Grab=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DescDE.txt new file mode 100644 index 00000000..1e707281 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DescDE.txt @@ -0,0 +1 @@ +Drücken zum Schalten. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DescUS.txt new file mode 100644 index 00000000..eeda4e00 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/DescUS.txt @@ -0,0 +1 @@ +Press to switch. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Graphics.png new file mode 100644 index 00000000..1dfe38ff Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Names.txt new file mode 100644 index 00000000..e2912ce0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schalter +US:Switch \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Script.c new file mode 100644 index 00000000..4e98274e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Controls.c4d/Switch.c4d/Script.c @@ -0,0 +1,75 @@ +/*-- Schalter --*/ + +#strict + +// Zielobjekte +local target; +local locked; + +public func Lock(bool unlock) +{ + // Negativlogik. :D + locked = !unlock; +} + +public func IsLocked() { return(locked); } + +public func Set(object t) { target = t; } + +/* Steuerung */ + +protected func Initialize() +{ + SetAction("Switch"); +} + +protected func ControlThrow(object byObj) +{ + if(IsLocked()) + return(Sound("CommandFailure1",0,0,80,GetController(byObj))); + + SetPhase((GetPhase()+1)%2); + if(target) target->~Access(); + + Sound("Lever1",0,0,80); + + return(1); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (target) + extra[GetLength(extra)] = ["Set(Object(%d))", target]; + if (locked) + extra[GetLength(extra)] = "Lock()"; +} + + +// Mehrere Ziele... +// +// Ziel hinzufügen: pTarget = Zielobjekt, CallFunc = Funktion, die aufgerufen werden soll (0 für "Switch") +//public func AddTarget(object pTarget, string CallFunc) +//{ +// targets[GetLength(targets)] = CreateArray(); +// targets[GetLength(targets)-1][0] = pTarget; +// targets[GetLength(targets)-1][1] = CallFunc; +// return(1); +//} +// +// Ziel entfernen +//public func RemoveTarget(object pTarget) +//{ +// var i=-1; +// for(var step in targets) +// { +// i++; +// if(!step) continue; +// if(step[0] == pTarget) +// { +// targets[i] = 0; +// return(1); +// } +// } +//} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/ActMap.txt new file mode 100644 index 00000000..f34e9571 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Crane +Procedure=FLOAT +Directions=1 +Length=1 +Delay=0 +FacetBase=1 +NextAction=Crane diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DefCore.txt new file mode 100644 index 00000000..ad866296 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=CRN1 +Version=4,9,8,2 +Name=Crane +Category=C4D_Structure +Width=14 +Height=16 +Offset=-7,-8 +Value=10 +Mass=20 +Components=METL=4 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DescDE.txt new file mode 100644 index 00000000..6e2bac76 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DescDE.txt @@ -0,0 +1 @@ +Ich will einen Kran! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DescUS.txt new file mode 100644 index 00000000..05ebdb1e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/DescUS.txt @@ -0,0 +1 @@ +I want a crane! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Graphics.png new file mode 100644 index 00000000..f550069d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/GraphicsPart.png b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/GraphicsPart.png new file mode 100644 index 00000000..242086d4 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/GraphicsPart.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Names.txt new file mode 100644 index 00000000..e07b52ff --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kran +US:Crane \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Script.c new file mode 100644 index 00000000..0928aece --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/Script.c @@ -0,0 +1,128 @@ +/*-- Kran --*/ + +#strict + +local length, size, + slide; + +protected func Initialize() { + SetAction("Crane"); // Standardaktion + // Standardteil + size=14; + AddPart(); + // "Kran" erzeugen + CreateCrane(); +} + +public func CreateCrane() { + // Schon ein Kran da? + if(slide) return(slide); + // Erstellen + slide = CreateObject(SLDE, 0, 5, GetOwner()); + // Ransetzen + slide->Set(this()); +} + +public func Set(int iNewLength) { + // 0 geht nicht + if(!iNewLength) return(); + // Länger machen? + if(iNewLength > length) + AddParts(iNewLength); + // Kürzer machen + if(iNewLength < length) + RemoveParts(iNewLength); +} + +/* Länge */ + +private func AddParts(int iNewLength) { + // Solang hinzufügen, bis richtig + while(length != iNewLength) + AddPart(); +} + +private func RemoveParts(int iNewLength) { + // Ein Teil ist Minimum + if(!iNewLength) iNewLength = 1; + // Solang wegnehmen, bis richtig + while(length != iNewLength) + RemovePart(); +} + +public func AddPart() { + // Position + var iX = GetX(),iY = GetY(); + length++; + // Ein Teil dransetzen + SetGraphics("Part",this(),GetID(),length, GFXOV_MODE_Base); + // Position + SetPosition(iX, iY); + // Anpassen + AdjustSize(); +} + +public func RemovePart() { + // Nicht ganz weg + if(length == 1) return(); + // Position + var iX = GetX(),iY = GetY(); + // Ein Teil wegnehmen + SetGraphics(0,this(),0,length); + length--; + // Position + SetPosition(iX, iY); + // Anpassen + AdjustSize(); +} + +public func AdjustSize() { + // Objektgröße anpassen + var Wdt = size*length; + SetShape(-Wdt/2, -4, Wdt, 8); + + // Grafik anpassen + for(var i = 1, j=-length+1; i <= length; i++) { + SetObjDrawTransform(1000, 0, size*500*j, 0, 1000, 0, this(), i); + j += 2; + } +} + +/* Callbacks */ + +public func LeftX() { + if(length%2) + return(GetX()-(length/2*size)-size/2); + + return(GetX()-(length/2*size)); +} + +public func RightX() { + if(length%2) + return(GetX()+(length/2*size)+size/2); + + return(GetX()+(length/2*size)); +} + +public func ConsoleControl(int i) +{ + if(slide) return(slide->ConsoleControl(i)); +} + +public func ConsoleControlled(int i, int Clonk) +{ + if(slide) return(slide->ConsoleControlled(i, Clonk)); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%d)", length); + var clamp = slide->LocalN("clamp"); + if (clamp && clamp->LocalN("load")) { + extra[GetLength(extra)] = Format("Reconfigure(%d,%d,Object(%%d))", GetX(slide)-GetX(), GetY(clamp)-(GetY(slide)+25), clamp->LocalN("clamp")); + } else { + extra[GetLength(extra)] = Format("Reconfigure(%d,%d)", GetX(slide)-GetX(), GetY(clamp)-(GetY(slide)+25)); + } +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/ActMap.txt new file mode 100644 index 00000000..d7cf8847 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Sliding +Procedure=FLOAT +FacetBase=1 +Facet=37,0,21,4,8,16 +FacetTargetStretch=1 +NextAction=Sliding \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/ActMap.txt new file mode 100644 index 00000000..f40e86ee --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=NoLoad +Procedure=FLOAT +Delay=1 +FacetBase=1 +NextAction=NoLoad + +[Action] +Name=Load +Procedure=FLOAT +Delay=1 +FacetBase=1 +NextAction=Load +EndCall=Loading \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/DefCore.txt new file mode 100644 index 00000000..b7dcbb0f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=CLMP +Version=4,9,8,2 +Name=Clamp +Category=C4D_Vehicle +Width=44 +Height=16 +Offset=-21,-8 +Vertices=1 +VertexY=-1 +VertexFriction=100 +Value=5 +Mass=15 +Components=METL=1 +SolidMask=2,5,40,4,0,0 +Picture=0,0,44,16 + +[Physical] +Float=100 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Graphics.png new file mode 100644 index 00000000..afcfdae8 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Names.txt new file mode 100644 index 00000000..dfd3968c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Haken +US:Clamp \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Script.c new file mode 100644 index 00000000..99e75811 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Clamp.c4d/Script.c @@ -0,0 +1,107 @@ +/*-- Haken --*/ + +#strict + +local slide, ydir, load; + +func Initialize() +{ + AddLightAmbience(45); +} + +public func Set(object pSlide) { + slide = pSlide; +// CreateObject(STLC, 0,0, GetOwner())->Connect(this(), pSlide); + SetAction("NoLoad"); + // Effekt, der Bewegung steuert + AddEffect("Movement", this(), 99, 2, this()); +} + +public func Down() { + if(ydir < 2) + ydir += 2; +} + +public func Up() { + if(ydir > -2) + ydir -= 2; +} + +public func Stop() { + ydir = 0; +} + +/* Bewegung */ + +public func FxMovementTimer() { + // Geschwindigkeiten + var y = BoundBy(GetY() + ydir, GetY(slide) + 10, LandscapeHeight()); + if(CheckSolid(y)) + { + y = GetY(); + ydir = 0; + } + SetPosition(GetX(slide), y); +} + +public func CheckSolid(int iY) { + if(!load) + return(GBackSolid(0,iY-GetY())); + iY = iY - GetY(); + var y = load->GetY() + load->GetObjHeight() + load->GetDefOffset(0,1) + iY; + if(iY < 0) + y = load->GetY() + load->GetDefOffset(0,1) + iY; + return(GBackSolid(0,y-GetY())); +} + +/* Objekte schnappen */ + +public func Grab() { + // Hat schon eines? + if(GetAction() eq "Load") return(Ungrab()); + + var obj; + obj = FindObjects(Find_Or(Find_AtPoint(0,0), Find_AtPoint(0,20)), Find_NoContainer(), Find_Func("IsCraneGrabable"), Find_Exclude(this())); + for(var pObj in obj) + if(GetProcedure(pObj) ne "FLOAT") + if(!pObj->~NoCrane()) + { + load = pObj; + SetAction("Load"); + Sound("Grapple"); + AddEffect("Loading", load, 99, 1, this(), 0, GetX(load)-GetX(), GetY(load)-GetY()); + return(1); + } +} + +public func FxLoadingStart(object target, int no, int temp, int x, int y) { + if(temp) return(); + EffectVar(0, target, no) = x; + EffectVar(1, target, no) = y; +} + +public func FxLoadingTimer(object target, int no) { + // Zielposition setzen + SetPosition(GetX()+EffectVar(0, target, no), GetY()+EffectVar(1, target, no), target); + SetXDir(0, target); + SetYDir(0, target); +} + +public func Loading() { + // Kein Ziel mehr? + if(!load) return(SetAction("NoLoad")); + // Alles gut +} + +public func Ungrab() { + if(!load) return(); + // Ziel loslassen + SetAction("NoLoad"); + if(GetEffect("Loading", load)) RemoveEffect("Loading", load); + load = 0; + Sound("Grapple"); +} + +/* Serialisierung */ + +public func NoSerialize() { return !false; } diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/DefCore.txt new file mode 100644 index 00000000..3208df6e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=SLDE +Version=4,9,8,2 +Name=Sliding Carriage +Category=C4D_Vehicle +Timer=3 +TimerCall=CheckY +Width=37 +Height=16 +Offset=-18,-8 +Vertices=3 +VertexX=0,-18,18 +VertexFriction=10,100,100 +Value=50 +Mass=75 +Components=METL=2 +Picture=0,0,37,16 + +[Physical] +Float=100 + diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Graphics.png new file mode 100644 index 00000000..e05d6739 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Names.txt new file mode 100644 index 00000000..64f30997 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schlitten +US:Sliding carriage \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Script.c new file mode 100644 index 00000000..07a1fd0d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/Script.c @@ -0,0 +1,187 @@ +/*-- Schlitten --*/ + +#strict + +local crane, clamp, xdir; + +protected func Initialize() { + SetName(GetName(0,GetID())); + clamp = CreateObject(CLMP, 0, 25, GetOwner()); + clamp->Set(this()); +} + +public func Set(object pCrane) { + crane = pCrane; + SetAction("Sliding", clamp); + Adjust(); +} + +public func Adjust() { + // Position anpassen + var iX = GetX(), iY; + // Etwas unterhalb der Schiene + iY = GetY(crane)+5; + // X-Wert nicht gut + if(NotInRange()) iX = Back2Crane(); + + SetPosition(iX, iY); +} + +public func NotInRange() { + if(!Inside(GetX(), crane->~LeftX()+10, crane->~RightX()-10)) + return(1); +} + +public func Back2Crane() { + return(BoundBy(GetX(), crane->~LeftX()+10, crane->~RightX()-10)); +} + +/* Konsolensteuerung */ + +public func ConsoleControl(int i) { + if(i == 1) return("$ControlCrane$"); +} + +public func ConsoleControlled(int i, int Clonk) { + var pClonk = Object(Clonk); + if(!pClonk) return(); + // Wird bereits kontrolliert? + if(GetEffect("Controller", this())) return(Sound("Error", 0, pClonk, 100, GetOwner(pClonk)+1)); + // Steuerung übernehmen + AddEffect("Controller", this(), 99, 2, this(), 0, GetOwner(pClonk), pClonk); + SetCursor(GetOwner(pClonk), this(), 1,1); +} + +public func FxControllerStart(object target, int no, int temp, int owner, object clonk) { + if(temp) return(); + EffectVar(0, target, no) = owner; + EffectVar(1, target, no) = clonk; +} + +public func FxControllerTimer(target, no) { + if(GetCursor(EffectVar(0, target, no)) != target || !EffectVar(1, target, no)) + { + target->Stop(); + return(-1); + } + if(EffectVar(1, target, no)->GetAction() ne "Push" || + EffectVar(1, target, no)->GetActionTarget()->~IsConsole() != true) + { + target->Stop(); + SetCursor(EffectVar(0, target, no), EffectVar(1, target, no)); + return(-1); + } + // Bewegung überprüfen + target->~CheckMovement(); +} + +func CrewSelection(bool deselect, bool cursoronly) +{ + if(deselect) + { + RemoveEffect("Controller2",this()); + Stop(); + } + else + { + AddEffect("Controller2", this(), 99, 2, this(), 0, GetController(), this()); + SetPlrView(GetController(), clamp); + } +} + +func FxController2Effect(string neweffect) +{ + if(neweffect S= "Controller2") + return(-1); +} + +func FxController2Timer() +{ + CheckMovement(); +} + +/* Steuerung */ + +public func ControlLeft(object obj) { + if(xdir > -2) + xdir -= 2; + + SetPlrView(GetController(obj), clamp); +} + +public func ControlRight(object obj) { + if(xdir < 2) + xdir += 2; + + SetPlrView(GetController(obj), clamp); +} + +public func ControlUp(object obj) { + clamp->Up(); + + SetPlrView(GetController(obj), clamp); +} + +public func ControlDown(object obj) { + clamp->Down(); + + SetPlrView(GetController(obj), clamp); +} + +public func ControlThrow(object obj) { + clamp->Grab(); + + SetPlrView(GetController(obj), clamp); +} + +public func ControlDig(object obj) { + xdir = 0; + clamp->Stop(); + + SetPlrView(GetController(obj), clamp); +} + +public func CheckMovement() { + // Außerhalb der Reichweite + if(NotInRange()) { Adjust(); xdir=0; } + // Der Greifer stößt irgendwo gegen + if(clamp) + if(clamp->GBackSolid(xdir * 3, 0)) + xdir = 0; + // Bei Bewegung Geräusch + if(xdir != 0) Sound("Elevator", 0, this(), 50, 0, 1); + else Sound("Elevator", 0, this(), 50, 0, -1); + + SetPosition(GetX() + xdir, GetY()); +} + +public func CheckY() { + // Überprüft, ob die Schiene weg ist + if(!crane) return(RemoveObject()); + if(GetY() != GetY(crane)+10) Adjust(); + // Die Schiene sollte eigentlich nicht bewegt werden :0 +} + +public func Stop() { + xdir = 0; + Sound("Elevator", 0, this(), 100, 0, -1); + clamp->LocalN("ydir") = 0; +} + +// Maus macht mich zZ kaputt +protected func ControlCommand() { return(1); } + +/* Serialisierung */ + +public func NoSerialize() { return !false; } + +public func Reconfigure(int dx, int dy, object load) +{ + SetPosition(GetX()+dx, GetY()); + clamp->SetPosition(GetX(clamp), GetY(clamp)+dy); + if (load) { + clamp->LocalN("load") = load; + clamp->SetAction("Load"); + clamp->AddEffect("Loading", load, 99, 1, clamp, 0, GetX(load)-GetX(clamp), GetY(load)-GetY(clamp)); + } +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/StringTblDE.txt new file mode 100644 index 00000000..2d8048a7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/StringTblDE.txt @@ -0,0 +1 @@ +ControlCrane=Kran steuern \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/StringTblUS.txt new file mode 100644 index 00000000..36107900 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Crane.c4d/SlidingCarriage.c4d/StringTblUS.txt @@ -0,0 +1 @@ +ControlCrane=Control crane \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/DescDE.txt new file mode 100644 index 00000000..e0129b1d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/DescDE.txt @@ -0,0 +1 @@ +Spielzeuge für große Jungs. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/DescUS.txt new file mode 100644 index 00000000..ad55c4a7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/DescUS.txt @@ -0,0 +1 @@ +Toys for big boys. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/Actmap.txt new file mode 100644 index 00000000..dc2e8a7b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/Actmap.txt @@ -0,0 +1,63 @@ +[Action] +Name=Work +Procedure=NONE +Delay=1 +Length=29 +FacetBase=1 +Facet=0,150,150,50,72,64 +NextAction=Work +Sound=Energy +PhaseCall=Working + +[Action] +Name=Start1 +Procedure=NONE +Delay=3 +Length=29 +FacetBase=1 +Facet=0,150,150,50,72,64 +NextAction=Start2 +Sound=Energy + +[Action] +Name=Start2 +Procedure=NONE +Delay=2 +Length=29 +FacetBase=1 +Facet=0,150,150,50,72,64 +NextAction=Work +Sound=Energy +EndCall=Started + +[Action] +Name=End2 +Procedure=NONE +Delay=2 +Length=29 +FacetBase=1 +Facet=0,150,150,50,72,64 +NextAction=End1 +Sound=Energy + +[Action] +Name=End1 +Procedure=NONE +Delay=3 +Length=29 +FacetBase=1 +Facet=0,150,150,50,72,64 +NextAction=Offline +Sound=Energy +EndCall=Ended + +[Action] +Name=Offline +Procedure=NONE +Delay=0 +Length=1 +FacetBase=1 +Facet=0,150,150,50,72,64 +NextAction=Offline + + diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DefCore.txt new file mode 100644 index 00000000..0a07111f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=GNRT +Version=4,9,8,2 +Name=Generator +Category=C4D_Structure +MaxUserSelect=1 +Width=320 +Height=150 +Offset=-160,-75 +Vertices=2 +VertexX=-150,150 +VertexY=74,74 +VertexFriction=500,500 +Value=750 +Mass=750 +Components=METL=20 +Picture=320,0,320,150 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DescDE.txt new file mode 100644 index 00000000..dde49a66 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DescDE.txt @@ -0,0 +1 @@ +Effiziente Gerätschaft, wenn es um billigen Strom geht. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DescUS.txt new file mode 100644 index 00000000..de8f0319 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/DescUS.txt @@ -0,0 +1 @@ +Supplies a station with power. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/Graphics.png new file mode 100644 index 00000000..66437842 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/ActMap.txt new file mode 100644 index 00000000..12e0a38c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/ActMap.txt @@ -0,0 +1,15 @@ +[Action] +Name=Advance +Procedure=NONE +Delay=1 +NextAction=Advance +StartCall=Advance + +[Action] +Name=Connect +Procedure=NONE +Length=30 +Delay=1 +EndCall=Remove +PhaseCall=Sparkle + \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DefCore.txt new file mode 100644 index 00000000..1d751b81 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=GNRL +Version=4,9,8,2 +Name=Generator Lightning +Category=C4D_StaticBack +Width=1 +Height=1 +Mass=1 +Picture=0,0,40,40 +Line=C4D_LineLightning diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DescDE.txt new file mode 100644 index 00000000..a7086efa --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DescDE.txt @@ -0,0 +1 @@ +Elektrische Entladung. diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DescUS.txt new file mode 100644 index 00000000..230e6fe7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/DescUS.txt @@ -0,0 +1 @@ +Electric Discharge. diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Graphics.png new file mode 100644 index 00000000..2c519ea7 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Names.txt new file mode 100644 index 00000000..546785ae --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Blitz +US:Lightning diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Script.c new file mode 100644 index 00000000..b72aa1d7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Generator.c4d/LightningShot.c4d/Script.c @@ -0,0 +1,172 @@ +/*-- Blitz --*/ + +#strict + +/* Locals */ + +local iAdvX, iVarX, // Bewegung / Abweichung X + iAdvY, iVarY; // Bewegung / Abweichung Y + +/* Aktivierung */ + +public func Activate(iStartX, iStartY, iAdvanceX, iRandomX, iAdvanceY, iRandomY) +{ + // Startposition + AddVertex(iStartX,iStartY); + // Bewegungsverhalten + iAdvX=iAdvanceX; iVarX=iRandomX; + iAdvY=iAdvanceY; iVarY=iRandomY; + // Aktion setzen + SetAction("Advance"); + // Geräusch + if (!Random(5)) Sound("Thunder*"); + return(1); +} + +public func Launch(iX, iY, iAngle) +{ + SetVisibility(VIS_None); + var XDir; + XDir = Cos(iAngle, 10, 10); +// if (iDir == DIR_Left()) XDir = -Cos(iAngle, 10, 10); +// else (XDir = +Cos(iAngle, 10, 10)); + Activate(iX, iY, XDir, 0, -Sin(iAngle, 10, 10)); + return(1); +} + +private func Timer() +{ + var i=0; + var r; + // Partikel-Effekt + while(i < GetVertexNum()-1) + { + r = (90*i)/GetVertexNum(); + DrawParticleLine ("LightningSpark", GetVertex(i)-GetX(), GetVertex(i, 1)-GetY(), + GetVertex(i+1)-GetX(), GetVertex(i+1,1)-GetY(), 6, 60, RGB(255,255,128+Sin(r,255))); + DrawParticleLine ("LightningSpark", GetVertex(i)-GetX(), GetVertex(i, 1)-GetY(), + GetVertex(i+1)-GetX(), GetVertex(i+1,1)-GetY(), 3, 25, RGB(255,255,250)); + i++; + } +} + +/* Bewegung */ + +private func Advance() +{ + // Einschlag + var iVtx = GetVertexNum()-1, iVtxX = GetVertex(iVtx, 0), iVtxY = GetVertex(iVtx, 1); + if (GBackSolid(iVtxX-GetX(), iVtxY-GetY() )) + return(Remove()); + + // Neuen Eckpunkt + if (!AddVertex( iVtxX+iAdvX+RandomX(-5,5), iVtxY+iAdvY+RandomX(-5,5))) + return(Remove()); + + SetPosition(GetVertex(GetVertexNum()), GetVertex(GetVertexNum(), 1)); + + // Im Wasser? + if (GBackLiquid(iVtxX-GetX(), iVtxY-GetY() )) + { + var obj; + // Alle Lebewesen in der Nähe bekommen was ab + while (obj = FindObject( 0, iVtxX-GetX()-400, iVtxY-GetY()-400, 800, 800, OCF_Alive(), 0,0, NoContainer(),obj ) ) + { + if(!PathFree(iVtxX, iVtxY, GetX(obj), GetY(obj))) continue; + if(!GBackLiquid(GetX(obj)-GetX(), GetY(obj)-GetY())) continue; + obj->~LightningStrike(); + DoDmg(12, DMG_Energy, obj); + DrawParticleLine ("LightningSpark2", iVtxX-GetX(), iVtxY-GetY(), + GetX(obj)-GetX(), GetY(obj)-GetY(), 6, 60, RGB(0,100,255)); + DrawParticleLine ("LightningSpark2", iVtxX-GetX(), iVtxY-GetY(), + GetX(obj)-GetX(), GetY(obj)-GetY(), 3, 25, RGB(250,250,255)); + } + return(Remove()); + } + + // Objektanziehung + iVtx = GetVertexNum()-1; iVtxX = GetVertex(iVtx, 0); iVtxY = GetVertex(iVtx, 1); + var obj; + if (iVtx>7) + { + while (obj = FindObject( 0, iVtxX-GetX()-25, iVtxY-GetY()-25, 50, 50, OCF_Alive(), 0,0, NoContainer(),obj ) ) + { + if(!PathFree(iVtxX, iVtxY, GetX(obj), GetY(obj))) continue; + Attraction(obj); + break; + } + } + for(obj in FindObjects(Find_ID(GetID()), Find_Distance(35,iVtxX-GetX(), iVtxY-GetY()), Find_Exclude(this()))) + { + AttractionLightning(obj); + break; + } + +// Timer(); + // Weiter + return(); +} + +/* Effekte */ + +private func Sparkle() +{ +// Timer(); + var iVtx = GetVertexNum()-1, iVtxX = GetVertex(iVtx, 0), iVtxY = GetVertex(iVtx, 1); + CastObjects(SPRK,1,20,iVtxX-GetX(), iVtxY-GetY()); + return(1); +} + +/* Anziehung */ + +private func Attraction(obj) +{ + // Einschlag in Objekt + AddVertex( GetVertex(0,0,obj)+GetX(obj), + GetVertex(0,1,obj)+GetY(obj) ); + obj->~LightningStrike(this()); + SetAction("Connect"); + DoDmg(20, DMG_Energy, obj); +} + +public func LightningStrike(obj) +{ + // Einschlag in Objekt + AddVertex( GetVertex(GetVertexNum(obj)-1,0,obj), + GetVertex(GetVertexNum(obj)-1,1,obj) ); + SetAction("Connect"); +} + +private func AttractionLightning(obj) +{ + // Einschlag in Objekt + AddVertex( GetVertex(GetVertexNum(obj)-1,0,obj), + GetVertex(GetVertexNum(obj)-1,1,obj) ); + obj->~LightningStrike(this()); + SetAction("Connect"); +} + +/* Ende */ + +private func Remove() +{ + var i=0; + var r; + // Leuchten + while(iLaunch(GetX()+x,GetY()+y,BoundBy(1800*dir,0,1800)); + CastObjects(SPRK, Random(3), 20, x,y); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetAction() eq "Work") { + extra[GetLength(extra)] = "SetAction(\"Work\")"; + extra[GetLength(extra)] = "GameCall(\"PowerSupplyOn\")"; + } +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/ActMap.txt new file mode 100644 index 00000000..42905244 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=Grid +Procedure=NONE +Delay=100 +Facet=0,0,40,40,0,0 +FacetBase=0 +NextAction=Grid + +[Action] +Name=Put +Procedure=NONE +Delay=100 +Facet=0,40,40,40,0,0 +NextAction=Put diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DefCore.txt new file mode 100644 index 00000000..dee93a63 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=ENGT +Version=4,9,8,2 +Name=Grid +Category=C4D_StaticBack +MaxUserSelect=5 +Width=40 +Height=40 +Offset=-20,-20 +Vertices=4 +VertexX=-11,11,-11,11 +VertexY=-9,-9,12,12 +VertexCNAT=5,6,9,10 +VertexFriction=50,50,50,50 +Value=5 +Mass=120 +Components=METL=1 +Picture=0,0,40,40 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DescDE.txt new file mode 100644 index 00000000..858e43fe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DescDE.txt @@ -0,0 +1 @@ +Lüftungsgitter. diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DescUS.txt new file mode 100644 index 00000000..127741a2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/DescUS.txt @@ -0,0 +1 @@ +Grid. diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Graphics.png new file mode 100644 index 00000000..eaa4bd23 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Names.txt new file mode 100644 index 00000000..27faf066 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Gitter +US:Grid diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Script.c new file mode 100644 index 00000000..01d1a6e4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Grid.c4d/Script.c @@ -0,0 +1,28 @@ +/* Lüftungsgitter */ + +#strict 2 + +protected func Initialize() +{ + SetAction("Grid"); +} + +protected func Damage() +{ + if (GetAction() == "Put") return(0); + if (GetDamage() < 30) return(0); + // Crack open + while (Contents()) Exit(Contents()); + Sound("CrateCrack"); + Sound("Blast2"); + SetAction("Put"); + return(1); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetAction() == "Put") + extra[GetLength(extra)] = "SetAction(\"Put\")"; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/ActMap.txt new file mode 100644 index 00000000..853b07fa --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/ActMap.txt @@ -0,0 +1,15 @@ +[Action] +Name=End1 +Facet=0,0,2,14 + +[Action] +Name=Linkage +Facet=2,0,23,14 + +[Action] +Name=Backing +Facet=0,0,2,14 + +[Action] +Name=End2 +Facet=25,0,2,14 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DefCore.txt new file mode 100644 index 00000000..bb469e6c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=BART +Version=4,9,8,2 +Name=Barrier Tape +Category=C4D_StaticBack|C4D_Foreground +Width=2 +Height=14 +Offset=-1,-7 +Value=5 +Mass=5 +Components=METL=1 +Picture=0,14,64,64 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DescDE.txt new file mode 100644 index 00000000..6c752ea0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DescDE.txt @@ -0,0 +1 @@ +Zum Absperren gefährlicher Gebiete. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DescUS.txt new file mode 100644 index 00000000..28331487 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/DescUS.txt @@ -0,0 +1 @@ +To barricade dangerous areas. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Graphics.png new file mode 100644 index 00000000..1afbc1df Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/GraphicsRail.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/GraphicsRail.png new file mode 100644 index 00000000..3d79a94f Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/GraphicsRail.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Names.txt new file mode 100644 index 00000000..1289bbc0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flatterband +US:Barrier Tape \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Script.c new file mode 100644 index 00000000..28bdca9c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Barrier Tape.c4d/Script.c @@ -0,0 +1,19 @@ +/*-- Barrier Tape --*/ + +#strict + +#include RAI1 + +/* Status */ + +public func Index(int index) { + if(index == 0) return("End1"); + if(index == 1) return("Linkage"); + if(index == 2) return("Backing"); + if(index == 3) return("End2"); +} + +public func Left() { return(0); } +public func Right() { return(3); } +public func Linkage() { return(1); } +public func Backing() { return(2); } \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/ActMap.txt new file mode 100644 index 00000000..7e9801e5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/ActMap.txt @@ -0,0 +1,11 @@ +[Action] +Name=End1 +Facet=0,0,8,14 + +[Action] +Name=Linkage +Facet=8,0,14,14 + +[Action] +Name=End2 +Facet=22,0,8,14 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DefCore.txt new file mode 100644 index 00000000..d979086c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=RAI3 +Version=4,9,8,2 +Name=Metalrail +Category=C4D_StaticBack|C4D_Foreground +Width=2 +Height=14 +Offset=-1,-7 +Value=5 +Mass=5 +Components=METL=1 +Picture=0,14,64,64 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DescDE.txt new file mode 100644 index 00000000..b6e9fc1a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DescDE.txt @@ -0,0 +1 @@ +Um nicht von Plattformen herunterzufallen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DescUS.txt new file mode 100644 index 00000000..73a1d267 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/DescUS.txt @@ -0,0 +1 @@ +So you do not fall off great heights. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Graphics.png new file mode 100644 index 00000000..c8e9ce71 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/GraphicsRail.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/GraphicsRail.png new file mode 100644 index 00000000..74be4b9e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/GraphicsRail.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Names.txt new file mode 100644 index 00000000..5ac59305 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Abgerundetes Metallgeländer +US:Rounded Metalgrid \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Script.c new file mode 100644 index 00000000..80d3e14d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail Round.c4d/Script.c @@ -0,0 +1,18 @@ +/*-- Rounded Metalrail --*/ + +#strict + +#include RAI1 + +/* Status */ + +public func Index(int index) { + if(index == 0) return("End1"); + if(index == 1) return("Linkage"); + if(index == 2) return("End2"); +} + +public func Left() { return(0); } +public func Right() { return(2); } +public func Linkage() { return(1); } +public func Backing() { return(-1); } // no such element \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/ActMap.txt new file mode 100644 index 00000000..cfff4dec --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/ActMap.txt @@ -0,0 +1,15 @@ +[Action] +Name=End1 +Facet=0,0,11,12 + +[Action] +Name=Linkage +Facet=11,0,17,12 + +[Action] +Name=Backing +Facet=9,0,2,12 + +[Action] +Name=End2 +Facet=28,0,10,12 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DefCore.txt new file mode 100644 index 00000000..4a20a9c9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=RAI2 +Version=4,9,8,2 +Name=Metalrail +Category=C4D_StaticBack|C4D_Foreground +Width=2 +Height=12 +Offset=-1,-6 +Value=5 +Mass=5 +Components=METL=1 +Picture=0,12,64,64 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DescDE.txt new file mode 100644 index 00000000..b6e9fc1a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DescDE.txt @@ -0,0 +1 @@ +Um nicht von Plattformen herunterzufallen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DescUS.txt new file mode 100644 index 00000000..73a1d267 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/DescUS.txt @@ -0,0 +1 @@ +So you do not fall off great heights. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Graphics.png new file mode 100644 index 00000000..3c8bc2c1 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/GraphicsRail.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/GraphicsRail.png new file mode 100644 index 00000000..54169040 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/GraphicsRail.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Names.txt new file mode 100644 index 00000000..769ab357 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Weißes Metallgeländer +US:White Metalgrid \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Script.c new file mode 100644 index 00000000..89029163 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail White.c4d/Script.c @@ -0,0 +1,20 @@ +/*-- Metalrail --*/ + +#strict + +#include RAI1 + +/* Status */ + + +public func Index(int index) { + if(index == 0) return("End1"); + if(index == 1) return("Linkage"); + if(index == 2) return("Backing"); + if(index == 3) return("End2"); +} + +public func Left() { return(0); } +public func Right() { return(3); } +public func Linkage() { return(1); } +public func Backing() { return(2); } \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/ActMap.txt new file mode 100644 index 00000000..59270299 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/ActMap.txt @@ -0,0 +1,19 @@ +[Action] +Name=End1 +Facet=0,0,4,12 + +[Action] +Name=Linkage1 +Facet=4,0,18,12 + +[Action] +Name=Linkage2 +Facet=24,0,18,12 + +[Action] +Name=Backing +Facet=22,0,2,12 + +[Action] +Name=End2 +Facet=22,0,4,12 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DefCore.txt new file mode 100644 index 00000000..faded95f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=RAI1 +Version=4,9,8,2 +Name=Metalrail +Category=C4D_StaticBack|C4D_Foreground +Width=2 +Height=12 +Offset=-1,-6 +Value=5 +Mass=5 +Components=METL=1 +Picture=0,12,64,64 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DescDE.txt new file mode 100644 index 00000000..b6e9fc1a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DescDE.txt @@ -0,0 +1 @@ +Um nicht von Plattformen herunterzufallen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DescUS.txt new file mode 100644 index 00000000..73a1d267 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/DescUS.txt @@ -0,0 +1 @@ +So you do not fall off great heights. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Graphics.png new file mode 100644 index 00000000..d538c68e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/GraphicsRail.png b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/GraphicsRail.png new file mode 100644 index 00000000..80749082 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/GraphicsRail.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Names.txt new file mode 100644 index 00000000..88d9b744 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Metallgeländer +US:Metalgrid \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Script.c new file mode 100644 index 00000000..60dc6809 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Metalrail.c4d/Script.c @@ -0,0 +1,172 @@ +/*-- Metalrail --*/ + +#strict + +/* Grundobjekt für andere Rails */ + +/* +Die einzelnen Teile des Geländers bekommen einen Index zugewiesen und +können dann theoretisch beliebig kombiniert werden. +Dabei werden folgende Kriterien vorausgesetzt: +Index 0 entspricht dem linken Endstück +Index 1 ist ein beliebig Mittelstück (kein Pfeiler!) +Der letzte Index (= func LastIndex() ) entspricht dem rechten Endstück +*/ + +// hat in regelmäßigen Abständen Pfeiler. +// Funktioniert nicht mit Geländern die keine Stützen haben (RAI3) +static const RAIL_Supported = 1; + +static const RAIL_LeftOpen = 2; // hat keinen Pfeiler am Anfang (steckt wohl links in der Wand) +static const RAIL_RightOpen = 4; // hat keinen Pfeiler am Ende (" rechts ") + +static const RAIL_AltLinkage = 8; // alternativer Geländerstil (wenn vorhanden) + + +/* Status */ + +public func Index(int index) { + if(index == 0) return("End1"); + if(index == 1) return("Linkage1"); + if(index == 2) return("Linkage2"); + if(index == 3) return("Backing"); + if(index == 4) return("End2"); +} + +public func Left() { return(0); } +public func Right() { return(4); } +public func Linkage(i) { return(1+(!!i)); } +public func Backing() { return(3); } + +/* Öffentliches */ + +// Alias +public func Set(a,b) { return(SetRailLength(a,b)); } + +// Die einfachste Art, ein Geländer auszurichten. Setzt eine bestimmte Länge Standardteile (Index 1) +public func SetRailLength(int iLength, int iMod) +{ + ClearRail(); + parttype = CreateArray(); + + var i = 0; + // Anfangspfosten setzen, falls kein Modifier gesetzt ist + if(!(iMod & RAIL_LeftOpen)) + parttype[i++] = Left(); + else + iLength--; + + var support = false, now = false; + if(iMod & RAIL_Supported) + if(Backing() != -1) { + support = true; + } + + while(i < iLength+1) { + if(support && now) { + parttype[i] = Backing(); + now = false; + iLength++; + } + else { + if(iMod & RAIL_AltLinkage) + parttype[i] = Linkage(1); + else + parttype[i] = Linkage(0); + now = true; + } + i++; + } + + // Endposten setzen, falls kein Modifier gesetzt ist + if(!(iMod & RAIL_RightOpen)) + parttype[GetLength(parttype)] = Right(); + + DrawRail(); +} + +// Setzt eine Abfolge von Teilstücken, Anfang und Ende werden automatisch eingesetzt +public func SetRail(array parts, bool nop) +{ + ClearRail(); + parttype = CreateArray(); + var i = 0, j = 0; + if(!nop) parttype[i++] = Left(); + for( ; j < GetLength(parts) ; i++) { + parttype[i] = parts[j++]; + } + if(!nop) parttype[GetLength(parttype)] = Right(); + DrawRail(); +} + +// Manipuliert einzelne Teile (um z.B. Anfang oder Ende zu entfernen +public func AdjustPart(int iPart, int iNewIndex) +{ + ClearRail(); + // Schütz vor Überlänge + if(GetLength(parttype) <= iPart || iPart < 0) return(); + // Manipulieren + parttype[iPart] = iNewIndex; + DrawRail(); + return(1); +} + +/* Internes */ + +local length, // Länge + parttype; // Array mit den Typen der einzelnen Teile + +protected func Initialize() +{ + // Initialisieren + parttype = CreateArray(); + // Erstmal Standardgröße setzen + parttype = [Left(), Linkage(), Right()]; + // Zeichnen + DrawRail(); +} + +// Neu zeichnen +protected func DrawRail() +{ + // Gesamtlänge in Pixeln + var alength = 0; + // Länge aktualisieren + length = GetLength(parttype); + // Einzelne Teile ansetzen + for(var i = 0, action, plength ; i < length ; i++) + { + // Aktion speichern + action = Index(parttype[i]); + // X-Länge der Aktion + plength = GetActMapVal("Facet", action, GetID(), 2); + // Grafik einpflanzen + SetGraphics("Rail", this(), GetID(), i+1, 2, action); + // Transformieren + SetObjDrawTransform(1000,0, 1000 * (plength/2 + alength), 0,1000,0,0, i+1); + // Größe des Teils draufrechnen + alength += plength; + } + SetShape(0,-GetObjHeight(this())/2, alength, GetObjHeight(this())); +} + +// Bisheriges Löschen +protected func ClearRail() +{ + for(var i = 0 ; i < GetLength(parttype) ; i++) + SetGraphics("", this(), 0, i+1); +} + +// Schutz vor Neuladen +protected func UpdateTransferZone() +{ + ClearRail(); + DrawRail(); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetRail(%v,1)", parttype); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Names.txt new file mode 100644 index 00000000..c0837af1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Handrails.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Geländer +US:Handrails diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/ActMap.txt new file mode 100644 index 00000000..a8d9611a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Float +Procedure=FLOAT +FacetBase=1 +NextAction=Hold diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DefCore.txt new file mode 100644 index 00000000..09a7f5fb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DefCore.txt @@ -0,0 +1,14 @@ +[DefCore] +id=JMPD +Version=4,9,8,2 +Name=Jumppad +Category=C4D_Vehicle +Width=30 +Height=18 +Offset=-15,-4 +Vertices=1 +VertexY=1 +Mass=1 +Components=JMPD=1 +Picture=0,18,64,64 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DescDE.txt new file mode 100644 index 00000000..16bdd9c9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DescDE.txt @@ -0,0 +1 @@ +Befördert Clonks weit durch die Lüfte. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DescUS.txt new file mode 100644 index 00000000..cc800471 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/DescUS.txt @@ -0,0 +1 @@ +The successor of the trampoline. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Graphics.png new file mode 100644 index 00000000..c4a26302 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Jumppad.wav b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Jumppad.wav new file mode 100644 index 00000000..1860415f Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Jumppad.wav differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Names.txt new file mode 100644 index 00000000..9e67fb52 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sprungschanze +US:Jumppad \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Script.c new file mode 100644 index 00000000..0c28ea95 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Script.c @@ -0,0 +1,36 @@ +/*-- Jumppad --*/ + +#strict + +local top; + +// Einstellung + +public func Set(int str, int a, int a2) +{ + SetR(a2); + if(!top) + { + top = CreateObject(JPTP, 0,0, GetOwner()); + top -> SetAction("Attach", this()); + } + top -> SetR(a); + top -> SetStr(str); +} + +// Initialisierung + +protected func Initialize() +{ + SetAction("Float"); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetR()) + extra[GetLength(extra)] = Format("Set(%d,%d,%d)",top->LocalN("strength"),top->GetR(),GetR()); + else + extra[GetLength(extra)] = Format("Set(%d,%d)",top->LocalN("strength"),top->GetR()); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/ActMap.txt new file mode 100644 index 00000000..ef235ebb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/ActMap.txt @@ -0,0 +1,15 @@ +[Action] +Name=Attach +Procedure=ATTACH +Length=10 +Facet=0,0,26,22 +Delay=1 +NextAction=Attach + +[Action] +Name=Disabled +Procedure=ATTACH +Length=1 +Facet=260,0,26,22 +Delay=0 +NextAction=Disabled diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/DefCore.txt new file mode 100644 index 00000000..a3573cf3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=JPTP +Version=4,9,8,2 +Name=Jumppad top +Category=C4D_Structure +Timer=1 +TimerCall=CheckBounce +Width=26 +Height=22 +Offset=-13,-16 +Vertices=1 +VertexY=1 +Value=10 +Mass=10 +Components=JPTP=1 +Picture=0,0,26,22 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Graphics.png new file mode 100644 index 00000000..4d1a1dc7 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Names.txt new file mode 100644 index 00000000..9e67fb52 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sprungschanze +US:Jumppad \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Script.c new file mode 100644 index 00000000..467d6e41 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Jumppad.c4d/Top.c4d/Script.c @@ -0,0 +1,54 @@ +/*-- Jumper --*/ + +#strict + +local strength; + +public func IsMachine() { return(true); } + +private func Initialize() { + + return(1); +} + +public func SetStr(int str) +{ + strength = str; +} + +private func CheckBounce() // Timer um Clonks wegzustoßen +{ + if(EMPShocked()) + return(); + for(var pClonk in FindObjects(Find_InRect(-8, -8, 16, 16), Find_Or(Find_OCF(OCF_Alive()),Find_Func("IsBouncy")), Find_NoContainer())) + Bounce(pClonk); +} + +private func Bounce(object pClonk) // Stößt unwissende Clonks usw. weg +{ + // mijon komplifikizierte Berechnung! + var nXDir, nYDir, oXDir, oYDir; + oXDir = pClonk->GetXDir(); + oYDir = pClonk->GetYDir(); + nXDir = Sin(GetR(), strength); + nYDir = -Cos(GetR(), strength); + // Der Clonk behält ein wenig seiner alten Geschwindigkeit bei + nXDir += oXDir/10; + nYDir += oYDir/10; + // Puff! + pClonk->SetAction("Jump"); + pClonk->SetSpeed(nXDir, nYDir); + Sound("Jumppad"); +} + +public func EMPShock() +{ + SetAction("Disabled"); + EMPShockEffect(38*3); +} + +public func EMPShockEnd() { + SetAction("Attach"); +} + +public func NoSerialize() { return(true); } \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/ActMap.txt new file mode 100644 index 00000000..fbf5def2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=2Be +Procedure=FLOAT +Directions=1 +Length=1 +Delay=0 +FacetBase=1 +NextAction=2Be diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DefCore.txt new file mode 100644 index 00000000..14fb1df5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=LADR +Version=4,9,8,2 +Name=Ladder +Category=C4D_Vehicle +Width=16 +Height=16 +Offset=-8,-8 +Vertices=2 +VertexY=-9,9 +VertexFriction=50,50 +Value=2 +Mass=40 +Components=METL=1 +Picture=0,0,18,18 +StretchGrowth=1 +IncompleteActivity=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DescDE.txt new file mode 100644 index 00000000..bdf2c8cd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DescDE.txt @@ -0,0 +1,2 @@ +Eine Leiter, auf der man rauf und runterklettern kann. +Nur Hazardclonks haben genug Geschick um mit ihnen umgehen zu können. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DescUS.txt new file mode 100644 index 00000000..34519824 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/DescUS.txt @@ -0,0 +1,2 @@ +A ladder on which you can climb up and down. +Only Hazardclonks have enough skill to use it. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Graphics.png new file mode 100644 index 00000000..dfea9cbf Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart1.png b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart1.png new file mode 100644 index 00000000..4b6d7a34 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart1.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart2.png b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart2.png new file mode 100644 index 00000000..68047ee6 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart2.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart3.png b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart3.png new file mode 100644 index 00000000..d55d87e0 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/GraphicsPart3.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Names.txt new file mode 100644 index 00000000..06d0d3bd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Leiter +US:Ladder diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Script.c new file mode 100644 index 00000000..5045289e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Ladder.c4d/Script.c @@ -0,0 +1,160 @@ +/*-- Leiter --*/ + +#strict + +/* Narf, die Leiter hat immer noch alte Effekt-Arrays. Aber das umbauen geht sehr doof und hackig, also behält sie die einfach, tah! */ + +static const LADR_Left = 1; +static const LADR_Right = 2; +static const LADR_Front = 4; + +local length; //gibt an aus wievielen Teilen die Leiter besteht +local sizeX, sizeY; //4great leicht umstelling +local Graphics, ID; //für andere leitern :D +local GraCount; + +func Initialize() { + SetAction("2Be"); //damit sie nicht runterfallen ;) + ID = GetID(); + sizeX = GetDefCoreVal("Height",0,GetID())/2; + sizeY = GetDefCoreVal("Width",0,GetID())/2; + Graphics = AddEffect("LadderPartSave",this(),1,0,this(),GetID()); + ID = AddEffect("LadderPartSave",this(),1,0,this(),GetID()); +// SetGraphics(Format("Part%d",Random(3)+1),0,LADR); + // Standardverhalten: nur Part1 anzeigen + AddGraphics("Part1",LADR); + AddPart(); //einen Teil hinzufügen :> + AdjustSize(); +} + +public func AddGraphics(string sNewGraphic, id idNewID) { + EffectCall(this(),Graphics,"AddPart",sNewGraphic,GraCount); + EffectCall(this(),ID,"AddPart",idNewID,GraCount); + GraCount++; +} + +public func ClearGraphics() { + while(GraCount >= 0) { + EffectCall(this(),Graphics,"ClearParts",GraCount); + EffectCall(this(),ID,"ClearParts",GraCount); + GraCount--; + } + GraCount = 0; +} + +public func SetSize(int x,int y) { + sizeX = x; + sizeY = y; + AdjustSize(); +} + +public func Set(int iNewLength, int iDir) { + if(iNewLength <= 0) + return(0); + var cmd; + // iDir angegeben, speziell für LADR... andere + // Kletterobjekte können das überladen + if(iDir) { + ClearGraphics(); + if(iDir & LADR_Left) AddGraphics("Part2",LADR); + if(iDir & LADR_Right) AddGraphics("Part3",LADR); + if(iDir & LADR_Front) AddGraphics("Part1",LADR); + Redraw(); + return(Set(iNewLength)); + } + //falls neue Länge größer als momentane + if(length < iNewLength) + cmd = "Add"; //hinzufügen + //falls kleiner + if(length > iNewLength) + cmd = "Remove"; //löschen + /*tu*/ + for(var x=Abs(length-iNewLength); x > 0; x--) + PrivateCall(this(),Format("%sPart",cmd)); + //zum Schluss das ganze Zeug noch auf die neue Größe anpassen + AdjustSize(); + return(1); +} + +//Zeichnet einfach die Grafiken neu. +public func Redraw() { + for(var x=1; x <= length; x++) { + var graph = Random(GraCount); + SetGraphics(EffectCall(this(),Graphics,"GetPart",graph),this(),EffectCall(this(),ID,"GetPart",graph),x,GFXOV_MODE_Base); + SetObjDrawTransform(1000,0,0,0,1000,1000*sizeY*(x-1),this(),x); + } +} + +private func AddPart() { + //ein Teil mehr, Länge raufzählen + length++; + //Sicherheitshalber checken, evtl. gibt es ja unvorhergesehenen Fehler durch kosmische Strahlung! + var graph = Random(GraCount); + if(!SetGraphics(EffectCall(this(),Graphics,"GetPart",graph),this(),EffectCall(this(),ID,"GetPart",graph),length,GFXOV_MODE_Base)) + return(0); + //Noch an die richtige Position schieben + SetObjDrawTransform(1000,0,0,0,1000,1000*sizeY*(length-1),this(),length); + //keine kosmische Strahlung, alles gut =D + return(1); +} + +private func RemovePart() { + //Minimal ein Teil muss schon da sein.. + if(length < 0) + return(0); + //letzten Teil entfernen + SetGraphics(0,0,0,length); + //ein Teil weniger, Länge runterzählen + length--; + //kein Kommentar.. + return(1); +} + +private func AdjustSize() { + var ydiff = GetObjHeight(); + SetShape(-sizeX,-sizeY,sizeX*2,sizeY+sizeY*length,this()); + ydiff -= GetObjHeight(); + SetPosition(GetX(),GetY()+ydiff); + SetVertex(0,1,-sizeY,this()); + SetVertex(1,1,sizeY*length,this()); + + //die ganzen Positionen der einzelnen Elemente neu adjustieren + for(var x=1; x <= length; x++) + SetObjDrawTransform(1000,0,0,0,1000,sizeY*1000*(x-1),this(),x); +} + +private func FxLadderPartSaveAddPart(object pTarget, int iEffectNr, string graphic, int index) { + var length; + if(!(length=index)) + while(EffectVar(length,pTarget,iEffectNr)) + length++; + EffectVar(length,pTarget,iEffectNr) = graphic; +} + +private func FxLadderPartSaveClearParts(object pTarget, int iEffectNr, int index) { + EffectVar(index,pTarget,iEffectNr)=0; +} + +private func FxLadderPartSaveGetPart(object pTarget, int iEffectNr, int index) { + return(EffectVar(index,pTarget,iEffectNr)); +} + +//bla +public func UpdateTransferZone() { + ClearGraphics(); + for(var z=1; z <= 3; z++) + AddGraphics(Format("Part%d",z),LADR); + AdjustSize(); + Redraw(); +} + +//Ja, Leitern kann man auch hochklettern.. :D +public func IsClimbable() { return(true); } + +/* Serialisierung */ + +public func Serialize(array& extra, int& extray) +{ + extra[GetLength(extra)] = Format("Set(%d)", length); + extray = - (length-1)*sizeY; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Actmap.txt new file mode 100644 index 00000000..806ccf33 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Actmap.txt @@ -0,0 +1,27 @@ +[Action] +Name=Travel +Procedure=FLOAT +Length=7 +Delay=5 +NextAction=Travel +FacetBase=1 +EndCall=Automatic +PhaseCall=CheckYTop + +[Action] +Name=Wait +Procedure=FLOAT +Length=1 +Delay=70 +NextAction=Travel +FacetBase=1 +EndCall=ResumeTravel + +[Action] +Name=SpeedToY +Procedure=NONE +Length=1 +Delay=3 +NextAction=SpeedToY +FacetBase=1 +StartCall=SpeedToY \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DefCore.txt new file mode 100644 index 00000000..e14c8a32 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DefCore.txt @@ -0,0 +1,26 @@ +[DefCore] +id=LIFT +Version=4,9,8,2 +Name=Lift +Category=C4D_Vehicle +ContactCalls=1 +Width=48 +Height=53 +Offset=-24,-26 +Vertices=2 +VertexY=-20,20 +VertexCNAT=4,8 +VertexFriction=100,100 +Value=30 +Mass=80 +Components=METL=5 +SolidMask=96,0,48,53,0,0 +TopFace=48,0,48,53,0,0 +Picture=0,53,64,64 +Grab=1 +Rotate=1 +HorizontalFix=1 +BorderBound=7 + +[Physical] +Float=150 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DescDE.txt new file mode 100644 index 00000000..5e32ac7e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DescDE.txt @@ -0,0 +1 @@ +Für jedwede Art von Fahrstuhlschacht. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DescUS.txt new file mode 100644 index 00000000..d66ea0a6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/DescUS.txt @@ -0,0 +1 @@ +Standard transportation for persons. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Graphics.png new file mode 100644 index 00000000..0e6e5fff Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Names.txt new file mode 100644 index 00000000..5a1650db --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lift +US:Lift diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Script.c new file mode 100644 index 00000000..44fc86a3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/Script.c @@ -0,0 +1,317 @@ +/*-- Lift --*/ + +#strict + +// Lokale Variable: Feuerfarbe :') +local UpperY, LowerY, WaitComDir, WaitY; +local rgb; + +protected func Initialize() +{ + AddEffect("Sparks", this(), 1, 4, this()); + rgb=RGB(40+Random(120), 40+Random(120), 40+Random(120)); + SetAction("Travel"); + UpdateTransferZone(); + return(1); +} + +public func FxSparksTimer(target, number, time) +{ + // Funken! :D + CreateParticle("PSpark", 0, -20, RandomX(-1,1), RandomX(-1,1)-GetYDir()/4, 50+Random(80), rgb, this(), true); + CreateParticle("PSpark", 0, +20, RandomX(-1,1), RandomX(-1,1)-GetYDir()/4, 50+Random(80), rgb, this(), true); +} + +func FlareUp() +{ + for(var i=3; i>0; --i) + CreateParticle("PSpark", 0, -20, RandomX(-4,4), RandomX(-2,-4), 130+Random(80), rgb, this(), true); +} + +func FlareDown() +{ + for(var i=3; i>0; --i) + CreateParticle("PSpark", 0, +20, RandomX(-4,4), RandomX(2,4), 130+Random(80), rgb, this(), true); +} + +/* Steuerung */ + +public func ControlCommand (string command, object target, int x, int y) { + // Bewegungskommando vertikal + if (command eq "MoveTo") { + if (Inside(x - GetX(),-16,+16)) { + if (y < GetY()) + return(SetComDir(COMD_Up())); + if (y > GetY()) + return(SetComDir(COMD_Down())); + } + } + // Andere Kommandos nicht auswerten +} + +public func ControlUpdate(object caller, int comdir, bool dig, bool throw) +{ + // Remove horizontal Comdir component + if(ComDirLike(comdir, COMD_Right)) comdir = ComDirTransform(comdir, COMD_Left); + if(ComDirLike(comdir, COMD_Left)) comdir = ComDirTransform(comdir, COMD_Right); + + if(comdir != GetComDir()) + Sound("Click"); + + // Clear X/Y-Dir + SetXDir(0); + if(!ComDirLike(comdir, COMD_Up) && !ComDirLike(comdir, COMD_Down)) + SetYDir(0); + + // Ab geth. + SetComDir(comdir); + SetAction("Travel"); + return(1); +} + +public func ControlUp (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + SetComDir(COMD_Up()); + SetXDir(0); + SetAction("Travel"); + } + return(1); +} + +public func ControlDownSingle (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + SetComDir(COMD_Down()); + SetXDir(0); + SetAction("Travel"); + } + return(1); +} + +public func ControlLeft (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + SetComDir(COMD_Stop()); + SetYDir(0); + SetAction("Travel"); + } + return(1); +} + +public func ControlRight (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + SetComDir(COMD_Stop()); + SetYDir(0); + SetAction("Travel"); + } + return(1); +} + +// Without HorizontalFix=1, these should prevent that the lift moves horizontally, +// but they do not. They still move after having pressed double left/right and +// waiting a few frames. +/*public func ControlLeftSingle (object caller) { + [|Method=None] + return(1); +} + +public func ControlLeftDouble (object caller) { + [|Method=None] + return(1); +} + +public func ControlRightSingle (object caller) { + [|Method=None] + return(1); +} + +public func ControlRightDouble (object caller) { + [|Method=None] + return(1); +}*/ + +public func ControlLeftReleased (object caller) { + [|Method=None] + return(1); +} + +/* Kontakt */ + +protected func ContactTop () { + Wait(COMD_Down()); + return(1); +} + +protected func ContactBottom () { + UnstuckClonks(); + Wait(COMD_Up()); + return(1); +} + +protected func ContactLeft () { + Stop(); + return(1); +} + +protected func ContactRight () { + Stop(); + return(1); +} + +public func SetYTop (int iNewTop) { + return(UpperY = iNewTop); +} + +private func YTop () { + return(UpperY); +} + +/* Kommandos */ + +private func Stop () { + SetAction("Travel"); + SetComDir(COMD_Stop()); + SetSpeed(); + return(1); +} + +private func Wait (int iComDir) { + Stop(); + // Aktion Wait ruft als EndCall ResumeTravel auf + SetAction("Wait"); + + WaitComDir = iComDir; + return(1); +} + +private func ResumeTravel () { // EndCall von Aktion Wait + SetAction("Travel"); + SetComDir(WaitComDir); + return(1); +} + +private func Automatic () { // EndCall von Aktion Travel + // Keine Automatik, wenn ein Clonk mitfährt + if (Passenger()) return(0); + // Zu einem wartenden Clonk hinfahren + if (SpeedToVertical()) return(1); + // Eigenständige Bewegung beginnen + if (SelfTravel()) return(1); + return(0); +} + +private func SelfTravel () { + // Nur wenn angehalten + if (GetComDir() != COMD_Stop()) return(0); + // Eigenständige Bewegung je nach zugelassener Richtung beginnen + SetComDir(COMD_Up()); + return(1); +} + +private func SpeedToVertical () { + var WaitClonk; + if(!(WaitClonk=FindObject(0, -50,-1000,100,2000, OCF_CrewMember(),0,0,NoContainer()))) return(); + if(Inside(WaitClonk->GetX(), GetX() - 12, GetX() + 12)) + if(Inside(WaitClonk->GetY(), GetY() - 40, GetY() - 20)) + return(); + if (GetComDir(WaitClonk) != COMD_Stop()) return(); + if(!Inside(GetY(WaitClonk), UpperY-50, LowerY+50)) return(); + SetAction("SpeedToY"); + WaitY = Max(GetY(WaitClonk), YTop()-10); + return(1); +} + +/* Aktion */ + +private func CheckYTop () { // PhaseCall von Travel + if (GetY() > YTop()-10) return(0); + SetPosition(GetX(), YTop()-10); + ContactTop(); + return(1); +} + +private func SpeedToY () { // StartCall von SpeedToY + SetYDir(BoundBy(WaitY - GetY(), -50, 50)); + if (Inside(WaitY-GetY(),-4,+2)) return(Stop()); + if(GetYDir() < 0) FlareDown(); + else FlareUp(); + return(1); +} + +private func UnstuckClonks () { // Sucht Clonks in der SolidMask und setzt sie auf die Platte + var pClonk; + while(pClonk = FindObject(0,-25,0,50,25, OCF_CrewMember, 0,0, NoContainer(), pClonk)) + if(Stuck(pClonk)) + SetPosition(GetX(pClonk), GetY(), pClonk); +} + +/* Status */ + +private func Passenger () { + return( FindObject(0, -24,-13,48,16, OCF_CrewMember(),0,0,NoContainer()) ); +} + +/* Transfer */ + +protected func UpdateTransferZone () { + // Obergrenze ermitteln + var y1 = -20, y2 = +20; + while(GetY() + y1 > 5 && !GBackSolid(0, y1)) + y1-=5; + // Untergrenze ermitteln + while(GetY() + y2 < LandscapeHeight()-5 && !GBackSolid(0, y2+15)) + y2+=5; + // Transferzone setzen + SetTransferZone(-23,y1,48,y2-y1 +10); + // Ober- und Untergrenze speichern + UpperY = GetY() + y1; + LowerY = GetY() + y2; + return(1); +} + +protected func ControlTransfer (object pObj, int iX, int iY) { + // Durchgang am Boden des Fahrstuhlschachts: nicht warten + if(Inside(GetY(pObj) - LowerY, -10, +10)) + if(Inside(iY - LowerY, -10, +10)) + return(); + + // Zielposition + // Maximale Obergrenze + iY = Max(iY, UpperY); + + // Fahrstuhl mit Clonk an Zielposition: anhalten, erledigt + if(Inside(iY - GetY(), -5, +5)) + if(Passenger()) + return(0,Stop()); + + // Fahrstuhl noch nicht beim Clonk: warten + if(!Inside(GetY() - GetY(pObj) -15, +15)) + return(1); + + // Fahrstuhl nur in der Mitte anfassen + if(!Inside(GetX() - GetX(pObj), -15, +15)) + return(AddCommand(pObj,"MoveTo",this(),0,0,0,15)); + + // Fahrstuhl anfassen + if(GetAction(pObj) ne "Push" || GetActionTarget(0, pObj) != this()) + return(AddCommand(pObj,"Grab",this())); + + // Fahrstuhl zur Zielposition steuern + if(iY < GetY()) + return(SetComDir(COMD_Up())); + return(SetComDir(COMD_Down())); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetYTop(%d)", UpperY); + extra[GetLength(extra)] = Format("LocalN(\"rgb\")=%d", rgb); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/StringTblDE.txt new file mode 100644 index 00000000..970135d2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +Up=Rauf +Down=Runter +Stop=Stopp \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/StringTblUS.txt new file mode 100644 index 00000000..fee25bbe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Lift.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +Up=Up +Down=Down +Stop=Stop \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/ActMap.txt new file mode 100644 index 00000000..089f6565 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/ActMap.txt @@ -0,0 +1,36 @@ +[Action] +Name=Travel +Procedure=FLOAT +Length=7 +Delay=5 +NextAction=Travel +FacetBase=1 +EndCall=Automatic +PhaseCall=CheckVerticalBoundaries + +[Action] +Name=Wait +Procedure=FLOAT +Length=1 +Delay=70 +NextAction=Travel +FacetBase=1 +EndCall=ResumeTravel + +[Action] +Name=SpeedToY +Procedure=NONE +Length=1 +Delay=3 +NextAction=SpeedToY +FacetBase=1 +StartCall=SpeedToY + +[Action] +Name=SpeedToX +Procedure=NONE +Length=1 +Delay=1 +NextAction=SpeedToX +FacetBase=1 +StartCall=SpeedToX \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DefCore.txt new file mode 100644 index 00000000..4ae4ac36 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=LFTP +Version=4,9,8,2 +Name=Liftplate +Category=C4D_Structure +ContactCalls=1 +Width=50 +Height=37 +Offset=-25,-18 +Vertices=6 +VertexX=0,0,-12,12,-24,24 +VertexY=18,-25,14,14,8,8 +VertexCNAT=72,4,8,8,1,2 +VertexFriction=100,100,100,100 +SolidMask=0,37,50,8,0,23 +TopFace=0,0,50,23,0,0 +Picture=50,0,64,64 +Grab=2 +VehicleControl=1 + +[Physical] +Float=200 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DescDE.txt new file mode 100644 index 00000000..17d40437 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DescDE.txt @@ -0,0 +1 @@ +Der Standardtransporter für Lasten und Personen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DescUS.txt new file mode 100644 index 00000000..101f6e3b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/DescUS.txt @@ -0,0 +1 @@ +Standard transportation for any loads and persons. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Graphics.png new file mode 100644 index 00000000..15fc8be2 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Names.txt new file mode 100644 index 00000000..50d2d125 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schwebeplatte +US:Liftplate diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Script.c new file mode 100644 index 00000000..07f57614 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/LiftPlate.c4d/Script.c @@ -0,0 +1,448 @@ +/*-- Große Schwebeplatte --*/ + +#strict + +/* Lokale Variablen */ + +local Mode; // 0: vertikal 1: horizontal 2: beides +local UpperY, LowerY, WaitComDir, WaitY; +local rLight, lLight; +local Limited; + +// Begrenzen +public func SetLimits(int iUY, int iLY) +{ + if(iUY) UpperY = iUY; + if(iLY) LowerY = iLY; + Limited = true; +} + +public func SetAutoLimits() { + Limited = true; + UpdateTransferZone(); +} + +/* Steuerung */ + +public func ControlCommand (string command, object target, int x, int y) { + // Bewegungskommando vertikal + if (command eq "MoveTo") { + if (Vertical()) + if (Inside(x - GetX(),-16,+16)) { + if (y < GetY()) + return(SetComDir(COMD_Up())); + if (y > GetY()) + return(SetComDir(COMD_Down())); + } + // Bewegungskommando horizontal + if (Horizontal()) + if (Inside(x - GetY(),-16,+16)) { + if (x < GetX()) + return(SetComDir(COMD_Left())); + if (x > GetX()) + return(SetComDir(COMD_Right())); + } + } + // Andere Kommandos nicht auswerten +} + +public func ControlUpdate(object caller, int comdir, bool dig, bool throw) +{ + // Remove horizontal Comdir component + if(!Horizontal()) + { + if(ComDirLike(comdir, COMD_Right)) comdir = ComDirTransform(comdir, COMD_Left); + if(ComDirLike(comdir, COMD_Left)) comdir = ComDirTransform(comdir, COMD_Right); + } + + // Remove vertical ComDir component + if(!Vertical()) + { + if(ComDirLike(comdir, COMD_Up)) comdir = ComDirTransform(comdir, COMD_Down); + if(ComDirLike(comdir, COMD_Down)) comdir = ComDirTransform(comdir, COMD_Up); + } + + if(comdir != GetComDir()) + Sound("Click"); + + // Stop without input + if(comdir == COMD_Stop) return(Stop()); + + // Clear X/Y-Dir if necessary + if(!ComDirLike(comdir, COMD_Right) && !ComDirLike(comdir, COMD_Left)) + SetXDir(0); + if(!ComDirLike(comdir, COMD_Up) && !ComDirLike(comdir, COMD_Down)) + SetYDir(0); + + // Ab geth. + SetComDir(comdir); + SetAction("Travel"); + return(1); +} + +public func ControlUp (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + if (!Vertical()) return(Stop()); + SetComDir(COMD_Up()); + SetXDir(0); + SetAction("Travel"); + return(1); + } +} + +public func ControlDownSingle (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + if (!Vertical()) return(Stop()); + SetComDir(COMD_Down()); + SetXDir(0); + SetAction("Travel"); + return(1); + } +} + +public func ControlLeft (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + if (!Horizontal()) return(Stop()); + SetComDir(COMD_Left()); + SetYDir(0); + SetAction("Travel"); + return(1); + } + else + { + AddCommand(caller, "Call", this(), 0,0,0,0, "ContMoveLeft"); + AddCommand(caller, "UnGrab", this()); + return(1); + } +} + +public func ControlRight (object caller) { + if(!GetPlrCoreJumpAndRunControl(caller->GetController())) + { + Sound("Click"); + if (!Horizontal()) return(Stop()); + SetComDir(COMD_Right()); + SetYDir(0); + SetAction("Travel"); + return(1); + } + else + { + AddCommand(caller, "Call", this(), 0,0,0,0, "ContMoveRight"); + AddCommand(caller, "UnGrab", this()); + return(1); + } +} + +public func ContMoveLeft(object caller) { caller->SetComDir(COMD_Left); } +public func ContMoveRight(object caller) { caller->SetComDir(COMD_Right); } + +/* Kontakt */ + +protected func ContactTop () { + if (!Vertical()) return(Stop()); + Wait(COMD_Down()); + return(1); +} + +protected func ContactBottom () { + UnstuckClonks(); + + if (!Vertical()) return(Stop()); + if (Horizontal() && Vertical()) return(Stop()); + Wait(COMD_Up()); + return(1); +} + +protected func ContactLeft () { + if (Horizontal() && Vertical()) return(Stop()); + if (!Horizontal()) return(Stop()); + Wait(COMD_Right()); + return(1); +} + +protected func ContactRight () { + if (Horizontal() && Vertical()) return(Stop()); + if (!Horizontal()) return(Stop()); + Wait(COMD_Left()); + return(1); +} + +/* Konfiguration */ + +public func EnableHorizontal () { + if (0 == Mode) Mode = 2; else Mode = 1; + UpdateTransferZone(); +} + +public func DisableHorizontal () { + Mode = 0; + UpdateTransferZone(); +} + +public func EnableVertical () { + if (1 == Mode) Mode = 2; else Mode = 0; + UpdateTransferZone(); +} + +public func DisableVertical () { + Mode = 1; + UpdateTransferZone(); +} + +private func Horizontal () { + return(Mode != 0); +} + +private func Vertical () { + return(Mode != 1); +} + +public func SetYTop (int iNewTop) { + return(UpperY = iNewTop); +} + +private func YTop () { + return(UpperY); +} + +public func SetYBottom (int iNewBottom) { + return(LowerY = iNewBottom); +} + +private func YBottom () { + return(LowerY); +} + +/* Kommandos */ + +private func Stop () { + SetAction("Travel"); + SetComDir(COMD_Stop()); + SetSpeed(); + return(1); +} + +private func Wait (int iComDir) { + Stop(); + // Aktion Wait ruft als EndCall ResumeTravel auf + SetAction("Wait"); + + WaitComDir = iComDir; + return(1); +} + +private func ResumeTravel () { // EndCall von Aktion Wait + SetAction("Travel"); + SetComDir(WaitComDir); + return(1); +} + +private func Automatic () { // EndCall von Aktion Travel + // Keine Automatik, wenn ein Clonk mitfährt + if (Passenger()) return(0); + // Zu einem wartenden Clonk hinfahren + if (SpeedToVertical()) return(1); + // Eigenständige Bewegung beginnen + if (SelfTravel()) return(1); + return(0); +} + +private func SelfTravel () { + // Nur wenn angehalten + if (GetComDir() != COMD_Stop()) return(0); + // Eigenständige Bewegung je nach zugelassener Richtung beginnen + if (1 == Mode) SetComDir(COMD_Left()); + if (0 == Mode) SetComDir(COMD_Up()); + if (2 == Mode) SetComDir(COMD_Down()); + return(1); +} + +private func SpeedToVertical () { + if (Mode != 0) return(0); + + var WaitClonk; + var upperdistance = AbsY(UpperY-20); + var lowerdistance = AbsY(LowerY+20); + + for(WaitClonk in FindObjects( Find_InRect(-50,upperdistance,100,-upperdistance+lowerdistance), + Find_OCF(OCF_CrewMember), + Find_NoContainer())) { + + if (GetComDir(WaitClonk) != COMD_Stop()) continue; + + SetAction("SpeedToY"); + WaitY = Max(GetY(WaitClonk), UpperY-10); + + return(1); + } + + return(0); +} + +/* Aktion */ + +private func CheckVerticalBoundaries () // PhaseCall von Travel +{ + if (GetY() < YTop()-10) + { + SetPosition(GetX(), YTop()-10); + ContactTop(); + } + if (YBottom() && GetY() > YBottom()) + { + SetPosition(GetX(), YBottom()); + ContactBottom(); + } + return(1); +} + +private func SpeedToY () { // StartCall von SpeedToY + SetYDir(BoundBy(WaitY - GetY(), -50, 50)); + if (Inside(WaitY-GetY(),-4,+2)) Stop(); + return(1); +} + +private func SpeedToX () { // StartCall von SpeedToX + SetYDir(0); + SetXDir(BoundBy(WaitY-GetX(),-50,+50)); + if (Inside(WaitY - GetX(),-10,+10)) Stop(); + return(1); +} + +private func UnstuckClonks () { // Sucht Clonks in der SolidMask und setzt sie auf die Platte + var pClonk; + while(pClonk = FindObject(0,-25,-2,50,20, 0, 0,0, NoContainer(), pClonk)) + if(Stuck(pClonk)) + SetPosition(GetX(pClonk), GetY(), pClonk); +} + +/* Status */ + +private func Passenger () { + return( FindObject(0, -24,-13,48,16, OCF_CrewMember(),0,0,NoContainer()) ); +} + +public func IsLift() { return(1); } + +/* Initialisierung */ + +protected func Initialize() +{ +// AddLightAmbience(100, this()); + lLight = AddLightCone(1000,RGBa(255,255,220,20),this()); + rLight = AddLightCone(1000,RGBa(255,255,220,20),this()); + + lLight->ChangeSizeXY(700, 500); + rLight->ChangeSizeXY(700, 500); + lLight->ChangeOffset(-11,-1); + rLight->ChangeOffset(+11,-1); + lLight->ChangeR(-130); + rLight->ChangeR(+130); + + AddEffect("LightEffects", this(), 1, 5, this()); + SetAction("Travel"); + UpdateTransferZone(); + return(1); +} + +public func FxLightEffectsTimer(target, number, time) +{ + // Funken! :D + CreateParticle("PSpark", RandomX(-8,8), 15, RandomX(-1,1), RandomX(2,5), 150+Random(70), RGB(50,50,25), this(), true); +} + +/* Transfer */ + +protected func UpdateTransferZone () { + + // Nur vertikale Schwebeplatten + if (Mode) return(SetTransferZone()); + + // Ober- und Untergrenze speichern + if(!Limited) DetermineLimits(); + + // Transferzone setzen + SetTransferZone(-25,AbsY(YTop()),50,YBottom()-YTop() +10); + + return(1); +} + +public func DetermineLimits() { + + // Obergrenze ermitteln + var y1, y2; + while(GetY() + y1 > 5 && !GBackSolid(0, y1)) + y1-=5; + // Untergrenze ermitteln + while(GetY() + y2 + 15 < LandscapeHeight()-5 && !GBackSolid(0, y2+15)) + y2+=5; + + UpperY = GetY() + y1; + LowerY = GetY() + y2; +} + +protected func ControlTransfer (object pObj, int iX, int iY) { + + // Durchgang am Boden des Fahrstuhlschachts: nicht warten + if(Abs(GetY(pObj) - LowerY) <= 10) + if(Abs(iY - LowerY) <= 10) + return false; + + // Zielposition + // Maximale Obergrenze + iY = Max(iY, UpperY); + + // Fahrstuhl mit Clonk an Zielposition: anhalten, erledigt + // oder: Fahrstuhl an Startposition wo der Clonk wartet + if(Abs(iY - GetY()) <= 5 && Passenger()) + { + Stop(); + return false; + } + + // Fahrstuhl noch nicht beim Clonk: warten + if(Abs(GetY() - GetY(pObj)) > 20) + { + return true; + } + + // Fahrstuhl nur in der Mitte anfassen + if(Abs(GetX() - GetX(pObj)) > 15) + { + AddCommand(pObj,"MoveTo",0,GetX(),GetY(pObj),0,15); + return true; + } + + // Fahrstuhl anfassen + if(GetAction(pObj) ne "Push" || GetActionTarget(0, pObj) != this) + { + AddCommand(pObj,"Grab",this); + return true; + } + + // Fahrstuhl zur Zielposition steuern + if(iY < GetY()) + SetComDir(COMD_Up()); + else + SetComDir(COMD_Down()); + + return true; +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetYTop(%d)", UpperY); + if (Mode == 1) + extra[GetLength(extra)] = "DisableVertical()"; + if (Mode == 2) + extra[GetLength(extra)] = "EnableHorizontal()"; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Names.txt new file mode 100644 index 00000000..fa3157ae --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Basis +US:Base diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Actmap.txt new file mode 100644 index 00000000..fff167aa --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Actmap.txt @@ -0,0 +1,9 @@ +[Action] +Name=Pipe +Procedure=NONE +Length=4 +Directions=4 +Delay=0 +NextAction=Hold +FacetBase=0 +Facet=0,0,50,50 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DefCore.txt new file mode 100644 index 00000000..3ab10e76 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=PIPL +Version=4,9,8,2 +Name=Pipe +Category=C4D_StaticBack +Timer=4 +TimerCall=LiquidCheck +Width=50 +Height=50 +Offset=-25,-25 +Picture=0,0,50,50 +StretchGrowth=1 +IncompleteActivity=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DescDE.txt new file mode 100644 index 00000000..e4669df0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine große Rohrleitung. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DescUS.txt new file mode 100644 index 00000000..18a84164 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/DescUS.txt @@ -0,0 +1 @@ +A big pipeline. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Graphics.png new file mode 100644 index 00000000..37026be6 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Names.txt new file mode 100644 index 00000000..b81041b3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rohr +US:Pipe diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Actmap.txt new file mode 100644 index 00000000..1e1ffa9d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Actmap.txt @@ -0,0 +1,9 @@ +[Action] +Name=Pump +Procedure=NONE +Length=4 +Directions=4 +Delay=0 +NextAction=Hold +FacetBase=0 +Facet=0,0,50,50 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DefCore.txt new file mode 100644 index 00000000..4f5a7b37 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=PMP2 +Version=4,9,8,2 +Name=Pump +Category=C4D_StaticBack +Timer=4 +TimerCall=Pumping +Width=50 +Height=50 +Offset=-25,-25 +Picture=200,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DescDE.txt new file mode 100644 index 00000000..3712121f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DescDE.txt @@ -0,0 +1 @@ +Pumpt Flüssigkeiten durch Rohre. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DescUS.txt new file mode 100644 index 00000000..9441fe79 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/DescUS.txt @@ -0,0 +1 @@ +Pumps liquid through pipes. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Graphics.png new file mode 100644 index 00000000..ddeeb44a Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Names.txt new file mode 100644 index 00000000..c2957f1a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pumpe +US:Pump \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Script.c new file mode 100644 index 00000000..437989fd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/Script.c @@ -0,0 +1,175 @@ +/*-- Pumpe --*/ + +#strict +#include PIPL + +local left, right, up, down, valve, connects, eff,con, + efflux, conflux, temp, temp2, + running; + +public func Initialize() { + SetAction("Pump"); + efflux = CreateArray(); + conflux = CreateArray(); + // Standardleistung + power = 2; +} + +/* Wichtig für die Pumpen: + + Erster Anschluss -> Zufluß + Zweiter Anschluss -> Abfluß +*/ + +public func Left(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(connects >= 2) return(); + + return(_inherited(iRepeat, solid, valve, pipeId, iPower, connect)); +} + +public func Right(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(connects >= 2) return(); + + return(_inherited(iRepeat, solid, valve, pipeId, iPower, connect)); +} + +public func Up(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(connects >= 2) return(); + + return(_inherited(iRepeat, solid, valve, pipeId, iPower, connect)); +} + +public func Down(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(connects >= 2) return(); + + return(_inherited(iRepeat, solid, valve, pipeId, iPower, connect)); +} + +public func ConnectTo(object connect, int dir) { + if(!connects) con = connect; + if(connects == 1) eff = connect; + connects++; + + return(_inherited(connect, dir)); +} + +/* Öffentliches */ + +public func UpdateEfflux() { + efflux = CreateArray(); + + if(eff) + { + if(eff == left) eff->UpdateSystem(this(), PIPE_Right, 2); + if(eff == right) eff->UpdateSystem(this(), PIPE_Left, 2); + if(eff == down) eff->UpdateSystem(this(), PIPE_Up, 2); + if(eff == up) eff->UpdateSystem(this(), PIPE_Down, 2); + } + + UpdateConflux(); +} + +public func UpdateConflux() { + conflux = CreateArray(); + + if(con) + { + if(con == left) con->UpdateSystem(this(), PIPE_Right, 1); + if(con == right) con->UpdateSystem(this(), PIPE_Left, 1); + if(con == down) con->UpdateSystem(this(), PIPE_Up, 1); + if(con == up) con->UpdateSystem(this(), PIPE_Down, 1); + } +} + +public func UpdateSystem(object start, int From, bool pump) { + // Andere Pumpe + if(pump) start->~TwoPumpError(); + // Prinzipiell regelt das die Pumpe + return(); +} + +public func NewConflux(object new) { + conflux[GetLength(conflux)] = new; +} + +public func NewEfflux(object new) { + efflux[GetLength(efflux)] = new; +} + +// Fehler! +public func TwoPumpError() { + Message("$Error$", this()); +} + +/* Pumpen */ + +protected func Pumping() { + if(!running) return(); + if(efflux[0] == 0) return(); + if(conflux[0] == 0) return(); + + var mat; + for(var i=0 ; i < power ; i++) + { + mat = ExtractLiquid(AbsX(GetX(conflux[temp2])), AbsY(GetY(conflux[temp2]))); + efflux[temp]->CastLiquid(mat, 35); + } + + if(!Random(4)) Smoke(0,0, 15); + if(!Random(4)) Bubble(AbsX(GetX(conflux[temp2])), AbsY(GetY(conflux[temp2]))); + + temp++; + temp2++; + if(efflux[temp] == 0) temp = 0; + if(conflux[temp2] == 0) temp2 = 0; +} + +public func On() { + running = true; + Sound("Gear", 0, this(), 50,0, 1); +} + +public func Off() { + running = false; + Sound("Gear", 0, this(), 0,0,-1); +} + +public func Status() { return(running); } + +/* Steuerkonsole */ + +public func ConsoleControl(int i) { + if(i == 1) + { + if(running) return("$TurnOff$"); + else return("$TurnOn$"); + } +} + +public func ConsoleControlled(int i) { + if(i == 1) + { + if(!running) On(); + else Off(); + } +} + +/* Steuerung mit Schalter */ +func Access() +{ + if(running) Off(); + else On(); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + _inherited(extra); + if (running) + extra[GetLength(extra)] = "On()"; + if (con) + extra[GetLength(extra)] = ["LocalN(\"con\")=Object(%d)", con]; + if (eff) + extra[GetLength(extra)] = ["LocalN(\"eff\")=Object(%d)", eff]; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/StringTblDE.txt new file mode 100644 index 00000000..79af3381 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +TurnOn=Einschalten +TurnOff=Ausschalten +Error=Fehler:|Zwei-Pumpen-System \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/StringTblUS.txt new file mode 100644 index 00000000..0c897b43 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Pump.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +TurnOn=Turn on +TurnOff=Turn off +Error=Error: Two-Pump-System \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Script.c new file mode 100644 index 00000000..692f77bd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Script.c @@ -0,0 +1,310 @@ +/*-- Pipe --*/ + +#strict + +local left, right, up, down, valve, // Anschlüsse, Ventil + efflux, temp, // Abflüsse, Zwischenspeichern + noliquid, power, // Befindet sich nicht in Flüssigkeit, Durchflussstärke + checked; // Zwischenspeicher für UpdatePipesystem + +static const PIPE_Left = 1, + PIPE_Right = 2, + PIPE_Up = 4, + PIPE_Down = 8; + +public func Initialize() { + SetAction("Pipe"); + SetClrModulation(RGB(180,180,180)); + efflux = CreateArray(); + + if(!GBackLiquid()) noliquid = true; + + // Standardstärke + power = 1; +} + +// Beim Verbinden nur gültige Rohrobjekten (mit den entsprechenden Callbacks) benutzen + +public func Left(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(!iRepeat) iRepeat = 1; + if(!pipeId) pipeId = PIPL; + if(!connect) connect = CreatePipe(PIPE_Left, pipeId); + if(!iPower) iPower = 1; + ConnectTo(connect, PIPE_Left); + connect->ConnectTo(this(), PIPE_Right); + connect->~ChangePower(iPower); + if(solid) connect->~Solid(); + if(valve) connect->~Valve(); + + if(iRepeat - 1) return(connect->~Left(iRepeat-1, solid, valve, pipeId, iPower)); + + return(connect); +} + +public func Right(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(!iRepeat) iRepeat = 1; + if(!pipeId) pipeId = PIPL; + if(!connect) connect = CreatePipe(PIPE_Right, pipeId); + if(!iPower) iPower = 1; + ConnectTo(connect, PIPE_Right); + connect->ConnectTo(this(), PIPE_Left); + connect->~ChangePower(iPower); + if(solid) connect->~Solid(); + if(valve) connect->~Valve(); + + if(iRepeat - 1) return(connect->~Right(iRepeat-1, solid, valve, pipeId, iPower)); + + return(connect); +} + +public func Up(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(!iRepeat) iRepeat = 1; + if(!pipeId) pipeId = PIPL; + if(!connect) connect = CreatePipe(PIPE_Up, pipeId); + if(!iPower) iPower = 1; + ConnectTo(connect, PIPE_Up); + connect->ConnectTo(this(), PIPE_Down); + connect->~ChangePower(iPower); + if(solid) connect->~Solid(); + if(valve) connect->~Valve(); + + if(iRepeat - 1) return(connect->~Up(iRepeat-1, solid, valve, pipeId, iPower)); + + return(connect); +} + +public func Down(int iRepeat, bool solid, bool valve, id pipeId, int iPower, object connect) { + if(!iRepeat) iRepeat = 1; + if(!pipeId) pipeId = PIPL; + if(!connect) connect = CreatePipe(PIPE_Down, pipeId); + if(!iPower) iPower = 1; + ConnectTo(connect, PIPE_Down); + connect->ConnectTo(this(), PIPE_Up); + connect->~ChangePower(iPower); + if(solid) connect->~Solid(); + if(valve) connect->~Valve(); + + if(iRepeat - 1) return(connect->~Down(iRepeat-1, solid, valve, pipeId, iPower)); + + return(connect); +} + +public func Valve(bool open) { + valve = CreateObject(VALV, 0,11, GetOwner()); + LocalN("open", valve) = open; + return(this()); +} + +public func Solid(bool Desolidate) { + if(Desolidate) { + SetClrModulation(RGB(180,180,180)); + return(SetSolidMask()); + } + + // Zeitverzögert, um Änderungen mit einzuberechnen + ScheduleCall(this(), "Consolidate", 1); + // Vordergrund + SetClrModulation(RGB()); + return(this()); +} + +protected func Consolidate() { + var index = !!left*PIPE_Left + | !!right*PIPE_Right + | !!up*PIPE_Up + | !!down*PIPE_Down; + + SetSolidMask(index%4 * 50, index/4 * 50, 50,50); +} + +public func ConnectTo(object connect, int dir) { + + // allocate local + if(dir == PIPE_Left) left = connect; + else if(dir == PIPE_Right) right = connect; + else if(dir == PIPE_Up) up = connect; + else if(dir == PIPE_Down) down = connect; + + UpdateGraphics(); +} + +private func UpdateGraphics() { + // update graphic + var index = !!left*PIPE_Left + | !!right*PIPE_Right + | !!up*PIPE_Up + | !!down*PIPE_Down; + + SetPhase(index%4); + SetDir(index/4); +} + +public func CreatePipe(int dir, id pipeId) { + var x=0, y=0; + + if(dir == PIPE_Left) { x -= GetDefWidth(); } + if(dir == PIPE_Right) { x += GetDefWidth(); } + if(dir == PIPE_Up) { y -= GetDefHeight(); } + if(dir == PIPE_Down) { y += GetDefHeight(); } + + x = x*GetCon()/100; + y = y*GetCon()/100; + + var pipe = CreateObject(pipeId,50,50,GetOwner()); + pipe->DoCon(GetCon()-100); + pipe->SetCategory(GetCategory()); + + pipe->SetPosition(GetX()+x,GetY()+y); + + return(pipe); +} + +public func ChangePower(int iNewPower) { + power = iNewPower; + return(this()); +} + +/* Flüssigkeit */ + +protected func LiquidCheck() { + if(!GBackLiquid()) + { + if(!noliquid) noliquid=true; + return(); + } + if(efflux[0] == 0) return(NewLiquidCheck()); + + if(!power) return(); + + var mat; + for(var i=0 ; i < power ; i++) + { + mat = ExtractLiquid(0,0); + efflux[temp]->CastLiquid(mat, 15); + } + + if(!Random(4)) Bubble(); + + temp++; + if(efflux[temp] == 0) temp = 0; +} + +public func CastLiquid(int iMat, int iStr) { + var x,y; + if(left || right) + { + x=0; + y=RandomX(-5, 5); + } + if(up || down) + { + x=RandomX(-5, 5); + y=0; + } + + CastPXSX(MaterialName(iMat), 1, iStr, x,y, GetLiquidAngle(), 15); +} + +private func NewLiquidCheck() { + if(!noliquid) return(); + + if(GBackLiquid()) + { + noliquid = false; + UpdateEfflux(); + } +} + +private func GetLiquidAngle() { + if(left) return(0); + if(right) return(180); + if(down) return(270); + if(up) return(90); +} + +/* Öffentliches */ + +public func UpdateEfflux() { + if(!GBackLiquid()) return(); + + efflux = CreateArray(); + + if(left) left ->UpdateSystem(this()); + if(right) right ->UpdateSystem(this()); + if(down) down ->UpdateSystem(this()); + if(up) up ->UpdateSystem(this()); +} + +public func UpdateSystem(object start, int From, int pump) { + //! Wenn in diesem Frame schon einmal überprüft, geht es nicht nochmal ! + if(checked) return(); + + if(valve) + if(!(valve->~Status())) + return(); + + if(pump == 1 && IsEnd()) + { + start->~NewConflux(this()); + return(); + } + if(pump == 2 && IsEnd()) + { + start->~NewEfflux(this()); + return(); + } + + if(IsEnd() && !GBackLiquid()) + { + start->NewEfflux(this()); + return(); + } + if(left && From != PIPE_Left) left ->UpdateSystem(start, PIPE_Right, pump); + if(right && From != PIPE_Right) right ->UpdateSystem(start, PIPE_Left, pump); + if(down && From != PIPE_Down) down ->UpdateSystem(start, PIPE_Up, pump); + if(pump || start->GetY() <= GetY()) { + if(up && From != PIPE_Up) up ->UpdateSystem(start, PIPE_Down, pump); } + + checked = true; + Schedule("LocalN(\"checked\") = false;", 1); +} + +public func NewEfflux(object new) { + efflux[GetLength(efflux)] = new; +} + +public func IsEnd() { + if(GetDir() == 0 && Inside(GetPhase(), 1,2)) return(1); + if(GetDir() == 1 && GetPhase() == 0) return(1); + if(GetDir() == 2 && GetPhase() == 0) return(1); +} + +/* Globales */ + +// Durchsucht alle Rohre nach Enden und lässt sich diese Abflusse suchen, außerdem regelt es Pumpen +global func UpdatePipesystem() { + var pipe, pump; + for(pump in FindObjects(Find_ID(PMP2))) + pump->~UpdateEfflux(); + for(pipe in FindObjects(Find_ID(PIPL))) + if(pipe->~IsEnd()) + pipe->~UpdateEfflux(); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (left) + extra[GetLength(extra)] = ["ConnectTo(Object(%d), PIPE_Left)", left]; + if (right) + extra[GetLength(extra)] = ["ConnectTo(Object(%d), PIPE_Right)", right]; + if (up) + extra[GetLength(extra)] = ["ConnectTo(Object(%d), PIPE_Up)", up]; + if (down) + extra[GetLength(extra)] = ["ConnectTo(Object(%d), PIPE_Down)", down]; + if (GetClrModulation() == RGB()) + extra[GetLength(extra)] = "Solid()"; + if (power != 1) + extra[GetLength(extra)] = Format("ChangePower(%d)", power); +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/ActMap.txt new file mode 100644 index 00000000..847a55a1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Exist +Procedure=FLOAT +FacetBase=1 +Delay=1 +NextAction=Exist \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DefCore.txt new file mode 100644 index 00000000..b4131ca1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=VALV +Version=4,9,8,2 +Name=Valve +Category=C4D_Vehicle +Width=10 +Height=15 +Offset=-5,-4 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=1 +Mass=1 +Components=METL=1 +Picture=0,0,10,29 +Grab=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DescDE.txt new file mode 100644 index 00000000..6dba8b14 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DescDE.txt @@ -0,0 +1 @@ +Drehen zum Öffnen oder Schließen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DescUS.txt new file mode 100644 index 00000000..e5f4d58e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/DescUS.txt @@ -0,0 +1 @@ +Turn to open or close. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Graphics.png new file mode 100644 index 00000000..138434c3 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Names.txt new file mode 100644 index 00000000..7d773999 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ventil +US:Valve \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Script.c new file mode 100644 index 00000000..77fe65a0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Pipe.c4d/Valve.c4d/Script.c @@ -0,0 +1,25 @@ +/*-- Ventil --*/ + +#strict + +local open; + +protected func Initialize() { + open = false; + SetAction("Exist"); +} + +protected func ControlDig() { + open = !open; + UpdatePipesystem(); +} + +public func Status() { return(open); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (open) + extra[GetLength(extra)] = "ControlDig()"; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/ActMap.txt new file mode 100644 index 00000000..793381e2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Turn +Procedure=NONE +Facet=0,0,36,36 +Length=4 +Directions=1 +Delay=6 +NextAction=Turn diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DefCore.txt new file mode 100644 index 00000000..72631d21 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=SEGU +Version=4,9,8,2 +Name=Sentry Gun +Category=C4D_Object +Timer=1 +TimerCall=Activity +Width=36 +Height=36 +Offset=-18,-18 +Vertices=3 +VertexX=0,-17,17 +VertexY=4,-19,-19 +VertexFriction=20,100,100 +Value=90 +Mass=170 +Components=METL=6 +Picture=0,36,64,60 +TopFace=0,0,36,36,0,0 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DescDE.txt new file mode 100644 index 00000000..e33f7c62 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DescDE.txt @@ -0,0 +1 @@ +Gestell für ein stationäres Geschütz. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DescUS.txt new file mode 100644 index 00000000..0de4ac6b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/DescUS.txt @@ -0,0 +1 @@ +A rack for a stationary gun. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Graphics.png new file mode 100644 index 00000000..823f2738 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/ActMap.txt new file mode 100644 index 00000000..5b66575e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=RackAttach +Procedure=ATTACH +FacetBase=1 +Directions=1 +Length=1 +NextAction=RackAttach diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DefCore.txt new file mode 100644 index 00000000..7f40b004 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=MGSA +Version=4,9,8,2 +Name=MG-Attachment +Category=C4D_Vehicle +MaxUserSelect=1 +Width=32 +Height=9 +Offset=-16,-4 +Vertices=1 +VertexFriction=20 +Value=45 +Mass=55 +Components=METL=4 +Picture=0,0,32,9 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DescDE.txt new file mode 100644 index 00000000..be79cf15 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein MG-Aufsatz für das stationäre Geschütz. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DescUS.txt new file mode 100644 index 00000000..0bf548ff --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/DescUS.txt @@ -0,0 +1 @@ +A MG-Attachment for the stationary gun. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Graphics.png new file mode 100644 index 00000000..f8a7f7ad Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/MGFire.wav b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/MGFire.wav new file mode 100644 index 00000000..c26c648d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/MGFire.wav differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Names.txt new file mode 100644 index 00000000..aaa9caf9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:MG-Aufsatz +US:MG-Attachment \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Script.c new file mode 100644 index 00000000..9185dc25 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/MG-Attachment.c4d/Script.c @@ -0,0 +1,58 @@ +/*-- MG-Aufsatz --*/ + +#strict + +#include WEPN + +public func HandSize() { return(1000); } +public func HandX() { return(7000); } +public func HandY() { return(0); } + +public func FMData1(int data) +{ + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(500); + + if(data == FM_Reload) return(6); + if(data == FM_Recharge) return(6); + + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(1); + if(data == FM_Auto) return(1); + +// return(Default(data)); +} + +public func Fire1() // Projektil-Dauerfeuer +{ + var user = GetUser(); + var angle = user->AimAngle(); + + var iX; + var iY; + + user->WeaponEnd(iX,iY); + + var ammo = CreateObject(SHT1, iX, iY, GetController(user)); + ammo->Sound("MGFire"); + //int iAngle, int iSpeed, int iDist, int iSize, int iTrail, int iDmg + ammo->Launch(angle, 300, 600, 3, 100, 44, 1); + + // Effekte + MuzzleFlash(20,user,iX,iY,angle); + + +} + +public func OnAutoStart() +{ + // wegen einem Bug in der SentryGun nicht loopbar + //Sound("MGFire",0,GetUser(),0,0,1); +} + +public func OnAutoStop() +{ + //Sound("MGFire",0,GetUser(),0,0,-1); +} + +public func NoWeaponChoice() { return(true); } diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Names.txt new file mode 100644 index 00000000..21eee18b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Selbstschussanlage +US:Sentry Gun \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DefCore.txt new file mode 100644 index 00000000..72caff4f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=RGSA +Version=4,9,8,2 +Name=Railgun-Attachment +Category=C4D_Vehicle +MaxUserSelect=1 +Width=33 +Height=10 +Offset=-16,-5 +Vertices=1 +VertexFriction=20 +Value=60 +Mass=55 +Components=METL=6 +Picture=0,0,33,10 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DescDE.txt new file mode 100644 index 00000000..61d0185c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein effektiver Railgun-Aufsatz für das stationäre Deckengeschütz. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DescUS.txt new file mode 100644 index 00000000..eb9a0d9b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/DescUS.txt @@ -0,0 +1 @@ +An effective Railgun-Attachment for the sentry Gun. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Graphics.png new file mode 100644 index 00000000..42372fd0 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Names.txt new file mode 100644 index 00000000..895655fe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Railgun-Aufsatz +US:Railgun-Attachment \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Script.c new file mode 100644 index 00000000..9faccb6c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Railgun-Attachment.c4d/Script.c @@ -0,0 +1,63 @@ +/*-- Railgun-Aufsatz --*/ + +#strict + +#include WEPN + +local lasupgrade; + +public func HandSize() { return(1000); } +public func HandX() { return(7000); } +public func HandY() { return(0); } + +public func FMData1(int data) +{ + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoUsage) return(1); + if(data == FM_AmmoRate) return(100); + if(data == FM_Auto) return(false); + if(data == FM_Aim) return(0); + if(data == FM_Condition) return(true); + if(data == FM_AmmoLoad) return(100); + if(data == FM_Reload) return(60); + if(data == FM_Recharge) return(125); +} + +func Fire1() // Peng +{ + var user = GetUser(); + var angle = user->AimAngle(); + + var iX; + var iY; + + user->WeaponEnd(iX,iY); + + var laser = CreateObject(LASR, iX, iY, GetController(user)); + laser->SetClrModulation(RGBa(255, 255, 255, 64)); + laser->Set(angle, 13, 500, 30, this(), user); + laser->SetContinuous(2); + Sound("RailGunShot"); +} + +/*public func AimLaser() +{ + var iX; + var iY; + WeaponEnd(iX,iY); + var user = Contained(); + + var Laser = CreateObject(LASR, iX, iY - 3, GetController(user)); + Laser->SetClrModulation(RGBa(255, 0, 0, 200)); + Laser->Set(GetR(),2,200,0,this(),this()); + Laser->SetContinuous(2); +}*/ + +func LaserStrike(object pObj) { + //Schaden machen, natürlich tollen Energiebrazzelschaden! + DoDmg(6, DMG_Energy, pObj); + + return(0); +} + +public func NoWeaponChoice() { return(true); } diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Script.c new file mode 100644 index 00000000..8f805c17 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/Script.c @@ -0,0 +1,316 @@ +/*-- Sentry Gun --*/ + +#strict + +local cur_Attachment; +local aim_angle; +local target_angle; +local Shooting; +local iPat_Dir; +local Active; +local GotTarget; + +/* Aufrufe */ + +public func TurnOn() +{ + Active = true; +} + +public func TurnOff() +{ + Active = false; +} + +public func Arm(id idWeapon) +{ + // Crash-Vermeidung + if(!idWeapon) return(); + if(!GetName(0, idWeapon)) return(); + + //Ausrüsten mit idWeapon + var pWeapon = CreateObject(idWeapon, 0, 0, GetOwner()); + Enter(this(),pWeapon); + //Ordnern + SetObjectOrder(this(), pWeapon, 1); + aim_angle = 180; + iPat_Dir = -1+ Random(2)*2; + cur_Attachment = pWeapon; + LocalN("controller", pWeapon) = this(); + Reload(); +} + +/* Script */ + +public func Initialize() +{ + //Ausrichten + FitToTop(); + AddEffect("ShowWeapon",this(),1,1,this(),GetID()); + //lieber Overlay 3 nehmen. Falls wir mal 2-overlayige waffen einbaun :] + SetGraphics(0,this(),GetID(),3,5,0,0,this()); +} + +public func WeaponAt(&x, &y, &r) { + x = 0; + y = -3000; + r = aim_angle+270; + return(1); +} + +public func WeaponBegin(&x, &y) { + var number = GetEffect("ShowWeapon",this()); + if(!number) + return(0); + x = EffectVar(2, this(), number)/1000; + y = EffectVar(3, this(), number)/1000; +} + +public func WeaponEnd(&x, &y) { + var number = GetEffect("ShowWeapon",this()); + if(!number) + return(0); + x = EffectVar(4, this(), number)/1000; + y = EffectVar(5, this(), number)/1000; +} + +public func GetWeaponR() { + var number = GetEffect("ShowWeapon",this()); + if(!number) + return(0); + return(EffectVar(1, this(), number)); +} + +public func FitToTop() +{ + //Das Gestell passt sich selbst mal etwas besser zur Decke an. + var x = GetX(), y = GetY() - GetObjHeight() / 2; + + SetPosition(GetX(),GetY()+GetObjHeight()/2); + var i = 0; + while(++i < GetObjHeight() && !Stuck()) SetPosition(GetX(),GetY()-1); + SetPosition(GetX(),GetY()-1); + Message("@%d",this,i); + +} + +public func Activity() +{ + var iHeight, iWidth, iAngle; + //Wuah, haben wir eine Waffe? + if(! GetAttWeapon()) return(); + //Sind wir im Eimer? + if( EMPShocked()) return(); + //Sind wir aktiv? + if(! Active) return(); + //Wenn nicht schon gesetzt: Turn-Action + if(GetAction() ne "Turn") + SetAction("Turn"); + + /*Patroullie fahren*/ + + // alle 5 Frames + if(!(GetActTime()%5)) { + //Zu weit links? + if( aim_angle <= MaxRotLeft() ) + { + //Wir fahren zurück + iPat_Dir = 1; + target_angle = MaxRotRight(); + GotTarget = 0; + } + //Oder zu weit rechts? + else if( aim_angle >= MaxRotRight() ) + { + //Hinfahren + iPat_Dir = -1; + target_angle = MaxRotLeft(); + GotTarget = 0; + } + if(!GotTarget) + aim_angle += iPat_Dir; + } + + //Das Fahren selber ;) + if(GotTarget) + aim_angle += BoundBy(target_angle-aim_angle,-2,2); + + + /* Feinde suchen */ + + if(!GotTarget) + { + if(Shooting) + { + Shooting = false; + GetAttWeapon()->StopAutoFire(); + } + + GotTarget = Search(); + } + else + { + target_angle = Angle(GetX(), GetY() + 7, GotTarget->GetX(), GotTarget->GetY()); + if(Abs(aim_angle - target_angle) < 15) + { + Shooting = true; + if(!GetAttWeapon()->IsShooting()) + GetAttWeapon()->ControlThrow(this()); + if(GetAmmo(GetAttWeapon()->GetFMData(FM_AmmoID), GetAttWeapon()) < GetAttWeapon()->GetFMData(FM_AmmoUsage)) + Reload(); + } + else + { + Shooting = false; + GetAttWeapon()->StopAutoFire(); + } + + if(!CheckTarget(GotTarget,this())) + GotTarget = 0; + else if(!PathFree(GetX(),GetY()+7,GotTarget->GetX(), GotTarget->GetY())) + GotTarget = 0; + else if(ObjectDistance(GotTarget,this()) > SearchLength()) + GotTarget = 0; + } + + /* + //Berechnung + iAngle = aim_angle; + iWidth = Sin(iAngle, SearchLength()); + iHeight = -Cos(iAngle, SearchLength()); + + if(iWidth < 0) + Search(iWidth, -iWidth, iHeight); + else + Search(0, iWidth, iHeight); + */ +} + +public func Search(int iX, int iWidth, int iHeight) +{ + var pAim; + + /*DrawParticleLine("PSpark", 0, 0, -70 + Sin(aim_angle, SearchLength()), SearchLength(), 10, 80, RGB(255, 0, 0)); + DrawParticleLine("PSpark", 0, 0, 70 + Sin(aim_angle, SearchLength()), SearchLength(), 10, 80, RGB(255, 0, 0));*/ + + var w,h; + + var Targets = FindTargets(this(), SearchLength()); //FindObjects(Find_Distance(SearchLength()),Find_PathFree(),Find_NoContainer()); + for(pAim in Targets) + { + if(GetOwner() != NO_OWNER) + if(pAim->GetOwner() == GetOwner() || !Hostile(pAim->GetOwner(), GetOwner())) + continue; + + if(!CheckTarget(pAim,this())) + continue; + + //Winkel zum Ziel + target_angle = Angle(GetX(), GetY() + 7, pAim->GetX(), pAim->GetY()); + + target_angle = Normalize(target_angle, 0); + if(target_angle < MaxRotLeft() || target_angle > MaxRotRight()) + continue; + + return pAim; + } + + if(Shooting && !pAim) + { + Shooting = false; + GetAttWeapon()->StopAutoFire(); + } + + if(!pAim) + GotTarget = true; +} + +private func Reload() +{ + // Munitionsart + var AmmoID = GetAttWeapon()->~GetFMData(FM_AmmoID); + // Erzeugen + Local(0, CreateContents(AmmoID)) = GetAttWeapon()->~GetFMData(FM_AmmoLoad); + // Waffe soll nachladen + GetAttWeapon()->~Reloaded(this()); + GetAttWeapon()->~Recharge(); + GetAttWeapon()->~StopAutoFire(); +} + +public func MaxDamage() { + return( 100 ); +} + +public func Damage() +{ + if(GetDamage() > MaxDamage()) + Explode(20); +} + +public func EMPShock() +{ + //EMP Granate!1 :O + EMPShockEffect(20*35); + if(GetAttWeapon()) + GetAttWeapon()->StopAutoFire(); + return(1); +} + +/* Konsolensteuerung */ + +public func ConsoleControl(int i) +{ + if(i == 1) + { + if(Active) return("$TurnOff$"); + else + return("$TurnOn$"); + } + if(i == 2 && EMPShocked()) + return("$Repair$"); +} + +public func ConsoleControlled(int i) +{ + if(i == 1) + { + if(Active) Active = 0; + else + { + Active = 1; + } + } + if(i == 3) + { + //Temporär mal noch nichts. + } +} + +//Für das Abfragen +public func GetAttWeapon() { return(cur_Attachment); } //Waffe +public func MaxRotLeft() { return(110); } //Maximaler Winkel links +public func MaxRotRight() { return(250); } //Maximaler Winkel rechts +public func SearchLength() { return(250); } //Suchlänge +public func AimAngle() { return(aim_angle); } //Winkel auf Ziel +public func ReadyToFire() { return(1); } //Allzeit bereit +public func IsMachine() { return(true); } //Ist eine Elektrische Anlage +public func IsBulletTarget() { return(true); } //Kugelziel +public func IsAiming() { return(true); } // Die Sentry Gun "zielt" immer + +/* Serialisierung */ + +public func RejectContainedSerialize(object foo) { return !false; } // weg mit den alten Waffen + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetTeam(%d)", GetTeam()); + if (Active) + extra[GetLength(extra)] = "TurnOn()"; + if (cur_Attachment) { + extra[GetLength(extra)] = Format("Arm(%i)", GetID(cur_Attachment)); + extra[GetLength(extra)] = Format("LocalN(\"aim_angle\")=%d", aim_angle); + extra[GetLength(extra)] = Format("LocalN(\"iPat_Dir\")=%d", iPat_Dir); + } +} + +public func IsThreat() { return(Active); } \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/StringTblDE.txt new file mode 100644 index 00000000..5cb4ef4d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +TurnOff=Ausschalten +TurnOn=Anschalten +Repair=Reparieren diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/StringTblUS.txt new file mode 100644 index 00000000..45faf262 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Sentry Gun.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +TurnOff=Turn On +TurnOn=Turn Off +Repair=Repair diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/ActMap.txt new file mode 100644 index 00000000..c47e5b35 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/ActMap.txt @@ -0,0 +1,47 @@ +[Action] +Name=Activate +Procedure=NONE +Facet=0,0,50,52 +Length=8 +Directions=1 +Delay=4 +Reverse=1 +NextAction=Activated + +[Action] +Name=Activated +Procedure=NONE +Facet=0,52,50,52 +Length=2 +Directions=1 +Delay=30 +StartCall=Activity +NextAction=Activated + +[Action] +Name=Deactivate +Procedure=NONE +Facet=0,0,50,52 +Length=8 +Directions=1 +Delay=4 +NextAction=Hold + +[Action] +Name=Beam +Procedure=NONE +Facet=0,52,50,52 +Length=10 +Directions=1 +Delay=4 +NextAction=DeBeam + +[Action] +Name=DeBeam +Procedure=NONE +Facet=0,52,50,52 +Length=10 +Directions=1 +Delay=4 +Reverse=1 +NextAction=Activated \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DefCore.txt new file mode 100644 index 00000000..e93b5bcc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=TELE +Version=4,9,8,2 +Name=Teleporter +Category=C4D_Structure +Width=50 +Height=52 +Offset=-25,-26 +Vertices=5 +VertexX=0,26,-26,-25,25 +VertexY=0,24,24,-24,-24 +VertexCNAT=64 +VertexFriction=0,100,100,100,100 +Value=200 +Mass=700 +Components=METL=6 +Picture=500,0,64,64 +Entrance=-8,-9,16,32 +Rotate=1 +RotatedEntrance=1 +NoStabilize=1 +RotatedSolidmasks=1 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DescDE.txt new file mode 100644 index 00000000..0a458316 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DescDE.txt @@ -0,0 +1 @@ +Der Teleporter. Gut um sich einen langen Fußweg zu ersparen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DescUS.txt new file mode 100644 index 00000000..16707e08 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/DescUS.txt @@ -0,0 +1 @@ +The teleporter. Good to avoid a long way on foot. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Graphics.png new file mode 100644 index 00000000..7ce93b53 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Names.txt new file mode 100644 index 00000000..f5560625 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Teleporter +US:Teleporter \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Script.c new file mode 100644 index 00000000..f86f9a4e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/Script.c @@ -0,0 +1,251 @@ +/*-- Teleporter --*/ +// Newton: einiges erneuert in Hazard 2.1 + +#strict 2 + +local pCurrentTarget; //Zweiter Teleporter (Ziel) +local pLight; +local isPrivate; + +func Initialize() +{ + SetAction("Activated"); + SetEntrance(0); + isPrivate = false; + + pLight = AddLight(100,RGBa(100,220,255)); +} + +func ActivateEntrance(object clonk) +{ + SetCommand(clonk, "None"); + if(GetAction() != "Activated") + { + PlayerMessage(clonk->GetOwner(), "$Inactive$", this); + return; + } + CheckBeam(clonk); +} + +func CheckBeam(object clonk) +{ + // Haben wir ein Ziel? + if(!pCurrentTarget) + { + Sound("Error"); + if(clonk) PlayerMessage(clonk->GetOwner(), "$NoTarget$", this); + return; + } + // Ziel nicht aktiv? + if(pCurrentTarget->GetAction() != "Activated") + { + Sound("Error"); + if(clonk) PlayerMessage(clonk->GetOwner(), "$TargetInactive$", this); + return; + } + BeamObjects(); +} + +func BeamObjects() +{ + for(var clonk in FindObjects(Find_InRect(-11, -13, 22, 43), + Find_NoContainer(), + Find_Not(Find_Category( C4D_Structure | C4D_StaticBack | C4D_Vehicle)), + Find_Exclude(this))) + { + Beam(clonk, pCurrentTarget); + SetAction("Beam"); + } +} + +global func Beam(object clonk, object target, int x, int y) +{ + if(!clonk) return; + + AddEffect("Beam", clonk, 180, 1, 0, TELE, target, x, y); +} + +func Activity() +{ + //Tolle Effekte bitte hierher. + // kk! + var x,y,xdir,ydir; + for(var i = -7; i < 9; i += 3) + { + x = Cos(GetR()+90+i, 23); + y = Sin(GetR()+90+i, 23); + xdir = -x/3; + ydir = -y/3; + CreateParticle("PSpark", x, y, xdir, ydir, 50, RGB(152, 209, 210)); + } +} + +private func CreateBeamSpark(int x, int y, int width, int height) +{ + x = RandomX( x - width / 2, x + width / 2); + y = RandomX( y - height / 2, y + height / 2); + + CreateParticle("LsrSprk",x,y,0,-2,170,RGBa(188, 127, 220, 50)); +} + +public func FxBeamEffect(string name, object target) +{ + if(name == "Beam") return -1; +} + +public func FxBeamStart(object target, int effectNumber, int temp, beamTo, x, y) +{ + if(temp) return; + + EffectVar(1, target, effectNumber) = GetClrModulation(target); // color modulation + EffectVar(2, target, effectNumber) = beamTo; // Objekt zu dem gebeamt wird + if(beamTo) + { + x = beamTo->GetX(); + y = beamTo->GetY() + target->GetObjHeight()/2; + } + EffectVar(3, target, effectNumber) = x; // [opt] x-Position zu der gebeamt wird (wenn Objekt = null) + EffectVar(4, target, effectNumber) = y; // [opt] y-Position zu der gebeamt wird (wenn Objekt = null) + Sound("DeEnergize"); + SetCommand(target, "None"); +} + +public func FxBeamStop(object target, int effectNumber, int reason, bool temp) +{ + if(temp || reason) return; + + var clrModulation = EffectVar(1, target, effectNumber); + var beamTarget = EffectVar(2, target, effectNumber); + var beamToX = EffectVar(3, target, effectNumber); + var beamToY = EffectVar(4, target, effectNumber); + + //Umsetzen und wiederherstellen + target->SetPosition(beamToX, beamToY); + target->SetClrModulation(clrModulation); +} + +public func FxBeamTimer(object target, int effectNumber, int time) +{ + //Ausfaden + var newVisibility = GetRGBaValue(target->GetClrModulation(), 0) + 5; + SetObjAlpha(newVisibility, target); + + //Scheinbar sind wir weg. :O + if(newVisibility > 230) return -1; + + var beamToX = EffectVar(3, target, effectNumber); + var beamToY = EffectVar(4, target, effectNumber); + + //Partikelwowowo! + for(var i = 0; i < Sqrt(time); ++i) + { + var width = target->GetObjWidth(); + var height = target->GetObjHeight(); + CreateBeamSpark(AbsX(target->GetX()), AbsY(target->GetY()), width, height); + CreateBeamSpark(AbsX(beamToX), AbsY(beamToY), width, height); + } +} + +func MenuSetTarget(id icon, object target) +{ + SetTarget(target); +} + +//Ziel setzen +func SetTarget(object target) +{ + if(target->GetID() != TELE) return false; + pCurrentTarget = target; + return true; +} + + +//Ziel bestimmen +func SearchTargets(object clonk) +{ + //Gibt es jemanden, der die Konsole bedient? + if(! clonk) return(0); + //Menü bauen + CreateMenu(HSGN, clonk, this()); + + var teleporters = FindObjects(Find_ID(TELE), + Find_Exclude(this), + Find_Not(Find_Func("IsPrivateTeleporter")), + Find_Not(Find_Hostile(GetOwner()))); + for(var teleporter in teleporters) + { + AddMenuItem("$ChooseTarget$", "MenuSetTarget", GetID(), clonk, 0, teleporter); + } + // Effekt für tolles Feature + AddEffect("TeleMenu", clonk, 101, 5, this, 0, teleporters); +} + +//Effekt zur Anzeige der Teleporter, die zur Auswahl stehen +func FxTeleMenuStart(object target, int no, int temp, array targets) +{ + if(temp) return; + EffectVar(0, target, no) = targets; +} + +func FxTeleMenuTimer(object target, int no) +{ + // Menü weg? + if(GetMenu(target) != HSGN) return -1; + + var i = GetMenuSelection(target); + SetPlrView(target->GetOwner(), EffectVar(0, target, no)[i]); +} + +//Konsolenkontrolle +public func ConsoleControl(int i) +{ + if(i == 1) return "$BeamMeUp$"; + if(i == 2) + { + if(GetAction() == "Deactivate") return "$TurnOn$"; + else return "$TurnOff$"; + } + if(i == 3) return "$SearchTarget$"; +} + +public func ConsoleControlled(int i, int clonkNum, int consoleNum) +{ + var clonk = Object(clonkNum); + + if(i == 1) CheckBeam(clonk); + if(i == 2) + { + if(GetAction() == "Deactivate") Activate(); + else Deactivate(); + } + if(i == 3 && clonk) SearchTargets(clonk); +} + +func Activate() { + SetAction("Activate"); + pLight->TurnOn(); +} + +func Deactivate() { + SetAction("Deactivate"); + pLight->TurnOff(); +} + +func IsPrivateTeleporter() { + return isPrivate; +} + +func SetPrivateTeleporter(bool private) +{ + isPrivate = private; +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (pCurrentTarget) + extra[GetLength(extra)] = ["SetTarget(Object(%d))", pCurrentTarget]; + if (GetAction() == "Activated") + extra[GetLength(extra)] = "Activate()"; +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/StringTblDE.txt new file mode 100644 index 00000000..9d527b1d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/StringTblDE.txt @@ -0,0 +1,8 @@ +NoTarget=Kein Zielteleporter angegeben +TargetInactive=Zielteleporter nicht aktiv +Inactive=Teleporter nicht aktiv +BeamMeUp=Beamen +TurnOn=Teleporter aktivieren +TurnOff=Teleporter deaktivieren +SearchTarget=Ziel eingeben +ChooseTarget=%s als Ziel wählen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/StringTblUS.txt new file mode 100644 index 00000000..b3c872da --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Teleporter.c4d/StringTblUS.txt @@ -0,0 +1,8 @@ +NoTarget=No target teleporter +TargetInactive= Target teleporter deactivated +Inactive=Teleporter deactivated +BeamMeUp=Beam +TurnOn=Activate teleporter +TurnOff=Deactivate teleporter +SearchTarget=Set target +ChooseTarget=Choose %s \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DefCore.txt new file mode 100644 index 00000000..d5645eeb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=WPVM +Version=4,9,8,2 +Name=Weapon Automat +Category=C4D_Structure +MaxUserSelect=10 +Timer=100 +TimerCall=Display +Width=48 +Height=40 +Offset=-24,-20 +Vertices=4 +VertexX=-23,-23,23,23 +VertexY=-19,19,-19,19 +VertexFriction=100,100,100,100 +Value=100 +Mass=240 +Components=WPVM=1 +Picture=0,0,48,40 +Grab=2 diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DescDE.txt new file mode 100644 index 00000000..0ecb6bc9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Automat, an dem man Waffen kaufen kann. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DescUS.txt new file mode 100644 index 00000000..0a30fae4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/DescUS.txt @@ -0,0 +1 @@ +A vending machine where you can buy weapons. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Graphics.png new file mode 100644 index 00000000..a778d9cf Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Names.txt new file mode 100644 index 00000000..835725d5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffenautomat +US:Weapons Automat \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Script.c b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Script.c new file mode 100644 index 00000000..b4fd9860 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Script.c @@ -0,0 +1,360 @@ +/*-- Waffenautomat --*/ + +#strict + +//tolle Waffenliste! +local aWare; +local aCount; + +func Initialize() { + aWare = CreateArray(); + aCount = CreateArray(); +} + +//Ware anzeigen +func Display() { + //haben wir überhaupt Ware? + if(!GetLength(aWare)) + return(SetGraphics(0,0,0,1)); + + var i = Random(GetLength(aWare)); + SetGraphics(0,this(),aWare[i],1,GFXOV_MODE_IngamePicture,0,1); + if(!aCount[i]) + SetClrModulation(RGB(150,100,100),0,1); + + SetObjDrawTransform(218,0,-16000,0,203,-6000,0,1); +} + +public func SortWare() { + if(GetLength(aWare) != GetLength(aCount)) + return(Log("Waffenautomat-PANICK. Den Devs melden!")); + + var length; + while(Par(length++)); + + var ware = CreateArray(), count = CreateArray(); + + //Nach Kategorie sortieren + for(var y = 0; y < length; y++) { + ware[y] = CreateArray(); + count[y] = CreateArray(); + for(var x = 0; x < GetLength(aWare); x++) { + if(DefinitionCall(aWare[x],Par(y))) { + AddToArray(ware[y],aWare[x]); + AddToArray(count[y],aCount[x]); + } + } + } + + //Nach Preis sortieren + for(var y = 0; y < length; y++) { + for(var x = 0; x < GetLength(ware[y]); x++) { + for(var z = x+1; z < GetLength(ware[y]); z++) { + if(GetDefValue(ware[y][z]) < GetDefValue(ware[y][x])) { + var tmp = ware[y][x]; + ware[y][x] = ware[y][z]; + ware[y][z] = tmp; + tmp = count[y][x]; + count[y][x] = count[y][z]; + count[y][z] = tmp; + } + } + } + } + + //Wieder sortiert ins Array tun + aWare = aCount = CreateArray(); + var cnt; + for(var y = 0; y < length; y++) { + for(var x = 0; x < GetLength(ware[y]); x++) { + aWare[cnt] = ware[y][x]; + aCount[cnt] = count[y][x]; + cnt++; + } + } + +} + +private func AddToArray(&a, add) { + a[GetLength(a)] = add; +} + + +/* Menüzeugs */ + +public func ControlDigDouble(object pByObj) { + if(!GetLength(aWare)) + return(0); + CreateBuyMenu(pByObj); +} + +protected func CreateBuyMenu(object pClonk) { + if(!pClonk) + return(0); + CreateMenu(WPVM, pClonk, this(),0,0,0,0,1); + for(var x; x < GetLength(aWare); x++) + AddBuyMenuItem(aWare[x], pClonk, aCount[x]); +} + +private func AddBuyMenuItem(id id, object pClonk, int iCount) { + //bei NoAmmo-Regel Munition nicht anzeigen + if(DefinitionCall(id,"IsAmmoPacket") && NoAmmo()) + return(); + + if(!id || !pClonk) + return(); + // noch mehr Variablen + var name = GetName(0,id), + obj = CreateObject(id), + wealth = GetDefValue(id), + iPlayer = GetOwner(pClonk), + bMoney = false; + + //Kann sich der Spieler die Waffe leisten? + if(GetWealth(iPlayer) < wealth || iCount == 0) { + name = Format("%s",name); + obj->SetClrModulation(RGB(100,100,100)); + bMoney = true; + } + + //Hiermit können andere sachen, die den Waffenautomaten includen, noch Grafisches Zeugs mit den Icons machen + this()->~AdaptMenuItem(obj, iPlayer); + + //hinzufügen + if(!iCount) + AddMenuItem(Format("%3d$: %s",wealth,name),"BuyItem",id,pClonk,0,pClonk,GetDesc(0,id),4|C4MN_Add_ForceCount, obj); + else if(bMoney) + AddMenuItem(Format("%3d$: %s",wealth,name),"BuyItem",id,pClonk,0,pClonk,GetDesc(0,id),4, obj); + else if(iCount < 0) + AddMenuItem(Format("%3d$: %s",wealth,name),"BuyItem",id,pClonk,0,pClonk,GetDesc(0,id),4, obj); + else + AddMenuItem(Format("%3d$: %s",wealth,name),"BuyItem",id,pClonk,iCount,pClonk,GetDesc(0,id),4, obj); + + RemoveObject(obj); //Hilfsobjekt löschen +} + +//Kaufbar? +public func BuyAble(id Item, int Plr) { + //genug Geld? + if(GetWealth(Plr) < GetDefValue(Item)) + return(false); + if(GetWareCount(Item) == 0) + return(false); + return(true); +} + +private func BuyItem(id Item, object pClonk) { + var iPlr = GetOwner(pClonk); + + if(!DoBuyItem(Item, iPlr, pClonk)) + { + Sound("Error",0,0,0,iPlr+1); + return; + } + Sound("Cash",0,0,0,iPlr+1); + + var sel = GetMenuSelection(pClonk); + CloseMenu(pClonk); + CreateBuyMenu(pClonk); + SelectMenuItem(sel,pClonk); +} + +public func DoBuyItem(id Item, int iPlr, object pClonk) +{ + //kaufbar? + if(!BuyAble(Item,iPlr)) return false; + + //Objekt erzeugen + var tmp = CreateObject(Item,0,0,GetOwner(pClonk)); + //einsammelbar? + if(pClonk->~RejectCollect(Item,tmp)) { + RemoveObject(tmp); + //nein. :( + return false; + } + //Kaufen! + else + { + //Waffe? + if(tmp->~IsWeapon()) + //n bisschen Muni gibts gratis dazu! + tmp->DoAmmo(tmp->GetFMData(FM_AmmoID), tmp->GetFMData(FM_AmmoLoad)); + + Enter(pClonk,tmp); + } + + //Geld abziehn + DoWealth(iPlr,-GetDefValue(Item)); + + DoWare(Item, -1); + + return true; +} + + + + + + + + +/* Warenhandling-Funktionen */ + +//Warenbestand ändern +public func DoWare(id ID, int iChange) { + //Ware nicht im Angebot? + if(!FindWare(ID)) + return(false); + if(!ID) { + for(var ware in aWare) + ChangeWare(ware,iChange); + } + else + ChangeWare(GetWare(ID),iChange); +} + +//nur eine interne Funktion, die die Ware dann wirklich ändert +//Damit man den Check nicht immer schreiben muss +private func ChangeWare(int iIndex, int iChange) { + //Ware ist unendlich oft verfügbar? + if(aCount[iIndex] < 0) + return(); //nichts tun. + + aCount[iIndex] += iChange; + //Anzahl < 0? + if(aCount[iIndex] < 0) + //Anzahl auf 0 setzen + //sonst wäre die Ware ja auf einmal unendlich oft zu haben. + aCount[iIndex] = 0; +} + +//Ware hinzufügen +public func AddWare(id ID, int iCount) { + //keine ID angegeben? + if(!ID) + //nix tun + return(false); + //Ware schon im Angebot? + if(FindWare(ID)) + //nix tun + return(false); + + //Anzahl-Parameter checken + if(iCount < -1) + iCount = -1; + + //Ware hinzufügen + AddToArray(aWare, ID); + AddToArray(aCount,iCount); +} + +//Alle Waren eines Typs hinzufügen +public func AddWares(string szCallback, int iCount) { + var id, defz; + //alle Definitionen durchgehn + while(id = GetDefinition(defz++)) { + //Objekt kann nicht gewählt werden? + if(DefinitionCall(id,"NoWeaponChoice")) + continue; //weiter + //Objekt ist vom richtigen Typ? + if(DefinitionCall(id,szCallback)) + AddWare(id,iCount); //hinzufügen. + } +} + +//Ware entfernen +public func RemoveWare(id ID) { + //wenn nichts angegeben, alles entfernen + if(!ID) { + aWare = aCount = CreateArray(); + return(true); + } + + if(!FindWare(ID)) + return(false); + + var x = GetWare(ID); + aWare[x] = 0; + aCount[x] = 0; + return(true); +} + +//Warenindex abfragen +private func GetWare(id ID) { + for(var x; x < GetLength(aWare); x++) + if(aWare[x] == ID) + return(x); + //haben wir nicht? -1 zurückgeben. + return(-1); +} + +//Anzahl einer Ware abfragen +public func GetWareCount(id ID) { + for(var x; x < GetLength(aWare); x++) + if(aWare[x] == ID) + return(aCount[x]); +} + +//Warenliste abfragen +public func GetWareList() { + return(aWare); +} + +// Waren nach Kategorie abfragten +public func GetWares(string szCallback) +{ + var ret = CreateArray(); + for(var x; x < GetLength(aWare); x++) + if(DefinitionCall(aWare[x], szCallback)) + ret[GetLength(ret)] = aWare[x]; + return ret; +} + +public func GetBuyableWaresFor(string szCallback, int player) +{ + var aWaresAll = GetWares(szCallback); + var aWares = CreateArray(); + for(var ware in aWaresAll) + if(GetWealth(player) >= GetValue(0, ware)) + aWares[GetLength(aWares)] = ware; + return aWares; +} + +//bestimmte Ware auf bestimmten Wert setzen. Oder alle. +public func SetWare(id id, int iCount) { + for(var x; x < GetLength(aWare); x++) + if(!id || id == aWare[x]) + aCount[x] = iCount; +} + +private func FindWare(id ID) { + for(var x in aWare) + if(x == ID) + return(true); + + return(false); +} + +//Bei Aufsammlung zur Warenliste hinzufügen +func RejectCollect(id id, object pObj) { + if(FindWare(id)) + return(RemoveObject(pObj)); + AddWare(id, 0); +} + +public func Grabbed(object pByObject, bool fGrab) +{ + if(fGrab) + CreateBuyMenu(pByObject); + return(1); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetLength(aWare)) { + extra[GetLength(extra)] = Format("LocalN(\"aWare\")=%v", aWare); + extra[GetLength(extra)] = Format("LocalN(\"aCount\")=%v", aCount); + } +} diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/StringTblDE.txt new file mode 100644 index 00000000..870d3339 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/StringTblDE.txt @@ -0,0 +1,4 @@ +Weapons=Waffen +Ammo=Munition +Equipment=Ausrüstung +End=Bestätigen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/StringTblUS.txt new file mode 100644 index 00000000..140f997f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/StringTblUS.txt @@ -0,0 +1,4 @@ +Weapons=Weapons +Ammo=Ammo +Equipment=Equipment +End=Finish \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Title.png b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Title.png new file mode 100644 index 00000000..bbfed8a2 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Base.c4d/Weaponsmachine.c4d/Title.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/DescDE.txt new file mode 100644 index 00000000..e585052d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/DescDE.txt @@ -0,0 +1 @@ +Alles das was eigentlich nichts macht. diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/DescUS.txt new file mode 100644 index 00000000..a73ae354 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/DescUS.txt @@ -0,0 +1 @@ +All stuff that usually does nothing. diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DefCore.txt new file mode 100644 index 00000000..584b3259 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=FENC +Version=4,9,8,2 +Name=Fence +Category=C4D_StaticBack|C4D_Foreground +Width=64 +Height=48 +Offset=-32,-24 +Value=10 +Mass=65 +Components=METL=2 +Picture=0,48,64,64 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DescDE.txt new file mode 100644 index 00000000..f7d5dad8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DescDE.txt @@ -0,0 +1 @@ +Alles Sperrgebiet. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DescUS.txt new file mode 100644 index 00000000..f5001e0c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/DescUS.txt @@ -0,0 +1 @@ +This is a prohibited area. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/Graphics.png new file mode 100644 index 00000000..6bf8f667 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/Names.txt new file mode 100644 index 00000000..5e1a7813 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Fence.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Zaun +US:Fence \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Actmap.txt new file mode 100644 index 00000000..3c635fc2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Actmap.txt @@ -0,0 +1,14 @@ +[Action] +Name=Turn +Length=10 +Delay=2 +NextAction=Turn +Facet=0,0,64,64 + +[Action] +Name=RevTurn +Length=10 +Delay=2 +Reverse=1 +NextAction=RevTurn +Facet=0,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DefCore.txt new file mode 100644 index 00000000..1ae82db6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=MVNT +Version=4,9,8,2 +Name=Minivent +Category=C4D_StaticBack +Width=64 +Height=64 +Offset=-32,-32 +Picture=640,0,64,64 +StretchGrowth=1 +IncompleteActivity=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DescDE.txt new file mode 100644 index 00000000..f0712efe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DescDE.txt @@ -0,0 +1 @@ +Belüftet muffige Stationskomplexe. diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DescUS.txt new file mode 100644 index 00000000..d98b0385 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/DescUS.txt @@ -0,0 +1 @@ +Fresh air. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Graphics.png new file mode 100644 index 00000000..6bb84ef2 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Names.txt new file mode 100644 index 00000000..cf8d656c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lüftung +US:Ventilation \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Script.c new file mode 100644 index 00000000..9760f8cc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Minivent.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Ventilator --*/ + +#strict + +func Initialize() { + SetAction("Turn"); + return(1); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Names.txt new file mode 100644 index 00000000..d0d91c90 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Dekoration +US:Decoration diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/ActMap.txt new file mode 100644 index 00000000..bde1b933 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Radar +Delay=4 +Length=20 +Facet=0,0,46,50 +NextAction=Radar \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DefCore.txt new file mode 100644 index 00000000..06621a81 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=RADR +Version=4,9,8,2 +Name=Radar +Category=C4D_StaticBack +Width=46 +Height=50 +Offset=-23,-25 +Picture=0,50,64,64 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DescDE.txt new file mode 100644 index 00000000..f786b113 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DescDE.txt @@ -0,0 +1 @@ +Spürt den Feind auf. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DescUS.txt new file mode 100644 index 00000000..dc267fe9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/DescUS.txt @@ -0,0 +1 @@ +Detects enemy activities. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Graphics.png new file mode 100644 index 00000000..a7cf4880 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Names.txt new file mode 100644 index 00000000..2eaa5704 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Radar +US:Radar \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Script.c new file mode 100644 index 00000000..31b7320e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Radar.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- toller Radar --*/ + +#strict + +func Initialize() +{ + SetAction("Radar"); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/ActMap.txt new file mode 100644 index 00000000..98019e86 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/ActMap.txt @@ -0,0 +1,69 @@ +[Action] +Name=Black +NextAction=Krsl +Delay=30 +FacetBase=1 + +[Action] +Name=Krsl +NextAction=KrslB +Delay=5 +Facet=30,0,30,25 +Length=3 + +[Action] +Name=KrslB +NextAction=Drink +Delay=5 +Facet=30,0,30,25 +Length=3 +Reverse=1 + +[Action] +Name=Drink +NextAction=Super +Delay=15 +Facet=0,25,30,25 +Length=5 + +[Action] +Name=Super +NextAction=SuperBlink1 +Delay=50 +Facet=0,50,30,25 + +[Action] +Name=SuperBlink1 +NextAction=SuperBlink2 +Delay=5 +Facet=0,50,30,25 +Length=2 + +[Action] +Name=SuperBlink2 +NextAction=SuperBlink3 +Delay=5 +Facet=0,50,30,25 +Length=2 + +[Action] +Name=SuperBlink3 +NextAction=Krsl2 +Delay=5 +Facet=0,50,30,25 +Length=2 + +[Action] +Name=Krsl2 +NextAction=KrslB2 +Delay=5 +Facet=30,0,30,25 +Length=3 + +[Action] +Name=KrslB2 +NextAction=Black +Delay=5 +Facet=30,0,30,25 +Length=3 +Reverse=1 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DefCore.txt new file mode 100644 index 00000000..e4fd38d5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SCR4 +Version=4,9,8,2 +Name=AdvertisingScreen +Category=C4D_StaticBack +Width=30 +Height=25 +Offset=-15,-12 +Picture=0,50,30,25 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DescDE.txt new file mode 100644 index 00000000..f6364869 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DescDE.txt @@ -0,0 +1 @@ +Aktuelle Produktanpreisungen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DescUS.txt new file mode 100644 index 00000000..2d6e7173 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/DescUS.txt @@ -0,0 +1 @@ +Propaganda, nothing more. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Graphics.png new file mode 100644 index 00000000..4d9dbf18 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Names.txt new file mode 100644 index 00000000..bbdb9620 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Werbeschirm +US:Advertising screen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Script.c new file mode 100644 index 00000000..7eccc056 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Advertising.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Werbeschirm --*/ + +#strict + +func Initialize() { + SetAction("Black"); + AddFrame(); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/DefCore.txt new file mode 100644 index 00000000..6aec49f2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=FRME +Version=4,9,8,2 +Name=Frame +Category=C4D_StaticBack +Width=64 +Height=64 +Offset=-32,-32 +Picture=0,0,50,50 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Graphics.png new file mode 100644 index 00000000..abeb9b1a Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken1.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken1.png new file mode 100644 index 00000000..6127f352 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken1.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken2.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken2.png new file mode 100644 index 00000000..81d8a507 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken2.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken3.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken3.png new file mode 100644 index 00000000..25769bc0 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken3.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken4.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken4.png new file mode 100644 index 00000000..7481305d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBroken4.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBrokenEnd.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBrokenEnd.png new file mode 100644 index 00000000..9ff7e41e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBrokenEnd.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBrokenGlass.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBrokenGlass.png new file mode 100644 index 00000000..b8326ac5 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsBrokenGlass.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsFrame.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsFrame.png new file mode 100644 index 00000000..e9a7b657 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/GraphicsFrame.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Names.txt new file mode 100644 index 00000000..0e907863 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rahmen +US:Frame \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Script.c new file mode 100644 index 00000000..6518dc29 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Frame.c4d/Script.c @@ -0,0 +1,84 @@ +/*-- Rahmen --*/ + +#strict + +local smashed; +local width, height; + +global func AddFrame(object pObj) { + if(!pObj) + if(!(pObj = this())) + return(0); + var tmp = CreateObject(FRME,0,25,GetOwner(pObj)); + ScheduleCall(tmp,"Set",1,0,pObj); + return(tmp); +} + +global func RemoveFrame(object pObj) { + if(!pObj) + if(!(pObj = this())) + return(0); + var pFrame = pObj->FindObject(FRME, 1,1); + if(pFrame) RemoveObject(pFrame); +} + +protected func Initialize() { + SetClrModulation(RGBa(255,255,255,200)); + SetObjectBlitMode(GFX_BLIT_Additive); + SetGraphics("Frame", this(),GetID(),4,1); +} + +public func Set(object pTarget) { + // *1000/(51-2-3) => Normiert auf 1000 und Verhältnis Zielobjekt <-> Fenster ohne Rahmen + width = GetObjWidth(pTarget)*1000/56; + height = GetObjHeight(pTarget)*1000/56; + var width2 = GetObjWidth(pTarget)*1000/61; + var height2 = GetObjHeight(pTarget)*1000/61; + + SetShape((-32*width)/1000,(-32*height)/1000,(64*width)/1000,(64*height)/1000); + SetPosition(GetX(pTarget),GetY(pTarget)); + + SetObjDrawTransform(width, 0, 0, 0, height, 0 ,0, 0); + SetObjDrawTransform(width2, 0, 0, 0, height2, 0, 0, 4); +} + +/* Farbmodulationen */ + +public func PanelColor(int rgba) { // Frontscheibenmodulation + SetClrModulation(rgba); +} + +public func FrameColor(int rgba) { // Rahmenmodulation + SetClrModulation(rgba, 0, 4); +} + +// Schaden +protected func Damage() { + if(!smashed || (smashed < 3 && !Random(4))) + { + smashed++; + CastObjects(SPRK, 7, 50); + Sparks(15, RGB(120, 150, 135)); + Sound("CrystalHit*"); + + var graphic = Random(4)+1; + + SetGraphics(Format("%s%d","Broken",graphic),this(),GetID(),smashed,1,0, 1); + SetObjDrawTransform(width, 0,0,0, height,0,0,smashed); + } + if(GetDamage() >= 75) + { + smashed = 4; + CastParticles("SplinterGlass", 1, 35, RandomX(-20,20), -5, 20, 20, GetClrModulation(), GetClrModulation()); + Sound("CrystalHit*"); + + SetGraphics("BrokenGlass", this(),GetID(), 0,1,0, 1); + SetGraphics("BrokenEnd", this(),GetID(), 1,1,0, 1); + SetGraphics(0,0,0,2); + SetGraphics(0,0,0,3); + } +} + +/* Serialisierung */ + +public func NoSerialize() { return !false; } diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DefCore.txt new file mode 100644 index 00000000..ce4a29ff --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=MAPS +Version=4,9,8,2 +Name=Map Screen +Category=C4D_StaticBack +Timer=1 +TimerCall=ScreenLandscape +Width=2 +Height=2 +Offset=-1,-1 +Components=MAPS=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DescDE.txt new file mode 100644 index 00000000..79c624fe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DescDE.txt @@ -0,0 +1 @@ +Scannt die Landschaft. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DescUS.txt new file mode 100644 index 00000000..416ff940 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/DescUS.txt @@ -0,0 +1 @@ +Scans the landscape. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Graphics.png new file mode 100644 index 00000000..375ba923 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/MapDot.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/MapDot.c4d/Graphics.png new file mode 100644 index 00000000..e4002157 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/MapDot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/MapDot.c4d/Particle.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/MapDot.c4d/Particle.txt new file mode 100644 index 00000000..ed9bb61e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/MapDot.c4d/Particle.txt @@ -0,0 +1,9 @@ +[Particle] +Name=MapDot +MaxCount=10000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,1,1,-1,-1 +Delay=0 +AlphaFade=35 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Names.txt new file mode 100644 index 00000000..1bc25932 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kartenschirm +US:Map screen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Script.c new file mode 100644 index 00000000..49142e34 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/Script.c @@ -0,0 +1,111 @@ +/*-- Landkartenanzeiger --*/ + +#strict + +static const MAP_ZoomFactor = 10; + +static MAP_ScreenWidth, MAP_ScreenHeight; +static MAP_MasterScreen; + +local MapX, MapY, lClonk; + +protected func Initialize() +{ + // Erstmal warten + ScheduleCall(this(), "Initialized", 1); +} + +protected func Initialized() +{ + // Noch kein MasterScreen gesetzt? + if(!MAP_MasterScreen) + { + // Ich werde zum MasterScreen + MAP_MasterScreen = this(); + // Landschaftsmaße ermitteln + LandscapeWH(); + } + // MasterScreen belegt, diesen Bildschirm initialisieren + InitScreen(); + // Braucht eigentlich nur der MasterScreen + MapX = MAP_ZoomFactor / 2; + MapY = MAP_ZoomFactor / 2; +} + +/* Slave-Funktionen */ + +// Alles was der Bildschirm nur für sich macht + +private func InitScreen() +{ + // Größe anpassen + SetShape(-MAP_ScreenWidth/2, -MAP_ScreenHeight/2, MAP_ScreenWidth, MAP_ScreenHeight); + // Rahmen setzen + var pFrame = AddFrame(); + pFrame->PanelColor(RGBa(1,1,1,200)); + pFrame->FrameColor(RGBa(255,255,255)); + // Clonkanzeige setzen + ScheduleCall(this(), "ShowClonks", 1); +} + +private func ScreenLandscape() +{ + // MasterScreen weg? + if(!MAP_MasterScreen) + MAP_MasterScreen = this(); + // Bin ich der MasterScreen? + if(MAP_MasterScreen != this()) + return(); + // Alle vorhandenen Bildscbirme speichern + var screens = CreateArray(); + screens = FindObjects(Find_ID(GetID())); + // Drei Landschaftspixel scannen + for(var j=0,mat,matC ; j<3 ; j++) + { + mat = GetMaterial(AbsX(MapX), AbsY(MapY)); + matC = RGB(GetMaterialColor(mat, 1, 0), GetMaterialColor(mat, 1, 1), GetMaterialColor(mat, 1, 2)); + // An alle Bildschirme verteilen + for(var i=0 ; i < GetLength(screens) ; i++) + screens[i]->DrawPixel((MapX-MAP_ZoomFactor/2) / MAP_ZoomFactor, (MapY-MAP_ZoomFactor/2) / MAP_ZoomFactor, matC); + // MapX und MapY erhöhen + MapX += MAP_ZoomFactor; + if((MapX-MAP_ZoomFactor/2) / MAP_ZoomFactor > MAP_ScreenWidth) + { + MapX = MAP_ZoomFactor / 2; + MapY += MAP_ZoomFactor; + if((MapY-MAP_ZoomFactor/2) / MAP_ZoomFactor > MAP_ScreenHeight) + MapY = MAP_ZoomFactor / 2; + } + } +} + +public func DrawPixel(int iX, int iY, int Color) +{ + // Zeichnen + SetLandscapePixel(-MAP_ScreenWidth/2 + iX, -MAP_ScreenHeight/2 + iY, Color); +} + +protected func ShowClonks() +{ + // Neuen Clonk suchen + lClonk = FindObject(0,0,0,0,0, OCF_CrewMember(),0,0,0, lClonk); + if(lClonk) + { + // Clonkposition anzeigen + var iX = GetX(lClonk) / MAP_ZoomFactor; + var iY = GetY(lClonk) / MAP_ZoomFactor; + CreateParticle("MapDot", -MAP_ScreenWidth/2 + iX, -MAP_ScreenHeight/2 + iY, 0, 0, 10, GetColorDw(lClonk)); + } + // Nächsten anzeigen + ScheduleCall(this(), "ShowClonks", 2); +} + +/* Master-Funktionen */ + +// Führt nur der MasterScreen aus + +private func LandscapeWH() +{ + MAP_ScreenWidth = LandscapeWidth() / MAP_ZoomFactor; + MAP_ScreenHeight = LandscapeHeight() / MAP_ZoomFactor; +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/ScriptOld.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/ScriptOld.c new file mode 100644 index 00000000..1894b8ab --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/MapScreen.c4d/ScriptOld.c @@ -0,0 +1,143 @@ +/*-- Landkartenanzeiger --*/ + +#strict + +static const MAP_ZoomFactor = 10; + +static MAP_ScreenData; + +func Initialize() { +/* + //so, also, erstmal schaun wie wir das mit dem Masterscreen machen.. + if(!masterscreen) { //evtl. so? nein. +dooof! masterscreen = this(); //Ich bin der Master, harhar +hm, doch nicht so. return(SheduleCall(0,"Initialize",1)); //und das ganze Initializezeugs um 1 Frame verzögern + return(InitMasterscreen()); //aber so :D doch nicht.. + } +*/ + +//jetzt aber. + if(!MAP_ScreenData) + InitScreens(); +} + +private func InitScreens() { + var data; + + //Auskommentieren, damit man z.b. das ganze neu machen kann. (oder so) +// if(MAP_ScreenData) +// return(0); + + data = AddEffect("MapData",0,1); + if(!data) + return(Log("PANICK")); + + for(var z=0; z < LandscapeWidth()/MAP_ZoomFactor; z++) + EffectCall(0,data,"AddData",AddEffect("MapData",0,1)); + + for(var x=0; x < LandscapeWidth()/MAP_ZoomFactor; x++) + for(var y=0; y < LandscapeHeight()/MAP_ZoomFactor; y++) { + var r,g,b; + var mat=GetMaterial(x*MAP_ZoomFactor,y*MAP_ZoomFactor); + r=GetMaterialVal("Color", 0, mat, 0); + g=GetMaterialVal("Color", 0, mat, 1); + b=GetMaterialVal("Color", 0, mat, 2); + EffectCall(0,EffectVar(x,0,data),"AddData",RGB(r,g,b)); + } + MAP_ScreenData = data; + +} + +func Resize(int width, int height) { + SetShape(-width/2,-height/2,width,height); +} + + +/* Speichereffekt */ + +global func FxMapDataAddData(object pTarget, int iEffectNr, data) { + EffectVar(++EffectVar(0,pTarget, iEffectNr),pTarget,iEffectNr) = data; +} + +global func FxMapDataGetData(object pTarget, int iEffectNr, data) { + return(EffectVar(data-1,pTarget,iEffectNr)); +} + +/* auch doof. +global func FxMapDataEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber, data) { + Log("%s",szNewEffectName); + if(szNewEffectName S= "MapData") + return(-3); +} + +global func FxMaxDataAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer, data) { + Log("%s geaddet", SzNewEffectName); + EffectVar(0, pTarget, iEffectNumber)++; + EffectVar(EffectVar(0, pTarget, iEffectNumber), pTarget,iEffectNumber) = data; + return(1); +} +*/ +/* +local wdt, hgt, px, x, y; + +func Initialize() { + // Objekt zeichnen + // Ja. + px=10; + wdt=LandscapeWidth()/px; + hgt=LandscapeHeight()/px; + x=GetX(); + y=GetY(); + SetShape(-wdt/2, -hgt/2, wdt, hgt); + var i; + for(i = wdt; i>=0; --i) + SetLandscapePixel( -wdt/2+i-1, -hgt/2, RGB(0,0,1)); + for(i = wdt; i>=0; --i) + SetLandscapePixel( -wdt/2+i-1, hgt/2, RGB(255,255,255)); + for(i = hgt; i>=0; --i) + SetLandscapePixel( -wdt/2-1, -hgt/2+i, RGB(50,50,50)); + for(i = hgt; i>=0; --i) + SetLandscapePixel( wdt/2, -hgt/2+i, RGB(205,205,205)); + AddEffect("Map", this(), 1, 1, this()); + return(1); +} + +public func FxMapTimer(target, effect, time) +{ + SetPosition(x,y); + var i=EffectVar(0, this(), effect)++; + if(i == wdt-1) EffectVar(0, this(), effect)=0; + var color, r, g, b, mat, npx=EffectVar(0, this(), effect); + for(var j=hgt-1; j>0; --j) + { + if(GBackSemiSolid(-wdt/2+i, -hgt/2+j) && (GetMaterial(-wdt/2+i, -hgt/2+j) != Material("Vehicle"))) continue; + mat=GetMaterial(i*px-x, j*px-y); + r=GetMaterialVal("Color", 0, mat, 0); + g=GetMaterialVal("Color", 0, mat, 1); + b=GetMaterialVal("Color", 0, mat, 2); + r+=RandomX(-5,5); + g+=RandomX(-5,5); + b+=RandomX(-5,5); + r = Max(0, Min(r, 255)); + g = Max(0, Min(g, 255)); + b = Max(0, Min(b, 255)); + if(GBackSky(i*px-x, j*px-y) && MaterialName(mat) ne "Vehicle") + { + r=200; g=200; b=250; + } + if(FindObject(0, i*px-x, j*px-y), 0, 0, 0, 0, NoContainer()) + { + r=250; g=25; b=20; + } +// CreateParticle("MapDot", -wdt/2+i, -hgt/2+j, 0, 0, 10, RGB(r, g, b)); + SetLandscapePixel( -wdt/2+i, -hgt/2+j, RGB(r, g, b)); + SetLandscapePixel( -wdt/2+npx, -hgt/2+j, RGB(0, 255, 0)); + } +} + +func UpdateTransferZone() +{ + SetShape(-wdt/2, -hgt/2, wdt, hgt); +} + +*/ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Names.txt new file mode 100644 index 00000000..bc25f009 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bildschirme +US:Screens diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/ActMap.txt new file mode 100644 index 00000000..59505922 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/ActMap.txt @@ -0,0 +1,114 @@ +# Show Planet + +[Action] +Name=LoadPlanet +Procedure=NONE +NextAction=Planet +Delay=4 +Length=9 +Facet=0,0,60,40 + +[Action] +Name=Planet +Procedure=NONE +NextAction=BlinkPlanet +Delay=100 +Length=1 +Facet=480,0,60,40 + +[Action] +Name=BlinkPlanet +Procedure=NONE +NextAction=BlinkPlanet +EndCall=BlinkPlanet +Delay=15 +Length=2 +Facet=480,0,60,40 + + +# Show Europe + +[Action] +Name=LoadEurope +Procedure=NONE +NextAction=Europe +Delay=4 +Length=9 +Facet=0,40,60,40 + +[Action] +Name=Europe +Procedure=NONE +NextAction=BlinkEurope +Delay=100 +Length=1 +Facet=480,40,60,40 + +[Action] +Name=BlinkEurope +Procedure=NONE +NextAction=BlinkEurope +EndCall=BlinkEurope +Delay=15 +Length=2 +Facet=480,40,60,40 + + +# Show Mid Europe + +[Action] +Name=LoadMidEurope +Procedure=NONE +NextAction=MidEurope +Delay=4 +Length=9 +Facet=0,80,60,40 + +[Action] +Name=MidEurope +Procedure=NONE +NextAction=MidEurope +EndCall=Credits +Delay=20 +Length=1 +Facet=480,80,60,40 + +[Action] +Name=Matthi +Procedure=NONE +NextAction=MidEurope +Delay=100 +Length=1 +Facet=0,120,60,40 + +[Action] +Name=Newton +Procedure=NONE +NextAction=MidEurope +Delay=100 +Length=1 +Facet=60,120,60,40 + +[Action] +Name=Boni +Procedure=NONE +NextAction=MidEurope +Delay=100 +Length=1 +Facet=120,120,60,40 + +[Action] +Name=Clonko +Procedure=NONE +NextAction=MidEurope +Delay=100 +Length=1 +Facet=180,120,60,40 + +[Action] +Name=Raven +Procedure=NONE +NextAction=MidEurope +Delay=100 +Length=1 +Facet=240,120,60,40 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/DefCore.txt new file mode 100644 index 00000000..0ddf2956 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SCR2 +Version=4,9,8,2 +Name=Screen +Category=C4D_StaticBack +Width=60 +Height=40 +Offset=-30,-20 +Picture=480,0,60,40 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Graphics.png new file mode 100644 index 00000000..53405d70 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Names.txt new file mode 100644 index 00000000..747a352b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Radarschirm +US:Radar screen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Script.c new file mode 100644 index 00000000..66d64d37 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Planet.c4d/Script.c @@ -0,0 +1,41 @@ +/*-- Radarschirm --*/ + +#strict + +local bc, cc; + +func Initialize() { + Start(); + AddFrame(); +} + +func Start() { + SetAction("LoadPlanet"); + bc = 0; + cc = 0; +} + +func BlinkPlanet() { + if(++bc > 2) { + bc = 0; + SetAction("LoadEurope"); + } +} + +func BlinkEurope() { + if(++bc > 2) { + bc = 0; + SetAction("LoadMidEurope"); + } +} + +func Credits() { + if(cc == 0) SetAction("Matthi"); + if(cc == 1) SetAction("Newton"); + if(cc == 2) SetAction("Boni"); + if(cc == 3) SetAction("Clonko"); + if(cc == 4) SetAction("Raven"); + + if(cc == 5) Start(); + else ++cc; +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/ActMap.txt new file mode 100644 index 00000000..600e5810 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Animate +Procedure=NONE +NextAction=Animate +Delay=3 +Length=32 +Facet=0,0,40,40 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/DefCore.txt new file mode 100644 index 00000000..45d279e2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SCR1 +Version=4,9,8,2 +Name=Screen +Category=C4D_StaticBack +Width=40 +Height=40 +Offset=-20,-20 +Picture=0,0,40,40 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Graphics.png new file mode 100644 index 00000000..9762d401 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Names.txt new file mode 100644 index 00000000..747a352b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Radarschirm +US:Radar screen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Script.c new file mode 100644 index 00000000..3a26e07d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Radar.c4d/Script.c @@ -0,0 +1,13 @@ +/*-- Radarschirm --*/ + +#strict + +func Initialize() { + SetAction("Animate"); + SetClrModulation(RGB(0,255,0)); + + AddFrame(); + Local(0) = AddLight(75,-1); //Licht nur sicherheitshalber speichern, für Änderungen. + //falls die Farbe per Script erst nacher wo gesetzt wird + ScheduleCall(Local(0),"Init",1,0,0,-1); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/ActMap.txt new file mode 100644 index 00000000..8cd1befd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Animate +Procedure=NONE +NextAction=Animate +Delay=2 +Length=21 +Facet=0,0,40,20 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/DefCore.txt new file mode 100644 index 00000000..01856c9b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SCR3 +Version=4,9,8,2 +Name=Screen +Category=C4D_StaticBack +Width=40 +Height=20 +Offset=-20,-10 +Picture=0,0,40,20 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Graphics.png new file mode 100644 index 00000000..8a4e87a0 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Names.txt new file mode 100644 index 00000000..c75153d5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Textschirm +US:Text screen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Script.c new file mode 100644 index 00000000..b804b7a8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Screens.c4d/Text.c4d/Script.c @@ -0,0 +1,10 @@ +/*-- Textschirm --*/ + +#strict + +func Initialize() { + SetAction("Animate"); + SetClrModulation(RGB(0,255,0)); + + AddFrame(); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/DefCore.txt new file mode 100644 index 00000000..fd860ae1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=HSGN +Version=4,9,8,2 +Name=HazardSign +Category=C4D_StaticBack +Width=64 +Height=64 +Offset=-32,-32 +Picture=0,0,64,64 +StretchGrowth=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/Graphics.png new file mode 100644 index 00000000..deb845ec Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/Names.txt new file mode 100644 index 00000000..ed609de0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/HazardSign.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Gefahrenschild +US:Hazard sign diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Names.txt new file mode 100644 index 00000000..0692e908 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schilder +US:Signs diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DefCore.txt new file mode 100644 index 00000000..dd1bb47d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=ESGN +Version=4,9,8,2 +Name=Extinguishersign +Category=C4D_StaticBack +Width=19 +Height=19 +Offset=-8,-8 +Value=10 +Mass=3 +Components=METL=1 +Picture=0,0,19,19 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DescDE.txt new file mode 100644 index 00000000..39fabce1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DescDE.txt @@ -0,0 +1 @@ +Zeigt den Standort eines Feuerlöschers an. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DescUS.txt new file mode 100644 index 00000000..6f145936 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/DescUS.txt @@ -0,0 +1 @@ +Shows the location of a fire extinguisher. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/Graphics.png new file mode 100644 index 00000000..f969b79c Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/Names.txt new file mode 100644 index 00000000..ac06e138 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Signs.c4d/Sign-Extinguisher.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Feuerlöscherschild +US:Fire Extinguisher-Sign \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DefCore.txt new file mode 100644 index 00000000..a527dbf4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=STRP +Version=4,9,8,2 +Name=Stripe +Category=C4D_StaticBack +Width=8 +Height=8 +Offset=-4,-4 +Picture=0,0,8,8 +ColorByOwner=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DescDE.txt new file mode 100644 index 00000000..e1dcff03 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DescDE.txt @@ -0,0 +1 @@ +Dekorative Streifen für Wände. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DescUS.txt new file mode 100644 index 00000000..69bf25fd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/DescUS.txt @@ -0,0 +1 @@ +Decorative stripes for wall design. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Graphics.png new file mode 100644 index 00000000..3c696b8c Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Names.txt new file mode 100644 index 00000000..6b5c6bcb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Streifen +US:Stripe \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Overlay.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Overlay.png new file mode 100644 index 00000000..64cce4f9 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Overlay.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Script.c new file mode 100644 index 00000000..884a2bcb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Stripe.c4d/Script.c @@ -0,0 +1,32 @@ +/*-- Streifen --*/ + +#strict + +local width,dir; + +protected func Initialize() { + Set(100,RGB(200,200,200),Random(2)); +} + +public func Set(int iWidth, int iRGB, bool bDir) +{ + width = iWidth; + dir = !!bDir; + SetShape(-width/2, -4, width, 8); + var w = 1000*iWidth/8; + SetObjDrawTransform(w,(1+dir*-2)*1000,0,0,1000,0,0,0); + // Farbe + SetColorDw(iRGB); +} + +public func UpdateTransferZone() +{ + Set(width, GetClrModulation()); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%d,%d,%d)", width, GetColorDw(), dir); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Actmap.txt new file mode 100644 index 00000000..f71b777e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Actmap.txt @@ -0,0 +1,16 @@ +[Action] +Name=Turn +Length=20 +Delay=1 +NextAction=Turn +Facet=64,0,128,128 +Sound=VentLoop + +[Action] +Name=RevTurn +Length=20 +Delay=1 +Reverse=1 +NextAction=RevTurn +Facet=64,0,128,128 +Sound=VentLoop \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DefCore.txt new file mode 100644 index 00000000..bde05068 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=VENT +Version=4,9,8,2 +Name=Ventilator +Category=C4D_StaticBack +Width=128 +Height=128 +Offset=-64,-64 +Picture=0,0,64,64 +StretchGrowth=1 +IncompleteActivity=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DescDE.txt new file mode 100644 index 00000000..f0712efe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DescDE.txt @@ -0,0 +1 @@ +Belüftet muffige Stationskomplexe. diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DescUS.txt new file mode 100644 index 00000000..d98b0385 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/DescUS.txt @@ -0,0 +1 @@ +Fresh air. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Graphics.png new file mode 100644 index 00000000..fb25aadf Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Names.txt new file mode 100644 index 00000000..1d4b40c3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ventilator +US:Ventilator diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Script.c new file mode 100644 index 00000000..9760f8cc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Ventilator --*/ + +#strict + +func Initialize() { + SetAction("Turn"); + return(1); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/VentLoop.wav b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/VentLoop.wav new file mode 100644 index 00000000..6761af37 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Vent.c4d/VentLoop.wav differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/ActMap.txt new file mode 100644 index 00000000..b2b707b1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Window1 +Procedure=NONE +Directions=2 +FlipDir=1 +FacetBase=1 + + diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DefCore.txt new file mode 100644 index 00000000..18dddf63 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=WNDW +Version=4,9,6 +Name=Window +Category=8388609 +Width=70 +Height=91 +Offset=-35,-45 +Picture=0,0,70,91 + + + + diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DescDE.txt new file mode 100644 index 00000000..b05c3e68 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DescDE.txt @@ -0,0 +1 @@ +Lichtblicke für muffige Stationskomplexe. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DescUS.txt new file mode 100644 index 00000000..921d6c7a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/DescUS.txt @@ -0,0 +1 @@ +Bright spots in musty station complexes. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Graphics.png new file mode 100644 index 00000000..f15dafae Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Names.txt new file mode 100644 index 00000000..6259b07a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fenster +US:Window \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Script.c new file mode 100644 index 00000000..45c3d8c7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window.c4d/Script.c @@ -0,0 +1,28 @@ +/*-- Fenster --*/ + +#strict + +func Initialize() +{ + SetAction("Window1"); + SetDir(0); +} + +public func SetDir(int iDir) +{ + SetSolidMask(70, 91 * iDir, 70, 91, 0,0); + return _inherited(iDir); +} + +// Backward compatibility +public func Set(int iDir) +{ + SetDir(iDir); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%d)", GetDir()); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/ActMap.txt new file mode 100644 index 00000000..b2b707b1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Window1 +Procedure=NONE +Directions=2 +FlipDir=1 +FacetBase=1 + + diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DefCore.txt new file mode 100644 index 00000000..08d14fee --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=WND2 +Version=4,9,6 +Name=Window +Category=8388609 +Width=70 +Height=47 +Offset=-35,-24 +Picture=0,0,70,47 + + + + diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DescDE.txt new file mode 100644 index 00000000..b05c3e68 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DescDE.txt @@ -0,0 +1 @@ +Lichtblicke für muffige Stationskomplexe. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DescUS.txt new file mode 100644 index 00000000..921d6c7a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/DescUS.txt @@ -0,0 +1 @@ +Bright spots in musty station complexes. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Graphics.png new file mode 100644 index 00000000..be315d91 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Names.txt new file mode 100644 index 00000000..6259b07a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fenster +US:Window \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Script.c new file mode 100644 index 00000000..fb9b4f8c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/Window2.c4d/Script.c @@ -0,0 +1,8 @@ +#strict 2 +#include WNDW + +public func SetDir(int iDir) +{ + SetSolidMask(70, 47 * iDir, 70, 47, 0,0); + return _inherited(iDir); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/ActMap.txt new file mode 100644 index 00000000..59bb61e7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Be +Procedure=NONE +FacetBase=1 +Directions=2 +FlipDir=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DefCore.txt new file mode 100644 index 00000000..5b8d9acb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=X5ST +Version=4,9,8,2 +Name=X5 Station +Category=C4D_StaticBack +Width=572 +Height=356 +Offset=-286,-187 +TopFace=0,356,232,114,168,242 +Picture=372,356,200,150 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DescDE.txt new file mode 100644 index 00000000..acf7e711 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DescDE.txt @@ -0,0 +1 @@ +Bei Explosion bitte genau danebenstellen! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DescUS.txt new file mode 100644 index 00000000..d93d890d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/DescUS.txt @@ -0,0 +1 @@ +In case of explosion stand next to it please . \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Graphics.png new file mode 100644 index 00000000..660de073 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Names.txt new file mode 100644 index 00000000..148eac90 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Raketenabschussbasis +US:Rocket silo diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Script.c b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Script.c new file mode 100644 index 00000000..2aa916c9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/Script.c @@ -0,0 +1,63 @@ +/*-- Raketenabschussbasis --*/ + +#strict + + +func Initialize() +{ + SetAction("Be"); +} + +public func Init2(int iDir) { + + SetDir(iDir); + + var r = -2*(iDir==1)+1; + var light; + var x=-286+iDir*572, y=-187; + var c=RGBa(255,255,255,50); + + var rocket = CreateObject(X5RK,x+r*272,171,GetOwner()); + rocket->SetAction("Clamped"); + rocket->SetDir(iDir); + + light = AddLightCone(1000,c,this()); + light->ChangeOffset(x+r*21,y+79); + light->ChangeR(122*r); + light->ChangeSizeXY(3000,6000); + + light = AddLightCone(1000,c,this()); + light->ChangeOffset(x+r*168,y+196); + light->ChangeR(128*r); + light->ChangeSizeXY(3000,4000); + + light = AddLightCone(1000,c,this()); + light->ChangeOffset(x+r*166,y+74); + light->ChangeR(80*r); + light->ChangeSizeXY(3000,4000); + + light = AddLightCone(1000,c,this()); + light->ChangeOffset(x+r*391,y+108); + light->ChangeR(270*r); + light->ChangeSizeXY(4000,3000); + + light = AddLightCone(1000,c,this()); + light->ChangeOffset(x+r*414,y+213); + light->ChangeR(252*r); + light->ChangeSizeXY(5000,2000); + + // hinter der Rakete + //light = AddLightCone(1000,c,this()); + //light->ChangeOffset(x+r*345,y+213); + //light->ChangeR(270*r); + //light->ChangeSizeXY(2000,7000); + + +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetDir(%d)", GetDir()); +} diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/ActMap.txt new file mode 100644 index 00000000..49dacb80 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Clamped +Procedure=NONE +FacetBase=1 +Facet=0,395,112,22,23,115 +Directions=2 +FlipDir=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DefCore.txt new file mode 100644 index 00000000..9fb98e1c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=X5RK +Version=4,9,8,2 +Name=X5 Rakete +Category=C4D_Vehicle +Width=134 +Height=395 +Offset=-67,-197 +Vertices=2 +VertexX=-30,30 +VertexY=200,200 +Value=1000 +Mass=1000 +Picture=0,0,134,395 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DescDE.txt new file mode 100644 index 00000000..acf7e711 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DescDE.txt @@ -0,0 +1 @@ +Bei Explosion bitte genau danebenstellen! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DescUS.txt new file mode 100644 index 00000000..7df8fe75 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/DescUS.txt @@ -0,0 +1 @@ +In case of explosion place yourself aside please. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/Graphics.png new file mode 100644 index 00000000..8a215f66 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/Names.txt new file mode 100644 index 00000000..cd646111 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Deco.c4d/X5Station.c4d/X5.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Rakete +US:Rocket \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/DescDE.txt new file mode 100644 index 00000000..489a040c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/DescDE.txt @@ -0,0 +1 @@ +Alles was man so in einer Raumstation findet. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/DescUS.txt new file mode 100644 index 00000000..f4afa905 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/DescUS.txt @@ -0,0 +1 @@ +Everything that one can find in a space station. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DefCore.txt new file mode 100644 index 00000000..9cb86c17 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=BED2 +Version=4,9,8,2 +Name=Bed +Category=C4D_Vehicle +MaxUserSelect=2 +Width=45 +Height=37 +Offset=-23,-17 +Vertices=2 +VertexX=23,-23 +VertexY=17,17 +VertexFriction=50,50 +Value=45 +Mass=200 +Components=METL=5 +Picture=0,37,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DescDE.txt new file mode 100644 index 00000000..4358f430 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DescDE.txt @@ -0,0 +1 @@ +Auch Stationspersonal muss mal ein Nickerchen machen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DescUS.txt new file mode 100644 index 00000000..5e448fbd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/DescUS.txt @@ -0,0 +1 @@ +Even the stationcrew has to sleep for a little while. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Graphics.png new file mode 100644 index 00000000..76c3955e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Names.txt new file mode 100644 index 00000000..a7b62e70 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bett +US:Bed \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Script.c new file mode 100644 index 00000000..ce3df90a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Bed.c4d/Script.c @@ -0,0 +1,5 @@ +/*-- Bett --*/ + +#strict + +public func CanBeRecycled() { return(2); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/ActMap.txt new file mode 100644 index 00000000..2a131720 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Exist +Directions=2 +FlipDir=1 +Facet=0,0,10,15 +Delay=5 +NextAction=Exist +EndCall=CheckVertex diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DefCore.txt new file mode 100644 index 00000000..6ed9671e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DefCore.txt @@ -0,0 +1,23 @@ +[DefCore] +id=CHAB +Version=4,9,8,2 +Name=BurnedChair +Category=C4D_Vehicle +MaxUserSelect=3 +Width=10 +Height=15 +Offset=-5,-7 +Vertices=2 +VertexX=-5,5 +VertexY=7,7 +VertexFriction=100,100 +Value=1 +Mass=10 +Components=WOOD=2 +Picture=0,0,10,15 +BlastIncinerate=5 +Rebuy=1 +ConstructTo=CHAR +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DescDE.txt new file mode 100644 index 00000000..6b9c73c5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DescDE.txt @@ -0,0 +1 @@ +Zu wild gefeuert. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DescUS.txt new file mode 100644 index 00000000..730711dd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/DescUS.txt @@ -0,0 +1 @@ +The battle got out of hand. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/Graphics.png new file mode 100644 index 00000000..e294bb86 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/Names.txt new file mode 100644 index 00000000..a34e93ee --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Burned.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Stuhl +US:Chair diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DefCore.txt new file mode 100644 index 00000000..ee5974d0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DefCore.txt @@ -0,0 +1,24 @@ +[DefCore] +id=CHAR +Version=4,9,8,2 +Name=Chair +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=3 +Width=10 +Height=15 +Offset=-5,-7 +Vertices=3 +VertexX=-4,5,-5 +VertexY=-7,7,7 +VertexCNAT=4,10,9 +VertexFriction=20,100,100 +Value=4 +Mass=25 +Components=WOOD=2 +Picture=0,0,10,15 +BlastIncinerate=20 +BurnTo=CHAB +Rebuy=1 +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DescDE.txt new file mode 100644 index 00000000..244873d6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Stuhl! :D diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DescUS.txt new file mode 100644 index 00000000..2f8b74e7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/DescUS.txt @@ -0,0 +1 @@ +A chair! :D \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Graphics.png new file mode 100644 index 00000000..84a6714f Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Names.txt new file mode 100644 index 00000000..a34e93ee --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Stuhl +US:Chair diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Script.c new file mode 100644 index 00000000..0b430697 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Chair.c4d/Script.c @@ -0,0 +1,49 @@ +/*-- Stuhl --*/ + +#strict + +public func IsBulletTarget() { + if(!Random(3)) return(1); +} + +public func OnDmg(int iDmg, int iType) { + if(iType == DMG_Fire) { + return(-100); + } +} + +public func OnHit(int iDmg, int iType, object pFrom) { + if(iType == DMG_Fire) { + Incinerate(); + } +} + +protected func Damage() { + // Splittern + if(Random(2)) CastObjects(SLNT, 1, 50, RandomX(-18,18), RandomX(-5,1)); + Sound("WoodHit*"); + // Kaputtgehen + if(Inside(GetDamage(), 14, 19)) + { + CastObjects(SLNT, 1, 45, RandomX(-18,18), RandomX(-5,1)); + CastObjects(SLNT, 1, 45, RandomX(-18,18), RandomX(-5,1)); + Sound("CrateCrack"); + RemoveObject(); + } +} + +// Vertex-Fix +protected func Initialize() { SetAction("Exist"); } + +private func CheckVertex() { + var dir = GetDir()*2-1; + SetVertex(0, 0, 4*dir); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetDir() != 0) + extra[GetLength(extra)] = "SetDir(1)"; +} \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DefCore.txt new file mode 100644 index 00000000..57e5d5e1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=CLVB +Version=4,9,8,2 +Name=Vending Machine Burned +Category=C4D_Structure +Width=35 +Height=40 +Offset=-17,-20 +Vertices=2 +VertexX=-15,13 +VertexY=19,19 +VertexFriction=100,100 +Picture=0,0,35,40 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DescDE.txt new file mode 100644 index 00000000..f718d454 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DescDE.txt @@ -0,0 +1 @@ +Selbst die härtesten Clonks brauchten mal eine eisgekühlte Erfrischung! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DescUS.txt new file mode 100644 index 00000000..64008c33 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/DescUS.txt @@ -0,0 +1 @@ +Even the toughest clonks needed an iced refreshment from time to time! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Graphics.png new file mode 100644 index 00000000..5ade07c7 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Names.txt new file mode 100644 index 00000000..2b65e86c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Verbrannter Clonk-Automat +US:Burned clonk automat diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Script.c new file mode 100644 index 00000000..7afeda81 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Burned.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- kaputter Automat --*/ + +#strict + +protected func Incineration() +{ + Extinguish(); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/CokeCrash.wav b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/CokeCrash.wav new file mode 100644 index 00000000..ca62c760 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/CokeCrash.wav differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DefCore.txt new file mode 100644 index 00000000..5f32f953 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=CLVM +Version=4,9,8,2 +Name=Vending machine +Category=C4D_Structure +Width=30 +Height=40 +Offset=-15,-20 +Vertices=2 +VertexX=-15,13 +VertexY=19,19 +VertexFriction=100,100 +Picture=0,40,64,64 +BlastIncinerate=100 +BurnTo=CLVB diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DescDE.txt new file mode 100644 index 00000000..c2c33f89 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DescDE.txt @@ -0,0 +1 @@ +Selbst die härtesten Clonks brauchen mal eine eisgekühlte Erfrischung! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DescUS.txt new file mode 100644 index 00000000..585ef37c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/DescUS.txt @@ -0,0 +1 @@ +Even the toughest clonks need an iced refreshment from time to time! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Graphics.png new file mode 100644 index 00000000..ded25ec3 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Names.txt new file mode 100644 index 00000000..9df7bbe0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Clonk-Automat +US:Clonk automat diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Script.c new file mode 100644 index 00000000..b20c8551 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Script.c @@ -0,0 +1,30 @@ +/*-- Automat --*/ + +#strict + +local broken; + +/* Was so passieren kann */ + +public func EMPShock() +{ + if(broken) return(); + // Viele bunte Dosen! + Schedule(Format("CreateParticle(\"Tin\", -5, 12, RandomX(-10, 10), -1, 30, %d);", TinColour()), 2, 10, this()); + Schedule("CastObjects(SPRK, 1, 15, RandomX(-10, 10), RandomX(-15, 15));", 3, 15, this()); + Sound("CokeCrash"); + Sound("FreezerLoop", 0,0,0,0, -1); + SetClrModulation(RGB(100,100,100)); + broken = true; + return(1); +} + +/* Status */ + +public func IsMachine() { return(true); } // Für EMP + +public func TinColour() { return(RGB(255, 25, 25)); } + +public func IsCraneGrabable() { return(true); } + +public func CanBeRecycled() { return(2); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Graphics.png new file mode 100644 index 00000000..459cc31f Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Names.txt new file mode 100644 index 00000000..3ef75196 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Dose +US:Tin \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Particle.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Particle.txt new file mode 100644 index 00000000..0e44939c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Coke.c4d/Tin.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=Tin +MaxCount=150 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +CollisionFn=Stop +Face=0,0,6,6,-3,-3 +Delay=0 +RByV=1 +GravityAcc=100 +VertexCount=1 +VertexY=50 +AlphaFade=10 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/ActMap.txt new file mode 100644 index 00000000..a59f9a1f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/ActMap.txt @@ -0,0 +1,31 @@ +[Action] +Name=Exist1 +Directions=1 +Length=1 +Facet=0,0,16,15 +NextAction=Hold + +[Action] +Name=Exist2 +Directions=1 +Length=1 +Facet=30,0,16,15 +NextAction=Hold + +[Action] +Name=Broken1 +Directions=1 +Length=1 +Facet=15,0,16,15 +ObjectDisabled=1 +NoOtherAction=1 +NextAction=Hold + +[Action] +Name=Broken2 +Directions=1 +Length=1 +Facet=45,0,16,15 +ObjectDisabled=1 +NoOtherAction=1 +NextAction=Hold diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DefCore.txt new file mode 100644 index 00000000..23c8822b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=LCOM +Version=4,9,8,2 +Name=Commode +Category=C4D_StaticBack +MaxUserSelect=10 +Width=16 +Height=15 +Offset=-8,-7 +Vertices=4 +VertexX=8,-8,8,-8 +VertexY=7,7,-7,-7 +VertexFriction=100,100,100,100 +Value=8 +Mass=10 +Components=WOOD=3 +Picture=0,15,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DescDE.txt new file mode 100644 index 00000000..bf5c3b9c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DescDE.txt @@ -0,0 +1 @@ +Auch emsige Forscher brauchen Platz um ihren ganzen Krams zu lagern. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DescUS.txt new file mode 100644 index 00000000..f10f880c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/DescUS.txt @@ -0,0 +1 @@ +Even busy scientists need space to store all their stuff. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Graphics.png new file mode 100644 index 00000000..f51f3974 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Names.txt new file mode 100644 index 00000000..7e3fb649 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kommode +US:Dresser \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Script.c new file mode 100644 index 00000000..d8941438 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Commode.c4d/Script.c @@ -0,0 +1,39 @@ +/*-- Commode --*/ + +#strict + +local iAction; + +func Initialize() +{ + SetAction( Format("Exist%d", iAction = Random(2) + 1)); + SetDir(Random(2)); +} + +public func OnHit(int iDmg, int iType, object pFrom) { + if(GetDamage() > MaxDamage()) + { + SetAction( Format("Broken%d", iAction)); + return(true); + } +} + +public func OnDmg(int iDmg, int iType) +{ + if( iType == DMG_Explosion) + return(0); + else + return(100); +} + +public func MaxDamage() { return(30); } + +public func CanBeRecycled() { return(2); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetAction(\"%s\")",GetAction()); + extra[GetLength(extra)] = Format("SetDir(%d)",GetDir()); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DefCore.txt new file mode 100644 index 00000000..9b414296 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=FIEX +Version=4,9,8,2 +Name=Fire Extinguisher +Category=C4D_StaticBack +Width=10 +Height=12 +Offset=-5,-6 +Vertices=2 +VertexY=6,-6 +VertexFriction=30,30 +Value=10 +Mass=4 +Components=METL=1 +Picture=10,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DescDE.txt new file mode 100644 index 00000000..6f6cbc9e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DescDE.txt @@ -0,0 +1 @@ +Falls es mal brennt. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DescUS.txt new file mode 100644 index 00000000..693c6255 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/DescUS.txt @@ -0,0 +1 @@ +In case of a fire. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/Graphics.png new file mode 100644 index 00000000..188fda2b Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/Names.txt new file mode 100644 index 00000000..c05fb2fd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/FireExtinguisher.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Feuerlöscher +US:Fire Extingisher \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DefCore.txt new file mode 100644 index 00000000..6b1b9ad7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DefCore.txt @@ -0,0 +1,23 @@ +[DefCore] +id=GTBL +Version=4,9,8,2 +Name=Glasstable +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=5 +Width=48 +Height=12 +Offset=-24,-6 +Vertices=4 +VertexX=-23,23,-23,23 +VertexY=0,0,5,5 +VertexCNAT=5,6,9,10 +VertexFriction=100,100,20,20 +Value=5 +Mass=60 +Components=METL=2 +SolidMask=2,2,44,1,0,0 +Picture=0,12,64,64 +Rebuy=1 +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DescDE.txt new file mode 100644 index 00000000..7455e698 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Glastisch. Zerbricht gerne. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DescUS.txt new file mode 100644 index 00000000..473ec86d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/DescUS.txt @@ -0,0 +1 @@ +A glass table. Likes to be broken. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Glass.wav b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Glass.wav new file mode 100644 index 00000000..4ed4d839 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Glass.wav differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Graphics.png new file mode 100644 index 00000000..f9533c39 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Names.txt new file mode 100644 index 00000000..dc99206f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Glastisch +US:Glasstable diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Script.c new file mode 100644 index 00000000..ebebafde --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Glasstable.c4d/Script.c @@ -0,0 +1,27 @@ +/*-- Glasstisch --*/ + +#strict + +local smashed; + +public func IsBulletTarget(id id) { + if(id == HMIS) + return(0); + if(!smashed) return(!Random(3)); + else + return(0); +} + +protected func Damage() { + // Ist schon kaputt + if(smashed) return(); + // Zersplittern + Sound("Glass"); + for(var i = 0 ; i < 10 ; i++) + CastParticles("SplinterGlass", 1, 35, RandomX(-20,20), -5, 20, 20, RGBa(255,255,255,0), RGBa(255,255,255,0)); + // Glas kaputt + SetSolidMask(); + smashed = true; +} + +public func IsCraneGrabable() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/ActMap.txt new file mode 100644 index 00000000..f2097532 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/ActMap.txt @@ -0,0 +1,4 @@ +[Action] +Name=Open +Facet=0,30,25,30,0,0 +Length=6 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DefCore.txt new file mode 100644 index 00000000..f8cc383f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=LCKR +Version=4,9,8,2 +Name=Locker +Category=C4D_Vehicle +Width=15 +Height=30 +Offset=-7,-15 +Vertices=4 +VertexX=-7,-7,7,7 +VertexY=-14,14,-14,14 +VertexFriction=75,75,75,75 +Value=15 +Mass=40 +Components=METL=2 +Picture=0,60,64,64 +Grab=2 +GrabPutGet=C4D_GrabGet|C4D_GrabPut +Rotate=135 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DescDE.txt new file mode 100644 index 00000000..845e2379 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DescDE.txt @@ -0,0 +1 @@ +Enthält Sachen, kippt physikalisch korrekt um und ist toll. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DescUS.txt new file mode 100644 index 00000000..14ec62b4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/DescUS.txt @@ -0,0 +1 @@ +Contains stuff. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Graphics.png new file mode 100644 index 00000000..bb593df7 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Names.txt new file mode 100644 index 00000000..3ecf31d2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spind +US:Locker \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Script.c new file mode 100644 index 00000000..830e5833 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Locker.c4d/Script.c @@ -0,0 +1,42 @@ +/*-- Spind --*/ + +#strict +#include CHST + +func Damage(int iChange) { + if(GetAction() ne "Open") + SetAction("Open"); + + AddEffect("Opening",this(),50,1,this(),GetID(),Abs(iChange)); +} + +func FxOpeningStart(object pTarget, int iEffectNumber, int iTemp, int speed) { + EffectVar(0,pTarget,iEffectNumber) = speed; + EffectVar(1,pTarget,iEffectNumber) = 1; +} + +func FxOpeningTimer(object pTarget, int iEffectNumber, int iEffectTime) { + if(EffectVar(0,pTarget,iEffectNumber) < 15 && iEffectTime%(15-EffectVar(0,pTarget,iEffectNumber))) + return(); + var phase = pTarget->GetPhase(); + phase += Max(1,EffectVar(0,pTarget,iEffectNumber)/15)*EffectVar(1,pTarget,iEffectNumber); + if(phase > 5) { + EffectVar(1,pTarget,iEffectNumber) = -1; + phase = 5-phase%5; + } + if(phase < 0) { + EffectVar(1,pTarget,iEffectNumber) = 1; + phase = phase%5; + } + pTarget->SetPhase(phase); + if(--EffectVar(0,pTarget,iEffectNumber) <= 0) + return(-1); +} + +func Hit() +{ + // Bumpf + Sound("ClonkHit*"); +} + +public func IsCraneGrabable() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Names.txt new file mode 100644 index 00000000..00b33432 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Basis-Einrichtung +US:Base furniture diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DefCore.txt new file mode 100644 index 00000000..0fc10bf7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=SPVB +Version=4,9,8,2 +Name=Vending Machine Burned +Category=C4D_Structure +Width=35 +Height=40 +Offset=-17,-20 +Vertices=2 +VertexX=-15,13 +VertexY=19,19 +VertexFriction=100,100 +Picture=0,0,35,40 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DescDE.txt new file mode 100644 index 00000000..27f78253 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DescDE.txt @@ -0,0 +1 @@ +Super - war mal Clonks härteste Konkurrenz in der Limonadenindustrie. Selbstverständlich auch eisgekühlt! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DescUS.txt new file mode 100644 index 00000000..31dc2087 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/DescUS.txt @@ -0,0 +1 @@ +Super - was Clonk's toughest rival in the soft drink industry. Naturally iced, too! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Graphics.png new file mode 100644 index 00000000..258b5f1b Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Names.txt new file mode 100644 index 00000000..727ddb3e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Verbrannter Super-Automat +US:Burned super automat diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Script.c new file mode 100644 index 00000000..7afeda81 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Burned.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- kaputter Automat --*/ + +#strict + +protected func Incineration() +{ + Extinguish(); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DefCore.txt new file mode 100644 index 00000000..eccc7529 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=SPVM +Version=4,9,8,2 +Name=Vending machine +Category=C4D_Structure +Width=30 +Height=40 +Offset=-15,-20 +Vertices=2 +VertexX=-15,13 +VertexY=19,19 +VertexFriction=100,100 +Picture=0,40,64,64 +BlastIncinerate=100 +BurnTo=SPVB diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DescDE.txt new file mode 100644 index 00000000..09b6b709 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DescDE.txt @@ -0,0 +1 @@ +Super - Clonks härteste Konkurrenz in der Limonadenindustrie. Selbstverständlich auch eisgekühlt! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DescUS.txt new file mode 100644 index 00000000..13f9be99 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/DescUS.txt @@ -0,0 +1 @@ +Super - Clonk's toughest rival in the soft drink industry. Naturally iced, too! \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Graphics.png new file mode 100644 index 00000000..03d796b8 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Names.txt new file mode 100644 index 00000000..e73bee72 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Super-Automat +US:Super automat diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Script.c new file mode 100644 index 00000000..1f834d91 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Pepsi.c4d/Script.c @@ -0,0 +1,6 @@ +/*-- Automat --*/ + +#strict +#include CLVM + +public func TinColour() { return(RGB(25, 25, 255)); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/ActMap.txt new file mode 100644 index 00000000..69b5da0b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/ActMap.txt @@ -0,0 +1,17 @@ +[Action] +Name=Plant1 +Length=1 +Delay=1 +NextAction=Plant1 +FacetBase=1 +Facet=0,5,15,17,-5,-17 +EndCall=FadeOut + +[Action] +Name=Plant2 +Length=1 +Delay=1 +NextAction=Plant2 +FacetBase=1 +Facet=15,11,39,11,-16,-11 +EndCall=FadeOut \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DefCore.txt new file mode 100644 index 00000000..b245e7c2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=PLNT +Version=4,9,8,2 +Name=Plant +Category=C4D_Vehicle +Width=6 +Height=5 +Offset=-3,-2 +Vertices=3 +VertexX=0,1,-1 +VertexY=-2,2,2 +VertexFriction=100,100 +Value=25 +Mass=10 +Components=PLNT=1 +Picture=0,0,6,5 +Rotate=1 +UprightAttach=8 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DescDE.txt new file mode 100644 index 00000000..3c7d8130 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DescDE.txt @@ -0,0 +1 @@ +Wächst und gedeiht, wenn richtig gepflegt. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DescUS.txt new file mode 100644 index 00000000..b58de6ef --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/DescUS.txt @@ -0,0 +1 @@ +A small plant. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Graphics.png new file mode 100644 index 00000000..7093cb71 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/GraphicsBroken.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/GraphicsBroken.png new file mode 100644 index 00000000..c1022e3d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/GraphicsBroken.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Names.txt new file mode 100644 index 00000000..b62fb7b1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pflanze +US:Plant \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Graphics.png new file mode 100644 index 00000000..c13ff38e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Names.txt new file mode 100644 index 00000000..d162147a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Blumentopf +US:Pot \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Particle.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Particle.txt new file mode 100644 index 00000000..56bdb301 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Pot.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=HalfPot +MaxCount=200 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,6,6,-3,-3 +Delay=0 +GravityAcc=75 +RByV=1 +VertexCount=1 +AlphaFade=3 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Script.c new file mode 100644 index 00000000..5f2e2d15 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant.c4d/Script.c @@ -0,0 +1,42 @@ +/*-- Pflänzchen --*/ + +#strict + +local broken; + +func Initialize() { + var random = Random(PlantCount()); + SetAction(Format("Plant%d", random+1)); + return(1); +} + +func Damage() { + if(broken) return(); + broken = true; + + SetGraphics("Broken"); + SetRDir(RandomX(-10,10)); + SetSpeed(RandomX(-10,10),-20); + + CreateParticle("HalfPot", -2, 0, -10-Random(5), -2, 50, RGBa(255,255,255,0)); + CreateParticle("HalfPot", 2, 0, 10+Random(5), -2, 50, RGBa(255,255,255,0)); + + // lacks of a sound :'( +} + +protected func FadeOut() { + if(!broken) return(); + if(GetRGBaValue(GetClrModulation()) >= 255) return(RemoveObject()); + + SetClrModulation(RGBa(255,255,255, GetRGBaValue(GetClrModulation())+1)); +} + +// Anzahl Pflanzen +private func PlantCount() { return(2); } + +// Kann von Kugeln getroffen werden +public func IsBulletTarget(id def) { + if(broken) return(); + if(def->~NoDecoDamage()) return(); + return(Random(2)); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DefCore.txt new file mode 100644 index 00000000..6c943964 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=PLT2 +Version=4,9,8,2 +Name=Plant2 +Category=C4D_Vehicle +Width=30 +Height=50 +Offset=-15,-25 +Vertices=2 +VertexY=23,-23 +VertexFriction=100,100 +Value=50 +Mass=20 +Components=PLT2=1 +Picture=30,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DescDE.txt new file mode 100644 index 00000000..25536cff --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DescDE.txt @@ -0,0 +1 @@ +Richtig gepflegt. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DescUS.txt new file mode 100644 index 00000000..5060262f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/DescUS.txt @@ -0,0 +1 @@ +A big plant. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/Graphics.png new file mode 100644 index 00000000..f4ae0786 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/Names.txt new file mode 100644 index 00000000..b62fb7b1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Plant2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Pflanze +US:Plant \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/ActMap.txt new file mode 100644 index 00000000..1b5fd360 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Poster +Facet=0,0,46,38 +FacetBase=0 +Length=4 +Delay=0 +Directions=4 +NextAction=Hold diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DefCore.txt new file mode 100644 index 00000000..78dacf5d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=PSTR +Version=4,9,8,2 +Name=Poster +Category=C4D_StaticBack +Width=46 +Height=38 +Offset=-23,-19 +Picture=0,0,46,38 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DescDE.txt new file mode 100644 index 00000000..8ec83f5b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DescDE.txt @@ -0,0 +1 @@ +Jedermanns Wanddekoration. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DescUS.txt new file mode 100644 index 00000000..6e7ee56b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/DescUS.txt @@ -0,0 +1 @@ +Everybody's wall decoration. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Graphics.png new file mode 100644 index 00000000..7317150e Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Names.txt new file mode 100644 index 00000000..67595cb5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Poster +US:Poster \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Script.c new file mode 100644 index 00000000..01dc04db --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Poster.c4d/Script.c @@ -0,0 +1,31 @@ +/*-- Poster --*/ + +#strict + +protected func Initialize() +{ + SetAction("Poster"); +} + +public func SetRandom() +{ + // sind nur 15 Poster, nich 16 + // wenn Poster hinzugefüht werden, muss der Code hier verändert werden. :( + var y, x = Random(4); + if(x == 3) y = Random(3); + else y = Random(4); + Set(x,y); +} + +public func Set(int x, int y) +{ + SetPhase(x); + SetDir(y); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%d,%d)",GetPhase(),GetDir()); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DefCore.txt new file mode 100644 index 00000000..38af85f5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DefCore.txt @@ -0,0 +1,24 @@ +[DefCore] +id=TABB +Version=4,9,8,2 +Name=BurnedTable +Category=C4D_Vehicle +MaxUserSelect=5 +Width=36 +Height=11 +Offset=-18,-5 +Vertices=3 +VertexX=-18,18,-18 +VertexY=0,0,5 +VertexCNAT=5,6,9,10 +VertexFriction=100,100,20,20 +Value=1 +Mass=25 +Components=WOOD=2 +Picture=0,11,64,64 +BlastIncinerate=65 +Rebuy=1 +ConstructTo=TABL +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DescDE.txt new file mode 100644 index 00000000..6b9c73c5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DescDE.txt @@ -0,0 +1 @@ +Zu wild gefeuert. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DescUS.txt new file mode 100644 index 00000000..1a290553 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/DescUS.txt @@ -0,0 +1 @@ +This battle got out of hand. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/Graphics.png new file mode 100644 index 00000000..ae1c459c Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/Names.txt new file mode 100644 index 00000000..a9920877 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Burned.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Verbrannter Tisch +US:Burned table \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DefCore.txt new file mode 100644 index 00000000..615f1335 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DefCore.txt @@ -0,0 +1,25 @@ +[DefCore] +id=TABL +Version=4,9,8,2 +Name=Table +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=5 +Width=36 +Height=11 +Offset=-18,-5 +Vertices=4 +VertexX=-18,18,-18,18 +VertexY=0,0,5,5 +VertexCNAT=5,6,9,10 +VertexFriction=100,100,20,20 +Value=5 +Mass=50 +Components=WOOD=2 +SolidMask=0,0,36,1,0,0 +Picture=0,11,64,64 +BlastIncinerate=35 +BurnTo=TABB +Rebuy=1 +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DescDE.txt new file mode 100644 index 00000000..723f5d51 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Holztisch. Jemand hat die Worte "Hallo CN!" reingeschnitzt. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DescUS.txt new file mode 100644 index 00000000..0f60417c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/DescUS.txt @@ -0,0 +1 @@ +A wooden table. Someone carved out the words "CN <3 NS!". \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Graphics.png new file mode 100644 index 00000000..01779933 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Names.txt new file mode 100644 index 00000000..c1159827 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Tisch +US:Table diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Script.c new file mode 100644 index 00000000..854104a4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Base.c4d/Table.c4d/Script.c @@ -0,0 +1,36 @@ +/*-- Tisch --*/ + +#strict + +public func IsBulletTarget() { + return(Inside(Abs(GetR()),80,100)||Inside(Abs(GetR()),260,280)); +} + +public func OnDmg(int iDmg, int iType) { + if(iType == DMG_Fire) { + return(-100); + } +} + +public func OnHit(int iDmg, int iType, object pFrom) { + if(iType == DMG_Fire) { + Incinerate(); + } +} + +public func ControlDigDouble(object pByObj) { + SetR(85*(pByObj->GetR()*2 - 1)); + SetPosition(GetX(),GetY()-8); +} + +protected func Damage() { + Sound("WoodHit*"); + // Kaputtgehen + if(Inside(GetDamage(), 25, 34)) + { + Sound("CrateCrack"); + RemoveObject(); + } +} + +public func IsCraneGrabable() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/ActMap.txt new file mode 100644 index 00000000..7dddacd6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/ActMap.txt @@ -0,0 +1,30 @@ +[Action] +Name=Turn +Procedure=NONE +Facet=0,40,50,40 +Length=10 +Directions=1 +Delay=4 +NextAction=Turn + +[Action] +Name=TurnOn +Procedure=NONE +Length=10 +Directions=1 +Facet=0,0,50,40 +Delay=2 +StartCall=ActionOn +NextAction=Turn + +[Action] +Name=TurnOff +Procedure=NONE +Length=10 +Directions=1 +Facet=0,0,50,40 +Delay=2 +Reverse=1 +StartCall=ActionOff +NextAction=Hold + diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DefCore.txt new file mode 100644 index 00000000..e0258828 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=CGLO +Version=4,9,8,2 +Name=Globe +Category=C4D_Structure +MaxUserSelect=1 +Width=50 +Height=40 +Offset=-25,-20 +Vertices=2 +VertexX=-25,25 +VertexY=20,20 +VertexFriction=100,100 +Value=1000 +Mass=1200 +Components=METL=30 +Picture=500,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DescDE.txt new file mode 100644 index 00000000..04c57b49 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DescDE.txt @@ -0,0 +1 @@ +Für taktische Planungen für bevorstehende Einsätze. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DescUS.txt new file mode 100644 index 00000000..82299689 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/DescUS.txt @@ -0,0 +1 @@ +Used for tactical planning for important missions. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Graphics.png new file mode 100644 index 00000000..36b75dbf Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Names.txt new file mode 100644 index 00000000..2b0b7d81 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Projektor +US:Projector \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Script.c new file mode 100644 index 00000000..43fd8b98 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/Script.c @@ -0,0 +1,67 @@ +/*-- Projector --*/ + +#strict + +local Active; +local light; + +func Initialize() +{ + SetAction("Turn"); + Active = 1; + light = AddLightCone(100,RGBa(100,220,255,20)); + light->ChangeSizeXY(1000,300); + light->ChangeOffset(25,-16); +} + +public func ConsoleControl(int i) +{ + if(i == 1) + { + if(Active) return("$TurnOff$"); + else + return("$TurnOn$"); + } +} + +public func ConsoleControlled(int i) +{ + if(i == 1) + { + if(Active) + { + Active = 0; + SetAction("TurnOff"); + } + else + { + Active = 1; + SetAction("TurnOn"); + } + } +} + +public func ActionOn() +{ + Active = 1; + if(light) + light->TurnOn(); +} + +public func ActionOff() +{ + Active = 0; + if(light) + light->TurnOff(); +} + +public func IsMachine() { return(1); } +public func EMPShock() { return(ActionOff()); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (!Active) + extra[GetLength(extra)] = "ActionOff()"; +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/StringTblDE.txt new file mode 100644 index 00000000..01a18996 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +TurnOn=Projektor einschalten. +TurnOff=Projektor ausschalten. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/StringTblUS.txt new file mode 100644 index 00000000..8696f6f2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Globe.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +TurnOn=Turn on the projector. +TurnOff=Turn off the projektor. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Actmap.txt new file mode 100644 index 00000000..399c9260 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Actmap.txt @@ -0,0 +1,13 @@ +[Action] +Name=Move +Procedure=NONE +Length=20 +FacetBase=1 +Facet=0,55, 54,42, 22,1 + +[Action] +Name=Stand +Procedure=NONE +Length=20 +FacetBase=1 +Facet=0,55, 54,42, 22,1 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DefCore.txt new file mode 100644 index 00000000..681f513f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=MPPJ +Version=4,9,8,2 +Name=Map Projector +Category=C4D_Structure +MaxUserSelect=1 +Timer=5 +TimerCall=Move +Width=100 +Height=55 +Offset=-50,-27 +Vertices=4 +VertexX=-50,50,-50,50 +VertexY=-27,-27,27,27 +VertexFriction=100,100,100,100 +Value=100 +Mass=100 +Components=METL=12 +Picture=100,0,100,55 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DescDE.txt new file mode 100644 index 00000000..fc3638ac --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine Übersichtskarte des Planeten. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DescUS.txt new file mode 100644 index 00000000..3f367c2e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/DescUS.txt @@ -0,0 +1 @@ +A map of the planet. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Graphics.png new file mode 100644 index 00000000..875aa839 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Names.txt new file mode 100644 index 00000000..77e49a8a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kartenprojektor +US:Map Projector diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Script.c new file mode 100644 index 00000000..4347b683 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Map.c4d/Script.c @@ -0,0 +1,48 @@ +/*-- Kartenprojektor --*/ + +#strict + +local iNew; // Nächste Phase + +func Initialize() { + SetAction("Move"); + SetPhase(Random(20)); + return(1); +} + +func Move() +{ + if(GetAction() eq "Stand") return(); + var iPhase=GetPhase(); + if( iPhase != iNew) + SetPhase(BoundBy(iNew, iPhase-1, iPhase+1)); // Noch nicht da + else if(!Random(50)) // Hinbewegt: Irgendwann neues Ziel suchen. + iNew=Random(20); + CreateParticle("PSpark", RandomX(-26,22), RandomX(-18,9), 0, 0, Random(16)+15, RGB(200,255,255)); +} + +public func TurnOff() +{ + var phase = GetPhase(); + SetAction("Stand"); + SetPhase(phase); +} +public func TurnOn() +{ + var phase = GetPhase(); + SetAction("Move"); + SetPhase(phase); +} + +public func IsMachine() { return(1); } +public func EMPShock() { return(TurnOff()); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetAction() eq "Stand") { + extra[GetLength(extra)] = "SetAction(\"Stand\")"; + extra[GetLength(extra)] = Format("SetPhase(%d)", GetPhase()); + } +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Names.txt new file mode 100644 index 00000000..3fb56103 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kommandozentrale +US:Command Center diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DefCore.txt new file mode 100644 index 00000000..cad8fea4 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=CCP1 +Version=4,9,8,2 +Name=Panel +Category=C4D_Structure +MaxUserSelect=1 +Width=38 +Height=24 +Offset=-19,-12 +Vertices=2 +VertexY=11,-11 +VertexFriction=100,100 +Value=750 +Mass=800 +Components=METL=15 +Picture=0,24,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DescDE.txt new file mode 100644 index 00000000..2a9d4f5d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DescDE.txt @@ -0,0 +1 @@ +Für allerei Aufgaben einer Kommandozentrale. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DescUS.txt new file mode 100644 index 00000000..dc153048 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/DescUS.txt @@ -0,0 +1 @@ +Used to manage all jobs in the command center. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/Graphics.png new file mode 100644 index 00000000..1cd8fdc7 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/Names.txt new file mode 100644 index 00000000..217efb5f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel1.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Panel +US:Panel \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/ActMap.txt new file mode 100644 index 00000000..cb7eeab3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Broken +Facet=28,0,28,32 +Delay=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DefCore.txt new file mode 100644 index 00000000..8b495526 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=CCP2 +Version=4,9,8,2 +Name=Panel +Category=C4D_Structure +MaxUserSelect=1 +Width=28 +Height=32 +Offset=-14,-16 +Vertices=2 +VertexY=15,-13 +VertexFriction=100,100 +Value=750 +Mass=800 +Components=METL=15 +Picture=0,32,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DescDE.txt new file mode 100644 index 00000000..2a9d4f5d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DescDE.txt @@ -0,0 +1 @@ +Für allerei Aufgaben einer Kommandozentrale. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DescUS.txt new file mode 100644 index 00000000..dc153048 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/DescUS.txt @@ -0,0 +1 @@ +Used to manage all jobs in the command center. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Electrify.wav b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Electrify.wav new file mode 100644 index 00000000..e4501971 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Electrify.wav differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Graphics.png new file mode 100644 index 00000000..74c92b3c Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Names.txt new file mode 100644 index 00000000..217efb5f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Panel +US:Panel \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Script.c new file mode 100644 index 00000000..b932af0c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Command Center.c4d/Panel2.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- Panel --*/ + +#strict + +local broken; + +protected func Damage() +{ + if(GetDamage() > 20 && !broken) + { + SetAction("Broken"); + Sparkle(20); + Sound("Electrify"); + Schedule("CastObjects(SPRK, 1, 30);", 100, 10, this()); + broken = true; + } +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/CrateCrack.wav b/Hazard.c4d/Structural.c4d/Furniture.c4d/CrateCrack.wav new file mode 100644 index 00000000..c72d83d5 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/CrateCrack.wav differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/DescDE.txt new file mode 100644 index 00000000..1bd9a73c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/DescDE.txt @@ -0,0 +1 @@ +Feng-Shui für Anfänger und Fortgeschrittene. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/DescUS.txt new file mode 100644 index 00000000..fc104ee7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/DescUS.txt @@ -0,0 +1 @@ +Feng-Shui for beginners and advanced leaners. diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/ActMap.txt new file mode 100644 index 00000000..bab346a6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/ActMap.txt @@ -0,0 +1,20 @@ +[Action] +Name=Blink +Procedure=NONE +Facet=0,0,50,55 +Length=4 +Directions=2 +FlipDir=1 +Delay=10 +NextAction=Blink2 + +[Action] +Name=Blink2 +Procedure=NONE +Facet=50,0,50,55 +Length=2 +Directions=2 +FlipDir=1 +Delay=10 +Reverse=1 +NextAction=Blink diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DefCore.txt new file mode 100644 index 00000000..ad8fbe31 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=LBPC +Version=4,9,8,2 +Name=Laboratorycomputer +Category=C4D_Structure +Timer=36 +TimerCall=Spark +Width=50 +Height=55 +Offset=-25,-28 +Vertices=2 +VertexX=25,-25 +VertexY=27,27 +VertexFriction=100,100 +Value=3000 +Mass=1300 +Components=METL=6 +Picture=200,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DescDE.txt new file mode 100644 index 00000000..f3926413 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DescDE.txt @@ -0,0 +1 @@ +Für forschungstechnische Zwecke genutzt. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DescUS.txt new file mode 100644 index 00000000..f911ff11 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/DescUS.txt @@ -0,0 +1 @@ +Used for research. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Graphics.png new file mode 100644 index 00000000..7093bf1a Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Names.txt new file mode 100644 index 00000000..2594954a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Laborcomputer +US:Laboratorycomputer \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Script.c new file mode 100644 index 00000000..b9b0ac9a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Computer.c4d/Script.c @@ -0,0 +1,24 @@ +/*-- Computer --*/ + +#strict + +func Initialize() +{ + SetAction("Blink"); +} + +public func Spark() +{ + if(!Random(4)) + { + var pLaser = CreateObject(LASR, -13,-20, GetOwner()); + pLaser->Set(RandomX(75, 85), 15, 26, 8, pLaser, this()); + pLaser->SetClrModulation( RGB(114,194,255)); + } + if(!Random(4)) + { + var pLaser = CreateObject(LASR, 14,-28, GetOwner()); + pLaser->Set(RandomX(75, 85) + 180, 15, 26, 8, pLaser, this()); + pLaser->SetClrModulation( RGB(114,194,255)); + } +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/ActMap.txt new file mode 100644 index 00000000..e9978a79 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/ActMap.txt @@ -0,0 +1,52 @@ +[Action] +Name=Exist1 +Procedure=NONE +Directions=1 +Length=1 +FacetBase=1 +NextAction=Hold + +[Action] +Name=Exist2 +Procedure=NONE +Directions=1 +Length=1 +FacetBase=1 +Facet=25,7,7,6,5,6 +NextAction=Hold + +[Action] +Name=Exist3 +Procedure=NONE +Directions=1 +Length=1 +FacetBase=1 +Facet=34,6,9,7,10,6 +NextAction=Hold + +[Action] +Name=Exist4 +Procedure=NONE +Directions=1 +Length=1 +FacetBase=1 +Facet=45,7,7,7,13,6 +NextAction=Hold + +[Action] +Name=Exist5 +Procedure=NONE +Directions=1 +Length=1 +FacetBase=1 +Facet=25,6,17,7,5,6 +NextAction=Hold + +[Action] +Name=Exist6 +Procedure=NONE +Directions=1 +Length=1 +FacetBase=1 +Facet=33,6,17,7,7,6 +NextAction=Hold diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DefCore.txt new file mode 100644 index 00000000..5e9d69f9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=FRAM +Version=4,9,8,2 +Name=Frame +Category=C4D_StaticBack +MaxUserSelect=10 +Width=23 +Height=15 +Offset=-11,-7 +Vertices=4 +VertexX=11,11,-11,-11 +VertexY=-7,7,-7,7 +VertexFriction=100,100,100,100 +Value=5 +Mass=20 +Components=WOOD=3 +Picture=0,0,23,15 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DescDE.txt new file mode 100644 index 00000000..d64678cc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DescDE.txt @@ -0,0 +1 @@ +Für ein geordnetes Labor. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DescUS.txt new file mode 100644 index 00000000..d8d0762d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/DescUS.txt @@ -0,0 +1 @@ +For a clean and classified laboratory. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Graphics.png new file mode 100644 index 00000000..d696e59d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Names.txt new file mode 100644 index 00000000..c919be05 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Regal +US:Frame \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Script.c new file mode 100644 index 00000000..15cc93fc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Frame.c4d/Script.c @@ -0,0 +1,47 @@ +/*-- Frame --*/ + +#strict + +local i_Action; + +func Initialize() +{ + Set(Random(5)+1); +} + +public func Set(int i) +{ + i = BoundBy(i,1,5); + SetAction( Format("Exist%d", i_Action = i) ); +} + +public func Damage() +{ + if( i_Action != 1) + { + SetAction("Exist1"); + for(var i = 5; i < 17; i += 2) + { + if(Random(2)) CastParticles("SplinterGlass", 2, 35, i, RandomX(17, 13), 20, 20, RGBa(255,255,255,0), RGBa(255,255,255,0)); + } + Sound("Glass"); + + i_Action = 1; + } +} + +public func IsBulletTarget(id def) +{ + if(def->~NoDecoDamage()) return(); + if(i_Action != 1) + return(!Random(40)); + + return(0); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%d)", i_Action); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/ActMap.txt new file mode 100644 index 00000000..80d2d928 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/ActMap.txt @@ -0,0 +1,20 @@ +[Action] +Name=1 +Procedure=NONE +Facet=0,0,9,15 +Length=9 +Directions=1 +Delay=2 +NextAction=1 + +[Action] +Name=2 +Facet=0,15,11,18 +Length=1 +NextAction=2 + +[Action] +Name=3 +Facet=14,15,10,17 +Length=1 +NextAction=3 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DefCore.txt new file mode 100644 index 00000000..e80c8905 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=GADG +Version=4,9,8,2 +Name=Gadgets +Category=C4D_Vehicle +MaxUserSelect=1 +Width=8 +Height=14 +Offset=-4,-7 +Vertices=2 +VertexY=5,-5 +VertexFriction=100,100 +Value=20 +Mass=10 +Components=GADG=1 +Picture=0,15,10,17 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DescDE.txt new file mode 100644 index 00000000..e5c47738 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DescDE.txt @@ -0,0 +1 @@ +Deko-Objekt für verschiedenste Apparaturen \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DescUS.txt new file mode 100644 index 00000000..d75e8dba --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/DescUS.txt @@ -0,0 +1 @@ +Decoration objects for differents gadgets. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Graphics.png new file mode 100644 index 00000000..7e8b824a Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Names.txt new file mode 100644 index 00000000..10e4689e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Apparaturen +US:Gadgets \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Script.c new file mode 100644 index 00000000..8065048d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Gadgets.c4d/Script.c @@ -0,0 +1,71 @@ +/*-- Apparatur --*/ + +#strict + +protected func Initialize() { + // Ein zufällig Aussehen + Set(Random(GetActions())+1); + return(1); +} + +public func Set(int i) +{ + i = BoundBy(i,1,GetActions()); + Call(Format("Gadget%d", i)); +} + +// Anzahl verschiedener Daseinsformen +private func GetActions() { return(3); } + +/* Für jedes Aussehen setzen wir andere Werte */ + +protected func Gadget1() { + SetAction("1"); + SetVertexXY(0, -4, 7); + SetVertexXY(1, 4, 7); +} + +protected func Gadget2() { + SetAction("2"); + SetVertexXY(0, -9, 9); + SetVertexXY(1, 9, 9); +} + +protected func Gadget3() { + SetAction("3"); + SetVertexXY(0, -9, 8); + SetVertexXY(1, 9, 8); +} + +/* Treffer! */ + +public func IsBulletTarget(id def) { + if(def->~NoDecoDamage()) return(); + return(1); +} + +protected func Damage() { + // Viel Glas! + CastParticles("SplinterGlass", 5+Random(5), 50, 0,0, 20,25, RGBa(255,255,255), RGBa(255,255,255)); + // Flüssigkeiten + if(GetAction() ne "3") + { + if(Random(2)) CastPXS("Acid", 5+Random(10), 50); + if(Random(2)) CastPXS("DuroLava", 5+Random(10), 50); + } + // Rauch + CreateSmokeTrail(RandomX(15,20), Random(360), 0,0, this()); + CreateSmokeTrail(RandomX(15,20), Random(360), 0,0, this()); + // Sound + Sound("Glass"); + // Explosion oder Verschwinden + if(Random(2)) Explode(5+Random(5)); + else RemoveObject(); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("Set(%s)", GetAction()); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DefCore.txt new file mode 100644 index 00000000..dba95a30 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=GSBO +Version=4,9,8,2 +Name=GasBottle +Category=C4D_Vehicle +Width=10 +Height=21 +Offset=-5,-10 +Vertices=4 +VertexX=-3,3,-3,3 +VertexY=9,9,-9,-9 +VertexFriction=50,50,50,50 +Value=20 +Mass=50 +Components=METL=2 +Picture=10,0,64,64 +Grab=1 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DescDE.txt new file mode 100644 index 00000000..cd3d1f9a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DescDE.txt @@ -0,0 +1 @@ +Gas zum Mitnehmen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DescUS.txt new file mode 100644 index 00000000..f135e406 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/DescUS.txt @@ -0,0 +1 @@ +Gas to pick up. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Graphics.png new file mode 100644 index 00000000..b7cae885 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Names.txt new file mode 100644 index 00000000..038389d2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Gasflasche +US:Gas bottle \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Script.c new file mode 100644 index 00000000..0043c743 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasBottle.c4d/Script.c @@ -0,0 +1,76 @@ +/*-- Gasflasche --*/ + +#strict + +local damaged; + +protected func Damage() +{ + // Die geht schnell hoch + if(GetDamage() < 20) return(); + if(damaged) return(); + damaged = 1; + // Es gibt drei Explosionsmöglichkeiten + var rand = Random(3); + // 1 - viele Explosionen! + if(!rand--) + { + // TIM1 nicht geladen + if(!GetCategory(0, TIM1)) return(InstaExplode()); + // TIM1 ist geladen. Also kleine Bomben verteilen! + for(var i=0, tim ; i < 4 ; i++) + { + tim = CreateObject(TIM1, RandomX(-40, 40), RandomX(-30,30), -1); + Schedule(Format("Explode()", 15+Random(20)), 5 + Random(15), 0, tim); + } + // Und explodieren! + return(InstaExplode()); + } + // 2 - Explosion + Schleudern + if(!rand--) + { + InstaExplode(1); + SetSpeed(RandomX(-25,25), RandomX(-55,-30)); + SetRDir(RandomX(-10,10)); + if(!GetRDir()) SetRDir(2); + SetClrModulation(RGB(50,50,50)); + return(1); + } + // 3 - Raketenartig rumfliegen! + if(!rand) + { + Explode(20+Random(10), CreateObject(HSGN,0,0,-1)); + Incinerate(); + Sound("Inflame"); + Sound("Fire",0,0,0,0,1); + SpeedUp(); + return(1); + } +} + +private func InstaExplode(bool noRemove) +{ + // Effekte + CastParticles("Wave", 7+Random(5), RandomX(35,55), 0,0, 20,40, RGBa(150,150,200,50), RGBa(150,150,255,100)); + AddLightFlash(60, 0,0, RGBa(255,255,200,100)); + Sparks(7+Random(5), RGBa(255,255,150,100)); + // Explosion + Explode(25+Random(20), CreateObject(HSGN, 0,GetDefHeight(HSGN)/2, -1)); + if(noRemove) return(1); + // Weggehen + RemoveObject(); +} + +private func SpeedUp(int iTime) +{ + // aufhören + if(iTime > 80) { Sound("Fire",0,0,0,0,-1); return(InstaExplode()); } + // Losdüsen + SetR(GetR()+RandomX(-10,10)); + var xdir, ydir; + xdir = Sin(GetR(), 35); + ydir = -Cos(GetR(), 35); + SetSpeed(xdir, ydir); + Smoke(0,0,RandomX(5,15)); + ScheduleCall(this(), "SpeedUp", 1, 0, iTime+1); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DefCore.txt new file mode 100644 index 00000000..94786d57 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=GSTA +Version=4,9,8,2 +Name=GasTank +Category=C4D_Structure +Width=62 +Height=39 +Offset=-31,-19 +Vertices=6 +VertexX=-18,18,31,-31,19,21 +VertexY=19,19,0,0,-19,-19 +VertexFriction=100,100,100,100,100,100 +Value=100 +Mass=200 +Components=METL=3 +Picture=0,39,64,64 +BlastIncinerate=50 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DescDE.txt new file mode 100644 index 00000000..8d355f71 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DescDE.txt @@ -0,0 +1 @@ +Gefüllt mit explosivem Gas. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DescUS.txt new file mode 100644 index 00000000..37a91422 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/DescUS.txt @@ -0,0 +1 @@ +Filled with explosive gas. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Graphics.png new file mode 100644 index 00000000..aab7f382 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Names.txt new file mode 100644 index 00000000..93cbfc77 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Gastank +US:Gas tank \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Script.c new file mode 100644 index 00000000..9ae490f1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/GasTank.c4d/Script.c @@ -0,0 +1,38 @@ +/*-- Gastank --*/ + +#strict + +protected func Initialize() +{ + // Standardfärbung + SetColorDw(RGB(100,255,100)); +} + +protected func Incineration() +{ + /* Mächtiger Badabumm! */ + + // TIM1 nicht geladen + if(!GetCategory(0, TIM1)) return(InstaExplode()); + // TIM1 ist geladen. Also kleine Bomben verteilen! + for(var i=0, tim ; i < 7 ; i++) + { + tim = CreateObject(TIM1, RandomX(-80, 80), RandomX(-20,20), -1); + Schedule(Format("Explode()", 20+Random(20)), 25 + Random(25), 0, tim); + } + // Und explodieren! + return(InstaExplode()); +} + +private func InstaExplode() +{ + /* Viel Effekt */ + CastParticles("Wave", 7+Random(5), RandomX(35,55), 0,0, 30,60, RGBa(0,0,200,50), RGBa(20,20,255,100)); + CastParticles("Glas", 15+Random(5), 100, 0,0, 60,100, RGBa(200,200,200), RGBa(200,200,200)); + AddLightFlash(120, 0,0, RGBa(255,255,200,100)); + Sparks(7+Random(5), RGBa(255,255,150,100)); + /* Rauch und Explosionen! */ + return(Explode(50)); +} + +public func IsCraneGrabable() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/ActMap.txt new file mode 100644 index 00000000..6b7ef134 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/ActMap.txt @@ -0,0 +1,27 @@ +[Action] +Name=Full +Directions=2 +FlipDir=1 +Length=1 +Facet=0,0,22,45 +NextAction=Hold + +[Action] +Name=Empty +Directions=2 +Length=1 +FlipDir=1 +Facet=22,0,22,45 +NextAction=Hold + +[Action] +Name=Break +Directions=2 +FlipDir=1 +Length=1 +Facet=44,0,22,45 +Delay=1 +NextAction=Hold +NoOtherAction=1 +ObjectDisabled=1 + diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DefCore.txt new file mode 100644 index 00000000..5df8be02 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=GLST +Version=4,9,8,2 +Name=Glastube +Category=C4D_Structure +Width=22 +Height=45 +Offset=-11,-22 +Vertices=4 +VertexX=11,-11,11,-11 +VertexY=21,21,-18,-18 +VertexFriction=100,100,100,100 +Value=150 +Mass=100 +Components=METL=3 +Picture=0,45,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DescDE.txt new file mode 100644 index 00000000..e9aec8e9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DescDE.txt @@ -0,0 +1 @@ +Dient der Konservierung. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DescUS.txt new file mode 100644 index 00000000..3799107a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/DescUS.txt @@ -0,0 +1 @@ +For conservation. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Graphics.png new file mode 100644 index 00000000..fc12cb4b Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Names.txt new file mode 100644 index 00000000..20125544 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Glasröhre +US:Glas tube \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Script.c new file mode 100644 index 00000000..984b3221 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Glastube.c4d/Script.c @@ -0,0 +1,35 @@ +/*-- Glasröhre --*/ + +#strict + +local smashed; + +protected func Initialize() +{ + SetAction("Full"); + SetDir(Random(2)); +} + +public func Damage() +{ + if(GetDamage() > 25 && !smashed) + { + //Sound machen + Sound("Glass"); + SetAction("Break"); + for(var i = -15; i < 20; i += 2) + { + if(Random(2)) CastParticles("SplinterGlass", 2, 35, RandomX(-10,10), i, 20, 20, RGBa(255,255,255,0), RGBa(255,255,255,0)); + if(Random(2)) CastParticles("SplinterGlass", 2, 35, RandomX(-10,10), i, 20, 20, RGBa(255,255,255,0), RGBa(255,255,255,0)); + if(!Random(5)) CastPXS("DuroLava", 5+ Random(5), 20, 0, 0); + } + + smashed = true; + } +} + +public func IsBulletTarget(id def) { + if(smashed) return(); + if(def) if(def->~NoDecoDamage()) return(); + return(!Random(20)); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DefCore.txt new file mode 100644 index 00000000..585b6c67 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=LTBL +Version=4,9,8,2 +Name=Laboratorytable +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=40 +Height=19 +Offset=-20,-9 +Vertices=6 +VertexX=20,20,-20,-20,15,-15 +VertexY=9,-2,9,-2,-9,-9 +VertexFriction=20,100,20,100,100,100 +Value=10 +Mass=70 +Components=METL=2 +SolidMask=0,7,40,1,0,7 +Picture=0,19,64,64 +Rebuy=1 +Grab=1 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DescDE.txt new file mode 100644 index 00000000..ada06b6a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DescDE.txt @@ -0,0 +1 @@ +Ablage und Platz für allerlei Forschungen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DescUS.txt new file mode 100644 index 00000000..bd862100 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/DescUS.txt @@ -0,0 +1 @@ +Table to do reasearch. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/Graphics.png new file mode 100644 index 00000000..3b90327d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/Names.txt new file mode 100644 index 00000000..6f877bd8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Labtable.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Labortisch +US:Laboratorytable \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/ActMap.txt new file mode 100644 index 00000000..2c067107 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/ActMap.txt @@ -0,0 +1,37 @@ +[Action] +Name=Off +FacetBase=1 +Delay=1 +NextAction=Off + +[Action] +Name=Broken +FacetBase=1 +Facet=10,0,8,6,1,1 +Length=3 +Delay=0 +NextAction=Broken + +[Action] +Name=On1 +FacetBase=1 +Facet=10,6,8,6,1,1 +Delay=3 +Length=4 +NextAction=On1 + +[Action] +Name=On2 +FacetBase=1 +Facet=10,12,8,6,1,1 +Delay=2 +Length=8 +NextAction=On2 + +[Action] +Name=On3 +FacetBase=1 +Delay=50 +Length=0 +NextAction=On3 +StartCall=ChooseImage \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DefCore.txt new file mode 100644 index 00000000..2353c211 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=MONI +Version=4,9,8,2 +Name=Monitor +Category=C4D_Vehicle +MaxUserSelect=1 +Width=10 +Height=10 +Offset=-5,-5 +Vertices=5 +VertexX=0,-4,4,-4,4 +VertexY=0,4,4,-4,-4 +VertexFriction=0,50,50,50,50 +Value=50 +Mass=10 +Components=METL=1 +Picture=0,0,10,10 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DescDE.txt new file mode 100644 index 00000000..ed512ea8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DescDE.txt @@ -0,0 +1 @@ +Zeigt allerhand wichtiges Zeug. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DescUS.txt new file mode 100644 index 00000000..a47708e8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/DescUS.txt @@ -0,0 +1 @@ +Shows all kind of stuff. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Graphics.png new file mode 100644 index 00000000..65c732ce Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Names.txt new file mode 100644 index 00000000..4fa4e693 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Monitor +US:Monitor \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Script.c new file mode 100644 index 00000000..51cefaa3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Monitor.c4d/Script.c @@ -0,0 +1,94 @@ +/*-- Monitor --*/ + +#strict + +local pLight; + +protected func Initialize() { + SetAction("Off"); + pLight = AddLightAmbience(15); + pLight->TurnOff(); + return(1); +} + +public func On(int iAction) { + if(pLight) + pLight->TurnOn(); + if(!iAction) + iAction = Random(GetActions()+1); + return(SetAction(Format("On%d", iAction))); +} + +public func Off() { + if(pLight) + pLight->TurnOff(); + + SetGraphics(0,0,0,1); + + return(SetAction("Off")); +} + +// Anzahl verfügbarer Animationen +private func GetActions() { return(3); } + +/* Kaputtgehen */ + +public func IsBulletTarget(id def) { + if(GetAction() ne "Broken") return(1); + if(def->~NoDecoDamage()) return(); +} + +protected func Damage() { + // schon kaputt + if(GetAction() eq "Broken") return(); + // Licht aus + if(pLight) RemoveObject(pLight); + // RUMMS! + CastObjects(SPRK, 7, 50); + Sparks(15, RGB(210, 210, 0)); + CreateSmokeTrail(RandomX(15,20), Random(360), 0,0, this()); + CreateSmokeTrail(RandomX(15,20), Random(360), 0,0, this()); + + Sound("CrystalHit*"); + Sound("Blast1"); + // Fliegen! + SetSpeed(RandomX(-25, 25), RandomX(-45, -35)); + SetRDir(GetXDir()*2); + // Kaputt + SetAction("Broken"); + SetPhase(Random(3)); +} + +private func ChooseImage() { + var id, defs; + while(id = GetDefinition(defs++)) + if(!Random(18)) + break; + if(!id) + return(SetGraphics(0,0,0,1)); + + SetGraphics(0,0,id,1,1); + SetObjDrawTransform(7000/GetDefWidth(id),0,0,0,5000/GetDefHeight(id),-1000,0,1 ); +} + +/* EMP */ + +public func IsMachine() +{ + if(GetAction() ne "Off" && GetAction() ne "Broken") + return(1); +} + +public func EMPShock() { Off(); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetAction() eq "On1") + extra[GetLength(extra)] = "SetAction(\"On1\")"; + if (GetAction() eq "On2") + extra[GetLength(extra)] = "SetAction(\"On2\")"; + if (GetAction() eq "On3") + extra[GetLength(extra)] = "SetAction(\"On3\")"; +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Names.txt new file mode 100644 index 00000000..7c668cff --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Laboreinrichtung +US:Laboratory furniture diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/ActMap.txt new file mode 100644 index 00000000..13bca6f8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Exist +Directions=2 +FlipDir=1 +FacetBase=1 +Delay=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DefCore.txt new file mode 100644 index 00000000..d7adadf5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=OPTB +Version=4,9,8,2 +Name=OperatingTable +Category=C4D_Vehicle +Width=40 +Height=36 +Offset=-20,-16 +Vertices=3 +VertexX=-8,8 +VertexY=16,16,-16 +VertexFriction=100,100,100 +Value=50 +Mass=100 +Components=METL=3;KLAS=1 +Picture=40,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DescDE.txt new file mode 100644 index 00000000..ccfba686 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DescDE.txt @@ -0,0 +1 @@ +Für ganz besondere Forschungszwecke. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DescUS.txt new file mode 100644 index 00000000..e78cf401 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/DescUS.txt @@ -0,0 +1 @@ +For very special research. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Graphics.png new file mode 100644 index 00000000..249e0411 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Names.txt new file mode 100644 index 00000000..8d360a90 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Operationstisch +US:Operating table \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Script.c new file mode 100644 index 00000000..5e5200e8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Laboratory.c4d/OperatingTable.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- OP-Tisch --*/ + +#strict + +#include BLGH + +protected func Initialize() +{ + SetAction("Exist"); + SetDir(Random(2)); + + pLight = AddLightCone(100, RGBa(255,255,220,70), this()); + pLight->ChangeSizeXY(700,400); + pLight->ChangeOffset(-8,-29,true); + pLight->ChangeR(180); + TurnOff(); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/ActMap.txt new file mode 100644 index 00000000..005b84b5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/ActMap.txt @@ -0,0 +1,15 @@ +[Action] +Name=On +Facet=0,0,10,9 +FacetBase=0 +Length=16 +Delay=2 +NextAction=On +PhaseCall=Alerting + +[Action] +Name=Off +Facet=0,0,10,9 +FacetBase=0 +Length=1 +NextAction=Hold diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DefCore.txt new file mode 100644 index 00000000..2c76c050 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=ALGH +Version=4,9,8,2 +Name=AlertLight +Category=C4D_StaticBack +Width=10 +Height=9 +Offset=-5,-4 +Value=5 +Mass=2 +Components=ALGH=1 +Picture=0,9,64,64 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DescDE.txt new file mode 100644 index 00000000..5a94b43a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DescDE.txt @@ -0,0 +1 @@ +Kündet Gefahren an. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DescUS.txt new file mode 100644 index 00000000..df770907 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/DescUS.txt @@ -0,0 +1 @@ +Announces dangers. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Graphics.png new file mode 100644 index 00000000..f1ba0d35 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Names.txt new file mode 100644 index 00000000..28c619b0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Alarmlicht +US:Alert light \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Script.c new file mode 100644 index 00000000..6b0cf630 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/AlertLight.c4d/Script.c @@ -0,0 +1,100 @@ +/*-- Alarmlicht --*/ + +#strict +#include BLGH + +local pAlert, pAlertWidth; +local dir; + +protected func Initialize() { + dir = 1; + pLight = AddLightAmbience(60); + if(pLight) + pLight->ChangeColor(RGBa(255,50,50,80)); + + pAlert = AddLightCone(1000, RGB(255,50,50), this()); + pAlert->ChangeSizeXY(0,100); + pAlert->ChangeR(GetR()+90); + + // Alarmlicht sind erstmal *nicht* an + TurnOff(); + + Schedule(Format("SetR(GetR(Object(%d)), Object(%d))", ObjectNumber(this()), ObjectNumber(pAlert)), 1); + + return(1); +} + +public func ChangeLightColor(int iNewRGBa) +{ + SetClrModulation(iNewRGBa); + if(pLight) + pLight->ChangeColor(iNewRGBa); + pAlert->ChangeColor(iNewRGBa); +} + +public func TurnOn() { + if(EMPShocked()) return; + if(GetAction() eq "On") return; + bOn = true; + SetAction("On"); + if(pLight) pLight->TurnOn(); + if(pAlert) pAlert->TurnOn(); +} + +public func TurnOff() { + if(GetAction() eq "Off") return; + SetAction("Off"); + bOn = false; + if(pLight) pLight->TurnOff(); + if(pAlert) pAlert->TurnOff(); +} + + +protected func Alerting() { + var phase,size; + phase = GetPhase(); + if(phase == 3 || phase == 11) + ChangeDir(); + + var len = GetActMapVal("Length",GetAction(),GetID()); + var percent = Sin(360*GetPhase()/len,1000); + var percent2 = Cos(360*GetPhase()/len,1000); + if(pLight) + pLight->ChangeSize(140+Max(0,240*percent2/1000)); + pAlert->ChangeSizeXY(1000,percent*3/2); + var r,g,b,a; + SplitRGBaValue(GetClrModulation(pAlert),r,g,b,a); + pAlert->ChangeColor(RGBa(r,g,b,128-Abs(percent)*128/1000)); + +} + +protected func ChangeDir() { + dir *= -1; + pAlert->SetObjectOrder(this(),0,dir<0); +} + +public func EMPShock() +{ + SetAction("Off"); + if(pLight) pLight->TurnOff(); + if(pAlert) pAlert->TurnOff(); + EMPShockEffect(800+Random(200)); +} + +public func EMPShockEnd() { + if(bOn) { + SetAction("On"); + if(pLight) pLight->TurnOn(); + if(pAlert) pAlert->TurnOn(); + } +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + _inherited(extra); + if (GetClrModulation()) { + extra[GetLength(extra)] = Format("ChangeLightColor(%d)", GetClrModulation()); + } +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/ActMap.txt new file mode 100644 index 00000000..0f46d8da --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=On +Facet=0,15,20,15 +Delay=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DefCore.txt new file mode 100644 index 00000000..3693a29b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=BLGH +Version=4,9,8,2 +Name=Background Light +Category=C4D_StaticBack +Width=20 +Height=15 +Offset=-10,-7 +Value=5 +Mass=2 +Components=BLGH=1 +Picture=20,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DescDE.txt new file mode 100644 index 00000000..9ff32ce9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DescDE.txt @@ -0,0 +1 @@ +Spendet Licht aus dem Hintergrund. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DescUS.txt new file mode 100644 index 00000000..aa77b8a6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/DescUS.txt @@ -0,0 +1 @@ +Gives light from the background. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Graphics.png new file mode 100644 index 00000000..b34a6f81 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Names.txt new file mode 100644 index 00000000..50572930 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hintergrundlicht +US:Background Light \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Script.c new file mode 100644 index 00000000..b0bf5b14 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/BackLight.c4d/Script.c @@ -0,0 +1,69 @@ +/*-- Hintergrundlicht --*/ + +#strict + +local pLight, bOn; + +public func LightSize() { return(100); } +public func Light() +{ + return pLight; +} + +protected func Initialize() { + CreateLight(); + TurnOn(); + return(1); +} + +protected func CreateLight() +{ + pLight = AddLightAmbience(LightSize()); +} + +public func TurnOn() { + if(EMPShocked()) return; + bOn = true; + SetAction("On"); + if(Light()) + Light()->TurnOn(); +} + +public func TurnOff() { + if(!SetAction("Off")) + SetAction("Idle"); + bOn = false; + if(Light()) + Light()->TurnOff(); +} + +public func Switch() { + if(GetAction() S= "On") + TurnOff(); + else + TurnOn(); +} + +public func IsLamp() { return(true); } +public func IsMachine() { return(true); } + +public func EMPShock() +{ + TurnOff(); + EMPShockEffect(800+Random(200)); +} + +public func EMPShockEnd() { + if(bOn) { + SetAction("On"); + if(Light()) Light()->TurnOn(); + } +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetAction() ne "On") + extra[GetLength(extra)] = "TurnOff()"; +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DefCore.txt new file mode 100644 index 00000000..74529f58 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=CLGH +Version=4,9,8,2 +Name=Ceiling light +Category=C4D_StaticBack +Width=9 +Height=4 +Offset=-4 +Value=5 +Mass=2 +Components=CLGH=1 +Picture=0,0,9,4 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DescDE.txt new file mode 100644 index 00000000..a42e1a4a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DescDE.txt @@ -0,0 +1 @@ +Mysteriöse Lebensform. Klammert sich zumeist an Decken. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DescUS.txt new file mode 100644 index 00000000..17649967 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/DescUS.txt @@ -0,0 +1 @@ +Look up. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Graphics.png new file mode 100644 index 00000000..8f8adffa Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Names.txt new file mode 100644 index 00000000..8aeddd26 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Deckenlicht +US:Ceiling light \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Script.c new file mode 100644 index 00000000..48de98f3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/CeilingLight.c4d/Script.c @@ -0,0 +1,11 @@ +/*-- Deckenlicht --*/ + +#strict +#include BLGH + +func CreateLight() { + pLight = AddLightAmbience(55); + pLight->ChangeGraphics("Half"); + pLight->SetR(180); + return(1); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DefCore.txt new file mode 100644 index 00000000..2618c3f0 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=FLGH +Version=4,9,8,2 +Name=Floodlight +Category=C4D_Vehicle +Width=21 +Height=16 +Offset=-10,-8 +Vertices=3 +VertexX=0,-9,9 +VertexY=-8,7,7 +VertexFriction=50,100,100 +Value=15 +Mass=25 +Components=METL=2 +Picture=0,16,64,64 +Grab=2 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DescDE.txt new file mode 100644 index 00000000..6669a109 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DescDE.txt @@ -0,0 +1 @@ +Viel Licht. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DescUS.txt new file mode 100644 index 00000000..9890b343 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/DescUS.txt @@ -0,0 +1 @@ +Light. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Graphics.png new file mode 100644 index 00000000..00c3c9aa Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/ActMap.txt new file mode 100644 index 00000000..c9891c81 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/ActMap.txt @@ -0,0 +1,14 @@ +[Action] +Name=Attach +Procedure=ATTACH +FacetBase=1 +Delay=1 +NextAction=Attach + +[Action] +Name=Turn +Procedure=ATTACH +FacetBase=1 +Delay=5 +NextAction=Turn +EndCall=Turning diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/DefCore.txt new file mode 100644 index 00000000..faecfdbc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=FLHH +Version=4,9,8,2 +Name=Floodlight +Category=C4D_Vehicle +Width=16 +Height=14 +Offset=-8,-7 +Vertices=1 +VertexFriction=100 +Picture=0,0,16,14 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Graphics.png new file mode 100644 index 00000000..ec6aae39 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Names.txt new file mode 100644 index 00000000..e9450e49 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Scheinwerfer +US:Floodlight \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Script.c new file mode 100644 index 00000000..67d1412c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Light.c4d/Script.c @@ -0,0 +1,57 @@ +/*-- Scheinwerfer --*/ + +#strict +#include BLGH + +local turn; + +func Activate(object pFloodLight) +{ + SetAction("Attach", pFloodLight); +} + +func CreateLight() +{ + pLight = AddLightCone(1000, RGBa(255,255,220,70), this()); + pLight->ChangeSizeXY(3000,6000); + RotateLight(); +} + +protected func Turning() +{ + if(EMPShocked()) return; + var anglediff = Normalize(GetR()-GetR(GetActionTarget()),-180); + + if(turn == -1 && anglediff < -90 || turn == +1 && anglediff > 90) + return(SetAction("Attach",GetActionTarget())); + + SetR(GetR()+turn); + RotateLight(); +} + +public func RotateLight() { + pLight->ChangeR(GetR()); +} + +public func TurnLeft() +{ + if(EMPShocked()) return; + turn = -1; + SetAction("Turn"); +} + +public func TurnRight() +{ + if(EMPShocked()) return; + turn = +1; + SetAction("Turn"); +} + +public func Stop() +{ + turn = 0; + SetAction("Attach"); + Sound("CannonStop"); +} + +public func IsLamp() { return(true); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Names.txt new file mode 100644 index 00000000..e9450e49 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Scheinwerfer +US:Floodlight \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Script.c new file mode 100644 index 00000000..cf8fab2d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Floodlight.c4d/Script.c @@ -0,0 +1,45 @@ +/*-- Scheinwerfer --*/ + +#strict + +local pLight; + +protected func Initialize() +{ + pLight = CreateObject(FLHH, 0,0, -1); + pLight -> Activate(this()); +} + +protected func ControlLeft() +{ + pLight->TurnLeft(); +} + +protected func ControlRight() +{ + pLight->TurnRight(); +} + +protected func ControlUp() +{ + pLight->Stop(); +} + +public func ControlDigDouble() +{ + pLight->Switch(); +} + +// Scriptaufruf + +public func SetRotation(int iR, int iOwn) +{ + iR = BoundBy(iR, -90, 90); + SetR(iOwn); + + pLight->SetR(iR+GetR()); + pLight->RotateLight(); +} + +// Kein Kran darf mich schnappen! +public func NoCrane() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DefCore.txt new file mode 100644 index 00000000..bb35faf3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=LLGH +Version=4,9,8,2 +Name=Laboratory Light +Category=C4D_StaticBack +Width=5 +Height=16 +Offset=-2,-8 +Value=5 +Mass=2 +Components=LLGH=1 +Picture=0,0,5,16 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DescDE.txt new file mode 100644 index 00000000..49f1db37 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DescDE.txt @@ -0,0 +1 @@ +Steriles Licht für Labore. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DescUS.txt new file mode 100644 index 00000000..ddb114de --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/DescUS.txt @@ -0,0 +1 @@ +Sterile light for laboratories. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Graphics.png new file mode 100644 index 00000000..5f09c796 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Names.txt new file mode 100644 index 00000000..9166ac09 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Laborlicht +US:Laboratory light \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Script.c new file mode 100644 index 00000000..0d793bcc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/LabLight.c4d/Script.c @@ -0,0 +1,9 @@ +/*-- Laborlicht --*/ + +#strict +#include BLGH + +func Initialize() { + AddLightAmbience(35); + return(1); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/ActMap.txt new file mode 100644 index 00000000..5edce49d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/ActMap.txt @@ -0,0 +1,13 @@ +[Action] +Name=Off +Procedure=FLOAT +Facet=0,0,6,10 +Delay=0 +NextAction=Hold + +[Action] +Name=On +Procedure=FLOAT +Facet=6,0,6,10 +Delay=0 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DefCore.txt new file mode 100644 index 00000000..521f4236 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=BULB +Version=4,9,8,2 +Name=Bulb +Category=C4D_Vehicle +Timer=1 +TimerCall=Adjust +Width=6 +Height=10 +Offset=-3,-5 +Vertices=1 +VertexY=-4 +Value=2 +Mass=5 +Components=BULB=1 +Picture=0,0,6,12 +Rotate=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DescDE.txt new file mode 100644 index 00000000..d56b0a41 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine Glühbirne. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DescUS.txt new file mode 100644 index 00000000..283f8005 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/DescUS.txt @@ -0,0 +1 @@ +A bulb. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Graphics.png new file mode 100644 index 00000000..8ec9d360 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Names.txt new file mode 100644 index 00000000..2ffaf1eb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Glühbirne +US:Bulb \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Script.c new file mode 100644 index 00000000..abca8a62 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Bulb.c4d/Script.c @@ -0,0 +1,101 @@ +/*-- Glühbirne --*/ + +#strict +#include BLGH + +local base, length, cable; +local phase, speed, dir, minspeed; //phase as in Winkel. + +func Initialize() { + dir=Random(2)*-2+1; + minspeed = 0; + _inherited(); +} + +func CreateLight() +{ + pLight = AddLightAmbience(40); +} + +func Init(object pObj, int iLength) { + base = pObj; + cable = CreateObject(BLBC); + cable->Set(base, this()); + length = iLength; + SetPosition(base->GetX(),base->GetY()+iLength); + speed = iLength/3*-dir; + phase = 0; +} + +public func Set(int Length) { + if(Length <= 0) + return(); + length = Length; + UpdatePos(); +} + +private func UpdatePos() { + var x,y; + x = Sin(phase/10,length); + y = Cos(phase/10,length); + SetPosition(base->GetX()+x,base->GetY()+y); +} + +private func Adjust() { + if(!base) + { + RemoveObject(cable); + RemoveObject(); + } + if(!dir) + return(); + //Position anpassen + UpdatePos(); + + phase += speed; + speed += dir; + + if((speed > 0 && dir < 0) || (speed < 0 && dir > 0)) + if(speed%5) + speed += dir; + + + if(Abs(phase) >= 900) { + speed = 0; + phase = phase/Abs(phase)*899; + } + //Gegenrechnen, weil sonst überschwanken + //while(Abs(speed) > maxspeed) { + //speed -= dir; + //} + + if((phase >= 0 && speed >= 0 && dir > 0) || (phase <= 0 && speed <= 0 && dir < 0)) { + dir *= -1; + if(Abs(speed) < 15) { + speed+=dir; + phase+=dir; + if(Abs(speed) < 7 && Abs(phase) < 5) { + dir = 0; + speed = 0; + speed = 0; + } + } + } + + SetR(Angle(GetX(),GetY(),base->GetX(),base->GetY())); + // Kabel anpassen + cable->Update(); +} + +func IsBulletTarget(id ID) { + if(ID != SHT1) + return(0); + var shot = FindObject(ID,0,0,-1,-1); + if(!shot) + return(0); + + speed += shot->GetXDir(); + speed = BoundBy(speed,-55,55); + dir = BoundBy(-speed,-1,1); + return(1); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DefCore.txt new file mode 100644 index 00000000..bb5d8588 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=BLBC +Name=Bulb-Cable +Version=4,9,5 +Category=C4D_StaticBack +Width=3 +Height=1 +Offset=-2,-1 +Value=10 +Mass=15 +Components=METL=1; +Picture=2,0,34,32 \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DescDE.txt new file mode 100644 index 00000000..f660e504 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DescDE.txt @@ -0,0 +1 @@ +Schwingt rum. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DescUS.txt new file mode 100644 index 00000000..b30ffb01 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/DescUS.txt @@ -0,0 +1 @@ +Swings around. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Graphics.png new file mode 100644 index 00000000..7157911d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Names.txt new file mode 100644 index 00000000..0a02477b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kabel +US:Cable \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Script.c new file mode 100644 index 00000000..8aaa7479 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Cable.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- Kabel --*/ + +#strict + +local base, bulb; + +func Set(object target1, object target2) +{ + base = target1; + bulb = target2; + + SetPosition(target1->GetX(), target1->GetY()); + + Update(); +} + +func Update() +{ + var r = -Angle(base->GetX(),base->GetY(), bulb->GetX(), bulb->GetY()); + if(r < 0 && r > -180) + r -= 2; + //var xoff = -Abs(base->GetX() - bulb->GetX())/2; + //var yoff = -Abs(base->GetY() - bulb->GetY())/2; + var xoff = 0; + var yoff = 0; + var d = ObjectDistance(base, bulb); + + var fsin=Sin(r, 1000), fcos=Cos(r, 1000); + SetObjDrawTransform ( + +fcos/2, +fsin*d, (1000-fcos)*xoff - fsin*yoff, + -fsin/2, +fcos*d, (1000-fcos)*yoff + fsin*xoff + ); +} + +/* Serialisierung */ + +public func NoSerialize() { return !false; } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DefCore.txt new file mode 100644 index 00000000..c4534f29 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=LBGH +Version=4,9,8,2 +Name=LightBulb +Category=C4D_StaticBack +MaxUserSelect=10 +Width=1 +Height=1 +Offset=-1,-1 +Vertices=1 +Components=LBGH=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DescDE.txt new file mode 100644 index 00000000..d56b0a41 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine Glühbirne. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DescUS.txt new file mode 100644 index 00000000..283f8005 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/DescUS.txt @@ -0,0 +1 @@ +A bulb. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Graphics.png new file mode 100644 index 00000000..4c109ed8 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Names.txt new file mode 100644 index 00000000..54e58aab --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Glühbirne +US:Light bulb \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Script.c new file mode 100644 index 00000000..613e87b9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Lightbulb.c4d/Script.c @@ -0,0 +1,28 @@ +/*-- Glühbirne - Grundobjekt --*/ + +#strict + +local bulb; + +public func Initialize() { + bulb = CreateObject(BULB); + bulb->Init(this(),50); + return(1); +} + +public func Set(int Length) { + bulb->Set(Length); +} + +public func Destruction() { + if(bulb) + RemoveObject(bulb); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + _inherited(extra); + extra[GetLength(extra)] = Format("Set(%d)", bulb->LocalN("length")); +} \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Names.txt new file mode 100644 index 00000000..7165aefe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lichter +US:Lights diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DefCore.txt new file mode 100644 index 00000000..50a54106 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DefCore.txt @@ -0,0 +1,14 @@ +[DefCore] +id=STLH +Version=4,9,8,2 +Name=Street Light +Category=C4D_StaticBack +Timer=5 +TimerCall=Glowing +Width=5 +Height=7 +Offset=-2,-3 +Value=5 +Mass=2 +Components=STLH=1 +Picture=0,0,5,7 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DescDE.txt new file mode 100644 index 00000000..d047bc93 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DescDE.txt @@ -0,0 +1 @@ +Schwebt in der Luft und beleuchtet den Boden. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DescUS.txt new file mode 100644 index 00000000..06053899 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/DescUS.txt @@ -0,0 +1 @@ +Floats in the air and lights the floor. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Graphics.png new file mode 100644 index 00000000..dc8b3222 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Names.txt new file mode 100644 index 00000000..ea68fe55 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Straßenlicht +US:Street light \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Script.c new file mode 100644 index 00000000..239e5ebe --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Lights.c4d/StreetLight.c4d/Script.c @@ -0,0 +1,15 @@ +/*-- Hintergrundlicht --*/ + +#strict +#include BLGH + +func CreateLight() +{ + pLight = AddLightCone(1000,RGBa(255,255,255,20),this()); + pLight->ChangeSize(750); + pLight->ChangeR(180); +} + +protected func Glowing() { + CreateParticle("PSpark", RandomX(-2,2), 4, RandomX(-1,1), RandomX(1,3), 10+Random(15), RGB(50,50,25), this(), true); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Names.txt new file mode 100644 index 00000000..7df8b350 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Einrichtung +US:Furniture diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/ActMap.txt new file mode 100644 index 00000000..9df26b34 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Exist +Facet=0,0,10,15 +Length=6 +NextAction=Exist +EndCall=CheckVertex diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DefCore.txt new file mode 100644 index 00000000..a92eb511 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=OCHR +Version=4,9,8,2 +Name=Office Chair +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=3 +Width=10 +Height=15 +Offset=-5,-7 +Vertices=3 +VertexX=-4,5,-5 +VertexY=-7,7,7 +VertexCNAT=4,10,9 +VertexFriction=20,100,100 +Value=4 +Mass=25 +Components=WOOD=1;METL=1 +Picture=0,15,64,64 +Rebuy=1 +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DescDE.txt new file mode 100644 index 00000000..2958aa7e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DescDE.txt @@ -0,0 +1 @@ +Bequeme Sitzgelegenheit. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DescUS.txt new file mode 100644 index 00000000..d39535b8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/DescUS.txt @@ -0,0 +1 @@ +Comfortable seating. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Graphics.png new file mode 100644 index 00000000..ccdbd03c Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Names.txt new file mode 100644 index 00000000..056b127f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bürostuhl +US:Office chair diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Script.c new file mode 100644 index 00000000..5af51999 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Chair.c4d/Script.c @@ -0,0 +1,26 @@ +/*-- Bürostuhl --*/ + +#strict + +public func IsBulletTarget() { + if(!Random(5)) return(-1); +} + +protected func Damage() { + Sparks(5, RGBa(255,255,220,20)); +} + +// Vertex-Fix +protected func Initialize() { SetAction("Exist"); SetPhase(Random(6)); } + +private func CheckVertex() { + var dir = GetDir()*2-1; + SetVertex(0, 0, 4*dir); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetPhase(%d)", GetPhase()); +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/ActMap.txt new file mode 100644 index 00000000..25b9876f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/ActMap.txt @@ -0,0 +1,18 @@ +[Action] +Name=Walk +Procedure=WALK +Directions=2 +FlipDir=1 +FacetBase=1 +Delay=300 +NextAction=Walk +EndCall=Walking + +[Action] +Name=Jump +Procedure=FLIGHT +Directions=2 +FlipDir=1 +FacetBase=1 +Delay=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DefCore.txt new file mode 100644 index 00000000..6e8fae63 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=OMSG +Version=4,9,8,2 +Name=Office messenger +Category=C4D_Vehicle +ContactCalls=1 +Width=9 +Height=5 +Offset=-4,-2 +Vertices=3 +VertexX=0,-3,3 +VertexY=2,-2,-2 +VertexCNAT=8,1,2 +VertexFriction=100,100 +Value=7 +Mass=5 +Components=METL=1 +Picture=0,0,9,5 + +[Physical] +Walk=100000 +Jump=10000 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DescDE.txt new file mode 100644 index 00000000..04f9fc5d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DescDE.txt @@ -0,0 +1 @@ +Kleiner Nachrichtenübermittler. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DescUS.txt new file mode 100644 index 00000000..a0283ae6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/DescUS.txt @@ -0,0 +1 @@ +Little messenger. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Graphics.png new file mode 100644 index 00000000..7dd622e2 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Names.txt new file mode 100644 index 00000000..5e70deb3 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Nachrichtenroboter +US:Message robot \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Script.c new file mode 100644 index 00000000..24cd025e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Script.c @@ -0,0 +1,44 @@ +/*-- Nachrichtenroboter --*/ + +#strict + +protected func Initialize() +{ + SetAction("Walk"); + SetComDir(COMD_Left()); +} + +protected func ContactLeft() +{ + SetComDir(COMD_Right()); +} + +protected func ContactRight() +{ + SetComDir(COMD_Left()); +} + +protected func Walking() +{ + CreateParticle("PSpark", RandomX(-2,2), -2, RandomX(-1,1), RandomX(1,3), 10+Random(15), RGB(255,50,50), this(), true); + + if(!Random(30)) Sound("Wheeng"); + + if(Random(2)) + SetComDir(COMD_Left()); + else + SetComDir(COMD_Right()); +} + +public func IsBulletTarget() { return(1); } + +protected func Damage() +{ + Explode(10+Random(5)); +} + +public func IsMachine() { return(1); } +public func EMPShock() { DoDamage(1); } +public func CanBeLaserRecycled() { return(2); } + +protected func Hit3() { DoDamage(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Wheeng.wav b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Wheeng.wav new file mode 100644 index 00000000..4bded3e6 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Messenger.c4d/Wheeng.wav differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Names.txt new file mode 100644 index 00000000..5efca677 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Büroeinrichtung +US:Office furniture diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DefCore.txt new file mode 100644 index 00000000..053fea92 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DefCore.txt @@ -0,0 +1,25 @@ +[DefCore] +id=OTBL +Version=4,9,8,2 +Name=Office Table +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=1 +Width=36 +Height=11 +Offset=-18,-5 +Vertices=4 +VertexX=-18,18,-18,18 +VertexY=0,0,5,5 +VertexCNAT=5,6,9,10 +VertexFriction=100,100,20,20 +Value=5 +Mass=50 +Components=WOOD=2 +SolidMask=0,0,36,1,0,0 +Picture=0,11,64,64 +BlastIncinerate=35 +BurnTo=TABB +Rebuy=1 +Grab=1 +Rotate=1 +Float=1 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DescDE.txt new file mode 100644 index 00000000..e76529fc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DescDE.txt @@ -0,0 +1 @@ +Produziert Arbeit. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DescUS.txt new file mode 100644 index 00000000..713fa79c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/DescUS.txt @@ -0,0 +1 @@ +Produces work. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Graphics.png new file mode 100644 index 00000000..c2a02277 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Names.txt new file mode 100644 index 00000000..f5c72012 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bürotisch +US:Office table \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Script.c new file mode 100644 index 00000000..90538c26 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Table.c4d/Script.c @@ -0,0 +1,20 @@ +/*-- Bürotisch --*/ + +#strict + +public func IsBulletTarget() { + if(Random(3)) return(-1); +} + +protected func Damage() { + // Splittern + Sound("WoodHit*"); + // Kaputtgehen + if(Inside(GetDamage(), 25, 34)) + { + Sound("CrateCrack"); + RemoveObject(); + } +} + +public func IsCraneGrabable() { return(1); } diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/ActMap.txt new file mode 100644 index 00000000..c61ee0fb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Open +Procedure=NONE +Directions=2 +Facet=0,0,21,30 +Delay=0 +NextAction=Hold + diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DefCore.txt new file mode 100644 index 00000000..fc99c0fd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=TOIC +Version=4,9,8,2 +Name=Toilet Cabin +Category=C4D_Structure +Width=20 +Height=30 +Offset=-10,-15 +Vertices=2 +VertexY=14,-14 +VertexFriction=100,100 +Value=15 +Mass=50 +Components=ROCK=3;METL=1 +Picture=21,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DescDE.txt new file mode 100644 index 00000000..cc6e41a7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DescDE.txt @@ -0,0 +1 @@ +Das stille Örtchen... \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DescUS.txt new file mode 100644 index 00000000..2f0c0b0d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/DescUS.txt @@ -0,0 +1 @@ +That's the john... \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Graphics.png new file mode 100644 index 00000000..d564dcb7 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Names.txt new file mode 100644 index 00000000..f00d1ed6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Toilettenkabine +US:Toilet cabin \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Script.c b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Script.c new file mode 100644 index 00000000..6fd58393 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/ToiletCabin.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- Toilette --*/ + +#strict + +func Initialize() +{ + SetAction("Open"); + SetDir(Random(2)); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetDir()) + extra[GetLength(extra)] = "SetDir(1)"; +} diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DefCore.txt new file mode 100644 index 00000000..2d05af3b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=WSHB +Version=4,9,8,2 +Name=Washbasin +Category=C4D_StaticBack +Width=20 +Height=28 +Offset=-10,-14 +Value=5 +Mass=30 +Components=ROCK=1;METL=1 +Picture=20,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DescDE.txt new file mode 100644 index 00000000..08d52317 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DescDE.txt @@ -0,0 +1 @@ +Nicht vergessen, Hände waschen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DescUS.txt new file mode 100644 index 00000000..10fe790e --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/DescUS.txt @@ -0,0 +1 @@ +Do not forget to clean your hands. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/Graphics.png new file mode 100644 index 00000000..b87baeec Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/Names.txt new file mode 100644 index 00000000..c3db850c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Furniture.c4d/Office.c4d/Washbasin.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waschbecken +US:Washbasin \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Names.txt new file mode 100644 index 00000000..63e51c6c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Strukturelemente +US:Structural diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Actmap.txt new file mode 100644 index 00000000..3a4b7461 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Actmap.txt @@ -0,0 +1,25 @@ +[Action] +Name=OpenDoor +Length=10 +Delay=1 +Facet=0,0,20,23 +NextAction=DoorOpen +StartCall=SoundOpenDoor + +[Action] +Name=CloseDoor +Length=10 +Delay=1 +Reverse=1 +Facet=0,0,20,23 +NextAction=Idle +StartCall=SoundCloseDoor + +[Action] +Name=DoorOpen +Length=1 +Delay=18 +Facet=180,0,20,23 +NextAction=CloseDoor +StartCall=OpenEntrance +EndCall=CloseEntrance \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DefCore.txt new file mode 100644 index 00000000..0448f612 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=GAT1 +Version=4,9,8,2 +Name=Gate +Category=C4D_StaticBack +Width=20 +Height=23 +Offset=-10,-11 +Picture=0,23,64,64 +Entrance=-10,-12,20,23 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DescDE.txt new file mode 100644 index 00000000..8f7cf0a7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Tor in fremde Welten. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DescUS.txt new file mode 100644 index 00000000..9c233d0f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/DescUS.txt @@ -0,0 +1 @@ +Who knows what is behind this? \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Graphics.png new file mode 100644 index 00000000..663a4770 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Names.txt new file mode 100644 index 00000000..990f677d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spiraltor +US:Spiral gate \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Script.c new file mode 100644 index 00000000..9989681a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate.c4d/Script.c @@ -0,0 +1,14 @@ +/*-- Tor --*/ + +#strict +#include DOOR + +private func SoundOpenDoor() +{ + Sound("Airlock1"); +} + +private func SoundCloseDoor() +{ + Sound("Airlock2"); +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Actmap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Actmap.txt new file mode 100644 index 00000000..43170847 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Actmap.txt @@ -0,0 +1,26 @@ +[Action] +Name=OpenDoor +Length=10 +Delay=1 +Facet=0,0,20,20 +NextAction=DoorOpen +StartCall=SoundOpenDoor + +[Action] +Name=CloseDoor +Length=10 +Delay=1 +Reverse=1 +Facet=0,0,20,20 +NextAction=Idle +StartCall=SoundCloseDoor + +[Action] +Name=DoorOpen +Length=1 +Delay=18 +Facet=180,0,20,20 +NextAction=CloseDoor +StartCall=OpenEntrance +EndCall=CloseEntrance + diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DefCore.txt new file mode 100644 index 00000000..8f30b2aa --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=GAT2 +Version=4,9,8,2 +Name=Gate +Category=C4D_StaticBack +Width=20 +Height=20 +Offset=-10,-10 +Picture=0,20,64,64 +Entrance=-10,-10,20,20 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DescDE.txt new file mode 100644 index 00000000..8f7cf0a7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein Tor in fremde Welten. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DescUS.txt new file mode 100644 index 00000000..9c233d0f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/DescUS.txt @@ -0,0 +1 @@ +Who knows what is behind this? \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Graphics.png new file mode 100644 index 00000000..a6e9fbf4 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Names.txt new file mode 100644 index 00000000..db7a3489 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schleusentor +US:Lock gate \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Script.c new file mode 100644 index 00000000..9989681a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Gate2.c4d/Script.c @@ -0,0 +1,14 @@ +/*-- Tor --*/ + +#strict +#include DOOR + +private func SoundOpenDoor() +{ + Sound("Airlock1"); +} + +private func SoundCloseDoor() +{ + Sound("Airlock2"); +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Names.txt new file mode 100644 index 00000000..01b70abd --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Background.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hintergrund-Türen +US:Background doors \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/DescDE.txt new file mode 100644 index 00000000..7526e294 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/DescDE.txt @@ -0,0 +1 @@ +Türen, Tore und ähnlich dekorative Raumtrenner. diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/DescUS.txt new file mode 100644 index 00000000..1debfd8f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/DescUS.txt @@ -0,0 +1 @@ +Doors, gates and similarly decorative barriers. diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DefCore.txt new file mode 100644 index 00000000..c0eeeddc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=GBDR +Version=4,9,8,2 +Name=Door Object +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DescDE.txt new file mode 100644 index 00000000..384c92cf --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DescDE.txt @@ -0,0 +1 @@ +Stellt die Grundfunktionalität für Türen bereit. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DescUS.txt new file mode 100644 index 00000000..95099961 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/DescUS.txt @@ -0,0 +1 @@ +Provides basic control for doors. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Graphics.png new file mode 100644 index 00000000..5f37e3a1 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Names.txt new file mode 100644 index 00000000..e85700e1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Türsteuerung +US:Doorcontrol \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Script.c new file mode 100644 index 00000000..a83487d2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/Script.c @@ -0,0 +1,210 @@ +/*-- Doorcontrol --*/ + +#strict + +// Lokale Variablen + +local closed; // offen? +local lock; // Tür ist verschließbar (geht nicht automatisch auf) +local destroyed; // zerstört +local maxdmg; + +// Einstellungen und Eigenschaften: + +public func GetMaxDamage() // max. Schaden + { return(maxdmg); } + +public func IsDestroyable() // zerstörbar? + { return(maxdmg != -1); } + +public func SetMaxDamage(int m) + { maxdmg = m; } + +public func Lock(bool aut) { // Tür öffnet sich nicht mehr automtisch + lock = 1; + if(aut) lock = 2; +} + +public func Unlock() + { lock = 0; } + +// Callbacks + +func OnDestroyed() { return(1); } // zerstört +func OnOpen() { return(1); } // geöffnet +func OnClose() { return(1); } // geschlossen + + +// Initialisieren + +public func Initialize() +{ + closed = true; + Unlock(); + SetMaxDamage(50); // default + AddEffect("CheckOpen",this(),1,5,this()); + + UpdateTransferZone(); +} + +public func UpdateTransferZone() +{ + SetTransferZone(-15,-GetObjWidth()/2,30,GetObjWidth()); +} + +//Hänschen klein, ging allein... +public func ControlTransfer(object obj, int x, int y) { + //Versperrt und Türe zu! + if(lock && closed) + //wir können nicht durch. :( + return(false); + + var dir = 1; + if(obj->GetX() < GetX()) + dir = -1; + + //Türe zu? + if(closed) + //Nahe genug herkommen, damit sie aufgeht. + return(AddCommand(obj,"MoveTo",0,GetX()+10*dir,GetY())); + + //Türe offen -> Durchgehn \o/ + +} + +// Ein Schloss hinzufügen + +public func SetKeycardLock(int iID, int dir, bool autoclose) // per Keycard +{ + var x = (dir*2-1)*(GetObjWidth()/2+15); + var konsole = CreateObject(LKEY,x,0,GetOwner()); + konsole -> Set(this(),iID); + Lock(autoclose); + return konsole; +} + +public func SetPasscodeLock(int a, int dir, bool autoclose) // per Eingabecode +{ + var x = (dir*2-1)*(GetObjWidth()/2+10); + var konsole = CreateObject(PKEY,x,0,GetOwner()); + konsole -> Set(this(),a); + Lock(autoclose); + return konsole; +} + +public func SetSwitchLock(int dir, bool autoclose) // per Schalter +{ + var x = (dir*2-1)*(GetObjWidth()/2+8); + var konsole = CreateObject(SWTH,x,0,GetOwner()); + konsole -> Set(this()); + Lock(autoclose); + return konsole; +} + +public func Access() { + if(closed) + Open(); + else if(lock != 2) + Close(); +} + +public func SwitchOn() { Open(); } +public func SwitchOff() { Close(); } + +// Öffnen & Schließen + +public func Open() // öffnet die Tür +{ + if(destroyed) return(); + if(!closed) return(); + OnOpen(); + closed = false; +} + +public func Close() // schließt die Tür +{ + if(destroyed) return(); + if(closed) return(); + OnClose(); + closed = true; +} + + +// Enginecalls + +protected func Damage(int iChange, int iByPlayer) // Schaden +{ + // kapusch + if(GetDamage() > GetMaxDamage() && IsDestroyable() && !destroyed) + { + SetSolidMask(0); + RemoveEffect("CheckOpen",this(),0); + destroyed = true; + OnDestroyed(); + } +} + +public func IsBulletTarget() // kann getroffen werden +{ + // kann nur beschossen werdne wenn zu + if(!closed || destroyed) + return(false); + return(true); +} + +// Türsteuerung - automatisches öffnen und schließen + +public func FxCheckOpenTimer() // Clonks suchen und Tür öffnen +{ + // Wenn kaputt, dann gar nix mehr + if(destroyed) return(-1); + // wenn verschließbar, Tür öffnet und schließt nicht automatisch + if(lock == 1) return(); + + // wieder schließen + if(!closed) { + if(!SomeonesApproaching()) + Close(); + } + // öffnen + else if(!lock) { + if(SomeonesApproaching()) + Open(); + } +} + +private func SomeonesApproaching() { // such ankommene Clonks + + var aClonks = CreateArray(); + + for(var i = 0; i < 2; ++i) + { + // Suchen wir mal rum. + aClonks = FindObjects(Find_InRect(-35 * i, -GetObjHeight() / 2, 35, GetObjHeight()), +// Find_NoContainer(), + Find_OCF(OCF_Alive), + Find_Not(Find_Func("IsAlien")) ); + // Irgendwas gefunden? + if(GetLength(aClonks) > 0) + { + return(true); + } + } + return(false); +} + +public func IsSideDoor() { return(true); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + extra[GetLength(extra)] = Format("SetMaxDamage(%d)", maxdmg); + if (lock) + extra[GetLength(extra)] = Format("Lock(%v)", (lock == 2)); + if (destroyed) { + extra[GetLength(extra)] = "SetSolidMask()"; + extra[GetLength(extra)] = "RemoveEffect(\"CheckOpen\",this(),0)"; + extra[GetLength(extra)] = "LocalN(\"destroyed\")=true"; + } +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/StringTblDE.txt new file mode 100644 index 00000000..143a1129 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +OpenDoor=Tür öffnen. +NoCard=Keine passende Karte vorhanden. diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/StringTblUS.txt new file mode 100644 index 00000000..0d39b9e2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Door.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +OpenDoor=Open door. +NoCard=No fitting card available. diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/ActMap.txt new file mode 100644 index 00000000..0b78954a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Gate +Directions=16 +Facet=0,0,200,8 +Delay=5 +NextAction=Gate +EndCall=CheckMovement \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DefCore.txt new file mode 100644 index 00000000..e18c8e05 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=HNG1 +Version=4,9,8,2 +Name=HangarGate +Category=C4D_StaticBack +Width=200 +Height=8 +Offset=-100,-4 +Vertices=2 +VertexX=-100,100 +VertexFriction=100,100 +Mass=250 +Components=METL=10 +SolidMask=0,0,100,8,0,0 +Picture=0,0,200,8 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DescDE.txt new file mode 100644 index 00000000..f9923839 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DescDE.txt @@ -0,0 +1 @@ +Zum Rausfliegen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DescUS.txt new file mode 100644 index 00000000..1ebc1620 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/DescUS.txt @@ -0,0 +1 @@ +Gate. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Graphics.png new file mode 100644 index 00000000..a65cf6cf Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Names.txt new file mode 100644 index 00000000..3566b9db --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hangartor +US:Hangar gate \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Script.c new file mode 100644 index 00000000..216610a7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/Script.c @@ -0,0 +1,76 @@ +/*-- Hangartor --*/ + +#strict + +local movement; // -1 = Schließen + // 0 = Nichts tun + // 1 = Öffnen + +protected func Initialize() +{ + SetAction("Gate"); + SetDir(0); +} + +public func Open() // Aufmachen +{ movement = 1; StartSound(); } + +public func Close() // Zumachen +{ movement = -1; StartSound(); } + +public func Stop() // Sofort stoppen +{ movement = 0; StopSound(); } + +public func ConsoleControl(int i) +{ + if(i == 1) return("$Open$"); + if(i == 2) return("$Close$"); + if(i == 3) return("$Stop$"); +} + +public func ConsoleControlled(int i) +{ + if(i == 1 && Inside(GetDir(), 0, 14)) Open(); + if(i == 2 && Inside(GetDir(), 1, 15)) Close(); + if(i == 3 && Inside(GetDir(), 1, 14)) Stop(); +} + +protected func CheckMovement() +{ + CheckSolidMask(); + + if(!movement) return(); + + if(movement == -1) + { + if(!GetDir()) + { Stop(); } + else + SetDir(GetDir()-1); + } + if(movement == 1) + { + if(GetDir() == 15) + { Stop(); } + else + SetDir(GetDir()+1); + } +} + +private func StartSound() { Sound("Elevator", 0,0,0,0, 1); } +private func StopSound() { Sound("Elevator", 0,0,0,0, -1); Sound("Discharge"); } + +private func CheckSolidMask() +{ + SetSolidMask(0, 8*GetDir(), 200, 8, 0, 0); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetDir()) { + extra[GetLength(extra)] = Format("SetDir(%d)", GetDir()); + extra[GetLength(extra)] = "CheckSolidMask()"; + } +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/StringTblDE.txt new file mode 100644 index 00000000..5e687b4b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +Open=Öffnen +Close=Schließen +Stop=Stopp diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/StringTblUS.txt new file mode 100644 index 00000000..a3fcfe76 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +Open=Open +Close=Close +Stop=Stop diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/ActMap.txt new file mode 100644 index 00000000..72916a60 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/ActMap.txt @@ -0,0 +1,25 @@ +[Action] +Name=GateStill +Facet=0,0,10,60 +Length=11 +Delay=0 +NextAction=Hold + +[Action] +Name=GateOpen +Facet=0,0,10,60 +Length=11 +Delay=2 +PhaseCall=CheckSolidMask +EndCall=Opened +Sound=Elevator + +[Action] +Name=GateClose +Facet=0,0,10,60 +Length=11 +Delay=2 +PhaseCall=CheckSolidMask +EndCall=Stop +Reverse=1 +Sound=Elevator \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DefCore.txt new file mode 100644 index 00000000..785309ac --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=HNG2 +Version=4,9,8,2 +Name=HangarGate +Category=C4D_StaticBack +Width=10 +Height=60 +Value=40 +Offset=-5,-30 +Vertices=2 +VertexY=-30,30 +VertexFriction=100,100 +Mass=200 +Components=METL=7 +SolidMask=0,0,10,60,0,0 +Picture=0,60,64,64 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DescDE.txt new file mode 100644 index 00000000..22978d33 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DescDE.txt @@ -0,0 +1 @@ +Schweres Metalltor. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DescUS.txt new file mode 100644 index 00000000..6e5db345 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/DescUS.txt @@ -0,0 +1 @@ +Reinforced metal gate. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Graphics.png new file mode 100644 index 00000000..fb005bac Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Names.txt new file mode 100644 index 00000000..3566b9db --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hangartor +US:Hangar gate \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Script.c new file mode 100644 index 00000000..623e6b8c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/Script.c @@ -0,0 +1,97 @@ +/*-- Hangartor --*/ + +#strict +#include GBDR + +public func Initialize() +{ + inherited(...); + SetAction("Closed"); + SetMaxDamage(500); + //by default locked + Lock(); +} + +public func OnDmg(int iDmg, int iType) +{ + // diese Tür ist besonders dick + if(iType == DMG_Projectile) return(70); + if(iType == DMG_Melee) return(80); + if(iType == DMG_Energy) return(50); + if(iType == DMG_Explosion) return(0); + + return(100); +} + +public func OnDestroyed(iType) +{ + Explode(30); +} + +public func OnOpen() // Aufmachen +{ + var phase = GetPhase(); + if(GetAction() eq "GateClose") phase = 11-GetPhase(); + SetAction("GateOpen"); + SetPhase(phase); + CheckSolidMask(); +} + +protected func Opened() +{ + SetAction("GateStill"); + SetPhase(11); + closed = false; + StopSound(); + CheckSolidMask(); +} + +public func OnClose() // Zumachen +{ + var phase = 11-GetPhase(); + SetAction("GateClose"); + SetPhase(phase); + closed = false; + CheckSolidMask(); +} + +public func Stop() // Sofort stoppen +{ + var phase = GetPhase(); + SetAction("GateStill"); + SetPhase(phase); + closed = true; + StopSound(); + CheckSolidMask(); +} + +public func ConsoleControl(int i) +{ + if(i == 1) return("$Open$"); + if(i == 2) return("$Close$"); + if(i == 3) return("$Stop$"); +} + +public func ConsoleControlled(int i) +{ + if(i == 1 && GetAction() ne "GateOpen") Open(); + if(i == 2 && GetAction() ne "GateClose") Close(); + if(i == 3 && GetAction() ne "GateStill") Stop(); +} + +private func StopSound() { Sound("Discharge"); } + +private func CheckSolidMask() +{ + SetSolidMask(10*GetPhase(), 0, 10, 60, 0, 0); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (GetPhase()) { + extra[GetLength(extra)] = Format("SetPhase(%d)", GetPhase()); + extra[GetLength(extra)] = "CheckSolidMask()"; + } +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/StringTblDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/StringTblDE.txt new file mode 100644 index 00000000..29f314eb --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +Open=Öffnen +Close=Schließen +Stop=Stop diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/StringTblUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/StringTblUS.txt new file mode 100644 index 00000000..a3fcfe76 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/HangarGate2.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +Open=Open +Close=Close +Stop=Stop diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/ActMap.txt new file mode 100644 index 00000000..4eb35f66 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/ActMap.txt @@ -0,0 +1,51 @@ +[Action] +Name=Closed +Procedure=NONE +Facet=0,0,20,20,3 +Directions=1 +Length=1 +FlipDir=0 +NextAction=Hold + +[Action] +Name=Open +Procedure=NONE +Facet=0,0,20,20,3 +Length=7 +Directions=1 +FlipDir=0 +Delay=2 +StartCall=SetPathFree +Reverse=0 +NextAction=Opened + +[Action] +Name=Opened +Procedure=NONE +Facet=100,0,20,20,3 +Length=1 +Directions=1 +FlipDir=0 +NextAction=Hold + +[Action] +Name=Close +Procedure=NONE +Facet=0,0,20,20,3 +Length=7 +Directions=1 +FlipDir=0 +Delay=2 +Reverse=1 +NextAction=Closed + +[Action] +Name=Destroyed +Procedure=NONE +Facet=0,0,20,20,3 +Directions=1 +Length=1 +FlipDir=1 +NoOtherAction=1 +ObjectDisabled=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Author.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Author.txt new file mode 100644 index 00000000..0319a8c1 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Author.txt @@ -0,0 +1 @@ +By henry aka Naskar \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DefCore.txt new file mode 100644 index 00000000..494c7dbf --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DefCore.txt @@ -0,0 +1,20 @@ +[DefCore] +id=HA4K +Name=Hatch +Version=4,9,5 +Category=2 +Width=26 +Height=20 +Offset=-13,-20 +Value=10 +Mass=10 +Components=METL=2; +Picture=0,20,64,64 +Vertices=2 +VertexY=0,0 +VertexX=-10,10 +VertexFriction=100,100 +SolidMask=0,0,20,20,3 +TopFace=0,0,20,20,3 +Grab=2 + \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DescDE.txt new file mode 100644 index 00000000..11ceeae7 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DescDE.txt @@ -0,0 +1 @@ +Loch mit Tür. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DescUS.txt new file mode 100644 index 00000000..dea7633a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/DescUS.txt @@ -0,0 +1 @@ +Gap with door. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Graphics.png new file mode 100644 index 00000000..d9cd58ef Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Names.txt new file mode 100644 index 00000000..40a322d8 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Bodenlucke +US:Hatch \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Script.c new file mode 100644 index 00000000..53e04b00 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Hatch.c4d/Script.c @@ -0,0 +1,126 @@ +/*-- Bodenlucke --*/ + +#strict + +#include GBDR + +public func Initialize() +{ + SetAction("Closed"); + _inherited(); + SetMaxDamage(400); +} + +public func OnDmg(int iDmg, int iType) +{ + // diese Tür ist besonders dick + if(iType == DMG_Projectile) return(60); + if(iType == DMG_Melee) return(80); + if(iType == DMG_Energy) return(30); + if(iType == DMG_Explosion) return(0); + + return(100); +} + +public func OnOpen() +{ + if(GetAction() eq "Open" || GetAction() eq "Opened") return(); + SetAction("Open"); + Sound("Airlock1"); +} + +public func OnClose() +{ + if(GetAction() eq "Closed" || GetAction() eq "Close") return(); + SetAction("Close"); + Sound("Airlock2"); + SetSolidMask(0, 0, 20, 20,3); +} + +public func SetPathFree() +{ + SetSolidMask(); +} + +public func OnDestroyed(iType) +{ + //Kleinen Explosionseffekt + CreateObject(ROCK)->Explode(20); + SetAction("Destroyed"); +} + +private func SomeonesApproaching()// such ankommene Clonks +{ + var aClonks = CreateArray(); + + // Suchen wir mal rum. + aClonks = FindObjects(Find_InRect(-(GetObjWidth()/2),0,GetObjWidth(),20), + Find_NoContainer(), + Find_OCF(OCF_Alive), + Find_Not(Find_Func("IsAlien")) );//Das mit dem Alien ändert sich später noch. -> Hazard 2.0 + + if(!closed) + { + if(!GetLength(aClonks)) + { + aClonks = FindObjects(Find_InRect(-(GetObjWidth()/2),-20,GetObjWidth(),20), + Find_NoContainer(), + Find_OCF(OCF_Alive), + Find_Not(Find_Func("IsAlien")) ); + } + } + + // Irgendwas gefunden? + if(GetLength(aClonks) > 0) + return(true); + return(false); +} + +public func ControlUp(object pByObj) +{ + if(GetAction() ne "Destroyed") + if(!lock) + OnOpen(); + return(1); +} + +public func IsBulletTarget(id idBullet){return(false);}//kann nur von explosionen schaden bekommen + +//KI +public func UpdateTransferZone() +{ + //SetTransferZone(-15,-GetObjWidth()/2,30,GetObjWidth()); + SetTransferZone(-GetObjWidth()/2,-GetObjHeight()/2,GetObjWidth(),GetObjHeight()); +} + +public func ControlTransfer(object obj, int x, int y) +{ + if(lock && closed) + return(false); + + var dir = 1; + if(obj->GetY() < GetY()+GetObjHeight()) + dir = -1; + + if(!closed) return(false); + + if(dir == -1) + { + if(GetProcedure(obj) ne "PUSH") + { + if(GetCommand(obj) ne "Grab") + return(AddCommand(obj,"Grab",this(),0,-10)); + } + else + { + ControlUp(obj); + return(true); + } + } + else + { + return(AddCommand(obj,"MoveTo",0,GetX(),GetY()+10)); + } +} + + diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/ActMap.txt new file mode 100644 index 00000000..69ad1741 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/ActMap.txt @@ -0,0 +1,44 @@ +[Action] +Name=Open +Procedure=NONE +Facet=0,0,15,30 +Directions=2 +Length=13 +FlipDir=1 +Delay=1 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Close +Procedure=NONE +Facet=0,0,15,30 +Directions=2 +Length=13 +FlipDir=1 +Delay=1 +Reverse=1 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Destroyed +Procedure=NONE +Facet=107,31,15,30 +Directions=2 +Length=4 +FlipDir=1 +Delay=2 +FacetTopFace=1 +NoOtherAction=1 +ObjectDisabled=1 +NextAction=Hold + +[Action] +Name=FrontSight +Procedure=NONE +Facet=66,30,40,30,-20,0 +Directions=1 +Length=1 +NextAction=Hold +FacetTopFace=1 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DefCore.txt new file mode 100644 index 00000000..2c32a541 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=LBDR +Version=4,9,8,2 +Name=Laboratory Door +Category=C4D_Structure +MaxUserSelect=5 +Width=15 +Height=30 +Offset=-7,-15 +Vertices=2 +VertexY=15,-15 +VertexFriction=100,100 +Value=50 +Mass=120 +Components=METL=6 +SolidMask=14,0,1,30,14,0 +TopFace=0,0,15,30,0,0 +Picture=0,30,64,64 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DescDE.txt new file mode 100644 index 00000000..e305c6dc --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DescDE.txt @@ -0,0 +1 @@ +Tür für einen Laborkomplex. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DescUS.txt new file mode 100644 index 00000000..cb6fb89b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/DescUS.txt @@ -0,0 +1 @@ +Door for a laboratory. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Graphics.png new file mode 100644 index 00000000..5a879f38 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/LabDoorClose.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/LabDoorClose.wav new file mode 100644 index 00000000..65d93214 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/LabDoorClose.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/LabDoorOpen.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/LabDoorOpen.wav new file mode 100644 index 00000000..2382ece5 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/LabDoorOpen.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Names.txt new file mode 100644 index 00000000..126c009c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Labortür +US:Laboratory Door \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Script.c new file mode 100644 index 00000000..967514b2 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Laboratory Door.c4d/Script.c @@ -0,0 +1,98 @@ +/*-- Labdoor --*/ + +#strict + +#include GBDR + +local Status, bBackground; + +//Einstellungem + +public func Initialize() +{ + SetDir(DIR_Right); + SetAction("Close"); + + UpdateSolidMask(); + _inherited(); + SetMaxDamage(100); +} + + +public func OnDmg(int iDmg, int iType) +{ + if(iType == DMG_Projectile) return(40); + if(iType == DMG_Melee) return(20); + if(iType == DMG_Energy) return(70); + if(iType == DMG_Explosion) return(-10); + + return(100); +} + +public func OnOpen() +{ + if( bBackground) return(false); + + if( GetAction() eq "Open" || Status) return(0); + + SetAction("Open"); + SetSolidMask(0); + Status = true; + //Sound + Sound("LabDoorOpen"); +} + +public func OnClose() +{ + if( bBackground) return(false); + + if( GetAction() eq "Close"|| !Status) return(0); + SetAction("Close"); + Status = false; + UpdateSolidMask(); + Sound("LabDoorClose"); +} + +public func OnDestroyed(iType) +{ + SetAction("Destroyed"); +} + +public func ShowFront() +{ + bBackground = true; + SetAction("FrontSight"); + SetSolidMask(); + + return(bBackground); +} + +public func UpdateSolidMask() +{ + if(GetDir() == DIR_Left) + return(SetSolidMask(14,0,1,30,14,0) ); + else + return(SetSolidMask(14,0,1,30,1,0) ); +} + +public func IsBulletTarget() { + if(bBackground) return(false); + return(_inherited()); + +} +public func CanBeLaserRecycled() { return(2); } + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + _inherited(extra); + if (destroyed) + extra[GetLength(extra)] = "SetAction(\"Destroyed\")"; + if (GetDir() == DIR_Left) { + extra[GetLength(extra)] = "SetDir(DIR_Left)"; + extra[GetLength(extra)] = "UpdateSolidMask()"; + } + if (bBackground) + extra[GetLength(extra)] = "ShowFront()"; +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Names.txt new file mode 100644 index 00000000..7fdd864b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Türen +US:Doors diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/ActMap.txt new file mode 100644 index 00000000..c6603ad6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/ActMap.txt @@ -0,0 +1,43 @@ +[Action] +Name=Closed +Procedure=NONE +Facet=0,0,20,30 +Directions=1 +Length=1 +FlipDir=0 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Open +Procedure=NONE +Facet=0,0,20,30 +Length=10 +Directions=1 +FlipDir=0 +FacetTopFace=1 +Delay=2 +EndCall=SetPathFree +NextAction=Opened + +[Action] +Name=Opened +Procedure=NONE +Facet=180,0,20,30 +Length=1 +Directions=1 +FlipDir=0 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Close +Procedure=NONE +Facet=0,0,20,30 +Length=10 +Directions=1 +FlipDir=0 +FacetTopFace=1 +Delay=2 +Reverse=1 +NextAction=Closed \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DefCore.txt new file mode 100644 index 00000000..a81a55a9 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=SEDR +Version=4,9,8,2 +Name=Sequium Door +Category=C4D_Structure +MaxUserSelect=3 +Width=20 +Height=30 +Offset=-10,-15 +Vertices=4 +VertexX=-6,-6,6,6 +VertexY=-14,14,-14,14 +VertexFriction=100,100,100,100 +Value=200 +Mass=2000 +Components=SEDR=1 +SolidMask=5,0,8,30,5,0 +TopFace=12,0,8,30,12,0 +Picture=0,30,64,64 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DescDE.txt new file mode 100644 index 00000000..b0d73f2b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DescDE.txt @@ -0,0 +1,2 @@ +Diese Tür ist mit Sequium verstärkt, die neuste Entdeckung und das härteste bekannte Material. +Bisher gibt es keine Waffe, die diese Tür vernichten könnte. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DescUS.txt new file mode 100644 index 00000000..47b8f252 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/DescUS.txt @@ -0,0 +1,2 @@ +This door is amplified with sequium the newest discovery and hardest known material. +No weapon known could destroy this door. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Graphics.png new file mode 100644 index 00000000..aeff4143 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Names.txt new file mode 100644 index 00000000..ece5991c --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sequiumtür +US:Sequium door \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Script.c new file mode 100644 index 00000000..b6cade45 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/Script.c @@ -0,0 +1,46 @@ +/*-- Sequium Door --*/ + +#strict + +#include GBDR + +local pathfree; + +public func Initialize() +{ + pathfree = false; + SetAction("Closed"); + _inherited(); + // not destroyable + SetMaxDamage(-1); +} + +public func OnOpen() +{ + if(GetAction() eq "Open" || GetAction() eq "Opened") return(); + SetAction("Open"); + Sound("SequiumDoorOpen"); +} + +public func OnClose() +{ + if(GetAction() eq "Closed" || GetAction() eq "Close") return(); + SetAction("Close"); + SetSolidMask(5, 0, 8, 30, 5, 0); + Sound("SequiumDoorClose"); +} + +public func SetPathFree() +{ + pathfree = true; + SetSolidMask(); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + _inherited(extra); + if (pathfree) + extra[GetLength(extra)] = "SetPathFree()"; +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/SequiumDoorClose.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/SequiumDoorClose.wav new file mode 100644 index 00000000..cf435677 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/SequiumDoorClose.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/SequiumDoorOpen.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/SequiumDoorOpen.wav new file mode 100644 index 00000000..4a799fea Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/SequiumDoor.c4d/SequiumDoorOpen.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/ActMap.txt new file mode 100644 index 00000000..9604d71d --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/ActMap.txt @@ -0,0 +1,56 @@ +[Action] +Name=Closed +Procedure=NONE +Facet=120,0,12,30 +FacetTopFace=1 +Directions=1 +Length=1 +FlipDir=0 +NextAction=Hold + +[Action] +Name=Open +Procedure=NONE +Facet=0,0,12,30 +Length=9 +Directions=1 +FlipDir=0 +Delay=2 +EndCall=SetPathFree +FacetTopFace=1 +NextAction=Opened + +[Action] +Name=Opened +Procedure=NONE +Facet=108,0,12,30 +Length=1 +Directions=1 +FlipDir=0 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Close +Procedure=NONE +Facet=0,0,12,30 +Length=9 +Directions=1 +FlipDir=0 +Delay=2 +FacetTopFace=1 +Reverse=1 +NextAction=Closed + +[Action] +Name=Destroyed +Procedure=NONE +Facet=132,0,12,30 +Directions=1 +Length=1 +FlipDir=1 +FacetTopFace=1 +NoOtherAction=1 +ObjectDisabled=1 +NextAction=Hold + diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DefCore.txt new file mode 100644 index 00000000..99f3feb6 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=SLDR +Version=4,9,8,2 +Name=Slide Door +Category=C4D_Structure +MaxUserSelect=5 +Width=12 +Height=30 +Offset=-6,-15 +Vertices=2 +VertexY=-15,14 +VertexFriction=100,100 +Value=60 +Mass=1000 +Components=METL=10 +SolidMask=140,0,4,30,7,0 +TopFace=1,0,7,30,1,0 +Picture=0,30,64,64 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DescDE.txt new file mode 100644 index 00000000..237dad1f --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine hydraulische Tür aus purem Stahl. Kaum zu zerbrechen. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DescUS.txt new file mode 100644 index 00000000..d6f6f626 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/DescUS.txt @@ -0,0 +1 @@ +A hydraulic door. Hard to destroy. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Graphics.png new file mode 100644 index 00000000..bae5802d Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Names.txt new file mode 100644 index 00000000..54f128ee --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Hydraulische Schiebetür +US:Hydraulic Slide Door \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Script.c new file mode 100644 index 00000000..74fda31a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/Script.c @@ -0,0 +1,66 @@ +/*-- Slide Door --*/ + +#strict + +#include GBDR + +local pathfree; + +public func CanBeLaserRecycled() { return(2); } + +public func Initialize() +{ + pathfree = false; + SetAction("Closed"); + _inherited(); + SetMaxDamage(300); +} + +public func OnDmg(int iDmg, int iType) { + // diese Tür ist besonders dick + if(iType == DMG_Projectile) return(60); + if(iType == DMG_Melee) return(80); + if(iType == DMG_Energy) return(30); + if(iType == DMG_Explosion) return(0); + + return(100); +} + +public func OnOpen() +{ + if(GetAction() eq "Open" || GetAction() eq "Opened") return(); + SetAction("Open"); + Sound("SlideSteeldoorOpen"); +} + +public func OnClose() +{ + if(GetAction() eq "Closed" || GetAction() eq "Close") return(); + SetAction("Close"); + Sound("SlideSteeldoorClose"); + SetSolidMask(140, 0, 4, 30, 7, 0); +} + +public func SetPathFree() +{ + pathfree = true; + SetSolidMask(); +} + +public func OnDestroyed(iType) +{ + //Kleinen Explosionseffekt + CreateObject(TIM1, 0,0, -1)->Explode(20); + SetAction("Destroyed"); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + _inherited(extra); + if (destroyed) + extra[GetLength(extra)] = "SetAction(\"Destroyed\")"; + if (pathfree) + extra[GetLength(extra)] = "SetPathFree()"; +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/SlideSteeldoorClose.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/SlideSteeldoorClose.wav new file mode 100644 index 00000000..e0509095 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/SlideSteeldoorClose.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/SlideSteeldoorOpen.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/SlideSteeldoorOpen.wav new file mode 100644 index 00000000..9507842c Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Slide Steeldoor.c4d/SlideSteeldoorOpen.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/ActMap.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/ActMap.txt new file mode 100644 index 00000000..ee26c22b --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/ActMap.txt @@ -0,0 +1,27 @@ +[Action] +Name=Open +Procedure=NONE +Facet=0,0,34,30 +Length=10 +Delay=1 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Close +Procedure=NONE +Facet=0,0,34,30 +Length=10 +Delay=1 +Reverse=1 +FacetTopFace=1 +NextAction=Hold + +[Action] +Name=Destroyed +Procedure=NONE +Facet=319,0,9,30,13,0 +Length=1 +NoOtherAction=1 +ObjectDisabled=1 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DefCore.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DefCore.txt new file mode 100644 index 00000000..8c3ea351 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=STDR +Version=4,9,8,2 +Name=Steeldoor +Category=C4D_Structure +MaxUserSelect=10 +Width=34 +Height=30 +Offset=-17,-15 +Vertices=4 +VertexX=-8,-8,8,8 +VertexY=14,-14,14,-14 +VertexFriction=100,100,100,100 +Value=13 +Mass=120 +Components=METL=4 +SolidMask=12,0,10,30,12,0 +TopFace=19,0,3,30,19,0 +Picture=0,30,64,64 diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DescDE.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DescDE.txt new file mode 100644 index 00000000..9a9811a5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine Stahltür. Geht auf... und zu. Die Stahltür hält Feuer zuverlässig ab, ist aber anfällig für Energie und Projektile \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DescUS.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DescUS.txt new file mode 100644 index 00000000..d17f6f7a --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/DescUS.txt @@ -0,0 +1 @@ +A steeldoor. Opens and closes. It is fire-resistant, but futile against energy and projectile attacks. \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Graphics.png b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Graphics.png new file mode 100644 index 00000000..5c6072a9 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Graphics.png differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Names.txt new file mode 100644 index 00000000..ef5a7445 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Stahltür +US:Steeldoor \ No newline at end of file diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Script.c b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Script.c new file mode 100644 index 00000000..8499a895 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/Script.c @@ -0,0 +1,62 @@ +/*-- Steeldoor --*/ + +#strict + +#include GBDR + +local Status; + +public func CanBeLaserRecycled() { return(2); } + +//Einstellungem + +public func Initialize() +{ + SetAction("Close"); + _inherited(); + SetMaxDamage(80); +} + +public func OnDmg(int iDmg, int iType) { + + // diese Tür ist nicht besonders dick + if(iType == DMG_Projectile) return(50); + if(iType == DMG_Melee) return(20); + if(iType == DMG_Energy) return(40); + if(iType == DMG_Explosion) return(0); + + return(100); +} + +public func OnOpen() +{ + if( GetAction() eq "Open" || Status) return(0); + + SetAction("Open"); + SetSolidMask(0); + Status = true; + //Sound + Sound("SteeldoorOpen"); +} + +public func OnClose() +{ + if( GetAction() eq "Close"|| !Status) return(0); + SetAction("Close"); + Status = false; + SetSolidMask(12, 0, 10, 30, 12, 0); + Sound("SteeldoorClose"); +} + +public func OnDestroyed(iType) +{ + SetAction("Destroyed"); +} + +/* Serialisierung */ + +public func Serialize(array& extra) +{ + if (destroyed) + extra[GetLength(extra)] = "SetAction(\"Destroyed\")"; +} diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/SteeldoorClose.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/SteeldoorClose.wav new file mode 100644 index 00000000..02e5195f Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/SteeldoorClose.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/SteeldoorOpen.wav b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/SteeldoorOpen.wav new file mode 100644 index 00000000..85f0bac6 Binary files /dev/null and b/Hazard.c4d/Structural.c4d/Passages.c4d/Doors.c4d/Steeldoor.c4d/SteeldoorOpen.wav differ diff --git a/Hazard.c4d/Structural.c4d/Passages.c4d/Names.txt b/Hazard.c4d/Structural.c4d/Passages.c4d/Names.txt new file mode 100644 index 00000000..f769a6a5 --- /dev/null +++ b/Hazard.c4d/Structural.c4d/Passages.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Durchgänge +US:Passages diff --git a/Hazard.c4d/System.c4g/AlienEffects.c b/Hazard.c4d/System.c4g/AlienEffects.c new file mode 100644 index 00000000..7d1697a1 --- /dev/null +++ b/Hazard.c4d/System.c4g/AlienEffects.c @@ -0,0 +1,79 @@ +/*-- Alienpartikeleffekte --*/ + +#strict + +global func AlienSplatter(int iSize, int iX, int iY, int iColor) { + // not on sky + if(GetMaterialVal("Density","Material",GetMaterial(iX,iY)) != 0 + || GetMaterial(iX,iY) == -1) return(); + + // behind everything (like the burn mark of the explosion) + var boom; + if(!ObjectCount(BOOM)) boom = CreateObject(BOOM,0,0,-1); + else boom = FindObject(BOOM); + + var r = Random(360); + var xdir = Sin(r,100); + var ydir = -Cos(r,100); + CreateParticle("AlienSplatter",iX,iY,xdir,ydir,iSize*5,iColor,boom,1); +} + +global func AlienBlood(int iSize, int iX, int iY, int iColor, object attach) { + + var rand = Random(360); + for(var i=0; i<5; ++i) { + var size = iSize*RandomX(10,20)/15*GetCon()/100; + var angle = rand+i*RandomX(50,80); + var xdir = Sin(angle,100); + var ydir = -Cos(angle,100); + var xoff = Sin(angle,iSize/2-5); + var yoff = -Cos(angle,iSize/2-5); + CreateParticle("AlienBlood",iX+xoff,iY+yoff,xdir,ydir,iSize*5,iColor, attach); + } + +} + +global func AlienHive(int iSize, int iX, int iY, int iColor, object attach, bool foreground) { + + // not on sky + //if(GetMaterialVal("Density","Material",GetMaterial(iX,iY)) != 0 + // || GetMaterial(iX,iY) == -1) return(); + + var boom; + // to which object (if any) + if(attach) boom = attach; + else if(!foreground) { + if(!ObjectCount(BOOM)) boom = CreateObject(BOOM,0,0,-1); + else boom = FindObject(BOOM); + } + + var r = Random(360); + var xdir = Sin(r,100); + var ydir = -Cos(r,100); + CreateParticle("AlienHive",iX,iY,xdir,ydir,iSize*5,iColor,boom,!foreground); +} + +/* Alienpartikel */ + +global func AddAlienFlareEffect(object target, int size) { + if(!target) target = this; + if(!target) return; + + AddEffect("AlienFlareEffect", target, 1, 1, 0, 0,size); + +} + +global func FxAlienFlareEffectStart(object target, int effect, int temp, size) { + EffectVar(0,target,effect) = size; +} + +global func FxAlienFlareEffectTimer(object target, int effect, int time) +{ + var xdir = GetXDir(target); + var ydir = GetYDir(target); + var size = EffectVar(0,target,effect)+RandomX(-100,100); + + if(!Contained(target)) + CreateParticle("FrSprk", GetX(target), GetY(target), xdir/3+RandomX(-10, 10), ydir/3+RandomX(-10, 10), + size, RGBa(160,255,0,0)); +} diff --git a/Hazard.c4d/System.c4g/Ammo.c b/Hazard.c4d/System.c4g/Ammo.c new file mode 100644 index 00000000..bf0f814a --- /dev/null +++ b/Hazard.c4d/System.c4g/Ammo.c @@ -0,0 +1,93 @@ +/* Ammosystem */ + +#strict + +global func DoAmmo(id ammoid, int change, object target) +{ + // gar keine Munition + if(!(ammoid->~IsAmmo())) return(0); + + // Kann 0 sein bei Objektlokalen Aufrufen. + if(!target) target=this(); + // Entsprechendes Munitionslagerobjekt suchen + var obj = target ->~ AmmoStoring(); + if(!obj) obj = target; + // no ammo rule + if(ObjectCount(NOAM)) + if(obj ->~ IsAmmoStorage()) + return(0); + var ammo=FindContents(ammoid, obj); + // Gibts schon ein Objekt der Munitionsart? OMGOMG, nein! + if(!ammo) + // Schnell eines erstellen + ammo=CreateContents(ammoid, obj); + //if(!ammo) Log("Panik - Munitionsobjekt wird nicht erstellt"); + // Alten Munitionsstand speichern + var oldammoamount = obj->GetAmmo(ammoid); + var truechange; + var maxamount = ammo->~MaxAmount(); + // Der neue Wert wird ausgerechnet, darf aber nicht größer als eventuelles MaxAmount() und nicht kleiner als 0 sein + if(maxamount == 0) + truechange= Max(oldammoamount+change, 0); + else + truechange= Max(Min(maxamount, oldammoamount+change), 0); + + // Neuer Wert dem Objekt geben, in Lokale ammoamount + ammo->Local(0)=truechange; + // Wenn Muni alle, Objekt entfernen + if(truechange==0) RemoveObject(ammo); + + // Callback an das Objekt, dass sich sein Ammo geändert hat + target->~ OnAmmoChange(ammoid, truechange); + + // Differenz zurückgeben: Tatsächliche Änderung. + return(truechange-oldammoamount); +} + +global func GetAmmo(id ammoid, object target) +{ + // gar keine Munition + if(!(ammoid->~IsAmmo())) return(0); + + // Kann 0 sein bei Objektlokalen Aufrufen. + if(!target) target=this(); + // Entsprechendes Munitionslagerobjekt suchen + var obj = target ->~ AmmoStoring(); + if(!obj) obj = target; + // no ammo rule + if(ObjectCount(NOAM)) + if(obj ->~ IsAmmoStorage()) + return(0); + var ammo; + if(ammo=FindContents(ammoid, obj)) + return(ammo->Local(0)); + else + return(0); +} + +global func CheckAmmo(id ammoid, int count) { + + if(!ammoid) return(false); + + // gar keine Munition + if(!(ammoid->~IsAmmo())) return(false); + + if(!Par(2)) Par(2) = this(); + var iSum = 0; + + // search + for(var i=2; i<10 && Par(i); ++i) { + // no ammo rule + var obj = Par(i) ->~ AmmoStoring(); + if(!obj) obj = Par(i); + if(ObjectCount(NOAM)) + if(obj ->~ IsAmmoStorage()) + return(true); + iSum += GetAmmo(ammoid,obj); + } + + + if(iSum >= count) + return(true); + return(false); +} diff --git a/Hazard.c4d/System.c4g/Arena.c b/Hazard.c4d/System.c4g/Arena.c new file mode 100644 index 00000000..f90e57c6 --- /dev/null +++ b/Hazard.c4d/System.c4g/Arena.c @@ -0,0 +1,98 @@ +#strict 2 + +global func Arena_ChooserFinished() +{ + // Bei InstaGIB werden alle Spawnpunkte entfernt und die Waffen aus den Spielern entfernt + if(FindObject(IGIB)) + { + for(var spwn in FindObjects(Find_ID(SPNP))) + RemoveObject(spwn); + for(var clonk in FindObjects(Find_OCF(OCF_CrewMember))) + while(Contents(0, clonk)) + RemoveObject(Contents(0, clonk)); + for(var bonus in FindObjects(Find_ID(BSPN))) + { + // Und den Bonusspawnpunkt anpassen + bonus->~RemoveBonus(AMPB); // Ammopack weg + bonus->~RemoveBonus(BSKB); // Berserker weg + bonus->~RemoveBonus(HELB); // Heal weg + } + } + // Bei Keine-Munition werden Munispawns entfernt + if(FindObject(NOAM)) + { + for(var spwn in FindObjects(Find_ID(SPNP))) + if(Contents(0, spwn)->~IsAmmoPacket()) + RemoveObject(spwn); + // Und den Bonusspawnpunkt anpassen + for(var bonus in FindObjects(Find_ID(BSPN))) + bonus->~RemoveBonus(AMPB); // Ammopack weg + } + + // Bei Waffenwahl werden alle Nicht-Munispawns entfernt + var wp = FindObject(WPCH); + if(wp) + { + for(var spwn in FindObjects(Find_ID(SPNP))) + if(!(Contents(0, spwn)->~IsAmmoPacket())) + RemoveObject(spwn); + for(var bonus in FindObjects(Find_ID(BSPN))) + bonus->~AddBonus(MNYB); // Money dazu + } +} + +global func Arena_RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + // Kein ordentlicher Spieler? + if(GetOwner(pCrew) == NO_OWNER || iPlr == NO_OWNER) + return; + // Kein Team + if(!iTeam) iTeam = GetPlayerTeam(iPlr); + // Clonk tot? + if(!GetAlive(pCrew)) + pCrew = Arena_RelaunchClonk(iPlr, pCrew); + // Zufallsposition + var pos = GameCall("RelaunchPosition",iTeam); + if(!pos) return; + var iX = pos[0]; + var iY = pos[1]; + // Lecker Waffen + if(!FindObject(IGIB)) + { + var pistol = CreateContents(PIWP, pCrew); + pistol->DoAmmo(pistol->GetFMData(FM_AmmoID), pistol->GetFMData(FM_AmmoLoad)); + DoAmmo(pistol->GetFMData(FM_AmmoID), pistol->GetFMData(FM_AmmoLoad), pCrew); + DoAmmo(GRAM, 2, pCrew); + } + if(Contained(pCrew)) + SetPosition(iX, iY, Contained(pCrew)); + else + SetPosition(iX, iY, pCrew); + // Fertig gerelauncht +} + +global func Arena_RelaunchClonk(int iPlr, object pCursor) +{ + var pClonk = CreateObject(HZCK, 10, 10, iPlr); + if(pCursor) + GrabObjectInfo(pCursor, pClonk); + else + MakeCrewMember(pClonk, iPlr); + + DoEnergy(+150, pClonk); + SetCursor(iPlr, pClonk); + SetPlrView(iPlr, pClonk); + + // Geldspritze + if(FindObject(WPCH)) + { + DoWealth(iPlr, +25); + } + + // Wegstecken + var tim = CreateObject(TIM2, 10, 10, -1); + pClonk->Enter(tim); + PlayerMessage(iPlr, Format("@%s", GetName(pClonk)), tim); + + return pClonk; +} \ No newline at end of file diff --git a/Hazard.c4d/System.c4g/Damage.c b/Hazard.c4d/System.c4g/Damage.c new file mode 100644 index 00000000..b65c6889 --- /dev/null +++ b/Hazard.c4d/System.c4g/Damage.c @@ -0,0 +1,56 @@ +/* Schadenssystem */ + +#strict + +//Schadens-Konstanten +static const DMG_Melee = 1; +static const DMG_Projectile = 2; +static const DMG_Fire = 3; +static const DMG_Explosion = 4; +static const DMG_Energy = 5; +static const DMG_Bio = 6; + +global func DoDmg(int iDmg, int iType, object pTarget, int iPrecision, int dmgplayer) +{ + if(!pTarget) + if(!(pTarget = this())) + return(0); + if(!iPrecision) + iPrecision = 10; + + var dmg; + var dmgdealer = dmgplayer-1; + if(dmgdealer < 0) + { + dmgdealer = GetController(this()); + if(!this()) dmgdealer = -1; + } + + var red = pTarget->~OnDmg(iDmg, iType); //reduction + // reduction + dmg = iDmg*(100-red)*iPrecision; + if(!dmg) return; + + // Killer setzen + if(this() && pTarget->GetOCF() & OCF_CrewMember || dmgplayer) + { + DebugLog("DoDmg sets killer: %d, owner of %s", "damage", this()->GetOwner(), this()->GetName()); + SetKiller(dmgdealer, pTarget); + } + + //Schaden machen + var pFrom = this(); + pTarget->~LastDamageType(iType); + pTarget->~OnHit(dmg/1000, iType, pFrom); + + // testweise: Schadensdings + //var rgb = RGB(255,0,0); + //if(dmg/1000 != 0){ + // if(dmg < 0) rgb = RGB(0,255,0); + // CreateObject(CMBT,AbsX(GetX(pTarget)),AbsY(GetY(pTarget)),-1) -> Set(0, Format("%d",dmg/1000), rgb); + //} + + if(GetCategory(pTarget) & C4D_Living) + return(DoEnergy(-dmg,pTarget, true, 0, dmgdealer + 1)); + return(DoDamage(dmg/1000,pTarget)); +} diff --git a/Hazard.c4d/System.c4g/Debug.c b/Hazard.c4d/System.c4g/Debug.c new file mode 100644 index 00000000..8019a448 --- /dev/null +++ b/Hazard.c4d/System.c4g/Debug.c @@ -0,0 +1,60 @@ +/* globale Log-Funktionen */ + +#strict + +static LOG_debug; + +// Logs an error message +global func ErrorLog(string msg) { + var out = Format(msg,Par(1),Par(2),Par(3),Par(4),Par(5),Par(6),Par(7),Par(8),Par(9)); + var out = Format("ERROR: %s",out); + Log(out); + if(this()) + Log(" in: %s @(%d,%d)",GetName(),GetX(),GetY()); +} + +// Logs if debug mode is on +global func DebugLog(string msg, name) { + if(Debug(name)) + Log(msg,Par(2),Par(3),Par(4),Par(5),Par(6),Par(7),Par(8),Par(9)); +} + +// Displays the message if the debug mode is on +// always per-object +global func DebugMessage(string msg, name) { + if(Debug(name)) + Message(msg,this(),Par(2),Par(3),Par(4),Par(5),Par(6),Par(7),Par(8),Par(9)); +} + +// Checks wether the debug mode is on +global func Debug(name) { + if(!LOG_debug) return(false); + + // this namespace on + if(LOG_debug->ContainsItem(name)) return(true); + + // generally on + if(LOG_debug->ContainsItem("all")) return(true); + + return(false); +} + +global func DebugMode(bool switch, name) { + + if(!name) name = "all"; + + // create the set? + if(!LOG_debug) LOG_debug = CreateObject(L_ST); + + // on + if(switch) { + if(!(LOG_debug->ContainsItem(name))) + LOG_debug->AddItem(name); + } + // off + else { + if(name == "all") LOG_debug->Clear(); + else LOG_debug->RemoveItem(name); + } +} + diff --git a/Hazard.c4d/System.c4g/EMPShocked.c b/Hazard.c4d/System.c4g/EMPShocked.c new file mode 100644 index 00000000..4457c2bd --- /dev/null +++ b/Hazard.c4d/System.c4g/EMPShocked.c @@ -0,0 +1,50 @@ +/*-- EMP Shocked--*/ + +#strict 2 + +global func EMPShockEffect(int iTime) { + AddEffect("EMPDamaged", this(), 190, 5, 0, 0,iTime); +} + +global func EMPShocked() { + return GetEffect("EMPDamaged",this()); +} + +global func FxEMPDamagedStart(object pTarget, int iEffectNumber, int iTemp, int iTime) +{ + EffectVar(0, pTarget, iEffectNumber) = iTime; + EffectVar(1, pTarget, iEffectNumber) = pTarget->GetClrModulation(); + pTarget->SetClrModulation(RGB(200,200,200)); +} + +global func FxEMPDamagedTimer(object pTarget, int iEffectNumber, int iEffectTime) +{ + + if(EffectVar(0, pTarget, iEffectNumber) < iEffectTime) + return -1; + // effects + if(!(pTarget->~Contained())) { + var wdt = GetDefWidth(GetID(pTarget)); + var hgt = GetDefHeight(GetID(pTarget)); + Sparks(2,0,GetX(pTarget)+RandomX(-wdt/2,wdt/2),GetY(pTarget)+RandomX(-hgt/2,hgt/2)); + if(!Random(3)) { + var pLaser = CreateObject(LASR, GetX(pTarget)+RandomX(-wdt/4,wdt/4), GetY(pTarget)+RandomX(-hgt/4,hgt/4), -1); + pLaser->SetClrModulation(RGBa(255, 200, 0, 64)); + pLaser->Set(Random(360), 8, Sqrt(wdt*wdt/4+hgt*hgt/4), 3); + } + } +} + +global func FxEMPDamagedAdd(object pTarget, int iEffectNumber, string szNewEffectName, int iNewEffectTimer, iTime) { + EffectVar(0,pTarget,iEffectNumber) = Max(EffectVar(0,pTarget,iEffectNumber),iTime); +} + +global func FxEMPDamagedEffect(string szNewEffectName, object pTarget, int iEffectNumber, int iNewEffectNumber) { + if(szNewEffectName == "EMPDamaged") + return -2; +} + +global func FxEMPDamagedStop(object pTarget, int iEffectNumber) { + pTarget->SetClrModulation(EffectVar(1, pTarget, iEffectNumber)); + pTarget->~EMPShockEnd(); +} \ No newline at end of file diff --git a/Hazard.c4d/System.c4g/EnemyChecks.c b/Hazard.c4d/System.c4g/EnemyChecks.c new file mode 100644 index 00000000..b994023e --- /dev/null +++ b/Hazard.c4d/System.c4g/EnemyChecks.c @@ -0,0 +1,229 @@ +#strict 2 + +/*-- Teams für besitzerlose Objekte --*/ + +// iTeam = 0 entfernt die Teamzugehörigkeit +global func SetTeam(int iTeam, object pObject) +{ + if(!pObject) + if(!(pObject = this)) + return; + // Null / unter Null? + if(iTeam <= 0) return RemoveEffect("OwnerlessTeam", pObject); + // nur für besitzerlose Objekte + if(GetOwner(pObject) != NO_OWNER) return; + // Team setzen + var eff = GetEffect("OwnerlessTeam", pObject); + if(!eff) + eff = AddEffect("OwnerlessTeam", pObject, 1); + EffectVar(0, pObject, eff) = iTeam; + return eff; +} + +// Team Dings abfragen +global func GetTeam(object pObject) +{ + if(!pObject) + if(!(pObject = this)) + return 0; + + // für besitzerlose wird der Effekt gefragt, ansonsten ganz normal + if(GetOwner(pObject) == NO_OWNER) { + return EffectVar(0, pObject, GetEffect("OwnerlessTeam", pObject)); + } else { + return GetPlayerTeam(GetOwner(pObject)); + } +} + +/*-- Treffer und Gegnerchecks --*/ + +// Wird für Trefferchecks benutzt +// Checkt ob pObj von pObj2 von der Verfeindung her getroffen werden kann +// berücksichtigt Friendly Fire +// tote Feinde gelten hier als keine Feinde +global func CheckEnemy(object pObj, object pObj2, bool findEnemy) { + + if(!pObj) return false; + + if(!pObj2) + pObj2 = this; + if(!pObj2) return false; + + // tote Lebewesen nicht treffen + if(GetCategory(pObj) & C4D_Living) + if(!GetAlive(pObj)) + return false; + + if(GetCategory(pObj2) & C4D_Living) + if(!GetAlive(pObj2)) + return false; + + var own1 = GetOwner(pObj); + var own2 = GetOwner(pObj2); + + // Feinde treffen + if(Hostile(own1, own2)) { + return true; + } + + // eines der Objekte hat keinen Besitzer + var noown1 = (own1 == NO_OWNER); + var noown2 = (own2 == NO_OWNER); + + var team1 = GetTeam(pObj); + var team2 = GetTeam(pObj2); + + if(noown1 || noown2) { + + // im selben Team: nicht treffen/finden + // 0 ist kein Team + if( (team1 == team2) && (team1 || team2)) { } + + // beide haben kein Team aber beide haben keinen Besitzer: nicht treffen/finden + else if( !(team1 || team2) && noown1 && noown2) { } + + // ansonsten (Sind in unterschiedlichen Teams bzw. bei keinem Team haben sie beide keinen Besitzer) + else { + + // bei Trefferchecks, treffen + if(!findEnemy) + return true; + + // bei Feindchecks, anvisieren wenn ein Objekt eine Bedrohung + if(pObj->~IsThreat()) { + return true; + } + } + + } + + // bei Trefferchecks treffen wenn FF aktiviert ist + if(FriendlyFire() && !findEnemy) { + if(!(pObj->~IgnoreFriendlyFire()) + && !(pObj2->~IgnoreFriendlyFire()) ) { + return true; + } + } + + return false; +} + +// angegebenes Objekt ist grundsätzlich würdig, ein Ziel zu sein +// wenn maxDist angegeben, werden auch Distanz etc überprüft +// ansonsten gleiche Parameter wie FindTargets +global func CheckTarget(object pTarget, object pObj, int maxDist, int maxAngle, int angle, bool disregardLineOfSight) { + + if(!pObj) + pObj = this; + + // kein Objekt ist nicht gut + if(!pTarget) return false; + + if(pObj == pTarget) { + return false; + } + + if(Contained(pTarget)) { + return false; + } + + if(!(pTarget->~IsBulletTarget(GetID(pObj),0,pObj) || pTarget->GetOCF() & OCF_Alive)) { + return false; + } + + if(!CheckEnemy(pTarget,pObj, true)) { + return false; + } + + // unsichtbare Objekte werden halt einfach nicht gesehen... + if(!CheckVisibility(pTarget, pObj)) { + return false; + } + + if(maxDist) { + + var x = GetX(pObj); + var y = GetY(pObj); + var ox = GetX(pTarget); + var oy = GetY(pTarget); + + if(!maxAngle) + maxAngle = 180; + + if(!disregardLineOfSight) + if(!PathFree(x,y,ox,oy)) { + return false; + } + + var diffAngle = Abs(Normalize(Angle(x,y,ox,oy)-angle,-180)); + if(diffAngle > maxAngle){ + return false; + } + if(maxDist < Distance(x,y,ox,oy)) { + return false; + } + + } + + return true; +} + +// Ziele finden: +// pObj - Objekt dass sucht +// maxDist - maximale Distanz +// maxAngle - maximaler Winkel im Suchtrichter (opt) +// angle - Richtung des Suchtrichters (opt) +// disregardLineOfSight - ob das Objekt hinter einr Wand ist, ist egal (opt) +global func FindTargets(object pObj, int maxDist, int maxAngle, int angle, bool disregardLineOfSight) { + + if(!pObj) + pObj = this; + + if(!maxAngle) + maxAngle = 180; + + var pT; + var targets = CreateArray(); + + var x = GetX(pObj); + var y = GetY(pObj); + + var preTargets = FindObjects( + Find_Distance(maxDist, AbsX(x), AbsY(y)), + Find_Exclude(pObj), + Find_NoContainer(), + Find_Or( + Find_Func("IsBulletTarget",GetID(pObj),0,pObj), + Find_OCF(OCF_Alive)), + Sort_Distance() + //Find_Hostile(GetOwner()), // schon in CheckEnemy drin + ); + + for(pT in preTargets) { + var ox = GetX(pT); + var oy = GetY(pT); + + if(!CheckEnemy(pT,pObj, true)) { + continue; + } + + // Pfad frei + if(!disregardLineOfSight) + if(!PathFree(x,y,ox,oy)) + continue; + + // Im Suchkegel + var diffAngle = Abs(Normalize(Angle(x,y,ox,oy)-angle,-180)); + if(diffAngle > maxAngle) + continue; + + // unsichtbare Ziele + if(!CheckVisibility(pT, pObj)) + continue; + + // dann rein in Ergebnismenge... + targets[GetLength(targets)] = pT; + } + + return targets; +} diff --git a/Hazard.c4d/System.c4g/Fading.c b/Hazard.c4d/System.c4g/Fading.c new file mode 100644 index 00000000..1b8b3d35 --- /dev/null +++ b/Hazard.c4d/System.c4g/Fading.c @@ -0,0 +1,93 @@ +/*-- Fading --*/ + +#strict + +global func SetObjAlpha(byAlpha, pObj,iLayer) +{ + byAlpha = BoundBy(byAlpha,0,255); + var dwClrMod=GetClrModulation(pObj,iLayer); + if(!dwClrMod) + dwClrMod=RGB(255,255,255); + + dwClrMod=SetRGBaValue(dwClrMod,byAlpha); + if(iLayer) + return SetClrModulation(dwClrMod, pObj,iLayer); + else + return SetClrModulation(dwClrMod, pObj); +} + +global func FxFadeOutStart(target, no, temp, int level, int speed) +{ + if(!level) + EffectVar(1, target, no) = 255; + else + EffectVar(1, target, no) = level; + + if(!speed) speed = 1; + EffectVar(2, target, no) = speed; +} + +global func FxFadeOutTimer(target, no) +{ + EffectVar(0, target, no) += EffectVar(2, target, no); + + var alpha = EffectVar(0, target, no); + var maxAlpha = EffectVar(1, target, no); + SetObjAlpha(alpha, target); + if(alpha >= maxAlpha) + { + if(maxAlpha >= 255) RemoveObject(target); + return -1; + } +} + +global func FadeOut(object pObject, int level, int speed) +{ + if(!pObject) + pObject = this(); + + if(GetEffect("*FadeOut*", pObject)) return(); + return(AddEffect("FadeOut", pObject, 101, 2,0,0,level,speed)); +} + +global func FxFadeInStart(target, no, temp, int level, int speed) +{ + if(!speed) speed = 1; + + EffectVar(0, target, no) = 255; + EffectVar(1, target, no) = level; + EffectVar(2, target, no) = speed; +} + +global func FxFadeInTimer(target, no) +{ + EffectVar(0, target, no) -= EffectVar(2, target, no); + + var alpha = EffectVar(0, target, no); + var maxAlpha = EffectVar(1, target, no); + + SetObjAlpha(alpha, target); + + if(alpha <= maxAlpha) return -1; +} + +global func FadeIn(object pObject, int level, int speed) +{ + if(!pObject) + pObject = this(); + + if(GetEffect("*FadeIn*", pObject)) return(); + SetObjAlpha(255, pObject); + return(AddEffect("FadeIn", pObject, 101, 2,0,0,level,speed)); +} + +global func StopFading(int color, object pObject) { + if(!pObject) + pObject = this(); + + var eff = GetEffectCount("*Fade*",pObject); + for(eff; eff; eff--) + RemoveEffect("*Fade*",pObject); + + SetClrModulation(color,pObject); +} diff --git a/Hazard.c4d/System.c4g/Funcs.c b/Hazard.c4d/System.c4g/Funcs.c new file mode 100644 index 00000000..76f8241f --- /dev/null +++ b/Hazard.c4d/System.c4g/Funcs.c @@ -0,0 +1,87 @@ +#strict 2 + +global func Chance(int chance) { // chance from 0 to 100% + return Random(100) < chance; +} + +global func Normalize(int iAngle, int iStart, int iPrecision) { + if(!iPrecision) iPrecision = 1; + var iEnd = iPrecision*360+iStart; + + while(iAngle=iEnd) iAngle -= iPrecision*360; + + return iAngle; +} + +global func CheckVisibility(object Obj1, object Obj2) { // if Owner of Obj2 can see Obj1 + if(!Obj2) + Obj2 = this; + + var vis = GetVisibility(Obj1); + if(vis != VIS_All) { + var own1 = GetOwner(Obj1); + var own2 = GetOwner(Obj2); + + // VIS Owner + if(vis & VIS_Owner) + if(own1 == own2) + return true; + // VIS Enemies + if(vis & VIS_Enemies) + if(Hostile(own1,own2)) + return true; + // VIS Allies + if(vis & VIS_Allies) + if(!Hostile(own1,own2)) + return true; + // VIS Local + if(vis & VIS_Local) { + var lo = own2/32; + var bit = 1 << own2%32; + // man, kompliziert... + if(bit & Local(lo,Obj1)) + return true; + } + // sonst gibt es keine Modi + return false; + } + return true; +} + +global func GetShooter(object weapon) { + + var shooter; + + if(!weapon) return; + + // Waffe? + if(weapon->~IsWeapon()) { + shooter = weapon->GetUser(); + // Schütze ist irgendwo drin + if(Contained(shooter)) + shooter = Contained(shooter); + //oder fässt was an + if(shooter) + if(shooter->GetActionTarget()) + shooter = GetActionTarget(); + } + + // noch immer nichst gefunden? + if(!shooter) + // dann einfach weapon nehmen. + shooter = weapon; + + return shooter; +} + +global func AngleDiff(a1,a2,p) { + if(!p) p=1; + a1 %= 360*p; a2 %= 360*p; + while(a1<0) a1+=360*p; + while(a2<0) a2+=360*p; + var r1 = Normalize(a2-a1,-180*p,p); + var r2 = Normalize(a2-a1-360*p,-180*p,p); + if(Abs(r1) < Abs(r2)) return(r1); + else return(r2); +} diff --git a/Hazard.c4d/System.c4g/JumpAndRun.c b/Hazard.c4d/System.c4g/JumpAndRun.c new file mode 100644 index 00000000..de5d57f0 --- /dev/null +++ b/Hazard.c4d/System.c4g/JumpAndRun.c @@ -0,0 +1,120 @@ +/*-- Hilfsfunktionen für JumpAndRun-Steuerung --*/ + +#strict + +/* ComDir */ + +global func ComDirTransform(int comdir, int tocomdir) +{ + if (comdir == tocomdir) return (comdir); + if (comdir == COMD_Stop) return (tocomdir); + if (comdir == (tocomdir + 3) % 8 + 1) return (COMD_Stop); + if (Inside(comdir, tocomdir + 1, tocomdir + 3)) return (comdir - 1); + if (Inside(comdir, tocomdir - 1, tocomdir - 3)) return (comdir + 1); + if (Inside(comdir, tocomdir - 7, tocomdir - 5)) return ((comdir + 6) % 8 + 1); + return (comdir % 8 + 1); +} + +global func ComDirLike(int comdir1, int comdir2) +{ + if (comdir1 == comdir2) return (true); + if (comdir1 == COMD_Stop || comdir2 == COMD_Stop) return(false); + if (comdir1 % 8 + 1 == comdir2) return (true); + if (comdir1 == comdir2 % 8 + 1) return (true); + return (false); +} + +/* Zielen von Armbrust/Katapult/Bogen/Winchester/etc. */ + +global func AimStdConf(int conf) +{ + var old_phase = GetPhase(); + SetPhase(BoundBy(GetPhase()+conf, 0, GetActMapVal("Length", GetAction(), GetID())-1)); + return(GetPhase() != old_phase); +} + +global func AimConf(string conffunc, int conf, object controller, id def) +{ + if(conffunc) + { + if(this()) + return(ProtectedCall(this(), conffunc, conf, controller)); + else if(def) + return(DefinitionCall(def, conffunc, conf, controller)); + else + // Global call via eval? + ; + } + + // Standard über SetPhase + return(AimStdConf()); +} + +global func AimUpdate(object controller, int comdir, int interval, string conffunc, id def) +{ + // Globaler Effekt, wenn this() 0 ist (DefinitionCall). + if(GetPlrCoreJumpAndRunControl(controller->GetController())) + { + AimCancel(controller); + + if(ComDirLike(comdir, COMD_Up)) + AddEffect("IntJnRAim", this(), 1, interval, 0, 0, conffunc, -1, controller, def); + if(ComDirLike(comdir, COMD_Down)) + AddEffect("IntJnRAim", this(), 1, interval, 0, 0, conffunc, 1, controller, def); + } +} + +global func AimUp(object controller, int interval, string conffunc, id def) +{ + if(!GetPlrCoreJumpAndRunControl(controller->GetController())) + return(AimConf(conffunc, -1, controller, def)); +} + +global func AimDown(object controller, int interval, string conffunc, id def) +{ + if(!GetPlrCoreJumpAndRunControl(controller->GetController())) + return(AimConf(conffunc, 1, controller, def)); +} + +global func AimCancel(object controller) +{ + var count = GetEffectCount("IntJnRAim", this()); + while(count --) + { + var number = GetEffect("IntJnRAim", this()); + if(EffectVar(2, this(), number) != controller) continue; + RemoveEffect(0, this(), number); + } +} + +global func FxIntJnRAimStart(object target, int number, int temp, string conffunc, int conf, object controller, id def) +{ + if(temp) return(); + EffectVar(0, target, number) = conffunc; + EffectVar(1, target, number) = conf; + EffectVar(2, target, number) = controller; + EffectVar(3, target, number) = def; +// EffectVar(4, target, number) = (controller != 0); // Speichert, ob ueberhaupt ein Controller gegeben war +} + +global func FxIntJnRAimTimer(object target, int number, int time) +{ + // Controller weg? + var controller = EffectVar(2, target, number); + if(!controller) return(-1); + + // Controller muss Fahrzeug anfassen + if(target) + // Wenn target und controller das selbe Fahrzeug ist, nichts tun. + if(target->GetCategory() & C4D_Vehicle && target != controller) + if(controller->GetProcedure() ne "PUSH" || controller->GetActionTarget() != target) + return(-1); + + if(target) + target->AimConf(EffectVar(0, target, number), EffectVar(1, target, number), EffectVar(2, target, number)); + else if(EffectVar(3, target, number)) + AimConf(EffectVar(0, target, number), EffectVar(1, target, number), EffectVar(2, target, number), EffectVar(3, target, number)); + else + // Global call via eval()? + ; +} diff --git a/Hazard.c4d/System.c4g/ParticleEffects.c b/Hazard.c4d/System.c4g/ParticleEffects.c new file mode 100644 index 00000000..1352df14 --- /dev/null +++ b/Hazard.c4d/System.c4g/ParticleEffects.c @@ -0,0 +1,163 @@ +/* Partikeleffekte */ + +#strict + +global func Sparks(int iAmount, int iRGB, int iX, int iY) +{ + // Partikel verschleudern + var iAngle, iSpeed, iSize, iLevel=30; + for( var i=0; iGetDamage(); + var maxdmg = target->~MaxDamage(); + var size = EffectVar(0,target,number); + + if(dmg < maxdmg/2) return; + if(target->Contained()) return; + + var x, y; + target->~GetDmgEffectPos(x,y); + + // occupacy of the smoke is dependend on damage taken + var xdir = +RandomX(-10,10); + var ydir = -RandomX(-15,10); + var smoke = RGBa(220,180,110,BoundBy(maxdmg-dmg,20,255)); + var thrust = RGBa(255,200,200,BoundBy(maxdmg-dmg,40,255)); + + CreateParticle("Smoke2",target->GetX()+x,target->GetY()+y,xdir,ydir,size*RandomX(80,380)/100,smoke); + CreateParticle("Thrust",target->GetX()+x,target->GetY()+y,xdir,ydir,size*RandomX(120,200)/100,thrust); +} + +/* Spawn-Effekt */ + +global func AddSpawnEffect(object pObj, int rgba) +{ + if(!pObj) + if(!(pObj = this())) + return(); + AddEffect("Spawn", pObj, 5, 1, 0, 0, rgba); +} + +global func FxSpawnStart(object pTarget, int iNo, int iTemp, int rgba) +{ + if(iTemp) return(); + EffectVar(0, pTarget, iNo) = rgba; + EffectVar(1, pTarget, iNo) = 360; +} + +global func FxSpawnTimer(object pTarget, int iNo) +{ + var rgba = EffectVar(0, pTarget, iNo); + var a = EffectVar(1, pTarget, iNo); + if(EffectVar(1, pTarget, iNo) <= 0) + { + CastParticles("PSpark", 20, 50, GetX(pTarget), GetY(pTarget), 10, 50, rgba, rgba); + return(-1); + } + for(var i=0, x,y ; i < 5 ; i++) + { + x = Cos(a - 90 * i, a / 20); + y = Sin(a - 90 * i, a / 20); + CreateParticle("PSpark", GetX(pTarget) + x, GetY(pTarget) + y, 0,0, BoundBy(((360 - a) / 10) * 5, 5, 25), rgba, pTarget); + } + + EffectVar(1, pTarget, iNo)-=10; +} + +/* Checkt ob hier ein Dust-Partikel erstellt werden darf */ + +global func CheckDust(int mat) { + + // check if digable + var digable = GetMaterialVal("DigFree","Material",mat); + + // hack for not-digable materials but should be by name digable + if(!digable) { + var name = GetMaterialVal("Name","Material",mat); + if(WildcardMatch(name, "*Earth")) digable = true; + else if(WildcardMatch(name, "*Sand")) digable = true; + else if(WildcardMatch(name, "*Ashes")) digable = true; + else if(WildcardMatch(name, "*Snow")) digable = true; + } + + return digable; +} + +global func VehicleSpawnEffect(object pObj) +{ + if(!pObj) return; + var size = Sqrt(Pow(pObj->GetDefWidth(),2)+Pow(pObj->GetDefHeight(),2)); + var color = RGBa(0,200,255,100); + pObj->CastParticles("PSpark", 30, 80, 0, 0, size, size*2, color, color); +} \ No newline at end of file diff --git a/Hazard.c4d/System.c4g/Serialize.c b/Hazard.c4d/System.c4g/Serialize.c new file mode 100644 index 00000000..2f026903 --- /dev/null +++ b/Hazard.c4d/System.c4g/Serialize.c @@ -0,0 +1,218 @@ +/* Serialisierung der Objekte */ + +#strict 2 + +global func GetObjects() +{ + // Objekte serialisieren + var data = SerializeObjects(0,0,LandscapeWidth(), LandscapeHeight(), Find_And(Find_Not(Find_Func("IsHUD")),Find_Not(Find_Func("IsLight")))); + + // Aufbereiten + return data; +} + +global func LogObjects() { + var objects = GetObjects(); + + var reference = [[],[]]; + var obj, data; + + var i = 0; + // Alle Objekte + for (data in objects) + { + // Daten in data. + // [0] ID + // [1] X-Pos + // [2] Y-Pos + // [3] Besitzer + // [4] Extra (weitere Aufrufe) + // [5] Noch mehr Extra (???) + + // Sonderbehandlung (z.B. PlaceSpawnpoint) + if (data[0] == -1) + { + Log("%s;",Format(data[4], data[1], data[2])); + } + // Ansonsten normal + else + { + // CreateObject-String formatieren. + var str = Format("CreateObject(%i,%d,%d,%d);",data[0], data[1], data[2], data[3]); + + var v = false; + + // falls noch was mit dem Objekt geschieht muss dieses Objekt gemerkt werden + for (var extra in data[4]) + { + + // vor den Logs also ausgeben... + if(!v) { + v = true; + Log("var obj%d = %s",i,str); + } + + if (GetType(extra) == C4V_Array) { + reference[0][GetLength(reference[0])] = [i, extra]; + } else { + Log("obj%d->%s;", i, extra); + } + } + for (var j in data[5]) + { + // auch hier... aber nicht doppelt + if(!v) { + v = true; + Log("var obj%d = %s",i,str); + } + reference[1][j] = i; + } + + // Variablenname benutzt, hochzählen + if(v) { + ++i; + // ansonsten das CreateObject ausgeben + } else { + Log(str); + } + + } + } + for (data in reference[0]) { + // Hier kommt es normalerweise zu einem BUG!!! :( + Log("obj%d->%s;", data[0], Format(data[1][0], reference[1][data[1][1]], reference[1][data[1][2]], reference[1][data[1][3]], reference[1][data[1][4]], reference[1][data[1][5]])); + } +} + +global func SerializeObjects(iX, int iY, int iW, int iH, exclusions) +{ + // Arraykompabilität + if (!iW || !iH) { + iY = iX[1]; iW = iX[2]; iH = iX[3]; + iX = iX[0]; + } + + var exp = Find_And( + Find_InRect(iX, iY, iW, iH), + Find_Not(Find_Func("NoSerialize")), + Find_Not(Find_Category(C4D_Goal)), + Find_Not(Find_Category(C4D_Rule)), + Find_Not(Find_Category(C4D_Environment)) + ); + if (exclusions) + exp = Find_And(exp, exclusions); + + var search = FindObjects(exp); + var objects = CreateArray(2); + objects[0] = CreateArray(GetLength(search)); // Vorallokierung + objects[1] = CreateArray(GetLength(search)); + var extra, extray, i = 0; + + for(obj in search) + { + // wenn das Objekt von seinem Container gelöscht werden soll + if (obj->Contained() && obj->Contained()->~RejectContainedSerialize(obj)) { + // Allokierung kürzen + SetLength(objects[0], GetLength(objects[0])-1); + SetLength(objects[1], GetLength(objects[1])-1); + continue; + } + + // Aufräumen + extra = CreateArray(); + extray = 0; + + // Objektzeiger temporär aufbewahren + objects[1][i] = obj; + + // Rotation + if (obj->GetR() != 0) extra[GetLength(extra)] = Format("SetR(%d)", obj->GetR()); + // Größe + if (obj->GetCon() != 100) { + extra[GetLength(extra)] = Format("SetCon(%d)", obj->GetCon()); + extray = -GetDefCoreVal("Offset", "DefCore", GetID(obj), 1) * (100-obj->GetCon()) / 100; + } + if (obj->Contained()) { + extra[GetLength(extra)] = Format("Enter(Object(%d))", obj->Contained()); + } + // Sonderbehandlung + if (obj->~Serialize(extra, extray)) { + // Kein CreateObject(ID, relative Position, Besitzer)->Extracalls Verfahren. + // Hier nur eval(Format(extra,x,y)) + objects[0][i++] = [-1, -iX, -iY, 0, extra]; + continue; + } + + // Aufzeichnen + objects[0][i++] = [ + GetID(obj), + -iX+GetX(obj), + -iY+GetY(obj)-GetDefCoreVal("Offset", "DefCore", GetID(obj), 1)-extray, + GetOwner(obj), + extra, + []]; + } + + // Objektzeiger in den extras aufbereiten + i = 0; // Index der Objektzeigerliste + for (var index_object=0; index_object%s", ObjectNumber(obj), extra)); + } + } + for (var i in data[5]) { + reference[1][i] = obj; + } + } + } + for (data in reference[0]) { + eval(Format("Object(%d)->%s", ObjectNumber(data[0]), Format(data[1][0], ObjectNumber(reference[1][data[1][1]]), ObjectNumber(reference[1][data[1][2]]), ObjectNumber(reference[1][data[1][3]]), ObjectNumber(reference[1][data[1][4]]), ObjectNumber(reference[1][data[1][5]])))); + } +} + +/* TODO!!! */ +// Hazardclonk (KI Commands, ...) + +/* UNWICHTIG :D */ +// Leitern (auf Arrays umstellen und bla) +// Wegpunkte (arrive command data auch objekt-referenzieren) diff --git a/Hazard.c4d/System.c4g/TIM1.c b/Hazard.c4d/System.c4g/TIM1.c new file mode 100644 index 00000000..8357235e --- /dev/null +++ b/Hazard.c4d/System.c4g/TIM1.c @@ -0,0 +1,7 @@ +#strict 2 +#appendto TIM1 + +func RejectCollect() +{ + if(Contents()) return true; +} diff --git a/Hazard.c4d/System.c4g/Team.c b/Hazard.c4d/System.c4g/Team.c new file mode 100644 index 00000000..0feef34d --- /dev/null +++ b/Hazard.c4d/System.c4g/Team.c @@ -0,0 +1,7 @@ +#strict 2 + +global func GetTaggedTeamName(int plr) { + var teamName = GetTeamName(GetPlayerTeam(plr)); + if(!teamName) return ""; + return(Format("<%s>", GetTeamColor(GetPlayerTeam(plr)),teamName)); +} \ No newline at end of file diff --git a/Hazard.c4d/Title.png b/Hazard.c4d/Title.png new file mode 100644 index 00000000..9f7ecad9 Binary files /dev/null and b/Hazard.c4d/Title.png differ diff --git a/Hazard.c4d/Vehicles.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/DescDE.txt new file mode 100644 index 00000000..74c1e292 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/DescDE.txt @@ -0,0 +1 @@ +Schwere Geräte für schwere Jungs. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/DescUS.txt new file mode 100644 index 00000000..1962de83 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/DescUS.txt @@ -0,0 +1 @@ +Heavy gadgets for hard lads. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/ActMap.txt new file mode 100644 index 00000000..0018966d --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Aim +Procedure=NONE +Directions=1 +Length=37 +Delay=0 +Facet=0,0,80,40 +FacetTopFace=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/DefCore.txt new file mode 100644 index 00000000..a7ba9db1 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/DefCore.txt @@ -0,0 +1,22 @@ +[DefCore] +id=FLAK +Name=Flak +Version=4,9,5 +Category=C4D_Structure|C4D_SelectBuilding|C4D_SelectKnowledge +MaxUserSelect=1 +Width=80 +Height=40 +Offset=-40,-20 +Value=150 +Mass=250 +TopFace=0,0,80,40 +Components=METL=2;MGWP=1; +Picture=0,40,64,64 +Vertices=6 +VertexX=0,0,-23,23,-17,17 +VertexY=5,19,19,19,-1,-1 +VertexFriction=0,100,100,100,100,100 +Exclusive=1 +Construction=1 +Grab=2 +VehicleControl=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/DescDE.txt new file mode 100644 index 00000000..2e33e266 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine stationäre Flak-Stellung. Optimal um nervige Shuttles vom Himmel zu holen. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/DescUS.txt new file mode 100644 index 00000000..2a30a673 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/DescUS.txt @@ -0,0 +1 @@ +A stationary flak emplacement. Ideal to shoot down annoying shuttles. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/FlakCannon.wav b/Hazard.c4d/Vehicles.c4d/Flak.c4d/FlakCannon.wav new file mode 100644 index 00000000..17905667 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Flak.c4d/FlakCannon.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Graphics.png new file mode 100644 index 00000000..985ef2e0 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Names.txt new file mode 100644 index 00000000..ebb512ae --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flakstellung +US:Flak turret \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Script.c new file mode 100644 index 00000000..b3b752e5 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Script.c @@ -0,0 +1,313 @@ +/*-- Flak --*/ + +#strict +#include WEPN + +local Crosshair; +local Rifle; // aus welchem Rohr wir gerade ballern + +func Initialize() +{ + SetAction("Aim"); + SetPhase(GetActMapVal("Length",GetAction())/3); // Nach oben Schaun + + // Schadenseffekt + AddDamageEffect(this); + + return(_inherited()); +} + + +/** Anfasszeugs **/ + +public func Grabbed(object byObj, bool grabbed) +{ + // Abfassen! :( + if(!grabbed) + { + if(GetUser() == byObj) + { + EndAim(); + SetUser(); + } + } + // Anfassen :-) + else + { + if(!GetUser()) + { + SetUser(byObj); + SetOwner(GetController(byObj)); + InitAim(); + } + else + { + // hacky hacky... + byObj->SetAction("Walk"); + } + } +} + +/* Zielzeug */ + +private func InitAim() +{ + if(Crosshair) + RemoveObject(Crosshair); + + Crosshair = CreateObject(HCRH); // Owner wird in Init gesetzt + Crosshair->Init(this()); + Crosshair->SetAngle(PtoR()); + + // es gibt keinen zuverlässigen callback mit dem man benachrichtigt wird wenn + // der user nicht mehr da ist + AddEffect("CheckForUser",this,1,1,this); +} + +private func FxCheckForUserTimer(object target, int nr, int time) +{ + if( !GetUser() || + GetActionTarget(0,GetUser()) != this || + GetProcedure(GetUser()) ne "PUSH" || + !GetAlive(GetUser())) + { + EndAim(); + SetUser(); + } +} + +private func EndAim() +{ + PauseReload(); + AimCancel(GetUser()); + if(Crosshair) + RemoveObject(Crosshair); + RemoveEffect("CheckForUser",this); +} + +public func IsAiming() { return(true); } + +private func StartAngle() { return(90); } + +// Winkel -> Phase +private func RtoP(int angle) +{ + var phases = GetActMapVal("Length",GetAction()); + + // -180 bis +180 + angle = Normalize(angle,-180); + // Maximale Drehung nach unten + angle = BoundBy(angle,-StartAngle(),+StartAngle()); + // 0 bis 2*StartAngle() + angle += StartAngle(); + + // umrechnen von 0..2*StartAngle() nach 0..phases-1 + var p = angle*(phases-1)/2/StartAngle(); + + return(p); +} + +// Phase -> Winkel +private func PtoR() +{ + var phases = GetActMapVal("Length",GetAction()); + + var a = GetPhase()*2*StartAngle()/(phases-1); + + a -= StartAngle(); + + return(a); +} + +/** Zielen **/ + +public func ControlCommand(string strCommand, object pTarget, int iTx, int iTy, object pTarget2, int iData, object pCmdObj, object clonk) +{ + if(clonk != GetUser()) return false; + + if(strCommand eq "MoveTo") + { + var angle = Normalize(Angle(GetX(),GetY(),iTx,iTy),-180); + // max angle + angle = BoundBy(angle,-StartAngle(),+StartAngle()); + + Crosshair->SetAngle(angle); + SetPhase(RtoP(angle)); + + ControlThrow(GetUser()); + return true; + } +} + +public func ControlLeft(object clonk) +{ + [$TxtLeft$|Image=TAN3:1] + var user = GetUser(); + if(user != clonk) return false; + AimUp(user, 1, "ControlConf"); + return true; +} + +public func ControlRight(object clonk) +{ + [$TxtRight$|Image=TAN3:2] + var user = GetUser(); + if(user != clonk) return false; + AimDown(user, 1, "ControlConf"); + return true; +} + +public func ControlThrow(object clonk) +{ + [$TxtFire$|Image=TAN3:0] + if(GetUser() != clonk) return false; + return _inherited(clonk,...); +} + +public func ControlUpdate(object clonk, int comdir, bool dig, bool throw) +{ + var user = GetUser(); + if(user != clonk) return false; + + if(comdir == COMD_Left) + AimUpdate(user, COMD_Up, 1, "ControlConf"); + else if(comdir == COMD_Right) + AimUpdate(user, COMD_Down, 1, "ControlConf"); + else + AimUpdate(user, 0, 1, "ControlConf"); + + inherited(clonk, comdir, dig, throw); + + return true; +} + +public func ControlConf(int conf) +{ + // Feineres Zielen mit JnR-Steuerung möglich + if(GetPlrCoreJumpAndRunControl(GetController(GetUser()))) + DoAiming(conf * AIM_Step / 5); + else + DoAiming(conf * AIM_Step); +} + +public func DoAiming(int change) +{ + var angle = Crosshair->GetAngle() + change; + + // Winkel anpassen, wenn keine freie Auswahl (klassische Steuerung) + if(!GetPlrCoreJumpAndRunControl(GetController(GetUser()))) + angle = angle-angle%AIM_Step; + + // Winkel wird zu groß? + if(Abs(angle) > 90) + return(); + + Crosshair->SetAngle(angle); + + //UpdatePhase(); + SetPhase(RtoP(angle)); +} + + +/** Waffenzeugs **/ + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Auto$"); + if(data == FM_AmmoID) return(STAM); + + if(data == FM_AmmoLoad) return(36); + if(data == FM_AmmoUsage) return(3); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(12); + + if(data == FM_Damage) return(20); + if(data == FM_Auto) return(true); + + return(Default(data)); +} + +public func Fire1() +{ + var angle = Crosshair->GetAngle(); + var x,y; + var ammo; + + CalculateRifle(x,y); + + ammo = CreateObject(SHTF, x, y, GetController(GetUser())); + ammo->Sound("FlakCannon"); + ammo->Launch(Sin(angle,160), -Cos(angle,160), GetFMData(FM_Damage,1)); + + angle = Normalize(angle,-180); + var bangle = angle-90; + if(angle<0) bangle = angle+90; + var str = Abs(angle/3); + BulletCasing(x/4,y/4, Sin(bangle,str), -Cos(bangle,str), 8); + + MuzzleFlash(100,this(),x,y,angle); +} + +private func CenterFix() { + var p = GetPhase(); + if(p > 17) + p = 35-p; + + // weirder Korrekturfaktor damit wir immer ~den Mittelpunkt haben + var correction; + correction = (100*p)/17; + return(correction); +} + +private func CalculateRifle(&oX, &oY) +{ + var angle = Crosshair->GetAngle() + GetR(); + + // Korrektur für Mitte (speziell für diese Grafik) + var correction = CenterFix(); + + var x = +Sin(angle, 40-(correction/5)); + var y = -Cos(angle, 20+correction/20); + + // circle x,y + // min->max breite: 0->6 + // min->max höhe: 3->5 + var cx, cy; + cx = correction/16; + cy = 5 - correction/50; + + x += Sin(30+90*Rifle, cx); + y += Cos(60+90*Rifle, cy); + + if(++Rifle > 3) + Rifle = 0; + + oX = x; + oY = y+4; +} + +public func NoWeaponChoice() { return(1); } + +// Schaden + +public func MaxDamage() { return (250); } + +public func OnDmg(int iDmg, int iType) { + + if(iType == DMG_Bio) return(100); + if(iType == DMG_Melee) return(80); + if(iType == DMG_Fire) return(80); + if(iType == DMG_Explosion) return(0); + + return(30); +} + +public func Damage() { + if(GetDamage() < MaxDamage()) return; + + // boom + Explode(30); +} + +public func IsBulletTarget() { return (true);} \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DefCore.txt new file mode 100644 index 00000000..6ba25fbd --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=SHTF +Version=4,9,8,2 +Name=Flak-Shell +Category=C4D_Vehicle +MaxUserSelect=10 +Width=7 +Height=15 +Offset=-3,-7 +Vertices=2 +VertexY=8,-7 +VertexFriction=20,20 +Value=15 +Mass=100 +Components=FLNT=4;METL=1 +Picture=0,0,7,15 +Rotate=1 +Timer=1 +TimerCall=AdjustR \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DescDE.txt new file mode 100644 index 00000000..99990feb --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DescDE.txt @@ -0,0 +1 @@ +Bumm. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DescUS.txt new file mode 100644 index 00000000..8819336d --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/DescUS.txt @@ -0,0 +1 @@ +Boom. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Graphics.png new file mode 100644 index 00000000..9736de76 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Names.txt new file mode 100644 index 00000000..3edf7a69 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Flak-Shell +US:Flak-Shell \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Script.c new file mode 100644 index 00000000..c465554e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Shell.c4d/Script.c @@ -0,0 +1,55 @@ +/*-- Flak-Shell --*/ + +#strict +#include GREN + +func AdjustR() +{ + SetR(Angle(0,0,GetXDir(),GetYDir())); +} + +func ExplodeDelay() { return(20); } + +func Hit() +{ + HitObject(); +} + +func HitObject(object target) +{ + RemoveEffect("Grenade",this()); + + BlastObjects(x+GetX(),y+GetY(), iDamage); + + var effSize = 20; + + AddLightFlash(25*effSize, 0, 0, RGBa(255,200,0,10)); + + for(var i = 5+Random(3); i; i--) + { + var r = Random(3*effSize), + a = Random(360); + + var x = Sin(a,r), + y = Cos(a,r); + + //CastParticles("FSpark",6,effSize,x,y,effSize*5,effSize*9, RGBa(80,70,70,100),RGBa(80,70,70,100)); + //CreateParticle("Smoke2", x, y, 0, 0,effSize*7, RGBa(255,255,255,0)); + //if(!Random(3)) + // Smoke(x,y,effSize/3); + + CreateParticle("Smoke3",x,y,RandomX(-2,2),RandomX(-2,4),effSize*7,RGBa(75,65,55,55)); + CastParticles("FSpark",3,effSize,x,y,effSize*10,effSize*12, RGBa(80,70,70,100),RGBa(80,70,70,100)); + if(Random(3)) + CreateSmokeTrail(effSize, a, x,y, this()); + } + + Sound("Blast2",0,0,50); + RemoveObject(); +} + +func FxGrenadeTimer(object target, int effect, int time) +{ + if(time > ExplodeDelay()) return(HitObject()); + +} \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/StringTblDE.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/StringTblDE.txt new file mode 100644 index 00000000..4c684e59 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +Auto=Automatikfeuer +Single=Einzelschuss +TxtFire=Feuer! +TxtLeft=Nach links +TxtRight=Nach rechts \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/StringTblUS.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/StringTblUS.txt new file mode 100644 index 00000000..79f3eabd --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +Auto=Automatic fire +Single=Single shots +TxtFire=Fire! +TxtLeft=Aim left +TxtRight=Aim right \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Symbols.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Symbols.c4d/DefCore.txt new file mode 100644 index 00000000..69fc3b0e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Symbols.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=TAN3 +Version=4,9,8 +Name=Symbol +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Vehicles.c4d/Flak.c4d/Symbols.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Symbols.c4d/Graphics.png new file mode 100644 index 00000000..e69b37cd Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Flak.c4d/Symbols.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Names.txt new file mode 100644 index 00000000..8fc0b9f6 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fahrzeuge +US:Vehicles diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/ActMap.txt new file mode 100644 index 00000000..acda7c7c --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/ActMap.txt @@ -0,0 +1,8 @@ +[Action] +Name=Aim +Procedure=NONE +Directions=1 +Length=37 +Delay=0 +Facet=0,0,52,32 +FacetTopFace=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DefCore.txt new file mode 100644 index 00000000..61e51c4d --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=PRCA +Name=Particle Cannon +Version=4,9,5 +Category=C4D_Structure|C4D_SelectBuilding|C4D_SelectKnowledge +Picture=0,32,64,64 +MaxUserSelect=1 +Width=52 +Height=32 +Offset=-26,-16 +Value=150 +Mass=250 +TopFace=0,0,52,32 +Components=METL=2;MGWP=1; +Vertices=3 +VertexX=0,-23,23 +VertexY=-5,15,15 +VertexFriction=100,100 +Exclusive=1 +Construction=1 +Grab=2 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DescDE.txt new file mode 100644 index 00000000..a698572c --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DescDE.txt @@ -0,0 +1 @@ +Das Partikelgeschütz ist ein Muss für die effektive Verteidigung gegen Fahrzeuge. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DescUS.txt new file mode 100644 index 00000000..4b04f86d --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/DescUS.txt @@ -0,0 +1 @@ +The particle turret is a must for the effective defense against vehicles. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Graphics.png new file mode 100644 index 00000000..0d092389 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Names.txt new file mode 100644 index 00000000..8ec21688 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Partikelgeschütz +US:Particle turret diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/ParticleShot.wav b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/ParticleShot.wav new file mode 100644 index 00000000..efa3f1a5 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/ParticleShot.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Script.c new file mode 100644 index 00000000..04d5f93c --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Script.c @@ -0,0 +1,103 @@ +/*-- Particle Cannon --*/ + +#strict 2 +#include FLAK + +private func CalculateRifle(&oX, &oY) +{ + var angle = Crosshair->GetAngle() + GetR(); + + // Korrektur für Mitte (speziell für diese Grafik) + var correction = CenterFix(); + + var x = +Sin(angle, 25-(correction/5)); + var y = -Cos(angle, 15+correction/20); + + // circle x,y + // min->max breite: 0->4 + // min->max höhe: 1->2 + var cx, cy; + cx = correction/25; + cy = 2 - correction/90; + + x += Sin(30+180*Rifle, cx); + y += Cos(60+180*Rifle, cy); + + if(++Rifle > 1) + Rifle = 0; + + oX = x; + oY = y-3; +} + +/** Waffenzeugs **/ + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Auto$"); + if(data == FM_AmmoID) return(ENAM); + + if(data == FM_AmmoLoad) return(40); + if(data == FM_AmmoRate) return(1); + if(data == FM_AmmoUsage) return(8); + + if(data == FM_Reload) return(100); + if(data == FM_Recharge) return(80); + + if(data == FM_Damage) return(30); + if(data == FM_Auto) return(false); + + return(Default(data)); +} + +public func Fire1() +{ + Sound("ParticleShot"); + ScheduleCall(0,"FireLaser",6,5); +} + +public func FMData2() {} + + +public func FireLaser() { + var user = GetUser(); + if(!user) return; + var x,y; + CalculateRifle(x,y); + + var angle = Crosshair->GetAngle(); + var laser = CreateObject(LASR,x,y,GetController(user)); + laser->SetClrModulation(RGB(100,150,255)); + laser->Set(angle,8,450,20,this()); + + // Effekte + MuzzleFlash(250,this,x,y,angle,RGBa(100,100,255,0)); + + // Sound + //Sound("LaserShot",0,laser); +} + +public func LaserStrike(object pTarget) { // Laser trifft + DoDmg(GetFMData(FM_Damage, 1), DMG_Energy, pTarget); + + // geht durch... + return 0; +} + +public func ControlLeft() +{ + [$TxtLeft$|Image=TAN2:1] + _inherited(...); +} + +public func ControlRight() +{ + [$TxtRight$|Image=TAN2:2] + _inherited(...); +} + +public func ControlThrow() +{ + [$TxtFire$|Image=TAN2:0] + _inherited(...); +} \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/StringTblDE.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/StringTblDE.txt new file mode 100644 index 00000000..4c684e59 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +Auto=Automatikfeuer +Single=Einzelschuss +TxtFire=Feuer! +TxtLeft=Nach links +TxtRight=Nach rechts \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/StringTblUS.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/StringTblUS.txt new file mode 100644 index 00000000..79f3eabd --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +Auto=Automatic fire +Single=Single shots +TxtFire=Fire! +TxtLeft=Aim left +TxtRight=Aim right \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Symbols.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Symbols.c4d/DefCore.txt new file mode 100644 index 00000000..09223027 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Symbols.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=TAN2 +Version=4,9,8 +Name=Symbol +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Symbols.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Symbols.c4d/Graphics.png new file mode 100644 index 00000000..fa8906e8 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/ParticleTurret.c4d/Symbols.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/ActMap.txt new file mode 100644 index 00000000..cfc702d0 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/ActMap.txt @@ -0,0 +1,92 @@ +[Action] +Name=Fly1 +Procedure=FLOAT +Directions=2 +FlipDir=1 +Length=13 +Delay=0 +Facet=0,45,140,94,-5,-25 +NextAction=Fly1 + +[Action] +Name=Fly2 +Procedure=FLOAT +Directions=2 +FlipDir=1 +Reverse=1 +Length=13 +Delay=0 +Facet=1820,45,140,94,-5,-25 +NextAction=Fly2 + +[Action] +Name=Turn1 +Procedure=FLOAT +Directions=2 +FlipDir=1 +Length=29 +Delay=3 +Facet=0,139,140,94,-5,-25 +NextAction=Fly1 +AbortCall=TurnEnd +EndCall=TurnEnd + +[Action] +Name=Turn2 +Procedure=FLOAT +Directions=2 +FlipDir=1 +Reverse=1 +Length=29 +Delay=3 +Facet=0,233,140,94,-5,-25 +NextAction=Fly2 +AbortCall=TurnEnd +EndCall=TurnEnd + +[Action] +Name=Landed +Procedure=NONE +Directions=2 +FlipDir=1 +Length=1 +Facet=0,45,140,94,-5,-25 +NextAction=Landed + +[Action] +Name=DoorOpening +Procedure=NONE +Directions=2 +FlipDir=1 +Length=10 +Delay=1 +Facet=0,328,12,18,36,22 +FacetBase=1 +NextAction=DoorOpen +StartCall=SoundOpenDoor + +[Action] +Name=DoorOpen +Procedure=NONE +Directions=2 +FlipDir=1 +Delay=40 +Facet=120,328,12,18,36,22 +FacetBase=1 +NextAction=DoorClosing +StartCall=DoorOpenStart + +[Action] +Name=DoorClosing +Procedure=NONE +Directions=2 +FlipDir=1 +Length=10 +Reverse=1 +Delay=1 +Facet=0,328,12,18,36,22 +FacetBase=1 +NextAction=Landed +StartCall=SoundCloseDoor + + diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/CloseDoor.wav b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/CloseDoor.wav new file mode 100644 index 00000000..4dfb5802 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/CloseDoor.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DefCore.txt new file mode 100644 index 00000000..45a01d7c --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DefCore.txt @@ -0,0 +1,36 @@ +[DefCore] +id=SHTL +Name=Shuttle +Category=C4D_Vehicle | C4D_SelectVehicle +Width=130 +Height=45 +Offset=-65,-23 +Picture=3700,0,64,64 +Version=4,9,7,7 +Rotate=1 +NoStabilize=1 +UprightAttach=10 +Float=-15 +Value=150 +ColorByOwner=1 +BorderBound=5 +AttractLightning=1 +VehicleControl=2 +SilentCommands=1 +Mass=1000 +NoComponentMass=1 +MoveToRange=20 +Timer=1 +TimerCall=Timer +Vertices=8 +VertexX=-61,61,40,-40,-25,-40,0,0 +VertexY=10,10,19,19,8,18,17,-10 +VertexFriction=100,100,100,100,100,100,100,100 +VertexCNAT=1,2,8,8,64,64,8,64 +ContactCalls=1 +ClosedContainer=2 +CollectionLimit=1 + +[Physical] +Float=1000 + diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DescDE.txt new file mode 100644 index 00000000..b67d36f5 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DescDE.txt @@ -0,0 +1 @@ +Gepanzertes Shuttle zum Transport von Verstärkung ins Einsatzgebiet. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DescUS.txt new file mode 100644 index 00000000..2bf42647 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/DescUS.txt @@ -0,0 +1 @@ +Armored shuttle for the transport of reinforcements into the area of operation. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/ActMap.txt new file mode 100644 index 00000000..f535ffcf --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/ActMap.txt @@ -0,0 +1,10 @@ +[Action] +Name=Be +Procedure=None +Directions=2 +FlipDir=1 +Length=3 +Delay=0 +FacetBase=0 +Facet=0,0,50,30 +NextAction=Hold diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DefCore.txt new file mode 100644 index 00000000..d5721e58 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=DSHT +Version=4,9,8,2 +Name=Shuttle +Category=C4D_Vehicle +Width=50 +Height=30 +Offset=-25,-15 +Vertices=3 +VertexX=-18,5,18 +VertexY=9,-10,9 +VertexFriction=100,100,100 +Mass=150 +Picture=0,0,50,30 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DescDE.txt new file mode 100644 index 00000000..0a5d70ee --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DescDE.txt @@ -0,0 +1 @@ +Immernoch prachtvoll. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DescUS.txt new file mode 100644 index 00000000..bcf46ed6 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/DescUS.txt @@ -0,0 +1 @@ +Still grand. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Graphics.png new file mode 100644 index 00000000..dcde038f Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Names.txt new file mode 100644 index 00000000..fcec1ee6 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Zerstörtes Shuttle +US:Destroyed shuttle diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Script.c new file mode 100644 index 00000000..231cc2d7 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Destroyed.c4d/Script.c @@ -0,0 +1,17 @@ +#strict + +local target; + +public func Init(int i) { + SetAction("Be"); + SetDir(Random(2)); + SetPhase(i); + SetR(Random(360)); + SetRDir(RandomX(-10,10)); + var r = Random(360); + var s = RandomX(20,30); + var xdir = Cos(r,s)-Sin(r,s); + var ydir = Cos(r,s)+Sin(r,s); + SetXDir(xdir); + SetYDir(xdir); +} diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/ActMap.txt new file mode 100644 index 00000000..467ee58c --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Attached +Procedure=ATTACH +Length=1 +Delay=0 +FacetBase=1 +NextAction=Walk diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/DefCore.txt new file mode 100644 index 00000000..32a2db9f --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=_ENT +Name=Entrance +Category=16 +Width=12 +Height=18 +Offset=-6,-9 +Entrance=-6,-9,12,18,-6,-9 +Vertices=1 +NoGet=1 +NoSell=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/Graphics.png new file mode 100644 index 00000000..2c48a6e4 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/Script.c new file mode 100644 index 00000000..4931c488 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Entrance.c4d/Script.c @@ -0,0 +1,27 @@ +#strict + +local target; + +public func AttachTo(object pObj, int index) +{ + target = pObj; + SetAction("Attached", target); + SetActionData(index); +} + +protected func AttachTargetLost() { + RemoveObject(); +} + +protected func ActivateEntrance(pObj) +{ + if (pObj->GetOCF() & OCF_CrewMember && !target->CrewInside()) { + if (target->GetAction() eq "Landed") { + target->SetAction("DoorOpening"); + } else if (target->GetAction() eq "DoorOpen") { + Enter(target, pObj); + FinishCommand(pObj, true); + } + } + else { FinishCommand(pObj, false); } +} diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Graphics.png new file mode 100644 index 00000000..fe7cbc5d Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark.c4d/Graphics.png new file mode 100644 index 00000000..a21a27fd Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark.c4d/Particle.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark.c4d/Particle.txt new file mode 100644 index 00000000..1c8be85e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=HoverSpark1 +MaxCount=6200 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,8,128,-4,-64 +Delay=0 +Repeats=1 +Reverse=0 +AlphaFade=8 +Additive=1 +Attach=0 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark2.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark2.c4d/Graphics.png new file mode 100644 index 00000000..bc2ac3d5 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark2.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark2.c4d/Particle.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark2.c4d/Particle.txt new file mode 100644 index 00000000..4ac83e47 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark2.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=HoverSpark2 +MaxCount=6200 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,32,128,-16,-64 +Delay=0 +Repeats=1 +Reverse=0 +AlphaFade=8 +Additive=1 +Attach=0 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark3.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark3.c4d/Graphics.png new file mode 100644 index 00000000..9f8835c2 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark3.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark3.c4d/Particle.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark3.c4d/Particle.txt new file mode 100644 index 00000000..3a28a65c --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/HoverSpark3.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=HoverSpark3 +MaxCount=6200 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,128,-32,-64 +Delay=0 +Repeats=1 +Reverse=0 +AlphaFade=8 +Additive=1 +Attach=0 +RByV=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Jet.wav b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Jet.wav new file mode 100644 index 00000000..32c22020 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Jet.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/JetSpark.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/JetSpark.c4d/Graphics.png new file mode 100644 index 00000000..183d6254 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/JetSpark.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/JetSpark.c4d/Particle.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/JetSpark.c4d/Particle.txt new file mode 100644 index 00000000..d7f100e3 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/JetSpark.c4d/Particle.txt @@ -0,0 +1,16 @@ +[Particle] +Name=JetSpark +MaxCount=6200 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,32,32,-16,-16 +Delay=1 +FadeOutLen=2 +FadeOutDelay=80 +Repeats=1 +Reverse=0 +AlphaFade=10 +Additive=1 +Attach=0 +RByV=2 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/OpenDoor.wav b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/OpenDoor.wav new file mode 100644 index 00000000..943baede Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/OpenDoor.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Script.c new file mode 100644 index 00000000..dbd16179 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Script.c @@ -0,0 +1,878 @@ +#strict 2 +#include WEPN + +// Flugeigenschaften +local mxspeed, myspeed, xacc, yacc, xbreak, ybreak; // m(ax) +// Flugzustände +local xspeed, yspeed, txspeed, tyspeed; // t(arget) +// Sensoreigenschaften +local shx, shy1, shy2; +local svx1, svx2, svy; +// Sensorzustände +local sb1, sb2; +// Triebwerke +local x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4; +// RAUS HIER +local entrance; +local quit; +// neigung (Ziel) +local pitch; +// upgrade +local shieldupgrade; +// lights +local light, light2, lightson; + +public func IsThreat() { return CrewInside(); } + +func Initialize() +{ + _inherited(); + quit = CreateArray(); + // Eingang und Ausgang + entrance = CreateObject(_ENT)->AttachTo(this,4); + SetAction("Landed"); + // Flugeigenschaften + mxspeed = 175; xacc = 5; xbreak = 3*xacc; + myspeed = 100; yacc = 5; ybreak = 3*yacc; + // Sensoren horizontal + shx = Abs(GetVertex(0,0))+25; + shy1 = GetVertex(2,1)+5; + shy2 = 2*GetVertex(4,1)-shy1; + // Sensoren vertikal + svx1 = GetVertex(2,0); + svx2 = GetVertex(3,0); + svy = GetVertex(2,1); + // Triebwerke + x1 = x2 = -42; x3 = x4 = -40; + y1 = -13; y2 = 13; y3 = -15; y4 = 15; + z1 = z2 = -2; z3 = z4 = 15; + shieldupgrade = false; + + light = AddLightCone(YLightSize(),RGBa(255,255,255,255), this()); + light->ChangeR((GetDir()*2-1)*90+GetR()); + light->ChangeSizeXY(YLightSize(),XLightSize()); + // attach to 5th vertex + light->SetActionData(5); + light2 = AddLight(YLightSize()/10, RGBa(255,255,255,255), this()); + // attach to invalid vertex (center) + light2->SetActionData(6); + lightson = false; + + AddDamageEffect(this); +} + +/* Kontrolle */ + +public func ContextLight(object pCaller) { + [$SwitchLight$|Image=FLSH] + SwitchLights(); + return(1); +} + +public func SwitchLights() +{ + TurnLights(!lightson); +} + +public func TurnLights(bool on) +{ + lightson = on; + var alpha = 255; + if(lightson) alpha = 90; + light->ChangeColor(RGBa(255,255,255,alpha)); + light2->ChangeColor(RGBa(255,255,255,255)); +} + + +protected func ContainedThrow(object driver) +{ + [$TxtFire$|Image=SAN1:6] + if(EMPShocked()) return(true); + ControlThrow(driver); + return true; +} + +protected func ContainedLeft() +{ + [$TxtLeft$|Image=SAN1:0] + if (IsFlying()) { + txspeed = -mxspeed; + tyspeed = yspeed; + if (GetDir() == DIR_Right) { + Turn(); + } + } + return 1; +} + +protected func ContainedLeftDouble() +{ + [$TxtLeft$|Image=SAN1:0] + if (IsFlying() || IsTurning()) { + tyspeed = 0; + } + return 1; +} + +protected func ContainedRight() +{ + [$TxtRight$|Image=SAN1:1] + if (IsFlying()) { + txspeed = mxspeed; + tyspeed = yspeed; + if (GetDir() == DIR_Left) { + Turn(); + } + } + return 1; +} + +protected func ContainedRightDouble() +{ + [$TxtRight$|Image=SAN1:1] + if (IsFlying() || IsTurning()) { + tyspeed = 0; + } + return 1; +} + +protected func ContainedUp() +{ + [$TxtUp$|Image=SAN1:2] + if (IsFlying() || IsTurning()) { + tyspeed = -myspeed; + } + return 1; +} + +protected func ContainedUpDouble() +{ + [$TxtUp$|Image=SAN1:2] + var i; + if (IsFlying() || IsTurning()) { + txspeed = 0; + } + else if (GetAction() == "Landed") { + // There's a hole in the sky, through which things can fly. + SetAction("Fly1"); + ContainedUp(Par(0)); + // Musik! + Sound("Takeoff"); + Sound("Jet",0,0,75,0,+1); + // die Rostlaube wieder ausbuddeln + SetR(0); + i=20; + while(Stuck() && i--) + SetPosition(GetX(),GetY()-1); + } + return 1; +} + +protected func ContainedDown(pController) +{ + [$TxtDown$|Image=SAN1:3] + if (IsFlying() || IsTurning()) { + tyspeed = myspeed; + } else { + ExitPassenger(pController); + } + return 1; +} + +protected func ContainedDownDouble() +{ + [$TxtDown$|Image=SAN1:3] + if (IsFlying() || IsTurning()) { + txspeed = 0; + } + return 1; +} + +protected func ContainedDig() +{ + [$TxtStop$|Image=SAN1:5] + if (IsFlying() || IsTurning()) { + if (tyspeed) tyspeed = 0; + else if (txspeed) txspeed = 0; + } + return 1; +} + +protected func ContainedDigDouble(object driver) +{ + [$TxtFireMode$|Image=SAN1:4] + if(EMPShocked()) return(true); + if (IsFlying() || IsTurning()) { + if (txspeed) txspeed = 0; + } + ControlDigDouble(driver); + return 1; +} + +/* Eingangskontrolle: nur einer zugelassen */ + + +protected func Ejection(object by) { + if(!CrewInside()) + { + Message("@",this); + CancelReload(); + if(IsDark()) TurnLights(false); + DoScore(GetOwner(),+GetValue()); + SetOwner(NO_OWNER); + } +} + +// nur CrewMember dürfen hier rein +protected func RejectCollect(id idObj, object pObj) { + if(GetOCF(pObj) & OCF_CrewMember) return(0); + return(1); +} + +protected func Collection2(object by) { + SetEntrance(0); + if(!(GetOCF(by) & OCF_CrewMember)) return; + DriverIsOwner(by); + if(IsDark()) TurnLights(true); +} + +private func DriverIsOwner(object driver) { + var owner = GetOwner(driver); + DoScore(GetOwner(),+GetValue()); + SetOwner(owner); + DoScore(owner,-GetValue()); + for(var i = 0; i < GetPlayerCount(); i++) + if(i != owner) + PlayerMessage(GetPlayerByIndex(i), "@%s",this(),Format("%s %s",GetTaggedPlayerName(owner),GetTaggedTeamName(owner))); +} + +private func ExitPassenger(object pObj) +{ + if (GetAction() == "Landed") { + quit[GetLength(quit)] = pObj; + SetAction("DoorOpening"); + } else + if (GetAction() == "DoorOpening") { + quit[GetLength(quit)] = pObj; + } else + if (GetAction() == "DoorOpen") { + Exit(pObj, GetVertex(4,0), GetVertex(4,1)+10); + } +} + +/* Flugverhalten */ + +private func Timer() +{ + + //var cx, pos, x , y, dx, dy, d, i, sy1, sy2, sx, cy1, cy2, ox, oy; + + if (IsFlying() || IsTurning()) { + var dxspeed, dyspeed; + dxspeed = txspeed; dyspeed = tyspeed; + + var xdir = (xspeed>0)-(xspeed<0); + var ydir = (yspeed>0)-(yspeed<0); + + var r = GetR(); + if (!xdir) { + xdir = -1+2*GetDir(); + if (IsTurning()) + xdir *= -1; + } + + // Frontsensoren abtasten + var x11 = GetX() + xdir*Cos(r,shx) - Sin(r,shy1) + xdir*(xspeed**2)/(xacc*2*35); + var x12 = x11 +xdir*3; + var x21 = GetX() + xdir*Cos(r,shx) - Sin(r,shy2) + xdir*(xspeed**2)/(xacc*2*35); + var x22 = x21 +xdir*3; + var y1 = GetY() + Cos(r,shy1)+xdir*Sin(r,shx) + yspeed*Abs(xspeed)/xacc/35; + var y2 = GetY() + Cos(r,shy2)+xdir*Sin(r,shx) + yspeed*Abs(xspeed)/xacc/35; + //CastParticles("MSpark", 10, 5, x11-GetX(), y1-GetY(), 40, 60, RGBa(255,0,0,0)); + //CastParticles("MSpark", 10, 5, x21-GetX(), y2-GetY(), 40, 60, RGBa(255,0,0,0)); + if (!PathFree(x11,y1,x12,y1) || !PathFree(x21,y2,x22,y2)) { + dxspeed = 0; + } + // Landschaft zuende + var w = LandscapeWidth(); + if(x12 >= w || x12 <= 0 || x22 >= w || x22 <= 0) dxspeed = 0; + + // Bodensensoren + var x30 = GetX() + xdir*Cos(r,svx1) - Sin(r,svy); + var y30 = GetY() + xdir*Sin(r,svx1) + Cos(r,svy); + var y31 = y30 + ydir*(yspeed**2)/(yacc*2*25); + var x40 = GetX() + xdir*Cos(r,svx2) - Sin(r,svy); + var y40 = GetY() + xdir*Sin(r,svx2) + Cos(r,svy); + var y41 = y40 + ydir*(yspeed**2)/(yacc*2*25); + + //CreateParticle("JetSpark", x30-GetX(), y30-GetY(), 0, 0, 60, RGBa(0,0,255,100)); + //CreateParticle("JetSpark", x40-GetX(), y40-GetY(), 0, 0, 60, RGBa(0,0,255,100)); + + //CreateParticle("JetSpark", x30-GetX(), y31-GetY(), 0, 0, 60, RGBa(255,0,0,100)); + //CreateParticle("JetSpark", x40-GetX(), y41-GetY(), 0, 0, 60, RGBa(255,0,0,100)); + + if(!PathFree(x30,y30,x30,y31) || !PathFree(x40,y40,x40,y41)) { + if(ydir > 0) + dyspeed = Min(0,dyspeed); + else + dyspeed = Max(0,dyspeed); + } + + // Beschleunigung + xdir = (dxspeed > xspeed)-(dxspeed < xspeed); + xspeed += xdir*Min(xacc, Abs(dxspeed - xspeed)); + ydir = (dyspeed > yspeed)-(dyspeed < yspeed); + yspeed += ydir*Min(yacc, Abs(dyspeed - yspeed)); + + // Geschwindigkeit setzen + SetXDir(xspeed,0, 35); + SetYDir(yspeed,0, 35); + + var withspeed = 0; + var withoutspeed = 0; + + // Dies setzt die Drehung bei horizontaler Geschwindigkeit fest + if(xspeed) { + if(xspeed > 0) + withspeed = Abs(xspeed)*(Angle(-1,0,xspeed,yspeed)-90)/mxspeed; + else if (xspeed<0) + withspeed = Abs(xspeed)*(Angle(1,0,xspeed,yspeed)-270)/mxspeed; + } + // und dies für keine horizontale Geschwindigkeit + if(Abs(xspeed) < mxspeed) { + var maxangle = 15; + var target = (GetDir()*2-1)*maxangle*yspeed/myspeed; + + var r = Normalize(GetR(),-180); + + var speed = 1; + var change = 0; + if(r < target) change = speed; + else if(r > target) change = -speed; + + withoutspeed = BoundBy(r+change,-maxangle,+maxangle); + DebugMessage("target: %d, rotation: %d, change: %d, max: %d ... so: %d","Shuttle",target,r,change,maxangle,withoutspeed); + + } + var psi = GetPhase()+2; + var at = -(GetDir()*2-1)*50*(30-2*psi)/30; + + SetRAt(withspeed*Abs(xspeed)/mxspeed + withoutspeed*(mxspeed-Abs(xspeed))/mxspeed,at,19); + SetRDir(0); + + // Effekte *bümz* + if (IsFlying()) + EffectsFly(); + else + EffectsTurn(); + + // Hover-Effect + EffectsHover(); + // Dust-Effect + EffectsDust(); + + // Phase control + // the faster te higher the pitch + if (IsFlying()) { + if(GetYDir() < 0 && GetAction() != "Fly2") SetAction("Fly2"); + if(GetYDir() > 0 && GetAction() != "Fly1") SetAction("Fly1"); + + var maxphase = GetActMapVal("Length",GetAction())-1; // cant be bigger than length of action-1 + pitch = Abs(maxphase*yspeed/myspeed); + + Pitch(); + } + + UpdateLights(); + } +} + +public func SetRAt(int angle, int x, int y) { + var r = GetR(); + //rotate + var ox = Sin(r,y) - Cos(r,x); + var oy = Cos(r,y) + Sin(r,x); + SetR(angle); + r = GetR(); + var nx = Sin(r,y) - Cos(r,x); + var ny = Cos(r,y) + Sin(r,x); + + SetPosition(GetX()+nx-ox,GetY()-ny+oy); +} + +protected func Pitch() { + var cphase = GetPhase(); + + if(pitch > cphase) SetPhase(cphase+1); + else if(pitch < cphase) SetPhase(cphase-1); +} + +public func Turn() { + var phase = GetPhase(); + + if(GetYDir() > 0) SetAction("Turn1"); + else SetAction("Turn2"); + + SetPhase(phase/3); +} + +/* Kontakt */ + +protected func ContactBottom() +{ + + if (IsFlying()) { + if (/*!txspeed && !xspeed &&*/ tyspeed>=0) { + SetAction("Landed"); + Sound("Jet",0,0,75,0,-1); + yspeed = tyspeed = 0; + SetXDir(0); + SetYDir(0); + } + } +} + +/* Action Callbacks */ + +private func DoorOpenStart() +{ + for (var pObj in quit) { + if (Contained(pObj) == this) + ExitPassenger(pObj); + } +} + +private func TurnEnd() +{ + SetDir(!GetDir()); + SetVertex(4,0,(-1+2*GetDir())*25,0,1); +} + +protected func SoundOpenDoor() { + Sound("OpenDoor"); +} + +protected func SoundCloseDoor() { + Sound("CloseDoor"); +} + + +/* Effects */ + +private func CreateEngineParticle(int iX, int iY, int iSize, bool fBehind) { + // the slower the shuttle the more alpha + var alpha = 65+120*(mxspeed-Abs(xspeed))/mxspeed; + var size = iSize*5; + CreateParticle("JetSpark", iX, iY, GetXDir(), GetYDir(), size, RGBa(155,255,205,alpha), this, fBehind); +} + +private func CreateHoverParticle(int iX, int iY, int iSize, int iSpeed, int alpha, bool fBehind) { + var r = GetShuttleR(); + var tx = 0; + var ty = iSpeed+GetYDir(); + var xr = Cos(r,tx)-Sin(r,ty); + var yr = Cos(r,ty)+Sin(r,tx); + var num = 1; + if(IsTurning()) { + var p = GetPhase(); + if(p > 15) p = 29 - p; + + if(p < 4) num = 1; + else if(p < 7) num = 2; + else if(p < 10) num = 3; + else if(p < 13) num = 2; + else num = 1; + } + CreateParticle(Format("HoverSpark%d",num), iX, iY, xr, yr, iSize*5, RGBa(155,255,205,Min(255,140+alpha)), this, fBehind); +} + +private func CreateRotatedParticle(int x, int y, int z, int psi, int phi, int r, int size, bool b) +{ + var _x = x*Cos(psi,10000) + y*Sin(psi,100)*Cos(phi,100) - z*Sin(psi,100)*Sin(phi,100); + var _y = z*Cos(phi,10000) + y*Sin(phi,10000); + x = Cos(r,_x)-Sin(r,_y); + y = Cos(r,_y)+Sin(r,_x); + CreateEngineParticle(x/10000,y/10000, size, b); +} + +private func GetPointOnShuttle(&x,&y) { + var r, tx, ty, psi; + + r = GetShuttleR(); + psi = GetPhase()+2; // azimuth + tx = (-1+2*GetDir())*x*(30-2*psi)/30; + ty = y; + x = Cos(r,tx)-Sin(r,ty); + y = Cos(r,ty)+Sin(r,tx); +} + +private func GetShuttleR() { + var r = GetR(); + + if(IsTurning()) + r += -(70-Abs(GetPhase()-14)*70/15)*(GetDir()*2-1); + + return r; +} + +private func EffectsHover() { + + // wobbling + var r = Sin(FrameCounter()*40,100, 10); + var yoff=Cos(FrameCounter()*35,1200, 10); + var fsin=Sin(r, 1000, 100), fcos=Cos(r, 1000, 100); + // set matrix values + SetObjDrawTransform ( + +fcos, +fsin, 0, + +fsin * (GetDir()*2-1), +fcos, yoff + ); + + // Hover effect + var x = RandomX(-5,5); + var y = z1+RandomX(24,26); + + GetPointOnShuttle(x,y); + + // Particles in front or behind the shuttle + var behind; + if(GetAction() == "Turn1" && GetPhase() < 14) behind = true; + else if(GetAction() == "Turn2" && GetPhase() > 14) behind = true; + else behind = false; + + CreateHoverParticle(x, y+yoff/1000, 140, RandomX(10,20), Abs(75*xspeed/mxspeed), behind); +} + +private func EffectsDust() { + + // Dust effect + var mat,i; + + // maximum distance in which the shuttle appears + var maxdistance = 150; + + // search for ground (yomisei: please use your sensor-function for that as soon as you finished it) + for(i=10; i 0) { + EffectsTurn(); + } + else { + + var tx1 = x1; + var tx2 = x3; + var ty1 = z1; + var ty2 = z3; + + GetPointOnShuttle(tx1,ty1); + GetPointOnShuttle(tx2,ty2); + + CreateEngineParticle(tx1, ty1, 4+Abs(xspeed)*18/mxspeed); + CreateEngineParticle(tx2, ty2, 4+Abs(xspeed)*18/mxspeed); + + } + } +} + +private func GetDmgEffectPos(&x, &y) { + + x = -RandomX(14,36); + y = z1+RandomX(-5,15); + + GetPointOnShuttle(x,y); +} + +/* Licht */ + +public func XLightSize() { return 6000; } +public func YLightSize() { return 3000; } + +private func UpdateLights() { + if(lightson) { + + // phase of flying is three times more exact + var p = GetPhase(); + if(IsFlying()) p /= 3; + + // position of the front (goes from +4000 to -4000) + // at the same time size of the light + var x = Cos(p*6,XLightSize()); + var absX = Abs(x); + + // The direction in which the shuttle seems to be + var dir = GetDir()*2-1; + var aniDir = dir; + if(x < 0) aniDir = -dir; + + // maximum angle in which he shuttle seems to pitch during turning + var maxshuttlepitch = 22; + + // direction of Z-turning + var rotationdir = -1; + if(GetAction() == "Turn2") rotationdir = 1; + + // rotation of the light + var lightr = aniDir*90+(absX*maxshuttlepitch/XLightSize()-maxshuttlepitch)*rotationdir; + + // alpha of the light (vanishes whil turning to Z) + var alpha = (absX*200/XLightSize()); + + // finally set the light + light->ChangeR(lightr+GetR()); + light->ChangeSizeXY(YLightSize(), absX); + light->ChangeColor(RGBa(255,255,255,BoundBy(180-alpha,90,255))); + // light flash from front-lights + if(GetAction() == "Turn1") + light2->ChangeColor(RGBa(255,255,255,BoundBy(alpha-10,40,255 ))); + // The position of the light-attach + SetVertex(5,0,(x/100)*dir,0,1); + } +} + +/* Status */ + +public func IsTurning() { return WildcardMatch(GetAction(),"Turn*"); } +public func IsFlying() { return WildcardMatch(GetAction(),"Fly*"); } + +public func IsBulletTarget() { return true; } + +/* Upgrade */ + +public func IsUpgradeable(id idObj) { + // Shield upgrade + if(idObj == HSHD && !shieldupgrade) + return("$UpgradeShield$"); +} + +public func Upgrade(id idObj) { + + if(idObj == HSHD && !shieldupgrade) { + shieldupgrade = true; + AddEffect("HazardShield", this(), 99, 3, 0, HSHD, 700); + return true; + } + return false; +} + +/* Damage */ + +public func MaxDamage() { return 350; } + +public func OnDmg(int iDmg, int iType) { + + if(shieldupgrade) { + if(iType == DMG_Energy) return(60); + if(iType == DMG_Explosion) return(20); + } + + if(iType == DMG_Melee) return(60); + if(iType == DMG_Bio) return(80); + if(iType == DMG_Fire) return(80); + if(iType == DMG_Explosion) return(0); + if(iType == DMG_Energy) return(-20); + + return(30); +} + +public func OnHit(int iDmg, int iType) { + + // shield flare for energy damage + if(iType != DMG_Energy) return(0); + EffectCall(this(), GetEffect("HazardShield", this()), "BulletHit"); +} + +public func Damage() { + if(GetDamage() < MaxDamage()) return; + + // Exit all clonks, otherwise they would be removed + var bla; + while(bla = Contents()) bla->Exit(); + + // create debris + for(var i=0; i<3; ++i) { + var obj = CreateObject(DSHT); + obj -> Init(i); + } + + // boom + Explode(50); +} + +protected func Destruction() { + if(light) light->RemoveObject(); + if(light2) light2->RemoveObject(); +} + +/* EMP */ + +public func EMPShock() { + // can't shoot anymore (see containedthrow) + EMPShockEffect(50*35); + + mxspeed = 120; + myspeed = 70; + yacc = 2; ybreak = 3*yacc; + + PauseReload(); + + return(1); +} + +public func EMPShockEnd() { + mxspeed = 175; + myspeed = 100; + yacc = 5; ybreak = 3*yacc; + + ResumeReload(); +} + +public func IsMachine() { return true; } + +/* Waffe */ + +public func ReadyToFire() { + if(GetFireMode() != 2) + return IsFlying(); + // speziell für FireMode = 2 + return IsFlying() || IsTurning(); +} + +public func NoWeaponChoice() { return true; } + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Missile$"); + if(data == FM_AmmoID) return(MIAM); + if(data == FM_AmmoLoad) return(2); + if(data == FM_AmmoRate) return(2); + + if(data == FM_Reload) return(160); + if(data == FM_Recharge) return(10); + if(data == FM_Auto) return(true); + + if(data == FM_Damage) return(25); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$Bomb$"); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(3); + if(data == FM_AmmoUsage) return(1); + + if(data == FM_Reload) return(120); + if(data == FM_Recharge) return(10); + if(data == FM_Auto) return(true); + + if(data == FM_Damage) return(45); + + return(Default(data)); +} + +public func Fire1() +{ + var x = 25; + var y = z1+30; + + GetPointOnShuttle(x,y); + + var speed = Sqrt(GetXDir()*GetXDir()+GetYDir()*GetYDir()); + //Message("%d",this,speed); + var r = (GetDir()*2-1)*90+GetR(); + var rocket = CreateObject(MISS,x,y,GetOwner(GetUser())); + rocket->Launch(r, GetFMData(FM_Damage, 1),Max(20,speed)); + + Sound("Rocket",0,rocket); +} + +public func Fire2() +{ + var x = 0; + var y = 30; + + GetPointOnShuttle(x,y); + + var r = (GetDir()*2-1)*90+GetR(); + var bomb = CreateObject(ABMB,x,y,GetOwner(GetUser())); + bomb->Launch(GetXDir(),GetYDir()); + bomb->SetExplo(40); +} + +/* HUD */ + +public func UpdateCharge(object driver) { + + var hud = driver->GetHUD(); + if(hud) hud->Update(this(), driver->AmmoStoring(),driver); + return true; +} + +public func GetFlagAttachVertex() { return 7; } +public func CanCarryFlag() { return true; } + +public func CrewInside() +{ + for(var i=0; Contents(i); ++i) + if(Contents(i)->GetOCF() & OCF_CrewMember) + return true; + return false; +} \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/StringTblDE.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/StringTblDE.txt new file mode 100644 index 00000000..0ba1d7e5 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/StringTblDE.txt @@ -0,0 +1,11 @@ +Missile=Raketenfeuer +UpgradeShield=Rüstet das Shuttle mit einem Schild aus +SwitchLight=Scheinwerfer an/aus +Bomb=Bombardieren +TxtLeft=Nach links +TxtRight=Nach rechts +TxtUp=Nach oben +TxtDown=Nach unten +TxtStop=Stoppen +TxtFireMode=Feuermodus wechseln +TxtFire=Feuer! \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/StringTblUS.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/StringTblUS.txt new file mode 100644 index 00000000..9e06d2f8 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/StringTblUS.txt @@ -0,0 +1,11 @@ +Missile=Missilefire +UpgradeShield=Mounts a shield to the shuttle. +SwitchLight=Floodlight on/off +Bomb=Bombard +TxtLeft=Fly left +TxtRight=Fly right +TxtUp=Fly up +TxtDown=Fly down +TxtStop=Stop +TxtFireMode=Change fire mode +TxtFire=Fire! \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Symbols.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Symbols.c4d/DefCore.txt new file mode 100644 index 00000000..8b4e35be --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Symbols.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=SAN1 +Version=4,9,8 +Name=Symbol +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Symbols.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Symbols.c4d/Graphics.png new file mode 100644 index 00000000..26d9ba66 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Symbols.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Takeoff.wav b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Takeoff.wav new file mode 100644 index 00000000..86b3cfcb Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Shuttle.c4d/Takeoff.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/ActMap.txt new file mode 100644 index 00000000..159bf486 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/ActMap.txt @@ -0,0 +1,31 @@ +[Action] +Name=Drive +Procedure=FLOAT +Directions=2 +FlipDir=1 +Length=8 +Delay=0 +FacetBase=0 +Facet=64,0,52,38 +NextAction=Drive + +[Action] +Name=Turn +Procedure=FLOAT +Directions=2 +Length=30 +Delay=1 +FacetBase=0 +Facet=0,64,60,38,-4,0 +NextAction=Drive +PhaseCall=ChangeDir + +[Action] +Name=TurnStalled +Procedure=FLOAT +Directions=2 +Length=30 +Delay=0 +FacetBase=0 +Facet=0,64,60,38,-4,0 +NextAction=Hold \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/ActMap.txt new file mode 100644 index 00000000..945874be --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/ActMap.txt @@ -0,0 +1,19 @@ +[Action] +Name=Attach +Procedure=ATTACH +Directions=2 +Length=1 +Delay=1 +FacetBase=0 +Facet=0,64,45,25 +AbortCall=Remove +NextAction=Attach + +[Action] +Name=Turn +Procedure=ATTACH +Directions=2 +Length=1 +Delay=1 +FacetBase=0 +EndCall=ChangeDir \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DefCore.txt new file mode 100644 index 00000000..bd9830da --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=CHSS +Version=4,9,8,2 +Name=Chassis +Category=C4D_Vehicle|C4D_MouseIgnore +Timer=1 +TimerCall=Engine +Width=45 +Height=25 +Offset=-24,-6 +Mass=50 +Picture=0,0,64,64 +Rotate=1 +BorderBound=1 +NoStabilize=1 +NoGet=1 +NoSell=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DescDE.txt new file mode 100644 index 00000000..72cbc63a --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DescDE.txt @@ -0,0 +1 @@ +Dank der Ketten und einem modernen Fusionsmotor im Fahrwerk, sind selbst zerklüftete Landschaften und extreme Steigungen kein Problem für den Marauder. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DescUS.txt new file mode 100644 index 00000000..e676e187 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/DescUS.txt @@ -0,0 +1 @@ +Thanks to the tracks and the modern fusion motor in the chassis, even craggy landscapes and extremely steep surfaces are no problem for the marauder. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Graphics.png new file mode 100644 index 00000000..b70b83eb Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Names.txt new file mode 100644 index 00000000..f8c1ccfe --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fahrwerk +US:Chassis diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Script.c new file mode 100644 index 00000000..e9f47c60 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Chassis.c4d/Script.c @@ -0,0 +1,36 @@ +/*-- Chassis --*/ + +#strict + +public func AttachTo(attachto) { // attach to tank + SetDir(DIR_Left); + SetAction("Attach",attachto); +} + +public func Remove() { // remove + if(GetAction() eq "Idle") + RemoveObject(); +} + +public func Turn() { + SetAction("Turn",GetActionTarget()); +} + +protected func ChangeDir() { + var a = GetAction(GetActionTarget()); + if(a eq "Turn" || a eq "TurnStalled") return(SetAction("Turn")); + + SetAction("Attach",GetActionTarget()); + if(GetDir() == DIR_Left) SetDir(DIR_Right); + else SetDir(DIR_Left); +} + +/* Engine effect */ + +protected func Engine() { + SetR(GetR(GetActionTarget())); + + // set matrix values + if(GetActionTarget()->Contents() && !(GetActionTarget()->EMPShocked())) + SetObjDrawTransform (1000, 0, 0, 0, 1000, Sin(GetActTime()*50,300)); +} diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/DefCore.txt new file mode 100644 index 00000000..078ca674 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/DefCore.txt @@ -0,0 +1,27 @@ +[DefCore] +id=TANK +Version=4,9,8,2 +Name=Tank +Category=C4D_Vehicle|C4D_SelectVehicle +MaxUserSelect=1 +Timer=1 +TimerCall=Timer +Width=52 +Height=38 +Offset=-26,-19 +Value=100 +Mass=150 +Picture=0,0,64,64 +Entrance=-10,-10,20,31 +Rebuy=1 +Rotate=1 +RotatedEntrance=1 +BorderBound=1 +NoPushEnter=1 +VehicleControl=2 +NoStabilize=1 +ClosedContainer=2 +CollectionLimit=1 + +[Physical] +Float=1000 diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/DescDE.txt new file mode 100644 index 00000000..90f3a739 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/DescDE.txt @@ -0,0 +1 @@ +Der ultimative Kampfpanzer. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/DescUS.txt new file mode 100644 index 00000000..b6452fd9 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/DescUS.txt @@ -0,0 +1 @@ +The ultimative battle tank. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/ActMap.txt new file mode 100644 index 00000000..7f0214f6 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/ActMap.txt @@ -0,0 +1,10 @@ +[Action] +Name=Be +Procedure=None +Directions=2 +FlipDir=1 +Length=1 +Delay=0 +FacetBase=0 +Facet=64,0,58,38,-4 +NextAction=Hold diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DefCore.txt new file mode 100644 index 00000000..c65f552b --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=DTNK +Version=4,9,8,2 +Name=Tank +Category=C4D_Vehicle +Width=52 +Height=38 +Offset=-26,-19 +Vertices=4 +VertexX=-24,24,-12,12 +VertexY=17,17,-14,-14 +VertexFriction=100,100,100,100 +Mass=150 +Picture=0,0,64,64 +Rotate=1 +NoStabilize=1 diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DescDE.txt new file mode 100644 index 00000000..59c8c3ad --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DescDE.txt @@ -0,0 +1 @@ +Fast historische Tragik. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DescUS.txt new file mode 100644 index 00000000..d48f213a --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/DescUS.txt @@ -0,0 +1 @@ +Historically tragic. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/Graphics.png new file mode 100644 index 00000000..57533a26 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/Names.txt new file mode 100644 index 00000000..3b1a2211 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Destroyed.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Zerstörter Marauder +US:Destroyed marauder diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Graphics.png new file mode 100644 index 00000000..5ff59bec Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Names.txt new file mode 100644 index 00000000..77edc804 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Staub +US:Dust diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Particle.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Particle.txt new file mode 100644 index 00000000..bf1f84a2 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Dust.c4d/Particle.txt @@ -0,0 +1,13 @@ +[Particle] +Name=Dust +MaxCount=300 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,64,64,-32,-32 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=2 +Attach=1 +RByV=1 diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Graphics.png new file mode 100644 index 00000000..b74b367d Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Names.txt new file mode 100644 index 00000000..67ad2056 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Marauder +US:Marauder \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Script.c new file mode 100644 index 00000000..6ef523b8 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Script.c @@ -0,0 +1,713 @@ +/*-- Tank --*/ + +#strict + +#include L_TK // tank physics + +/* Initialization */ +/* ------------------------------------------------------------------------- */ + +public func Initialize() { // Initialization + + // Action + SetAction("Drive"); + SetDir(DIR_Left); + + // Create turret + NewTurret(TurretID()); + + // Create chassis + NewChassis(ChassisID()); + + shieldupgrade = false; + aiming = false; + + // Damage effect + AddDamageEffect(this); + + return(_inherited()); +} + +/* Turret and Chassis */ +/* ------------------------------------------------------------------------- */ + +local turret, chassis; // turret, chassis + +public func TurretID() { return(TRRT); } +public func ChassisID() { return(CHSS); } + +public func NewTurret(id idTurret) { // Set new turret + // delete old turret if there were one + if(turret) RemoveObject(turret); + + // create the new one + turret = CreateObject(idTurret,0,5,GetOwner()); + turret -> AttachTo(this()); + SetObjectOrder(this(), turret); +} + +public func NewChassis(id idChassis) { // set new chassis + // delete old chassis if there were one + if(chassis) RemoveObject(chassis); + + // create the new one + chassis = CreateObject(idChassis,0,18,GetOwner()); + chassis -> AttachTo(this()); + SetObjectOrder(this(), chassis); +} + +// the turret has the lights + +public func ContextLight(pCaller) { + [$SwitchLight$|Image=FLSH] + turret->~SwitchLights(); + return(1); +} + +/* Aiming */ +/* ------------------------------------------------------------------------- */ + +local aiming; +local crosshair; +local aimmode; + +public func ReadyToAim() { return(!IsJumping()); } +public func AimOverride() { return(IsJumping()); } +public func IsAiming() { return(aiming); } + +public func MaxAimUp() { + return(turret->~MaxAimUp()); +} + +public func MaxAimDown() { + return(Min(110,turret->~MaxAimDown())); +} + +// almost copied from hazard...: + +public func StartAiming() { // Anfangen zu zielen + Stop(); + + crosshair = CreateObject(HCRH,0,0,-1); + crosshair->Init(this()); + crosshair->SetAngle(80*(GetDir()*2-1)); + + if(IsTurning()) crosshair->SetVisibility(VIS_None); + + // Callback + aiming = true; + turret->~AimStart(); +} + +public func StopAiming() { // Zielen beenden + + if(crosshair) RemoveObject(crosshair); + + // Callback + aiming = false; + turret->~AimStop(); +} + +// copied from hazard + +public func ContainedConf(int conf) +{ + // Feineres Zielen mit JnR-Steuerung möglich + if(GetPlrCoreJumpAndRunControl(GetController())) + DoAiming(conf * AIM_Step / 5); + else + DoAiming(conf * AIM_Step); +} + +protected func ContainedUpdate(object clonk, int comdir, bool dig, bool throw) +{ + if(IsAiming()) + { + AimUpdate(this(), comdir, 1, "ContainedConf"); + return(1); + } + if(IsTurning()) + if(comdir != COMD_Stop) + { + Go(); + return(1); + } + if(IsDriving()) + if(comdir == COMD_Stop) + { + Stop(); + return(1); + } + + return(_inherited(clonk, comdir, dig, throw)); +} + +public func DoAiming(int iChange) { + //zielen wir überhaupt? + if(!IsAiming()) + return(); + + var angle = Abs(crosshair->GetAngle()) + iChange; + + // Winkel anpassen, wenn keine freie Auswahl (klassische Steuerung) + if(!GetPlrCoreJumpAndRunControl(GetController())) + angle = angle-angle%AIM_Step; + + // Winkel wird zu groß? + if(angle > MaxAimDown() || angle < MaxAimUp()) + return(); + + if(GetDir() == DIR_Left) + angle = 360-angle; + crosshair->SetAngle(angle); + + UpdateAiming(); +} + +public func UpdateAiming() { + if(!IsAiming()) + return(); + + var a = crosshair->GetAngle(); + + turret->~SetAimAngle(a); +} + +/* Callbacks */ +/* ------------------------------------------------------------------------- */ + +public func Damage() { // Damage + if(GetDamage() < MaxDamage()) return(); + + Destroyed(); +} + +protected func Destruction() { // Destruction + if(turret) RemoveObject(turret); + if(chassis) RemoveObject(chassis); +} + +protected func ActivateEntrance(object by) { // Entrance + if(by->GetOCF() & OCF_CrewMember) { + if(by == Contents()) { + PauseTurn(); + Exit(by,0,20); + return true; + } + else if(!ContentsCount()) { + Enter(this, by); + return true; + } + } +} + +protected func Ejection(object by) { + if(!EMPShocked()) { + Sound("tank_stop",0,0,SLvl(0)); + Sound("tank",0,0,SLvl(0),0,-1); + Sound("tank2",0,0,SLvl(1),0,-1); + } + if(!Contents()) + { + turret->CancelReload(); + if(IsDark()) turret->~TurnLights(false); + Message("@",this); + DoScore(GetOwner(),+GetValue()); + SetOwner(NO_OWNER); + } +} + +protected func Collection2(object by) { + SetEntrance(0); + if(!(GetOCF(by) & OCF_CrewMember)) return; + + DriverIsOwner(by); + if(!EMPShocked()) { + Sound("tank_start",0,0,SLvl(0)); + Sound("tank",0,0,SLvl(0),0,1); + ResumeTurn(); + } + if(IsDark()) turret->~TurnLights(true); + +} + +// nur CrewMember dürfen hier rein +protected func RejectCollect(id idObj, object pObj) { + if(GetOCF(pObj) & OCF_CrewMember) return(0); + return(1); +} + +private func DriverIsOwner(object driver) { + var owner = GetOwner(driver); + DoScore(GetOwner(),+GetValue()); + SetOwner(owner); + DoScore(owner,-GetValue()); + for(var i = 0; i < GetPlayerCount(); i++) + if(i != owner) + PlayerMessage(GetPlayerByIndex(i), "@%s",this(),Format("%s %s",GetTaggedPlayerName(owner),GetTaggedTeamName(owner))); +} + +/* Sound */ +/* ------------------------------------------------------------------------- */ + +private func SLvl(bool drive) { + if(!drive) return(50); + if(drive) return(100); +} + +public func OnGo() { + if(!IsTurning()) EngineSoundStart(); +} + +public func OnStop() { + if(!IsTurning()) EngineSoundStop(); +} + +public func OnJumpStart() { + EngineSoundStop(); + Sound("Flamer",0,0,80); +} + +public func OnJumpEnd() { + if(!stop) EngineSoundStart(); +} + +public func OnTurnStart() { + if(stop) EngineSoundStart(); +} + +public func OnTurnEnd() { + if(stop) EngineSoundStop(); +} + +private func EngineSoundStart() { Sound("tank2",0,0,SLvl(1),0,+1); } +private func EngineSoundStop() { Sound("tank2",0,0,SLvl(1),0,-1); } + +/* Status */ +/* ------------------------------------------------------------------------- */ + +public func IsBulletTarget() { return(1); } + +public func MaxDamage() { return(750); } + +public func IsThreat() { return(!!ContentsCount()); } + +/* Control */ +/* ------------------------------------------------------------------------- */ + +public func ContainedLeft(object driver) { // Left + [$TxtLeft$|Image=TAN1:3] + if(EMPShocked()) return(true); + if(GetDir() != DIR_Left) { + if(!IsTurning()) { + if(BottomContact()) + Turn(); + } + } + else { + if(!IsDriving()) + if(!IsAiming()) + Go(); + } + return(true); +} + +public func ContainedRight(object driver) { // Right + [$TxtRight$|Image=TAN1:4] + if(EMPShocked()) return(true); + if(GetDir() != DIR_Right) { + if(!IsTurning()) + if(BottomContact()) + Turn(); + } + else { + if(!IsDriving()) + if(!IsAiming()) + Go(); + } + return(true); +} + +public func ContainedDown(object driver) { // Down + [$TxtAimDown$|Image=TAN1:2] + if(IsAiming()) { + AimDown(this(), 1, "ContainedConf"); + return(1); + } + if(IsDriving()) { + Stop(); + return(1); + } + else { + if(GetPlrDownDouble(GetOwner(driver))) { + StartAiming(); + } + } + //PauseTurn(); + return(1); +} + +public func ContainedUpDouble(object driver) { // UpDouble + [$TxtOut$|Image=TAN1:6] + if(IsAiming()) { + AimUp(this(), 1, "ContainedConf"); + return(1); + } + if(!IsDriving()) { + PauseTurn(); + Exit(driver,0,20); + } +} + +public func ContainedLeftDouble(object driver) { // LeftDouble + [$TxtStopAim$|Image=TAN1:7] + if(IsAiming()) { + StopAiming(); + return(1); + } +} + +public func ContainedRightDouble(object driver) { // RightDouble + [$TxtStopAim$|Image=TAN1:7] + if(IsAiming()) { + StopAiming(); + return(1); + } +} + +public func ContainedUp(object driver) { // Up + [$TxtAimUp$|Image=TAN1:1] + if(IsAiming()) { + AimUp(this(), 1, "ContainedConf"); + return(1); + } + if(Jump()) { + for(var i=0; i<20; ++i) + CreateDustParticle(RandomX(-10,10),RandomX(20,300)); + + //var dir = GetDir()*2-1; + //Schedule(Format("MuzzleFlash(20, Object(%d), %d, -2, %d, %d)",ObjectNumber(this()),-21*dir -1, -90*dir, RGB(255,150,0)),2,5,this()); + } +} + +public func ContainedThrow(object driver) { // Throw (Fire) + [$TxtFire$|Image=TAN1:0] + if(EMPShocked()) return(true); + // forward to turret: select the fire mode + turret->ControlThrow(driver); + return(true); +} + +public func ContainedDigDouble(object driver) { // Dig Double (fire mode) + [$TxtFireMode$|Image=TAN1:5] + if(EMPShocked()) return(true); + // forward to turret: select the fire mode + turret->ControlDigDouble(driver); + return(true); +} + +public func ControlCommand(string strCommand, object pTarget, int iTx, int iTy, object pTarget2, int iData, object pCmdObj) { + if(strCommand eq "MoveTo") { + + if(IsAiming()) { + //Winkel wird zu groß? + var iAngle = Normalize(Angle(GetX(),GetY(),iTx,iTy)-GetR(),-180); + + // falsche Richtung? (nur drehen) + if(iAngle < 0 && GetDir() == DIR_Right || + iAngle > 0 && GetDir() == DIR_Left) { + + Turn(); + // danach! + turret->ControlThrow(pCmdObj); + return(1); + } + + iAngle = Abs(iAngle); + iAngle = BoundBy(iAngle,MaxAimUp(),MaxAimDown()); + + if(GetDir() == DIR_Left) + iAngle = 360-iAngle; + + crosshair->SetAngle(iAngle); + UpdateAiming(); + + ScheduleCall(turret,"ControlThrow",5,0,pCmdObj); + } + else + turret->ControlThrow(pCmdObj); + // do not exit + return(1); + } +} + +/* Turning */ +/* ------------------------------------------------------------------------- */ + +public func Turn() { + SetAction("Turn"); + + OnTurnStart(); + if(crosshair) crosshair->SetVisibility(VIS_None); + + chassis -> Turn(); + turret -> Turn(); +} + +protected func ChangeDir() { + + // turn dir + if(GetPhase() == 15) { + if(GetDir() == DIR_Left) + SetDir(DIR_Right); + else + SetDir(DIR_Left); + + if(crosshair) crosshair->ChangeDir(); + } + + if(GetPhase() == 29) { + + if(crosshair) { + crosshair->SetVisibility(VIS_Owner); + } + + OnTurnEnd(); + } +} + +public func ResumeTurn() { + // resume turning only if paused + if(GetAction() ne "TurnStalled") return(); + var p = GetPhase(); + SetAction("Turn"); + SetPhase(p); +} + +public func PauseTurn() { + // pause turning only if turning + if(GetAction() ne "Turn") return(); + var p = GetPhase(); + SetAction("TurnStalled"); + SetPhase(p); +} + +/* HUD */ +/* ------------------------------------------------------------------------- */ + +public func ReadyToFire() { return(!IsTurning()); } + +public func UpdateCharge(object driver) { + + if(!turret) return false; + + var hud = driver->GetHUD(); + if(hud) hud->Update(turret, driver->AmmoStoring(),driver); + return true; +} + + +/* Graphical effects */ +/* ------------------------------------------------------------------------- */ +// mid term: most sbould be general functions + +protected func Timer() { + + DrivingAnimation(); // Animation beim Fahren + DustEffect(); // Aufwirbeln von Staub +} + +public func GetDmgEffectPos(&x, &y) { + + var turn = 100; + if(GetAction() ne "Drive") + turn = 100*Abs(15 - GetPhase())/15; + x = Cos(GetR(),-(GetDir()*2-1)*13*turn/100)+Sin(GetR(),-4); + y = Sin(GetR(),-(GetDir()*2-1)*13*turn/100)+Cos(GetR(),-4); +} + +private func DustEffect() { + + if(IsDriving() || IsTurning()) { + CreateDustParticle((GetDir()*2-1)*10,RandomX(20,300)); + } +} + +private func CreateDustParticle(int dir, int size) { + // Dust effect + var groundx = Sin(GetR(),-YOffsToWheels()-3); + var groundy = Cos(GetR(),+YOffsToWheels()+3); + var mat = GetMaterial(groundx, groundy); + + if(CheckDust(mat)) { + + var rand = Random(3); + var r = GetMaterialColor(mat,rand,0); + var g = GetMaterialColor(mat,rand,1); + var b = GetMaterialColor(mat,rand,2); + var alpha = 160; + var xdir = -Max(26-Abs(dir*2),0)*dir/Abs(dir); + var x = -Sin(GetR(),YOffsToWheels()) + Cos(GetR(),-dir); + var y = Cos(GetR(),YOffsToWheels()) + Sin(GetR(),-dir); + CreateParticle("Dust",x,y,Cos(GetR(),xdir+RandomX(-2,2)),RandomX(-5,5),size,RGBa(r,g,b,alpha)); + } +} + +private func DrivingAnimation() { + if(IsDriving()) { + + if(!IsTurning()) { + + // Fling :D + var dir = GetDir()*2-1; + var r = GetR(); + var x = Cos(r,dir*20) -Sin(r,8); + var y = Sin(r,dir*20) +Cos(r,8); + + for(var obj in FindObjects(Find_Category(C4D_Living),Find_NoContainer(),Find_AtPoint(x,y), Find_OCF(OCF_Alive))) + { + if(Hostile(GetOwner(obj),GetController()) || FriendlyFire()) + { + // fling only stuff that is not flying (= that we did not send flying :-] ) + if(GetProcedure(obj) ne "FLIGHT") + { + Fling(obj,-dir,-2); + DoDmg(20,DMG_Melee, obj, 0, GetController()); + } + } + } + + var maxphase = GetActMapVal("Length",GetAction()); + if(maxphase > GetPhase()+2) + SetPhase(GetPhase()+2); + else { + if(maxphase == GetPhase()+1) SetPhase(1); + else SetPhase(0); + } + } + } +} + +public func ThrustEffect(int iEffectTime) { + if(!BottomContact()) { + if(iEffectTime < 10) { + var angle = GetR(); + var xoff = -(GetDir()*2-1)*8; + var yoff = +YOffsToWheels(); + var x = -Sin(angle,yoff)+Cos(angle,xoff); + var y = +Cos(angle,yoff)+Sin(angle,xoff); + + CreateParticle("Thrust",x,y,-GetXDir()/2,-GetYDir()/2,RandomX(140,200),RGBa(255,200,200,80),0,0); + CreateParticle("Smoke2",x,y,-GetXDir()/2,-GetYDir()/2,RandomX(180,220),RGBa(220,200,180,0),0,0); + + // Stichflamme... + if(iEffectTime % 3) { + var dir = GetDir()*2-1; + xoff = -dir*23; + yoff = -3; + x = -Sin(angle,yoff)+Cos(angle,xoff); + y = +Cos(angle,yoff)+Sin(angle,xoff); + MuzzleFlash(20, this, x,y,angle-dir*90, RGB(255,150,0)); + } + } + } +} + +/* Damage */ +/* ------------------------------------------------------------------------- */ + +public func OnDmg(int iDmg, int iType) { + // full resistance to bio and fire damage + // vulnerable to explosions and energy + // and a bit resistant vs everything else + if(shieldupgrade) { + if(iType == DMG_Energy) return(60); + if(iType == DMG_Explosion) return(20); + } + + if(iType == DMG_Energy) return(-20); + if(iType == DMG_Bio) return(80); + if(iType == DMG_Melee) return(60); + if(iType == DMG_Fire) return(80); + if(iType == DMG_Explosion) return(0); + + return(30); +} + +public func OnHit(int iDmg, int iType) { + + // nur Energie + if(iType != DMG_Energy) return(0); + // Schild flackert auf + EffectCall(this(), GetEffect("HazardShield", this()), "BulletHit"); +} + +public func Destroyed() { + // exit all drivers + var bla; + while(bla = Contents()) bla->Exit(); + + // remove turret and chassis + if(turret) { + turret->Explosive(); + turret = 0; + } + if(chassis) { + chassis->RemoveObject(); + } + + // bumm + var tank = CreateObject(DTNK,0,19,-1); + tank->SetAction("Be"); + tank->SetR(GetR()); + tank->SetDir(GetDir()); + Explode(40); +} + +/* EMP */ +/* ------------------------------------------------------------------------- */ + +public func IsMachine() { return(1); } + +public func EMPShock() { + // at emp-shock: stop, pause turning and assign a shock-effect + Stop(); + PauseTurn(); + if(turret) turret->PauseReload(); + EMPShockEffect(30*35); + Sound("tank_stop",0,0,SLvl(0)); + Sound("tank",0,0,SLvl(0),0,-1); + Sound("tank2",0,0,SLvl(1),0,-1); + return(1); +} + +public func EMPShockEnd() { + // at the end of the shock-effect: the tank may continue to turn + if(Contents()) { + ResumeTurn(); + if(turret) turret->ResumeReload(); + Sound("tank_start",0,0,20); + Sound("tank",0,0,20,0,1); + } +} + +/* Upgrade */ +/* ------------------------------------------------------------------------- */ + +local shieldupgrade; + +public func IsUpgradeable(id idObj) { + if(idObj == HSHD && !shieldupgrade) + return("$UpgradeShield$"); + return(false); + } + +public func Upgrade(id idObj) { + if(idObj == HSHD) { + shieldupgrade = true; + AddEffect("HazardShield", this(), 99, 3, 0, HSHD, 400); + return(1); + } +} + +public func CanCarryFlag() { return true; } \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/StringTblDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/StringTblDE.txt new file mode 100644 index 00000000..ae41a6bd --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/StringTblDE.txt @@ -0,0 +1,10 @@ +UpgradeShield=Rüstet den Panzer mit einem Schild aus +SwitchLight=Scheinwerfer an/aus +TxtOut=Aussteigen wenn der Panzer steht +TxtStopAim=Zielen beenden +TxtAimDown=Nach unten zielen +TxtAimUp=Nach oben zielen +TxtLeft=Nach links +TxtRight=Nach rechts +TxtFire=Feuern! +TxtFireMode=Feuermodus wechseln \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/StringTblUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/StringTblUS.txt new file mode 100644 index 00000000..06dc3999 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/StringTblUS.txt @@ -0,0 +1,10 @@ +UpgradeShield=Mounts a shield to the tank. +SwitchLight=Floodlight on/off +TxtOut=Exit if the tank stands +TxtStopAim=Stop aiming +TxtAimDown=Aim down +TxtAimUp=Aim up +TxtLeft=Drive left +TxtRight=Drive right +TxtFire=Fire! +TxtFireMode=Change fire mode \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Symbols.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Symbols.c4d/DefCore.txt new file mode 100644 index 00000000..3f4457a2 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Symbols.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=TAN1 +Version=4,9,8 +Name=Symbol +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Symbols.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Symbols.c4d/Graphics.png new file mode 100644 index 00000000..da05eeed Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Symbols.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/TankCannon.wav b/Hazard.c4d/Vehicles.c4d/Tank.c4d/TankCannon.wav new file mode 100644 index 00000000..69dfff03 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/TankCannon.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/ActMap.txt new file mode 100644 index 00000000..9305f5c4 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/ActMap.txt @@ -0,0 +1,32 @@ +[Action] +Name=Attach +Procedure=ATTACH +Directions=2 +Length=1 +Delay=1 +FacetBase=0 +Facet=0,64,52,25 +AbortCall=Remove +NextAction=Attach +StartCall=Timer + + +[Action] +Name=Turn +Procedure=ATTACH +Directions=2 +Length=1 +Delay=1 +FacetBase=0 +EndCall=ChangeDir + +[Action] +Name=Explosive +Procedure=Idle +Directions=2 +Length=1 +Delay=12 +FacetBase=0 +Facet=0,64,52,25 +NextAction=Idle +EndCall=BurnBurnBurn \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/ActMap.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/ActMap.txt new file mode 100644 index 00000000..1242d833 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/ActMap.txt @@ -0,0 +1,9 @@ +[Action] +Name=Travel +Procedure=NONE +NextAction=Travel +FacetBase=0 +Facet=0,0,6,10 +Length=1 +Delay=1 +StartCall=Traveling \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DefCore.txt new file mode 100644 index 00000000..1e3af2fc --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=TBUL +Version=4,9,8,2 +Name=Bullet +Category=C4D_Vehicle +Width=6 +Height=10 +Offset=-3,-5 +Vertices=1 +VertexFriction=1 +Picture=6,0,64,64 +Rotate=1 + +[Physical] +Float=100000 diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DescDE.txt new file mode 100644 index 00000000..78af8e69 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DescDE.txt @@ -0,0 +1 @@ +Explodiert gerne. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DescUS.txt new file mode 100644 index 00000000..93ba24d1 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/DescUS.txt @@ -0,0 +1 @@ +Loves to explode. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Graphics.png new file mode 100644 index 00000000..33af1432 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Names.txt new file mode 100644 index 00000000..07cde46e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Geschoss +US:Bullet diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Script.c new file mode 100644 index 00000000..92fbc04e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Bullet.c4d/Script.c @@ -0,0 +1,53 @@ +#strict + +local shooter; +local explo; +local nospeed; + +/* Bullet */ + +func Construction(object byObj) { + // nichts? :C + if(!byObj) + return(); + // Waffe? + shooter = GetShooter(byObj); + + SetExplo(30); +} + +public func Launch(int xdir, int ydir) +{ + AddEffect("HitCheck", this(), 1, 1, 0, SHT1,shooter,true); + SetSpeed(xdir, ydir); + SetAction("Travel"); +} + +public func SetExplo(int ex) { + explo = ex; +} + +public func Hit() { + Explode(explo); +} + +public func HitObject(obj) { Hit(); } + +func Traveling () { + SetR(Angle(0,0,GetXDir(),GetYDir())); + + // wie, liegt das rum?! kaputtmachen + if(!GetXDir() && !GetYDir()) { + if(!nospeed) { + nospeed = true; + } + else { + Hit(); + } + } else { + nospeed = false; + } + + CreateParticle("Smoke2", 0, 0, RandomX(-15, 15), -5, + RandomX(80, 160), RGBa(100,100,100,60)); +} \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DefCore.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DefCore.txt new file mode 100644 index 00000000..6a648633 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=TRRT +Version=4,9,8,2 +Name=Turret +Category=C4D_Vehicle|C4D_MouseIgnore +Timer=1 +TimerCall=Engine +Width=52 +Height=25 +Offset=-26,-20 +Mass=50 +Picture=0,0,64,64 +Rotate=1 +BorderBound=1 +NoStabilize=1 +NoGet=1 +NoSell=1 \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DescDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DescDE.txt new file mode 100644 index 00000000..b8e20c88 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DescDE.txt @@ -0,0 +1 @@ +Neben der Kanone ist auf diesem Geschützturm ein Mehrfachraketenwerfer installiert. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DescUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DescUS.txt new file mode 100644 index 00000000..d4a2860d --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/DescUS.txt @@ -0,0 +1 @@ +In addition to the cannon, there is a multiple rocket launching system installed on this turret. \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Graphics.png b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Graphics.png new file mode 100644 index 00000000..02f3133b Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Graphics.png differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Names.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Names.txt new file mode 100644 index 00000000..e99eff44 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Geschützturm +US:Turret diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Script.c b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Script.c new file mode 100644 index 00000000..be26731e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/Script.c @@ -0,0 +1,263 @@ +/*-- Turret --*/ + +#strict +#include WEPN + +local light, light2, lightson; +local aimmode; + +/* Turret as a weapon */ + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Cannon$"); + if(data == FM_Icon) return(TBUL); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(30); + if(data == FM_Recharge) return(10); + + return(Default(data)); +} + +public func FMData2(int data) +{ + if(data == FM_Name) return("$Missile$"); + if(data == FM_Icon) return(HMIS); + if(data == FM_AmmoID) return(MIAM); + if(data == FM_AmmoLoad) return(2); + + if(data == FM_Reload) return(100); + if(data == FM_Recharge) return(30); + + return(Default(data)); +} + +public func Fire1() // fire the cannon +{ + // dir + var r = Normalize(GetR(),-180); + if(GetDir() == DIR_Right) r = Normalize(r-180,-180); + + // where does it come out? + var x = +Cos(r,-28); + var y = -Sin(r,28); + var strength = 100; + var xdir = -Cos(r,strength) + GetXDir(GetActionTarget()); + var ydir = -Sin(r,strength) + GetYDir(GetActionTarget()); + + // launch! + var bullet = CreateObject(TBUL,x,y+3,GetController(GetActionTarget())); + bullet->Launch(xdir, ydir); + + var realr; + if(GetDir() == DIR_Left) realr = r-90; + else realr = r-90; + // Effects + MuzzleFlash(90,this(),x,y,realr,RGB(255,255,0)); + Sound("TankCannon"); + + + DoImpulse(-(GetDir()*2-1)*38); + +} + +public func Fire2() // fire the missiles! +{ + // dir + var r = Normalize(GetR(),-180); + if(GetDir() == DIR_Right) r = r-180; + + // where does it come out? + var x = +Cos(r,-16); + var y = -Sin(r,16); + var ax = +Cos(r,+4); + var ay = -Sin(r,-4); + var xdir = (ax - x)*2; + var ydir = (ay - y)*2; + + var rocket = CreateObject(HMIS,x,y,GetController(GetActionTarget())); + rocket->Launch(r-90); + + // effects + + CreateParticle("Thrust",ax,ay,xdir/2,ydir/2,80,RGBa(255,200,200,0),0,0); + + for(var i=0; i<20; ++i) { + var rand = RandomX(-10,+10); + CreateParticle("Smoke2",ax+Sin(r,rand),ay-Cos(r,rand), + RandomX(0,2*xdir),RandomX(0,2*ydir), + RandomX(80,140),RGBa(220,200,180,0),0,0); + } + + Sound("Rocket",0,rocket); + + // the turret + DoImpulse(-(GetDir()*2-1)*16); + +} + +/* aiming */ + +local aimangle; + +public func MaxAimUp() { return(50); } +public func MaxAimDown() { return(110); } + +public func SetAimAngle(int a) { + aimangle = 90-Abs(a); +} + +public func AimStop() { + aimangle = 10; +} + +/* engine effect */ + +protected func Engine() { + if(GetAction() eq "Explosive") return(); + // set matrix values + if(GetActionTarget()->Contents() && !(GetActionTarget()->EMPShocked())) { + SetObjDrawTransform (1000, 0, 0, 0, 1000, Sin(GetActTime()*50,200)); + } +} + +/* Explode */ + +public func Explosive() { + // if the tank is broken, the turret is flung + // into the air and will explode if it comes to the ground + SetAction("Explosive"); + var rand = RandomX(-30,30); + SetXDir(rand); + SetYDir(-80); + SetRDir(rand/4); + SetClrModulation(RGB(60,60,60)); +} + +protected func BurnBurnBurn() { + // call if it is explosive and comes to the ground + Explode(30); +} + +/* Physics */ + +public func DoImpulse(int impulse) { // impulse to the chassis + SetRDir(GetRDir() + impulse); +} + +public func SetImpulse(int impulse) { + SetRDir(impulse); +} + +private func Timer() { // set the rotation according to im- and repulse + SetRDir(BoundBy((GetRDir()*9 + Repulse()*9)/10,-20,20)); +} + +private func Repulse() { // repulse from the pneumatic system + + var dir = GetDir()*2-1; + if(light) light->ChangeR(dir*90+GetR()); + + var rdiff = Normalize(GetR() + dir*aimangle - GetR(GetActionTarget()),-180); + var repulse = 0; + + // the greater the angle, the greater the repulse + if(rdiff > 0) + repulse = -rdiff/2; + else + repulse = -rdiff; + + // if small enough, leave it + + return(repulse); +} + +public func AttachTo(attachto) { // attach to tank + + SetDir(DIR_Left); + SetAction("Attach",attachto); + light = AddLightCone(1000,RGBa(255,255,255,255), this()); + light->ChangeR((GetDir()*2-1)*90+GetR()); + light->ChangeSizeXY(2000,4000); + light2 = AddLight(200, RGBa(255,255,255,255), this()); + lightson = false; + aimmode = false; + aimangle = 10; + SetR(aimangle); +} + +public func SwitchLights() +{ + TurnLights(!lightson); +} + +public func TurnLights(bool on) +{ + lightson = on; + var alpha = 255; + if(lightson) alpha = 90; + light->ChangeColor(RGBa(255,255,255,alpha)); + light2->ChangeColor(RGBa(255,255,255,255)); +} + +public func Remove() { // remove + if(GetAction() eq "Idle") + RemoveObject(); +} + +public func Destruction() { + if(light) light->RemoveObject(); + if(light2) light2->RemoveObject(); +} + +/* Turning */ + +public func Turn() { + SetAction("Turn",GetActionTarget()); + // reset rotation + SetR(8); + SetRDir(0); + + if(GetDir() == DIR_Left) { + SetR(-Normalize(GetR(),-180)); + SetDir(DIR_Right); + } + else { + SetR(+Normalize(GetR(),-180)); + SetDir(DIR_Left); + } +} + +protected func ChangeDir() { + + if(lightson) { + var at = GetActionTarget(); + var dir = GetDir()*2-1; + var x = Cos(GetPhase(at)*6,4000); + if(x < 0) { + x = -x; + dir = -dir; + } + var alpha = (Abs(x)*200/4000); + + light->ChangeSizeXY(2000, x); + light->ChangeR(Normalize(GetR(at)-90*dir,-180) + dir*10); + light->ChangeColor(RGBa(255,255,255,BoundBy(180-alpha,90,255))); + + if(GetDir() == DIR_Right) + light2->ChangeColor(RGBa(255,255,255,BoundBy(alpha-10,40,255 ))); + } + + var at = GetActionTarget(); + if(GetAction(at) eq "Turn" || GetAction(at) eq "TurnStalled") { + return(SetAction("Turn")); + } + SetAction("Attach",at); + SetR(Normalize(GetR(at),-180) - (GetDir()*20-10)); + SetRDir(0); +} + + +public func NoWeaponChoice() { return(true); } diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/StringTblDE.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/StringTblDE.txt new file mode 100644 index 00000000..a7fa6d61 --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/StringTblDE.txt @@ -0,0 +1,6 @@ +Cannon=Kanone +Missile=Raketen +aim=Zielmodus %s +aimDesc=Schaltet den Zielmodus %s +on=an +off=aus \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/StringTblUS.txt b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/StringTblUS.txt new file mode 100644 index 00000000..14a87a4e --- /dev/null +++ b/Hazard.c4d/Vehicles.c4d/Tank.c4d/Turret.c4d/StringTblUS.txt @@ -0,0 +1,6 @@ +Cannon=Cannon +Missile=Missiles +aim=Aim mode %s +aimDesc=Turns the aim mode %s +on=on +off=off \ No newline at end of file diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank.wav b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank.wav new file mode 100644 index 00000000..5fb8549e Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank2.wav b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank2.wav new file mode 100644 index 00000000..19da5000 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank2.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank_start.wav b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank_start.wav new file mode 100644 index 00000000..a3ad1925 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank_start.wav differ diff --git a/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank_stop.wav b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank_stop.wav new file mode 100644 index 00000000..64cdf422 Binary files /dev/null and b/Hazard.c4d/Vehicles.c4d/Tank.c4d/tank_stop.wav differ diff --git a/Hazard.c4d/Version.txt b/Hazard.c4d/Version.txt new file mode 100644 index 00000000..c44ae7bb --- /dev/null +++ b/Hazard.c4d/Version.txt @@ -0,0 +1 @@ +4.9.10.13 diff --git a/Hazard.c4f/AH_Predator.c4s/DescDE.rtf b/Hazard.c4f/AH_Predator.c4s/DescDE.rtf new file mode 100644 index 00000000..d9506895 Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/AH_Predator.c4s/DescUS.rtf b/Hazard.c4f/AH_Predator.c4s/DescUS.rtf new file mode 100644 index 00000000..f4c91c26 Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/AH_Predator.c4s/Icon.png b/Hazard.c4f/AH_Predator.c4s/Icon.png new file mode 100644 index 00000000..d36d76c6 Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/Icon.png differ diff --git a/Hazard.c4f/AH_Predator.c4s/Landscape.bmp b/Hazard.c4f/AH_Predator.c4s/Landscape.bmp new file mode 100644 index 00000000..2867b55c Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/AH_Predator.c4s/Material.c4g/TexMap.txt b/Hazard.c4f/AH_Predator.c4s/Material.c4g/TexMap.txt new file mode 100644 index 00000000..a1329a6a --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/Material.c4g/TexMap.txt @@ -0,0 +1,93 @@ +# Static Map Material/Texture Table +# Index +128 for underground materials + +# Original Materials: Range 1 - 15 +# Hazard Materials: Range 24 - 85 + +OverloadMaterials +OverloadTextures + +1=Tunnel-Smooth +2=Tunnel-Rough +3=Water-Liquid +4=Acid-Liquid2 +5=DuroLava-Liquid +6=Granite-Ridge +7=Sand-Swirl +8=FlySand-Smooth +9=Ashes-Swirl +10=FlyAshes-Smooth +11=Snow-Flare2 +12=Ice-Structure +13=Earth-Smooth +14=Earth-Rough +15=Rock-Ridge + +19=FlySand-Swirl + +24=Water2-Liquid3 +25=BackWall-Bricks1 +26=BackWall-Bricks2 +27=BackWall-Column1 +28=BackWall-Concrete1 +29=BackWall-Concrete2 +30=BackWall-Concrete3 +31=BackWall-Concrete4 +32=BackWall-Concrete5 +33=BackWall-Grid1 +34=BackWall-Grid2 +35=BackWall-Industrial1 +36=BackWall-Industrial2 +37=BackWall-Industrial3 +38=BackWall-Laboratory1 +39=BackWall-Marble1 +40=BackWall-Metal1 +41=BackWall-Metal2 +42=BackWall-Metal3 +43=BackWall-Metal4 +44=BackWall-Slime1 +45=BackWall-Tiles1 +46=BackWall-Tiles2 +47=BackWall-Tiles3 +48=BackWall-Unknown1 +49=BackWall-Unknown2 +50=Wall-Bricks1 +51=Wall-Bricks2 +52=Wall-Concrete1 +53=Wall-Concrete2 +54=Wall-Concrete3 +55=Wall-Concrete4 +56=Wall-Concrete5 +57=Wall-Industrial1 +58=Wall-Metal2 +59=Wall-Metal3 +60=Wall-Metal4 +61=Wall-Unknown1 +62=Wall-Unknown2 +63=Wall-Structure +64=Wall-Smooth2 +65=WeakWall-Bricks1 +66=WeakWall-Bricks2 +67=WeakWall-Concrete1 +68=WeakWall-Concrete2 +69=WeakWall-Concrete3 +70=WeakWall-Concrete4 +71=WeakWall-Concrete5 +72=WeakWall-Industrial1 +73=WeakWall-Metal2 +74=WeakWall-Metal3 +75=WeakWall-Metal4 +76=WeakWall-Unknown1 +77=WeakWall-Unknown2 +78=WeakWall-Structure +79=WeakWall-Smooth2 +80=Rough-Bricks1 +81=Rough-Concrete2 +82=Rough-Concrete4 +83=Rough-Slime1 +84=Rough-Unknown1 +85=Rough-Unknown2 +86=BackWall-Stripes +87=Wall-Stripes + +99=Sand-Smooth \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/RadioStatic.wav b/Hazard.c4f/AH_Predator.c4s/RadioStatic.wav new file mode 100644 index 00000000..fae03a0d Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/RadioStatic.wav differ diff --git a/Hazard.c4f/AH_Predator.c4s/Scenario.txt b/Hazard.c4f/AH_Predator.c4s/Scenario.txt new file mode 100644 index 00000000..8f801318 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/Scenario.txt @@ -0,0 +1,46 @@ +[Head] +Icon=16 +Title=Predator +Origin=Hazard.c4f\AH_Predator.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GAH_=1 +Rules=CHOS=1 + +[Player1] +Crew=HZCK=1 +Magic=MWP2=0;MFFA=0;MVLC=0;MWND=0;MQKE=0;CMFG=0;RMMG=0;MBRG=0;EXTG=0;ETFL=0;MGHL=0;MGUP=0;MGWP=0;MMTR=0;MFFS=0;FRFS=0;MLGT=0;RVLT=0;MINV=0;MGDW=0;MFFW=0 + +[Player2] +Crew=HZCK=1 +Magic=MWP2=0;MFFA=0;MVLC=0;MWND=0;MQKE=0;CMFG=0;RMMG=0;MBRG=0;EXTG=0;ETFL=0;MGHL=0;MGUP=0;MGWP=0;MMTR=0;MFFS=0;FRFS=0;MLGT=0;RVLT=0;MINV=0;MGDW=0;MFFW=0 + +[Player3] +Crew=HZCK=1 +Magic=MWP2=0;MFFA=0;MVLC=0;MWND=0;MQKE=0;CMFG=0;RMMG=0;MBRG=0;EXTG=0;ETFL=0;MGHL=0;MGUP=0;MGWP=0;MMTR=0;MFFS=0;FRFS=0;MLGT=0;RVLT=0;MINV=0;MGDW=0;MFFW=0 + +[Player4] +Crew=HZCK=1 +Magic=MWP2=0;MFFA=0;MVLC=0;MWND=0;MQKE=0;CMFG=0;RMMG=0;MBRG=0;EXTG=0;ETFL=0;MGHL=0;MGUP=0;MGWP=0;MMTR=0;MFFS=0;FRFS=0;MLGT=0;RVLT=0;MINV=0;MGDW=0;MFFW=0 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Pollute1 + +[Weather] +Climate=40,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Disasters] +Meteorite=1,0,0,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/Script.c b/Hazard.c4f/AH_Predator.c4s/Script.c new file mode 100644 index 00000000..2a5c35c8 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/Script.c @@ -0,0 +1,330 @@ +/*-- Fressfeind --*/ + +#strict + +static alienengt; +static down; + +protected func Initialize() +{ + // Himmel + SetSkyAdjust(RGB(255,0,255), RGB(255,128,255)); + +CreateObject(TRB2,850,97,-1); +CreateObject(TRB1,949,148,-1); +AddEffect("Spezialzauber", CreateObject(CRAT,582,180,-1), 1, 0); +CreateObject(CRAT,644,208,-1); +CreateObject(TRB1,800,225,-1); +CreateObject(TRB3,1093,221,-1); +var obj0 = CreateObject(GRAS,49,245,-1); +obj0->SetR(-3); +obj0->SetCon(57); +var obj1 = CreateObject(GRAS,14,242,-1); +obj1->SetR(1); +obj1->SetCon(57); +CreateObject(TRB2,204,257,-1); +var obj2 = CreateObject(GRAS,283,255,-1); +obj2->SetCon(55); +var obj3 = CreateObject(GRAS,250,255,-1); +obj3->SetCon(73); +var obj4 = CreateObject(LKEY,486,243,-1); +var obj5 = CreateObject(HSGN,458,245,-1); +obj5->SetCon(50); +var obj6 = CreateObject(TELE,526,251,-1); +obj6->Deactivate(); +CreateObject(TRB2,728,247,-1); +var obj7 = CreateObject(BONE,924,241,-1); +obj7->SetR(35); +var obj8 = CreateObject(BONE,928,241,-1); +obj8->SetR(45); +var obj9 = CreateObject(BONE,918,241,-1); +obj9->SetR(42); +CreateObject(BUSB,1214,222,-1); +CreateObject(SKUL,1301,219,-1); +var obj10 = CreateObject(HTB1,1377,226,-1); +obj10->SetR(75); +CreateObject(SKUL,1442,228,-1); +var obj11 = CreateObject(GRAS,121,261,-1); +obj11->SetR(2); +obj11->SetCon(50); +var crat = CreateObject(CRAT,631,499,-1); +crat->CreateContents(KRFL, 0, 2); +crat->CreateContents(HARM); +crat->CreateContents(MINE); +crat->CreateContents(ALN2, 0, 2); +AddEffect("Spezialzauber2", crat, 1, 0); +var obj12 = CreateObject(LADR,848,590,-1); +obj12->Set(13); +var obj13 = CreateObject(IDOL,450,523,-1); +obj13->SetR(105); +alienengt = CreateObject(ENGT,671,605,-1); +alienengt->SetCon(75); +var obj15 = CreateObject(LADR,817,818,-1); +obj15->Set(28); +var obj16 = CreateObject(ALGH,837,598,-1); +obj16->SetR(-90); +obj16->TurnOff(); +CreateObject(GSBO,871,590,-1)->SetAction("Empty"); +CreateObject(GSBO,860,590,-1); +var obj17 = CreateObject(LADR,981,710,-1); +obj17->Set(19); +CreateObject(CRAT,1301,590,-1); +var obj18 = CreateObject(PIPL,372,637,-1); +var obj19 = CreateObject(PMP2,422,637,-1); +obj19->Solid(); +CreateObject(FIEX,451,630,-1); +var obj20 = CreateObject(TELE,528,641,-1); +obj20->SetTarget(obj6); +obj6->SetTarget(obj20); +CreateObject(LCKR,587,640,-1); +CreateObject(BLGH,569,609,-1); +CreateObject(LCKR,606,640,-1); +CreateObject(STDR,636,641,-1); +var obj21 = CreateObject(LADR,675,850,-1); +obj21->Set(27); +var obj22 = CreateObject(PIPL,372,687,-1); +var obj23 = CreateObject(CLGH,597,651,-1); +obj23->TurnOff(); +var obj24 = CreateObject(PIPL,222,737,-1); +var obj25 = CreateObject(PIPL,272,737,-1); +CreateObject(VALV,322,716,-1); +var obj26 = CreateObject(PIPL,322,737,-1); +var obj27 = CreateObject(PIPL,372,737,-1); +var obj28 = CreateObject(VENT,429,726,-1); +obj28->SetCon(40); +CreateObject(SPVM,473,730,-1); +CreateObject(PLNT,500,718,-1); +CreateObject(TABL,509,729,-1); +CreateObject(BED2,576,729,-1); +CreateObject(BED2,614,729,-1); +CreateObject(STDR,646,730,-1); +var obj29 = CreateObject(ENGT,269,795,-1); +obj29->SetCon(75); +var obj30 = CreateObject(PIPL,322,787,-1); +CreateObject(GSTA,312,849,-1); +var obj31 = CreateObject(PIPL,322,837,-1); +var obj32 = CreateObject(LLGH,376,842,-1); +obj32->TurnOff(); +var obj33 = CreateObject(OPTB,403,849,-1); +obj33->TurnOff(); +var obj34 = CreateObject(FRAM,431,822,-1); +obj34->Set(3); +CreateObject(MONI,464,838,-1); +var obj35 = CreateObject(GADG,450,836,-1); +obj35->Set(3); +CreateObject(LTBL,454,849,-1); +CreateObject(GLST,496,850,-1); +var obj36 = CreateObject(LBDR,542,850,-1); +obj36->SetDir(DIR_Left); +obj36->UpdateSolidMask(); +CreateObject(GLST,522,850,-1); +var obj37 = CreateObject(SLDR,695,850,-1); +CreateObject(_SPA,933,668,-1); +CreateObject(TANK,897,883,-1); + var card = obj6->CreateContents(KCRD); + card->SetKeyNumber(1); +obj4->Set(obj6, 1); +obj18->ConnectTo(Object(19), PIPE_Right); +obj18->ConnectTo(Object(22), PIPE_Down); +obj19->ConnectTo(Object(18), PIPE_Left); +obj22->ConnectTo(Object(18), PIPE_Up); +obj22->ConnectTo(Object(27), PIPE_Down); +obj24->ConnectTo(Object(25), PIPE_Right); +obj25->ConnectTo(Object(24), PIPE_Left); +obj25->ConnectTo(Object(26), PIPE_Right); +obj26->ConnectTo(Object(25), PIPE_Left); +obj26->ConnectTo(Object(27), PIPE_Right); +obj26->ConnectTo(Object(30), PIPE_Down); +obj27->ConnectTo(Object(26), PIPE_Left); +obj27->ConnectTo(Object(22), PIPE_Up); +obj30->ConnectTo(Object(26), PIPE_Up); +obj30->ConnectTo(Object(31), PIPE_Down); +obj31->ConnectTo(Object(30), PIPE_Up); +} + +/* Relaunch */ + +public func ChooserFinished() +{ + // Erste Alienkolonie erzeugen + CastObjects(ALN2, 10, 10, 1300, 180); + CastObjects(ALN4, 11, 10, 1300, 180); + PlaceBubbles(10, 1100, 150, 350, 100); + PlaceBubbles(7, 1000, 560, 280, 70); + // Waffen + PlaceWeapons(); + ScriptGo(1); + + if(FindObject(WPCH)) + { + var wp; + wp = CreateObject(WPVM, 470,640); + AddWares(wp); + + wp = FindObject(WPCH); + AddWares(wp); + } + + Arena_ChooserFinished(); +} + +private func AddWares(object wp) +{ + wp->RemoveWare(); + wp->AddWare(PIWP,-1); + wp->AddWare(GLWP,-1); + wp->AddWare(ENWP,-1); + wp->AddWare(FTWP,-1); + wp->AddWare(NLGT,-1); + wp->AddWare(MEDI,-1); +} + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + return [140,250]; +} + +/* Alienzeugs */ + +protected func PlaceBubbles(int iNumber, int iX, int iY, int iWdt, int iHgt) +{ + for(var i=0,j,x ; i < iNumber ; i++) + { + x = Random(iWdt); + j = 0; + while(GBackSemiSolid(iX + x, iY + iHgt - j) && j < iHgt) j++; + if(j < iHgt) var bubble = CreateObject(HBBL, iX+x, iY+iHgt-j, -1); + // blöder Workaround + if(bubble) while(GBackSemiSolid(bubble->GetX(), bubble->GetY())) bubble->SetPosition(bubble->GetX(), bubble->GetY()-1); + } +} + +protected func PlaceEggs(int iNumber, int iX, int iY, int iWdt, int iHgt, id idAlien) +{ + for(var i=0,j,x ; i < iNumber ; i++) + { + x = Random(iWdt); + j = 0; + while(!GBackSolid(iX + x, iY + j) && iY + j < iY + iHgt) j++; + CreateObject(HBBL, iX+x, iY+j, -1)->Set(idAlien); + } +} + +/* Waffen und Muni */ + +public func PlaceWeapons() +{ + PlaceSpawnpoint(GRAP, 70, 230); + PlaceSpawnpoint(STAP, 60, 230); + PlaceSpawnpoint(GLWP, 590, 630); + PlaceSpawnpoint(GRAP, 600, 630); + PlaceSpawnpoint(ENWP, 410, 720); + PlaceSpawnpoint(ENAP, 420, 720); + PlaceSpawnpoint(NLGT, 260, 790); + PlaceSpawnpoint(MEDI, 330, 840); +} + +/* Script */ + +static bombardment; + +protected func Script2() +{ + SetDarkness(); + Sound("RadioStatic"); + Message("@$Intro$"); +} + +protected func Script15() +{ + Sound("RadioStatic"); + Message("$Intro2$"); + CreateObject(AIRS, 160, 250, -1); + CreateObject(AIRS, 160, 250, -1); +} + +protected func Script25() +{ + if(!bombardment) + { + if(GetLength(FindObjects(Find_InRect(0,0, LandscapeWidth(),300), Find_Func("IsAlien"))) < 15) + { + CastObjects(ALN2, 2, 10, 1300, 180); + PlaceBubbles(3, 1100, 150, 350, 100); + PlaceEggs(5, 1100, 150, 350, 100, ALN2); + } + return(goto(16)); + } +} + +protected func Script26() +{ + Sound("RadioStatic"); + Message("$Bombs$"); +} + +protected func Script42() +{ + if(GetLength(FindObjects(Find_InRect(0,0, LandscapeWidth(),300), Find_Func("IsAlien")))) + return(goto(41)); + Sound("RadioStatic"); + Message("$Keycard$"); +} + +protected func Script45() +{ + var box = CreateObject(SBOX, 130, 250, -1); + FindObject(KCRD)->Enter(box); + + CreateObject(HCON, 1280, 810, -1); + PlaceBubbles(10, 560, 460, 230, 80); + PlaceBubbles(10, 1010, 550, 340, 60); + CreateObject(ALN1, 1301, 560, -1); + CastObjects(ALN2, 7, 10, 1301, 560); + CastObjects(ALN4, 2, 10, 1301, 560); + +} + +protected func Script47() +{ + if(!GetLength(FindObjects(Find_InRect(400,570, 220,70), Find_OCF(OCF_CrewMember)))) return(goto(46)); + SetDarkness(8); + down = true; +} + +protected func Script49() +{ + if(!GetLength(FindObjects(Find_InRect(650,570, 40,80), Find_OCF(OCF_CrewMember)))) return(goto(48)); + alienengt->DoDamage(100); + alienengt->CreateObject(ALN2, 0,0, -1)->SetXDir(-10); + ScriptGo(); +} + +global func FxSpezialzauberStop(object target, int no, int reason) +{ + if(reason == 3) + { + PlaceSpawnpoint(FTWP, 575,180, 2000); + PlaceSpawnpoint(GSAP, 585,180, 2000); + } +} + +global func FxSpezialzauber2Stop(object target, int no, int reason) +{ + if(reason == 3) + { + CastObjects(ALN2, 7, 10, 690, 450); + CastObjects(ALN2, 2, 10, 690, 450); + } +} diff --git a/Hazard.c4f/AH_Predator.c4s/Secret.c4d/DefCore.txt b/Hazard.c4f/AH_Predator.c4s/Secret.c4d/DefCore.txt new file mode 100644 index 00000000..e2502f5c --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/Secret.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=_SPA +Name=Secret Passage +Version=4,9,5 +Category=25165825 +Width=64 +Height=64 +Offset=-32,-32 \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/Secret.c4d/Graphics.png b/Hazard.c4f/AH_Predator.c4s/Secret.c4d/Graphics.png new file mode 100644 index 00000000..679825a1 Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/Secret.c4d/Graphics.png differ diff --git a/Hazard.c4f/AH_Predator.c4s/StringTblDE.txt b/Hazard.c4f/AH_Predator.c4s/StringTblDE.txt new file mode 100644 index 00000000..cebd3271 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/StringTblDE.txt @@ -0,0 +1,4 @@ +Intro=Sind sie gelandet? Gut. Beginnen sie mit der Reinigung an der Oberfläche! +Intro2=Hier noch etwas Basisausrüstung und ein Sender, für unser Bombardment.|Platzieren sie ihn und vernichten sie die Vorkommen an der Oberfläche.|Mutterschiff Ende. +Bombs=Zielort programmiert, alles klar! Die Bomben sind unterwegs.|Rotten sie danach den Rest aus.|Mutterschiff Ende. +Keycard=Gute Arbeit!|Wir senden ihnen die Schlüsselkarte für den Teleporter.|Dort unten sind sie dann auf sich allein gestellt.|Mutterschiff Ende. \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/StringTblUS.txt b/Hazard.c4f/AH_Predator.c4s/StringTblUS.txt new file mode 100644 index 00000000..0248359f --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/StringTblUS.txt @@ -0,0 +1,4 @@ +Intro=Did you land? Good. Initiate the cleaning of the surface! +Intro2=Here some basic equipment and a sender for our bombardment.|Place it in their hive and destroy the remaining aliens.|Mother ship over. +Bombs=Target programmed! The bombs are on their way.|Exterminate the remaining aliens after that.|Mother ship over. +Keycard=Good work!|We send you the key card for the teleporter.|Down there you are on your own.|Mother ship over. \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/DefCore.txt b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/DefCore.txt new file mode 100644 index 00000000..031c4a1f --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=SBOX +Name=Supply Box +Version=4,9,5 +Category=4 +Width=25 +Height=18 +Offset=-12,-9 +Value=5 +Mass=50 +Components=METL=2; +Picture=0,0,25,18 +Vertices=4 +VertexX=-11,11,-11,11 +VertexY=8,8,-8,-8 +VertexFriction=100,100,100,100 +Grab=2 +GrabPutGet=3 +CollectionLimit=10 \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Graphics.png b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Graphics.png new file mode 100644 index 00000000..d8298b48 Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Graphics.png differ diff --git a/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Names.txt b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Names.txt new file mode 100644 index 00000000..a9e799b9 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Nachschubkiste +US:Supply box \ No newline at end of file diff --git a/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Script.c b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Script.c new file mode 100644 index 00000000..6192da09 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/SupplyBox.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- Kiste --*/ + +#strict +#include CHST + +public func Hit() { Sound("ClonkHit*"); } + +public func Supply() +{ + if(!FindContents(STAP)) CreateContents(STAP); + ScheduleCall(this(), "Supply", 400); + if(down) + { + if(!FindContents(ENAP)) CreateContents(ENAP); + if(!FindContents(GRAP)) CreateContents(GRAP); + } +} diff --git a/Hazard.c4f/AH_Predator.c4s/System.c4g/Bombardment.c b/Hazard.c4f/AH_Predator.c4s/System.c4g/Bombardment.c new file mode 100644 index 00000000..cb908b97 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/System.c4g/Bombardment.c @@ -0,0 +1,17 @@ +/* Airstrike löst Szenarioscript aus */ + +#strict 2 + +#appendto AIRS + +func Activate(pObject) { + _inherited(pObject); + + if(!bombardment) bombardment = true; +} + +func Destruction() { + if(!bombardment) + CreateObject(GetID(), 160, 250, -1); + _inherited(); +} diff --git a/Hazard.c4f/AH_Predator.c4s/System.c4g/Teleporter.c b/Hazard.c4f/AH_Predator.c4s/System.c4g/Teleporter.c new file mode 100644 index 00000000..44383044 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/System.c4g/Teleporter.c @@ -0,0 +1,4 @@ +#strict +#appendto TELE + +public func Access() { this()->~Activate(); } diff --git a/Hazard.c4f/AH_Predator.c4s/Title.png b/Hazard.c4f/AH_Predator.c4s/Title.png new file mode 100644 index 00000000..4eaedfb4 Binary files /dev/null and b/Hazard.c4f/AH_Predator.c4s/Title.png differ diff --git a/Hazard.c4f/AH_Predator.c4s/Title.txt b/Hazard.c4f/AH_Predator.c4s/Title.txt new file mode 100644 index 00000000..c19fce31 --- /dev/null +++ b/Hazard.c4f/AH_Predator.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:AH - Predator +US:AH - Predator \ No newline at end of file diff --git a/Hazard.c4f/AS_Research.c4s/Author.txt b/Hazard.c4f/AS_Research.c4s/Author.txt new file mode 100644 index 00000000..a9dee26e --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/Author.txt @@ -0,0 +1 @@ +KKenny \ No newline at end of file diff --git a/Hazard.c4f/AS_Research.c4s/DescDE.rtf b/Hazard.c4f/AS_Research.c4s/DescDE.rtf new file mode 100644 index 00000000..8931b2bb Binary files /dev/null and b/Hazard.c4f/AS_Research.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/AS_Research.c4s/DescUS.rtf b/Hazard.c4f/AS_Research.c4s/DescUS.rtf new file mode 100644 index 00000000..53a3516c Binary files /dev/null and b/Hazard.c4f/AS_Research.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/AS_Research.c4s/Icon.png b/Hazard.c4f/AS_Research.c4s/Icon.png new file mode 100644 index 00000000..80f5c6bd Binary files /dev/null and b/Hazard.c4f/AS_Research.c4s/Icon.png differ diff --git a/Hazard.c4f/AS_Research.c4s/Landscape.bmp b/Hazard.c4f/AS_Research.c4s/Landscape.bmp new file mode 100644 index 00000000..4c6858b0 Binary files /dev/null and b/Hazard.c4f/AS_Research.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/AS_Research.c4s/Scenario.txt b/Hazard.c4f/AS_Research.c4s/Scenario.txt new file mode 100644 index 00000000..272d0ed6 --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/Scenario.txt @@ -0,0 +1,56 @@ +[Head] +Icon=16 +Title=AS-Research +Version=4,9,9 +ForcedGfxMode=1 +MinPlayer=4 + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +Goals=GAS_=1 +Rules=CHOS=1 +StructNeedEnergy=0 + +[Player1] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Default +MapWidth=64,0,64,10000 +MapHeight=99,0,40,10000 +Amplitude=10,10,0,100 +Phase=50,50,0,100 +Period=10,10,0,100 +Random=20,20,0,100 +Liquid=Water-Smooth +LiquidLevel=20,30,0,100 +Layers=Rock=7;Rock-Ridge=7;Gold=7;Granite=4;Ore=3;Coal-Swirl=4;Water-Smooth=5;Oil-Smooth=5;Earth-Rough=50;Earth-Smooth2=50 +NewStyleLandscape=2 + +[Weather] +Climate=0,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + \ No newline at end of file diff --git a/Hazard.c4f/AS_Research.c4s/Script.c b/Hazard.c4f/AS_Research.c4s/Script.c new file mode 100644 index 00000000..bf7e1dcd --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/Script.c @@ -0,0 +1,570 @@ +/*-- AS-Research --*/ + +#strict + +static Door; +static Turret; +static Target; +static X; +static Y; + +func Initialize() { + SetSkyParallax(0,16,12); + + // Startpositionen + X=CreateArray(2); + Y=CreateArray(2); + + X[AS_GetAttackerTeam()]=40; + Y[AS_GetAttackerTeam()]=655; + X[AS_GetDefenderTeam()]=1240; + Y[AS_GetDefenderTeam()]=530; + +} + + +public func PlaceScenObjects() { + + if(!FindObject(WPCH) && !FindObject(IGIB)) + { + PlaceSpawnpoint(GLWP,135,665,200); + PlaceSpawnpoint(PIWP,160,525,200); + PlaceSpawnpoint(ENWP,110,525,200); + PlaceSpawnpoint(GLWP,1205,535,200); + PlaceSpawnpoint(PIWP,1115,535,200); + PlaceSpawnpoint(ENWP,1155,535,200); + PlaceSpawnpoint(FTWP,1075,535,200); + } + + if(!FindObject(NOAM) && !FindObject(IGIB)) + { + PlaceSpawnpoint(GRAP,115,665,200); + PlaceSpawnpoint(STAP,140,525,200); + PlaceSpawnpoint(ENAP,90,525,200); + PlaceSpawnpoint(GRAP,1185,535,200); + PlaceSpawnpoint(STAP,1095,535,200); + PlaceSpawnpoint(GSAP,1055,535,200); + PlaceSpawnpoint(ENAP,1135,535,200); + } + + if(FindObject(WPCH)) + { + AddWares(CreateObject(WPVM,1055,670,-1)); + AddWares(CreateObject(WPVM,1595,950,-1)); + AddWares(CreateObject(WPVM,240,1010,-1)); + } + + // Warps + + CreateObject(AWRP,1894,153,-1)->Set(1390,990); + CreateObject(AWRP,1503,203,-1)->Set(1612,110); + CreateObject(AWRP,1196,674,-1)->Set(860,290); + CreateObject(AWRP,1226,953,-1)->Set(920,940); + CreateObject(AWRP,2003,1145,-1)->Set(1333,930); + + // Serialize + + CreateObject(LADR,457,608,-1)->Set(12); + CreateObject(SBBA,665,539,-1); + CreateObject(STDR,816,541,-1); + CreateObject(CRAT,725,600,-1); + CreateObject(CRAT,294,660,-1); + CreateObject(CRAT,328,660,-1); + CreateObject(CRAT,364,660,-1); + CreateObject(CRAT,949,262,-1); + CreateObject(CRAT,956,290,-1); + + CreateObject(CRAT,1044,382,-1); + CreateObject(CRAT,1044,410,-1); + + + CreateObject(CRAT,1975,850,-1); + CreateObject(CRAT,2004,850,-1); + + var door1 = CreateObject(STDR,407,661,-1); + var door2 = CreateObject(STDR,237,671,-1); + door1->Lock(); + door2->Lock(); + door1->SetMaxDamage(200); + door2->SetMaxDamage(200); + //CreateObject(CRAT,449,671,-1); + //CreateObject(CRAT,482,670,-1); + CreateObject(SBBA,651,671,-1); + CreateObject(SBBA,663,660,-1); + CreateObject(SBBA,678,671,-1); + CreateObject(SBBA,828,669,-1); + CreateObject(SBBA,896,671,-1); + CreateObject(LBDR,2003,921,-1); + + var obj0 = CreateObject(LADR,1327,134,-1); + obj0->Set(10); + var obj1 = CreateObject(JMPD,899,133,-1); + obj1->Set(80,60); + CreateObject(ESGN,986,128,-1); + CreateObject(FIEX,987,146,-1); + var obj5 = CreateObject(LADR,1016,342,-1); + obj5->Set(25); + var obj6 = CreateObject(VENT,1097,146,-1); + obj6->SetCon(50); + CreateObject(CRAT,1178,150,-1); + CreateObject(CRAT,1206,150,-1); + CreateObject(CRAT,1270,150,-1); + var obj7 = CreateObject(SBBA,1427,141,-1); + obj7->SetDir(0); + var obj8 = CreateObject(SBBA,1441,149,-1); + obj8->SetDir(0); + var obj9 = CreateObject(SBBA,1416,149,-1); + obj9->SetDir(0); + var obj10 = CreateObject(VENT,1492,146,-1); + obj10->SetCon(50); + var obj11 = CreateObject(LADR,1556,345,-1); + obj11->Set(25); + var obj12 = CreateObject(LADR,1243,253,-1); + obj12->Set(10); + var obj13 = CreateObject(FRAM,1219,183,-1); + obj13->Set(1); + var obj14 = CreateObject(FRAM,1274,186,-1); + obj14->Set(5); + var obj15 = CreateObject(FRAM,1342,184,-1); + obj15->Set(2); + var obj16 = CreateObject(LADR,1376,336,-1); + obj16->Set(20); + var obj17 = CreateObject(FRAM,1412,185,-1); + obj17->Set(1); + var obj18 = CreateObject(OPTB,1187,259,-1); + obj18->TurnOff(); + CreateObject(ESGN,1157,237,-1); + CreateObject(SCR3,1241,215,-1); + CreateObject(MONI,1284,248,-1); + CreateObject(MONI,1271,248,-1); + var obj19 = CreateObject(GADG,1348,247,-1); + obj19->Set(1); + var obj20 = CreateObject(GADG,1334,245,-1); + obj20->Set(2); + var obj21 = CreateObject(GADG,1322,247,-1); + obj21->Set(1); + var obj22 = CreateObject(GADG,1428,246,-1); + obj22->Set(3); + CreateObject(MONI,1446,248,-1); + CreateObject(CNS2,1403,260,-1); + CreateObject(SCR3,1447,214,-1); + CreateObject(GLST,1478,260,-1); + CreateObject(RADR,771,321,-1); + CreateObject(HSGN,1100,295,-1); + CreateObject(FIEX,1158,256,-1); + CreateObject(GSBO,1227,260,-1); + CreateObject(GSBO,1217,260,-1); + CreateObject(LTBL,1280,259,-1); + CreateObject(LTBL,1335,259,-1); + CreateObject(LTBL,1436,259,-1); + CreateObject(GSBO,1498,260,-1); + var obj23 = CreateObject(PSTR,1168,361,-1); + obj23->Set(3,1); + CreateObject(ESGN,1404,347,-1); + CreateObject(CRAT,1490,342,-1); + CreateObject(CRAT,1455,342,-1); + var obj24 = CreateObject(LADR,777,510,-1); + obj24->Set(18); + var obj25 = CreateObject(PSTR,891,372,-1); + obj25->Set(0,2); + CreateObject(CRAT,920,370,-1); + CreateObject(CRAT,962,370,-1); + var obj26 = CreateObject(JMPD,1123,372,-1); + obj26->Set(110,-10); + CreateObject(GSTA,1224,369,-1); + CreateObject(GSTA,1288,369,-1); + CreateObject(GSBO,1338,370,-1); + CreateObject(GSBO,1327,370,-1); + CreateObject(CRAT,1440,370,-1); + CreateObject(FIEX,1405,364,-1); + CreateObject(CRAT,1499,370,-1); + CreateObject(CRAT,1469,370,-1); + CreateObject(LCKR,749,540,-1); + CreateObject(LCKR,732,540,-1); + var obj43 = CreateObject(LADR,796,638,-1); + obj43->Set(6); + CreateObject(CRAT,864,600,-1); + CreateObject(ENGT,1051,623,-1); + CreateObject(SPVM,1104,670,-1); + CreateObject(SCR3,1592,903,-1); + CreateObject(SCR3,1713,904,-1); + CreateObject(CRAT,599,953,-1); + var obj56 = CreateObject(LADR,846,1163,-1); + obj56->Set(28); + CreateObject(SPVM,1375,950,-1); + CreateObject(LCKR,1400,950,-1); + CreateObject(LCKR,1415,950,-1); + CreateObject(PLT2,1464,951,-1); + CreateObject(PLT2,1545,951,-1); + var obj57 = CreateObject(LADR,1506,1055,-1); + obj57->Set(15); + CreateObject(LCKR,1629,950,-1); + CreateObject(LCKR,1645,950,-1); + CreateObject(PLNT,1697,938,-1); + CreateObject(OTBL,1696,949,-1); + CreateObject(CCP1,1739,950,-1); + var obj58 = CreateObject(LADR,1815,1031,-1); + obj58->Set(15); + CreateObject(SPVM,95,1010,-1); + CreateObject(PLNT,135,998,-1); + CreateObject(ENGT,147,976,-1); + CreateObject(LCKR,194,1010,-1); + CreateObject(LCKR,178,1010,-1); + CreateObject(CRAT,577,980,-1); + CreateObject(CRAT,605,980,-1); + CreateObject(CRAT,636,980,-1); + var obj59 = CreateObject(PSTR,687,969,-1); + obj59->Set(0,0); + CreateObject(CLVM,735,980,-1); + CreateObject(MVNT,1945,1024,-1); + CreateObject(BOOM,2028,959,-1); + CreateObject(TABL,135,1009,-1); + var obj60 = CreateObject(LADR,585,1160,-1); + obj60->Set(15); + var obj61 = CreateObject(PSTR,1584,1024,-1); + obj61->Set(3,0); + CreateObject(CRAT,1660,1052,-1); + CreateObject(GSTA,1769,1059,-1); + CreateObject(SCR3,90,1062,-1); + CreateObject(ESGN,140,1084,-1); + CreateObject(FIEX,140,1104,-1); + CreateObject(TABL,193,1099,-1); + CreateObject(CHAR,173,1099,-1); + CreateObject(SCR2,204,1088,-1); + CreateObject(STDR,255,1101,-1); + CreateObject(VENT,428,1116,-1); + CreateObject(PLT2,616,1081,-1); + CreateObject(CCP1,646,1080,-1); + CreateObject(CCP1,681,1080,-1); + CreateObject(CGLO,763,1080,-1); + CreateObject(CLVM,1333,1080,-1); + CreateObject(GLST,1570,1080,-1); + var obj62 = CreateObject(RAI1,1839,1060,-1); + obj62->SetRail([0, 1, 1, 1, 4],1); + CreateObject(GSBO,1869,1060,-1); + CreateObject(GSBO,1860,1060,-1); + CreateObject(CRAT,741,1156,-1); + CreateObject(PLNT,645,1167,-1); + CreateObject(GTBL,659,1180,-1); + CreateObject(PLNT,668,1167,-1); + CreateObject(LCKR,780,1180,-1); + CreateObject(LCKR,796,1180,-1); + CreateObject(CRAT,740,1181,-1); +} + +func PreResetAssault() +{ + X[AS_GetAttackerTeam()]=40; + Y[AS_GetAttackerTeam()]=655; + X[AS_GetDefenderTeam()]=1240; + Y[AS_GetDefenderTeam()]=530; +} + +func ResetAssault() +{ + // new objects + PlaceScenObjects(); + + // and initialize! + CreateASStuff(); +} + +func CreateASStuff() +{ + Door=CreateArray(9); + Turret=CreateArray(6); + Target=CreateArray(5); + + // turret des Angreiferteams + var turret=CreateObject(SEGU,170,590,-1); + turret->Arm(RGSA); + turret->TurnOn(); + turret->SetTeam(AS_GetAttackerTeam()); + + //Target 1 + Target[0] = CreateObject(CCP2,905,585,-1); + Target[0]->SetName("Computer 1"); + + Door[0]=CreateObject(SEDR,1160,670,-1); + + Door[1]=CreateObject(SEDR,800,370,-1); + + Door[2]=CreateObject(SEDR,990,290,-1); + + Door[7] = CreateObject(SEDR,973,410,-1); + + Door[8] = CreateObject(SEDR,1007,410,0); + + Turret[0]=CreateObject(SEGU,600,515,-1); + + //Target 2 + Target[1] = CreateObject(CCP2,1230,65,-1); + + Door[3]=CreateObject(SEDR,1759,150,-1); + Door[3]->Lock(); + + Turret[1]=CreateObject(SEGU,1100,60,-1); + + Turret[2]=CreateObject(SEGU,1415,65,-1); + + //Target 3 + Target[2] = CreateObject(CCP2,2030,945,-1); + + Door[4]=CreateObject(SEDR,1300,950,-1); + + Turret[3]=CreateObject(SEGU,1850,980,-1); + + //Target 4 + Target[3] = CreateObject(CCP1,720,1065,-1); + + Door[5]=CreateObject(SEDR,270,1100,-1); + + Door[6]=CreateObject(SEDR,60,1010,-1); + + Turret[4]=CreateObject(SEGU,555,1035,-1); + + // Hauptziel - Target 5 + Target[4] = CreateObject(LBPC,95,1095,-1); + Target[4]->SetName("$MainComp$"); + + Turret[5]=CreateObject(SEGU,210,1060,-1); + + // Türen schließen + for(var door in Door) + door->Lock(); + + var assault = FindObject(GAS_); + + // Ziele + for(var i = 0; i < 4; i++) + { + Target[i]->SetName(Format("Computer %d", i+1)); + assault->AddTarget(Target[i], 0, 200); + } + assault->AddTarget(Target[4], 0, 500); + + for(var turret in Turret) + { + turret->Arm(MGSA); + turret->TurnOn(); + turret->SetTeam(AS_GetDefenderTeam()); + assault->AddTarget(turret, 1,150); + } + + // wealth reset + for(var i = 0; iRemoveWare(); + wp->AddWare(PIWP,-1); // Pistole + wp->AddWare(GLWP,-1); // Granatenwerfer + wp->AddWare(ENWP,-1); // Energy rifle + wp->AddWare(MIWP,-1); // minigun + wp->AddWare(FTWP,-1); // fire gun + wp->AddWare(LMIN,-1); // Lasermine + wp->AddWare(SMIN,-1); // swarm mine + wp->AddWare(MINE,-1); // mine + wp->AddWare(MEDI,-1); // medipack + wp->AddWare(NVDN,-1); // novodekan + wp->AddWare(HARM,-1); // armor + wp->AddWare(DRSU,-1); // drone + wp->AddWare(JTPK,-1); // jetpack + wp->AddWare(KLAS,-1); // Laser + wp->AddWare(KSLM,-1); // slime +} + +func OnTarget1Destruction() +{ + Door[0]->Open(); + Door[1]->Open(); + Door[2]->Open(); + Door[7]->Open(); + Door[8]->Open(); + if(Turret[0]) + Turret[0]->TurnOff(); + + X[AS_GetAttackerTeam()]=1240; + Y[AS_GetAttackerTeam()]=530; + X[AS_GetDefenderTeam()]=1730; + Y[AS_GetDefenderTeam()]=45; + + for(var obj in FindObjects(Find_ID(SPNP), Find_InRect(0,170, 520,500))) + obj->RemoveObject(); + + // Spawn 3 + if(!FindObject(IGIB)) + { + if(!FindObject(WPCH)) + { + PlaceSpawnpoint(LMIN,1710,55,200); + PlaceSpawnpoint(GLWP,1695,55,200); + PlaceSpawnpoint(ENWP,1645,55,200); + PlaceSpawnpoint(FTWP,1605,55,200); + PlaceSpawnpoint(KLAS,1555,55,200); + PlaceSpawnpoint(MEDI,1300,75,1000); + } + + if(!FindObject(NOAM)) + { + PlaceSpawnpoint(GRAP,1675,55,200); + PlaceSpawnpoint(ENAP,1625,55,200); + PlaceSpawnpoint(GSAP,1585,55,200); + PlaceSpawnpoint(STAP,1530,255,500); + PlaceSpawnpoint(GRAP,1510,255,500); + } + } +} + +func OnTarget2Destruction() +{ + Door[3]->Open(); + if(Turret[1]) + Turret[1]->~TurnOff(); + if(Turret[2]) + Turret[2]->~TurnOff(); + + X[AS_GetAttackerTeam()]=1730; + Y[AS_GetAttackerTeam()]=45; + X[AS_GetDefenderTeam()]=1800; + Y[AS_GetDefenderTeam()]=835; + + for(var obj in FindObjects(Find_ID(SPNP), Find_InRect(1050,500, 200,50))) + obj->RemoveObject(); + + // Alle Minenspawns des vorherigen Spawnpoints löschen + for(var obj in FindObjects(Find_ID(SPNP), Find_InRect(1550,0, 200,100))) { + if(obj->Contents(0)) + if(obj->Contents(0)->~IsMine()) + obj->RemoveObject(); + } + + // Spawn 4 + if(!FindObject(IGIB)) + { + if(!FindObject(WPCH)) + { + PlaceSpawnpoint(PGWP,1770,795,200); + PlaceSpawnpoint(KLAS,1730,795,400); + PlaceSpawnpoint(GLWP,1765,845,200); + PlaceSpawnpoint(ENWP,1725,845,200); + PlaceSpawnpoint(MEDI,1850,915,1000); + } + if(!FindObject(NOAM)) + { + PlaceSpawnpoint(GRAP,1745,845,200); + PlaceSpawnpoint(STAP,1430,945,500); + PlaceSpawnpoint(GRAP,1410,945,500); + PlaceSpawnpoint(ENAP,1705,845,200); + PlaceSpawnpoint(STAP,1750,795,200); + } + } +} + +func OnTarget3Destruction() +{ + Door[4]->Open(); + if(Turret[3]) + Turret[3]->~TurnOff(); + + X[AS_GetAttackerTeam()]=1800; + Y[AS_GetAttackerTeam()]=835; + X[AS_GetDefenderTeam()]=365; + Y[AS_GetDefenderTeam()]=885; + + for(var obj in FindObjects(Find_ID(SPNP), Find_InRect(1550,0, 200,100))) + obj->RemoveObject(); + + // Spawn 5 + if(!FindObject(IGIB)) + { + if(!FindObject(WPCH)) + { + PlaceSpawnpoint(HARM,200,845,400); + PlaceSpawnpoint(PGWP,370,895,200); + PlaceSpawnpoint(GLWP,300,895,200); + PlaceSpawnpoint(ENWP,240,895,200); + PlaceSpawnpoint(SMIN,400,895,500); + PlaceSpawnpoint(MEDI,710,595,1000); + PlaceSpawnpoint(MEDI,240,1095,500); + PlaceSpawnpoint(MINE,795,1070,500); + PlaceSpawnpoint(MIWP,320,845,1000); + PlaceSpawnpoint(KLAS,220,845,400); + } + if(!FindObject(NOAM)) + { + PlaceSpawnpoint(STAP,300,845,1000); + PlaceSpawnpoint(STAP,350,895,200); + PlaceSpawnpoint(GRAP,280,895,200); + PlaceSpawnpoint(ENAP,220,895,200); + PlaceSpawnpoint(STAP,730,595,500); + PlaceSpawnpoint(GRAP,750,595,500); + PlaceSpawnpoint(STAP,180,1005,500); + PlaceSpawnpoint(GRAP,200,1005,500); + } + } +} + +func OnTarget4Destruction() +{ + Door[5]->Open(); + Door[6]->Open(); + + X[AS_GetAttackerTeam()]=1800; + Y[AS_GetAttackerTeam()]=835; + X[AS_GetDefenderTeam()]=365; + Y[AS_GetDefenderTeam()]=885; +} + +public func RelaunchPosition(int iTeam) +{ + return [X[iTeam],Y[iTeam]]; +} + +// Man beachte die simple Genialität meiner Lösung. +// Und ich hasse dich jetzt, du hast mir meine Zeit gestohlen. +func ResetContents(obj) +{ + + //obj->~StopAiming(); + var con, cnt; + while(con = Contents(cnt++,obj)) + { + RemoveObject(con); + ClearScheduleCall(obj,"Contents(0)->~Selection(this());"); + } +} + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); + + DoScoreboardShow(1,iPlr); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + diff --git a/Hazard.c4f/AS_Research.c4s/Sky.jpg b/Hazard.c4f/AS_Research.c4s/Sky.jpg new file mode 100644 index 00000000..a5f6e111 Binary files /dev/null and b/Hazard.c4f/AS_Research.c4s/Sky.jpg differ diff --git a/Hazard.c4f/AS_Research.c4s/StringTblDE.txt b/Hazard.c4f/AS_Research.c4s/StringTblDE.txt new file mode 100644 index 00000000..54c31448 --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/StringTblDE.txt @@ -0,0 +1,3 @@ +MainComp=Hauptcomputer +Rot=Predators +Blau=Terminatoren \ No newline at end of file diff --git a/Hazard.c4f/AS_Research.c4s/StringTblUS.txt b/Hazard.c4f/AS_Research.c4s/StringTblUS.txt new file mode 100644 index 00000000..6862ed42 --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/StringTblUS.txt @@ -0,0 +1,3 @@ +MainComp=Main computer +Rot=Predators +Blau=Terminators \ No newline at end of file diff --git a/Hazard.c4f/AS_Research.c4s/System.c4g/SEDR.c b/Hazard.c4f/AS_Research.c4s/System.c4g/SEDR.c new file mode 100644 index 00000000..7ca9f58d --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/System.c4g/SEDR.c @@ -0,0 +1,10 @@ +/*-- SEDR --*/ + +#strict +#appendto SEDR + +func Damage() +{ +return(0); +} + diff --git a/Hazard.c4f/AS_Research.c4s/System.c4g/SEGU.c b/Hazard.c4f/AS_Research.c4s/System.c4g/SEGU.c new file mode 100644 index 00000000..25437932 --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/System.c4g/SEGU.c @@ -0,0 +1,10 @@ +/*-- SEGU --*/ + +#strict 2 +#appendto SEGU + +public func MaxDamage() { + var maxdamage = EffectVar(0, this, GetEffect("AS_Target",this)); + if(!maxdamage) maxdamage = 220; + return maxdamage; +} diff --git a/Hazard.c4f/AS_Research.c4s/System.c4g/targets.c b/Hazard.c4f/AS_Research.c4s/System.c4g/targets.c new file mode 100644 index 00000000..1a713777 --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/System.c4g/targets.c @@ -0,0 +1,16 @@ +/*-- Ziele --*/ + +#strict 2 +#appendto LBPC +#appendto CCP2 +#appendto CCP1 + +public func Damage() +{ + var maxdamage = EffectVar(0, this, GetEffect("AS_Target",this)); + if(maxdamage) + if(GetDamage() >= maxdamage) Explode(35); +} + +public func IsBulletTarget() { return GetEffect("AS_Target",this); } +public func IgnoreFriendlyFire() { return true; } \ No newline at end of file diff --git a/Hazard.c4f/AS_Research.c4s/Teams.txt b/Hazard.c4f/AS_Research.c4s/Teams.txt new file mode 100644 index 00000000..d6f3c1c1 --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/Teams.txt @@ -0,0 +1,12 @@ +[Teams] +LastTeamID=2 + + [Team] + id=1 + Name=$Rot$ + Color=16711680 + + [Team] + id=2 + Name=$Blau$ + Color=255 diff --git a/Hazard.c4f/AS_Research.c4s/Title.png b/Hazard.c4f/AS_Research.c4s/Title.png new file mode 100644 index 00000000..b539234d Binary files /dev/null and b/Hazard.c4f/AS_Research.c4s/Title.png differ diff --git a/Hazard.c4f/AS_Research.c4s/Title.txt b/Hazard.c4f/AS_Research.c4s/Title.txt new file mode 100644 index 00000000..d913008d --- /dev/null +++ b/Hazard.c4f/AS_Research.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:AS - Skynet +US:AS - Skynet \ No newline at end of file diff --git a/Hazard.c4f/BR_Docks.c4s/DescDE.rtf b/Hazard.c4f/BR_Docks.c4s/DescDE.rtf new file mode 100644 index 00000000..994e5eb8 Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/BR_Docks.c4s/DescUS.rtf b/Hazard.c4f/BR_Docks.c4s/DescUS.rtf new file mode 100644 index 00000000..e532d821 Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/BR_Docks.c4s/Docks.c4d/DefCore.txt b/Hazard.c4f/BR_Docks.c4s/Docks.c4d/DefCore.txt new file mode 100644 index 00000000..279f8ff7 --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/Docks.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=_DCK +Name=Docks +Version=4,9,5 +Category=1 +Width=612 +Height=314 +Offset=-300,-150 \ No newline at end of file diff --git a/Hazard.c4f/BR_Docks.c4s/Docks.c4d/Graphics.png b/Hazard.c4f/BR_Docks.c4s/Docks.c4d/Graphics.png new file mode 100644 index 00000000..833a9b9d Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/Docks.c4d/Graphics.png differ diff --git a/Hazard.c4f/BR_Docks.c4s/Docks.c4d/Script.c b/Hazard.c4f/BR_Docks.c4s/Docks.c4d/Script.c new file mode 100644 index 00000000..f42b226d --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/Docks.c4d/Script.c @@ -0,0 +1,6 @@ +#strict + +public func Initialize() { + SetCategory(GetCategory() | C4D_Parallax() | C4D_Background()); + Local()=40; Local(1)=60; +} diff --git a/Hazard.c4f/BR_Docks.c4s/Icon.png b/Hazard.c4f/BR_Docks.c4s/Icon.png new file mode 100644 index 00000000..5be25752 Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/Icon.png differ diff --git a/Hazard.c4f/BR_Docks.c4s/Landscape.bmp b/Hazard.c4f/BR_Docks.c4s/Landscape.bmp new file mode 100644 index 00000000..6b658e08 Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/BR_Docks.c4s/Scenario.txt b/Hazard.c4f/BR_Docks.c4s/Scenario.txt new file mode 100644 index 00000000..d705367d Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/Scenario.txt differ diff --git a/Hazard.c4f/BR_Docks.c4s/Script.c b/Hazard.c4f/BR_Docks.c4s/Script.c new file mode 100644 index 00000000..e386ed9c --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/Script.c @@ -0,0 +1,387 @@ +/*-- Docks --*/ + +#strict + +static Goals; +static switchright, switchleft; + +protected func Initialize() +{ + SetSkyParallax(0,45,24,0,0,0,0); + CreateObject(_DCK,220,360,-1); + CreateObject(_DCK,727,360,-1); + + CreateObject (CRAT, 750, 250, -1); + //CreateObject (CRAT, 852, 140, -1); + CreateObject (CRAT, 850, 310, -1); + CreateObject (CRAT, 979, 310, -1); + CreateObject (CRAT, 521, 310, -1); + CreateObject (CRAT, 650, 310, -1); + //CreateObject (CRAT, 648, 140, -1); + CreateObject (LADR, 1304, 174, -1)->Set(7); + CreateObject (LADR, 1207, 601, -1)->Set(14); + CreateObject (LADR, 1420, 472, -1)->Set(3); + CreateObject (LADR, 1176, 461, -1)->Set(11); + CreateObject (LADR, 916, 210, -1)->Set(11); + CreateObject (LADR, 781, 352, -1)->Set(14); + CreateObject (LADR, 1026, 350, -1)->Set(6); + CreateObject (LADR, 476, 350, -1)->Set(6); + CreateObject (LADR, 721, 351, -1)->Set(14); + CreateObject (LADR, 587, 210, -1)->Set(11); + CreateObject (LADR, 326, 461, -1)->Set(11); + CreateObject (LADR, 82, 472, -1)->Set(3); + CreateObject (LADR, 295, 600, -1)->Set(14); + CreateObject (LADR, 196, 174, -1)->Set(7); + CreateObject (PLT2, 1473, 121, -1); + CreateObject (PLT2, 27, 121, -1); + CreateObject (TABL, 1438, 119, -1); + CreateObject (TABL, 62, 119, -1); + CreateObject (GSBO, 823, 140, -1); + CreateObject (GSBO, 881, 210, -1); + CreateObject (GSBO, 803, 310, -1); + CreateObject (GSBO, 814, 310, -1); + CreateObject (GSBO, 686, 310, -1); + CreateObject (GSBO, 697, 310, -1); + CreateObject (GSBO, 619, 210, -1); + CreateObject (GSBO, 677, 140, -1); + CreateObject (FLGH, 1092, 642, -1)->SetRotation(-70); + CreateObject (FLGH, 412, 642, -1)->SetRotation(70); + CreateObject (SPVM, 1403, 120, -1); + CreateObject (SBBA, 866, 379, -1); + CreateObject (SBBA, 635, 378, -1); + CreateObject (CON1, 897, 310, -1); + CreateObject (CON1, 603, 310, -1); + CreateObject (LFTP, 1415, 347, -1); + CreateObject (LFTP, 85, 373, -1); + CreateObject (CLVM, 98, 120, -1); + CreateObject (GSTA, 1344, 359, -1); + CreateObject (GSTA, 156, 359, -1); + CreateObject (SEDR, 762, 381, -1); + CreateObject (SEDR, 739, 381, -1); + switchright = CreateObject (SLDR, 968, 251, -1)->SetSwitchLock(DIR_Right); + switchleft = CreateObject (SLDR, 525, 250, -1)->SetSwitchLock(DIR_Left); + CreateObject (DEB1, 1027, 643, -1)->SetDir(DIR_Right); + CreateObject (DEB1, 471, 642, -1); + CreateObject (VENT, 749, 480, -1)->SetCon(40); + CreateObject (BART, 773, 90, -1); + CreateObject (BART, 701, 90, -1); + CreateObject (LBGH, 1356, 24, -1); + CreateObject (ALGH, 1343, 268, -1)->SetR(180); + CreateObject (BLGH, 917, 233, -1); + CreateObject (BLGH, 1174, 290, -1); + CreateObject (AWRP, 922, 97, -1)->Set(1260, 640); + CreateObject (RAI1, 1130, 220, -1)->Set(4); + CreateObject (VENT, 1365, 475, -1)->SetCon(30); + CreateObject (FENC, 1100, 380, -1); + CreateObject (GAT2, 806, 484, -1); + CreateObject (GAT2, 918, 485, -1); + CreateObject (GAT2, 1028, 485, -1); + CreateObject (FIEX, 1259, 111, -1); + //CreateObject (STRP, 981, 278, -1)->Set(100, RGB(250,25,25), DIR_Left); + CreateObject (ESGN, 1258, 97, -1); + CreateObject (MVNT, 1448, 96, -1); + CreateObject (ENGT, 882, 97, -1)->SetCon(75); + CreateObject (ENGT, 618, 97, -1)->SetCon(75); + CreateObject (MVNT, 49, 96, -1); + CreateObject (ESGN, 241, 97, -1); + //CreateObject (STRP, 531, 282, -1)->Set(100, RGB(25,250,25), DIR_Right); + CreateObject (FIEX, 242, 111, -1); + CreateObject (GAT2, 472, 495, -1); + CreateObject (GAT2, 582, 495, -1); + CreateObject (GAT2, 694, 494, -1); + CreateObject (FENC, 400, 380, -1); + CreateObject (VENT, 136, 476, -1)->SetCon(30); + CreateObject (RAI1, 291, 220, -1)->Set(4); + CreateObject (AWRP, 579, 97, -1)->Set(240, 640); + CreateObject (AWRP, 750, 601, -1)->Set(750, 200); + CreateObject (BLGH, 326, 298, -1); + CreateObject (BLGH, 583, 241, -1); + CreateObject (ALGH, 157, 267, -1)->SetR(180); + CreateObject (LBGH, 144, 24, -1); + for(var lift in FindObjects(Find_ID(LFTP))) + lift->SetYTop(250); + + PlaceSpawnpoint(ENWP, 220, 110); + PlaceSpawnpoint(ENAP, 250, 110); + PlaceSpawnpoint(KRFL, 60, 100); + PlaceSpawnpoint(NVDN, 160, 230); + PlaceSpawnpoint(MINE, 50, 430); + PlaceSpawnpoint(STAP, 670, 370); + PlaceSpawnpoint(GLWP, 685, 190); + PlaceSpawnpoint(GRAP, 700, 190); + PlaceSpawnpoint(FTWP, 620, 670); + PlaceSpawnpoint(GSAP, 640, 670); + PlaceSpawnpoint(MIAP, 730, 480); + PlaceSpawnpoint(ENAP, 720, 30); + + PlaceSpawnpoint(GGWP, 750, 30); + PlaceSpawnpoint(KLAS, 750, 170); + PlaceSpawnpoint(PGWP, 750, 370); + PlaceSpawnpoint(BZWP, 750, 480); + PlaceSpawnpoint(HARM, 750, 640); + + PlaceSpawnpoint(ENWP, 1280, 110); + PlaceSpawnpoint(ENAP, 1250, 110); + PlaceSpawnpoint(KRFL, 1440, 100); + PlaceSpawnpoint(NVDN, 1340, 230); + PlaceSpawnpoint(MINE, 1450, 430); + PlaceSpawnpoint(STAP, 830, 370); + PlaceSpawnpoint(GLWP, 815, 190); + PlaceSpawnpoint(GRAP, 800, 190); + PlaceSpawnpoint(FTWP, 880, 670); + PlaceSpawnpoint(GSAP, 860, 670); + PlaceSpawnpoint(MIAP, 770, 480); + PlaceSpawnpoint(ENAP, 780, 30); + + CreateWaypoints(); + + // Die Bombe! + CreateBomb(750, 70, RGB(200,200,200)); + + Goals = CreateArray(3); +} + +protected func CreateWaypoints() +{ + + var wp1 = CreateWP(750,208); + var wp2 = CreateWP(750,71); + var wp3 = CreateWP(750,290); + var wp4 = CreateWP(1360,110); + var wp5 = CreateWP(1138,208); + var wp6 = CreateWP(1061,239); + var wp7 = CreateWP(1480,197); + var wp8 = CreateWP(878,270); + var wp9 = CreateWP(881,126); + var wp10 = CreateWP(798,369); + var wp11 = CreateWP(893,198); + var wp12 = CreateWP(1005,241); + var wp13 = CreateWP(1377,348); + var wp14 = CreateWP(805,624); + var wp15 = CreateWP(1348,228); + var wp16 = CreateWP(1197,208); + var wp17 = CreateWP(996,499); + var wp18 = CreateWP(1098,490); + var wp19 = CreateWP(1157,602); + var wp20 = CreateWP(999,298); + var wp21 = CreateWP(1102,368); + var wp22 = CreateWP(1041,605); + var wp23 = CreateWP(771,478); + var wp24 = CreateWP(848,498); + var wp25 = CreateWP(977,499); + var wp26 = CreateWP(875,498); + var wp27 = CreateWP(1236,476); + var wp28 = CreateWP(1252,110); + var wp29 = CreateWP(140,110); + var wp30 = CreateWP(362,208); + var wp31 = CreateWP(439,239); + var wp32 = CreateWP(20,199); + var wp33 = CreateWP(622,270); + var wp34 = CreateWP(619,126); + var wp35 = CreateWP(702,369); + var wp36 = CreateWP(607,198); + var wp37 = CreateWP(495,241); + var wp38 = CreateWP(123,348); + var wp39 = CreateWP(695,622); + var wp40 = CreateWP(152,228); + var wp41 = CreateWP(303,208); + var wp42 = CreateWP(504,499); + var wp43 = CreateWP(402,490); + var wp44 = CreateWP(338,607); + var wp45 = CreateWP(503,297); + var wp46 = CreateWP(398,368); + var wp47 = CreateWP(458,600); + var wp48 = CreateWP(729,478); + var wp49 = CreateWP(652,498); + var wp50 = CreateWP(523,499); + var wp51 = CreateWP(625,498); + var wp52 = CreateWP(264,476); + var wp53 = CreateWP(253,110); + wp1 -> AddPath(wp8, Path_MoveTo, 1); + wp1 -> AddPath(wp33, Path_MoveTo, -1); + wp2 -> AddPath(wp9, Path_MoveTo, 1); + wp2 -> AddPath(wp34, Path_MoveTo, -1); + wp3 -> AddPath(wp10, Path_MoveTo, 1); + wp3 -> AddPath(wp8, Path_MoveTo, 1); + wp3 -> AddPath(wp35, Path_MoveTo, -1); + wp3 -> AddPath(wp33, Path_MoveTo, -1); + wp4 -> AddPath(wp15, Path_MoveTo, 1); + wp4 -> AddPath(wp28, Path_Jump, -1); + wp5 -> AddPath(wp6, Path_Jump, -1); + wp5 -> AddPath(wp16, Path_MoveTo, 1); + wp6 -> AddPath(wp12, Path_MoveTo, -1); + wp6 -> AddPath(wp5, Path_Backflip, 1); + wp7 -> AddPath(wp15, Path_MoveTo, -1); + wp8 -> AddPath(wp20, Path_MoveTo, 1); + wp8 -> AddPath(wp3, Path_MoveTo, -1); + wp8 -> AddPath(wp11, Path_Jump, -1); + wp8 -> AddPath(wp1, Path_MoveTo, -1); + wp9 -> AddPath(wp11, Path_MoveTo, 1); + wp9 -> AddPath(wp19, Path_Jump, 1); + wp9 -> AddPath(wp2, Path_MoveTo, -1); + wp10 -> AddPath(wp21, Path_MoveTo, 1); + wp10 -> AddPath(wp3, Path_MoveTo, -1); + wp10 -> AddPath(wp35, Path_MoveTo, -1); + wp11 -> AddPath(wp8, Path_MoveTo, -1); + wp11 -> AddPath(wp9, Path_Jump, 1); + wp12 -> AddPath(wp21, Path_MoveTo, 1); + wp12 -> AddPath(wp8, Path_MoveTo, -1); + wp12 -> SetArriveCommand(1, 0, "Grab", switchright); + wp12 -> SetArriveCommand(1, 1, "Call", switchright, 0, 0, 0, "ControlThrow"); + wp12 -> SetArriveCommand(1, 2, "Ungrab"); + wp12 -> AddPath(wp6, Path_MoveTo, 1); + wp13 -> AddPath(wp21, Path_MoveTo, -1); + wp13 -> AddPath(wp15, Path_MoveTo, -1); + wp14 -> AddPath(wp22, Path_MoveTo, 1); + wp14 -> AddPath(wp1, Path_Jump, -1); + wp14 -> AddPath(wp39, Path_MoveTo, -1); + wp15 -> AddPath(wp13, Path_MoveTo, 1); + wp15 -> AddPath(wp7, Path_MoveTo, 1); + wp16 -> AddPath(wp15, Path_Backflip, 1); + wp16 -> AddPath(wp5, Path_MoveTo, -1); + wp17 -> AddPath(wp18, Path_Backflip, 1); + wp17 -> AddPath(wp25, Path_MoveTo, -1); + wp18 -> AddPath(wp17, Path_Backflip, -1); + wp18 -> AddPath(wp27, Path_MoveTo, 1); + wp18 -> AddPath(wp19, Path_MoveTo, 1); + wp19 -> AddPath(wp27, Path_Jump, 1); + wp19 -> AddPath(wp22, Path_MoveTo, -1); + wp20 -> AddPath(wp21, Path_MoveTo, 1); + wp20 -> AddPath(wp8, Path_MoveTo, -1); + wp21 -> AddPath(wp27, Path_MoveTo, 1); + wp21 -> AddPath(wp13, Path_MoveTo, 1); + wp21 -> AddPath(wp20, Path_MoveTo, -1); + wp21 -> AddPath(wp12, Path_Jump, -1); + wp21 -> AddPath(wp10, Path_MoveTo, -1); + wp21 -> AddPath(wp6, Path_Jump, -1); + wp22 -> AddPath(wp19, Path_MoveTo, 1); + wp22 -> AddPath(wp14, Path_MoveTo, -1); + wp23 -> AddPath(wp24, Path_Jump, 1); + wp23 -> AddPath(wp48, Path_MoveTo, -1); + wp24 -> AddPath(wp26, Path_MoveTo, 1); + wp24 -> AddPath(wp23, Path_Jump, -1); + wp25 -> AddPath(wp26, Path_Backflip, -1); + wp25 -> AddPath(wp17, Path_MoveTo, 1); + wp26 -> AddPath(wp25, Path_Backflip, 1); + wp26 -> AddPath(wp24, Path_MoveTo, -1); + wp27 -> AddPath(wp18, Path_MoveTo, -1); + wp27 -> AddPath(wp19, Path_MoveTo, -1); + wp27 -> AddPath(wp21, Path_Jump, -1); + wp28 -> AddPath(wp4, Path_Jump, 1); + wp28 -> AddPath(wp16, Path_MoveTo, -1); + wp29 -> AddPath(wp40, Path_MoveTo, -1); + wp29 -> AddPath(wp53, Path_Jump, 1); + wp30 -> AddPath(wp31, Path_Jump, 1); + wp30 -> AddPath(wp41, Path_MoveTo, -1); + wp31 -> AddPath(wp37, Path_MoveTo, 1); + wp31 -> AddPath(wp30, Path_Backflip, -1); + wp32 -> AddPath(wp40, Path_MoveTo, 1); + wp33 -> AddPath(wp45, Path_MoveTo, -1); + wp33 -> AddPath(wp3, Path_MoveTo, 1); + wp33 -> AddPath(wp36, Path_Jump, 1); + wp33 -> AddPath(wp1, Path_MoveTo, 1); + wp34 -> AddPath(wp36, Path_MoveTo, -1); + wp34 -> AddPath(wp44, Path_Jump, -1); + wp34 -> AddPath(wp2, Path_MoveTo, 1); + wp35 -> AddPath(wp46, Path_MoveTo, -1); + wp35 -> AddPath(wp3, Path_MoveTo, 1); + wp35 -> AddPath(wp10, Path_MoveTo, 1); + wp36 -> AddPath(wp33, Path_MoveTo, 1); + wp36 -> AddPath(wp34, Path_Jump, -1); + wp37 -> AddPath(wp46, Path_MoveTo, -1); + wp37 -> AddPath(wp33, Path_MoveTo, 1); + wp37 -> SetArriveCommand(1, 0, "Grab", switchleft); + wp37 -> SetArriveCommand(1, 1, "Call", switchleft, 0, 0, 0, "ControlThrow"); + wp37 -> SetArriveCommand(1, 2, "Ungrab"); + wp37 -> AddPath(wp31, Path_MoveTo, -1); + wp38 -> AddPath(wp46, Path_MoveTo, 1); + wp38 -> AddPath(wp40, Path_MoveTo, 1); + wp39 -> AddPath(wp1, Path_Jump, 1); + wp39 -> AddPath(wp14, Path_MoveTo, 1); + wp39 -> AddPath(wp47, Path_MoveTo, -1); + wp40 -> AddPath(wp38, Path_MoveTo, -1); + wp40 -> AddPath(wp32, Path_MoveTo, -1); + wp41 -> AddPath(wp40, Path_Backflip, -1); + wp41 -> AddPath(wp30, Path_MoveTo, 1); + wp42 -> AddPath(wp43, Path_Backflip, -1); + wp42 -> AddPath(wp50, Path_MoveTo, 1); + wp43 -> AddPath(wp42, Path_Backflip, 1); + wp43 -> AddPath(wp52, Path_MoveTo, -1); + wp43 -> AddPath(wp44, Path_MoveTo, -1); + wp44 -> AddPath(wp52, Path_Jump, -1); + wp44 -> AddPath(wp47, Path_MoveTo, 1); + wp45 -> AddPath(wp46, Path_MoveTo, -1); + wp45 -> AddPath(wp33, Path_MoveTo, 1); + wp46 -> AddPath(wp52, Path_MoveTo, -1); + wp46 -> AddPath(wp38, Path_MoveTo, -1); + wp46 -> AddPath(wp45, Path_MoveTo, 1); + wp46 -> AddPath(wp37, Path_Jump, 1); + wp46 -> AddPath(wp35, Path_MoveTo, 1); + wp46 -> AddPath(wp31, Path_Jump, 1); + wp47 -> AddPath(wp44, Path_MoveTo, -1); + wp47 -> AddPath(wp39, Path_MoveTo, 1); + wp48 -> AddPath(wp49, Path_Jump, -1); + wp48 -> AddPath(wp23, Path_MoveTo, 1); + wp49 -> AddPath(wp51, Path_MoveTo, -1); + wp49 -> AddPath(wp48, Path_Jump, 1); + wp50 -> AddPath(wp51, Path_Backflip, 1); + wp50 -> AddPath(wp42, Path_MoveTo, -1); + wp51 -> AddPath(wp50, Path_Backflip, -1); + wp51 -> AddPath(wp49, Path_MoveTo, 1); + wp52 -> AddPath(wp43, Path_MoveTo, 1); + wp52 -> AddPath(wp44, Path_MoveTo, 1); + wp52 -> AddPath(wp46, Path_Jump, 1); + wp53 -> AddPath(wp29, Path_Jump, -1); + wp53 -> AddPath(wp41, Path_MoveTo, 1); + +} + +protected func InitTeamGoal(int iTeam) +{ + var x,y,dir; + if(iTeam == 1) + { + x = 15; + y = 240; + dir = DIR_Right; + } + if(iTeam == 2) + { + x = 1485; + y = 240; + dir = DIR_Left; + } + CreateBombGate(iTeam, x, y, dir); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + // Tore setzen (wenn nicht schon erledigt + if(!Goals[iTeam]) + { + Goals[iTeam] = true; + InitTeamGoal(iTeam); + } + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + if(iTeam == 1) return [110,100]; + if(iTeam == 2) return [1390,100]; +} diff --git a/Hazard.c4f/BR_Docks.c4s/Sky.jpg b/Hazard.c4f/BR_Docks.c4s/Sky.jpg new file mode 100644 index 00000000..60752726 Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/Sky.jpg differ diff --git a/Hazard.c4f/BR_Docks.c4s/StringTblDE.txt b/Hazard.c4f/BR_Docks.c4s/StringTblDE.txt new file mode 100644 index 00000000..241d0108 --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/StringTblDE.txt @@ -0,0 +1,2 @@ +Left=Dockarbeiter +Right=Werftarbeiter \ No newline at end of file diff --git a/Hazard.c4f/BR_Docks.c4s/StringTblUS.txt b/Hazard.c4f/BR_Docks.c4s/StringTblUS.txt new file mode 100644 index 00000000..d40c14e5 --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/StringTblUS.txt @@ -0,0 +1,2 @@ +Left=Dockers +Right=Deckhands \ No newline at end of file diff --git a/Hazard.c4f/BR_Docks.c4s/System.c4g/Switch.c b/Hazard.c4f/BR_Docks.c4s/System.c4g/Switch.c new file mode 100644 index 00000000..b544577d --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/System.c4g/Switch.c @@ -0,0 +1,16 @@ +/*-- Schalter --*/ + +#strict +#appendto SWTH + +protected func ControlThrow() +{ + SetPhase((GetPhase()+1)%2); + if(target) + { + target->~Access(); + ClearScheduleCall(target, "Access"); + ScheduleCall(target, "Close", 70); + } + return(1); +} diff --git a/Hazard.c4f/BR_Docks.c4s/Teams.txt b/Hazard.c4f/BR_Docks.c4s/Teams.txt new file mode 100644 index 00000000..b9524e4b --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/Teams.txt @@ -0,0 +1,13 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=$Left$ + Color=1702425 + + [Team] + id=2 + Name=$Right$ + Color=16390425 \ No newline at end of file diff --git a/Hazard.c4f/BR_Docks.c4s/Title.png b/Hazard.c4f/BR_Docks.c4s/Title.png new file mode 100644 index 00000000..ef14780a Binary files /dev/null and b/Hazard.c4f/BR_Docks.c4s/Title.png differ diff --git a/Hazard.c4f/BR_Docks.c4s/Title.txt b/Hazard.c4f/BR_Docks.c4s/Title.txt new file mode 100644 index 00000000..c2a364fb --- /dev/null +++ b/Hazard.c4f/BR_Docks.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:BR - Docks +US:BR - Docks \ No newline at end of file diff --git a/Hazard.c4f/BR_Industrial.c4s/Author.txt b/Hazard.c4f/BR_Industrial.c4s/Author.txt new file mode 100644 index 00000000..5b839aa1 --- /dev/null +++ b/Hazard.c4f/BR_Industrial.c4s/Author.txt @@ -0,0 +1 @@ +David Dormagen (Zapper) diff --git a/Hazard.c4f/BR_Industrial.c4s/DescDE.rtf b/Hazard.c4f/BR_Industrial.c4s/DescDE.rtf new file mode 100644 index 00000000..14b6ab54 Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/BR_Industrial.c4s/DescUS.rtf b/Hazard.c4f/BR_Industrial.c4s/DescUS.rtf new file mode 100644 index 00000000..4312c070 Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/BR_Industrial.c4s/Icon.png b/Hazard.c4f/BR_Industrial.c4s/Icon.png new file mode 100644 index 00000000..5be25752 Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/Icon.png differ diff --git a/Hazard.c4f/BR_Industrial.c4s/Landscape.bmp b/Hazard.c4f/BR_Industrial.c4s/Landscape.bmp new file mode 100644 index 00000000..d1391b1c Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/BR_Industrial.c4s/Scenario.txt b/Hazard.c4f/BR_Industrial.c4s/Scenario.txt new file mode 100644 index 00000000..0dfa1258 Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/Scenario.txt differ diff --git a/Hazard.c4f/BR_Industrial.c4s/Script.c b/Hazard.c4f/BR_Industrial.c4s/Script.c new file mode 100644 index 00000000..9df2c569 --- /dev/null +++ b/Hazard.c4f/BR_Industrial.c4s/Script.c @@ -0,0 +1,275 @@ +/*--Industrial --*/ + +#strict + +static Goals; + +protected func Initialize() +{ + SetSkyParallax(0,12,12,0,0,0,0); + + // Deko etc. + CreateObject (AWRP, 750, 505, -1)->Set(747, 373); + CreateObject (AWRP, 160, 535, -1)->Set(613, 51); + CreateObject (AWRP, 1340, 535, -1)->Set(884, 52); + CreateObject (SEGU, 748, 108, -1)->Arm(RGSA); + CreateObject (LADR, 965, 108, -1)->Set(5); + CreateObject (LADR, 539, 108, -1)->Set(5); + CreateObject (LADR, 699, 230, -1)->Set(5); + CreateObject (LADR, 802, 228, -1)->Set(5); + CreateObject (LADR, 808, 145, -1)->Set(10); + CreateObject (LADR, 696, 143, -1)->Set(10); + CreateObject (LADR, 1467, 537, -1)->Set(48); + CreateObject (LADR, 37, 537, -1)->Set(48); + CreateObject (LADR, 864, 549, -1)->Set(19); + CreateObject (LADR, 638, 550, -1)->Set(19); + //CreateObject (OMSG, 85, 469, -1); + //CreateObject (OMSG, 1450, 536, -1); + CreateObject (GSTA, 749, 189, -1); + CreateObject (GSBO, 704, 400, -1); + CreateObject (GSBO, 802, 400, -1); + CreateObject (GSBO, 1088, 431, -1); + CreateObject (GSBO, 1097, 431, -1); + CreateObject (GSBO, 374, 441, -1); + CreateObject (GSBO, 365, 441, -1); + //CreateObject (PLT2, 796, 401, -1); + //CreateObject (PLT2, 706, 401, -1); + CreateObject (JMPD, 1324, 330, -1)->Set(100, -40); + CreateObject (JMPD, 177, 330, -1)->Set(100, 40); + CreateObject (JMPD, 831, 320, -1)->Set(70, 10); + CreateObject (JMPD, 670, 320, -1)->Set(70, -10); + CreateObject (CON1, 1370, 189, -1); + CreateObject (CON1, 1045, 420, -1); + CreateObject (CON1, 130, 189, -1); + CreateObject (CON1, 448, 420, -1); + CreateObject (LFTP, 965, 205, -1)->DisableVertical(); + CreateObject (LFTP, 533, 203, -1)->DisableVertical(); + //CreateObject (MVNT, 750, 308, -1); + //CreateObject (PSTR, 751, 66, -1); + //CreateObject (PSTR, 1431, 318, -1); + //CreateObject (PSTR, 70, 322, -1); + //CreateObject (VENT, 1158, 310, -1); + //CreateObject (VENT, 386, 303, -1); + //CreateObject (HSGN, 750, 179, -1); + //CreateObject (ESGN, 1395, 459, -1); + //CreateObject (FIEX, 1416, 460, -1); + CreateObject (FIEX, 1374, 460, -1); + CreateObject (FIEX, 86, 457, -1); + //CreateObject (FIEX, 128, 457, -1); + //CreateObject (ESGN, 105, 457, -1); + //CreateObject (SCR2, 750, 390, -1); + CreateObject (RAI2, 816, 70, -1)->Set(7); + CreateObject (RAI2, 546, 69, -1)->Set(7); + CreateObject (RAI1, 880, 191, -1)->Set(3); + CreateObject (RAI1, 560, 191, -1)->Set(3); + //CreateObject (BART, 650, 400, -1); + //CreateObject (BART, 824, 400, -1); + //CreateObject (BART, 922, 410, -1); + //CreateObject (BART, 555, 409, -1); + CreateObject (ENGT, 1396, 401, -1); + CreateObject (ENGT, 105, 401, -1); + //CreateObject (ENGT, 905, 172, -1); + //CreateObject (ENGT, 590, 170, -1); + + // Spawnpunkte + PlaceSpawnpoint(STAP, 1384, 147); + PlaceSpawnpoint(STAP, 1367, 147); + PlaceSpawnpoint(PGWP, 1352, 147); + PlaceSpawnpoint(KRFL, 1423, 251); + PlaceSpawnpoint(KLAS, 1159, 182); + PlaceSpawnpoint(KSLM, 1397, 401); + PlaceSpawnpoint(GRAP, 1387, 462); + PlaceSpawnpoint(GRAP, 1374, 463); + PlaceSpawnpoint(GLWP, 1395, 462); + PlaceSpawnpoint(GSAP, 1453, 111); + PlaceSpawnpoint(GSAP, 1463, 110); + PlaceSpawnpoint(FTWP, 1439, 110); + PlaceSpawnpoint(ENAP, 1437, 321); + PlaceSpawnpoint(ENAP, 1422, 322); + PlaceSpawnpoint(ENWP, 1407, 322); + PlaceSpawnpoint(HARM, 751, 279); + PlaceSpawnpoint(NVDN, 911, 183); + PlaceSpawnpoint(NVDN, 590, 185); + PlaceSpawnpoint(STAP, 739, 524); + PlaceSpawnpoint(STAP, 765, 524); + PlaceSpawnpoint(MIWP, 751, 524); + PlaceSpawnpoint(MINE, 938, 61); + PlaceSpawnpoint(MINE, 561, 62); + PlaceSpawnpoint(MIAP, 732, 61); + PlaceSpawnpoint(MIAP, 768, 62); + PlaceSpawnpoint(BZWP, 751, 61); + PlaceSpawnpoint(KRFL, 84, 258); + PlaceSpawnpoint(KLAS, 391, 179); + PlaceSpawnpoint(KSLM, 105, 401); + PlaceSpawnpoint(GRAP, 137, 464); + PlaceSpawnpoint(GRAP, 124, 464); + PlaceSpawnpoint(GLWP, 113, 463); + PlaceSpawnpoint(GSAP, 61, 112); + PlaceSpawnpoint(GSAP, 48, 112); + PlaceSpawnpoint(FTWP, 35, 112); + PlaceSpawnpoint(STAP, 116, 149); + PlaceSpawnpoint(STAP, 133, 149); + PlaceSpawnpoint(PGWP, 148, 148); + PlaceSpawnpoint(ENAP, 63, 322); + PlaceSpawnpoint(ENAP, 78, 322); + PlaceSpawnpoint(ENWP, 93, 322); + + //Hier werden die Lampen platziert. + CreateObject(BLGH,589,109,-1); + CreateObject(BLGH,904,113,-1); + CreateObject(BLGH,1303,385,-1); + CreateObject(BLGH,200,385,-1); + CreateObject(FLGH,136,399,-1)->SetRotation(-10); + CreateObject(FLGH,1364,399,-1)->SetRotation(+10); + CreateObject(FLGH,893,182,-1)->SetRotation(-90); + CreateObject(FLGH,609,181,-1)->SetRotation(+90); + CreateObject(CLGH,749,423,-1); + CreateObject(CLGH,674,342,-1); + CreateObject(CLGH,823,345,-1); + CreateObject(CLGH,65,143,-1); + CreateObject(CLGH,1435,143,-1); + + CreateWaypoints(); + + // Die Bombe! + CreateBomb(747, 390, RGB(200,200,200)); + + Goals = CreateArray(3); +} + +protected func CreateWaypoints() +{ + for(var i=0 ; i < 2 ; i++) + { + if(!i) var dir = 1; + else dir = -1; + + if(!i) + { + var wp1 = CreateWP(1500*i+dir*750,480); + var wp5 = CreateWP(1500*i+dir*750,60); + var wp16 = CreateWP(1500*i+dir*750,387); + wp1 -> AddPath(wp16, Path_MoveTo, -1); + } + var wp2 = CreateWP(1500*i+dir*725,517); + var wp3 = CreateWP(1500*i+dir*661,518); + var wp4 = CreateWP(1500*i+dir*728,178); + var wp6 = CreateWP(1500*i+dir*66,318); + var wp7 = CreateWP(1500*i+dir*127,294); + var wp8 = CreateWP(1500*i+dir*178,313); + var wp9 = CreateWP(1500*i+dir*572,175); + var wp10 = CreateWP(1500*i+dir*200,177); + var wp11 = CreateWP(1500*i+dir*65,454); + var wp12 = CreateWP(1500*i+dir*62,525); + var wp13 = CreateWP(1500*i+dir*159,517); + var wp14 = CreateWP(1500*i+dir*625,55); + var wp15 = CreateWP(1500*i+dir*510,398); + var wp17 = CreateWP(1500*i+dir*669,301); + var wp18 = CreateWP(1500*i+dir*576,398); + var wp19 = CreateWP(1500*i+dir*661,387); + var wp20 = CreateWP(1500*i+dir*61,179); + wp2 -> AddPath(wp3, Path_MoveTo); + wp2 -> AddPath(wp1, Path_Jump); + wp3 -> AddPath(wp19, Path_MoveTo); + wp3 -> AddPath(wp2, Path_MoveTo); + wp4 -> AddPath(wp4, Path_Jump); + wp4 -> AddPath(wp14, Path_Jump); + wp4 -> AddPath(wp9, Path_Backflip, 0,0,0, 1); + wp4 -> AddPath(wp16, Path_MoveTo); + wp5 -> AddPath(wp14, Path_MoveTo); + wp6 -> AddPath(wp7, Path_MoveTo); + wp6 -> AddPath(wp11, Path_MoveTo); + wp6 -> AddPath(wp20, Path_MoveTo); + wp7 -> AddPath(wp6, Path_MoveTo); + wp7 -> AddPath(wp8, Path_MoveTo); + wp7 -> AddPath(wp15, Path_Jump); + wp8 -> AddPath(wp9, Path_MoveTo); + wp9 -> AddPath(wp10, Path_Lift); + wp9 -> AddPath(wp16, Path_MoveTo); + wp10 -> AddPath(wp9, Path_Lift); + wp10 -> AddPath(wp20, Path_MoveTo); + wp11 -> AddPath(wp6, Path_MoveTo); + wp11 -> AddPath(wp12, Path_MoveTo); + wp11 -> AddPath(wp15, Path_MoveTo); + wp12 -> AddPath(wp11, Path_MoveTo); + wp12 -> AddPath(wp13, Path_MoveTo); + wp13 -> AddPath(wp14, Path_MoveTo); + wp14 -> AddPath(wp15, Path_MoveTo); + wp14 -> AddPath(wp16, Path_MoveTo); + wp14 -> AddPath(wp5, Path_MoveTo); + wp14 -> AddPath(wp4, Path_MoveTo); + wp15 -> AddPath(wp15, Path_MoveTo); + wp15 -> AddPath(wp15, Path_MoveTo); + wp15 -> AddPath(wp18, Path_MoveTo); + wp15 -> AddPath(wp11, Path_MoveTo); + wp16 -> AddPath(wp17, Path_Jump); + wp16 -> AddPath(wp19, Path_MoveTo); + wp17 -> AddPath(wp9, Path_MoveTo); + wp18 -> AddPath(wp19, Path_Jump); + wp18 -> AddPath(wp15, Path_MoveTo); + wp19 -> AddPath(wp16, Path_MoveTo); + wp19 -> AddPath(wp18, Path_Jump); + wp19 -> AddPath(wp3, Path_MoveTo); + wp20 -> AddPath(wp10, Path_MoveTo); + wp20 -> AddPath(wp6, Path_MoveTo); + if(!i) + { + var spec1 = wp2; var spec2 = wp4; + } + else + { + wp2->AddPath(spec1, Path_MoveTo, 0,0,0, 1); + wp4->AddPath(spec2, Path_MoveTo, 0,0,0, 1); + } + } +} + +protected func InitTeamGoal(int iTeam) +{ + var x,y,dir; + if(iTeam == 1) + { + x = 126; + y = 331; + dir = DIR_Right; + } + if(iTeam == 2) + { + x = 1374; + y = 331; + dir = DIR_Left; + } + CreateBombGate(iTeam, x, y, dir); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + // Tore setzen (wenn nicht schon erledigt + if(!Goals[iTeam]) + { + Goals[iTeam] = true; + InitTeamGoal(iTeam); + } + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + if(iTeam == 1) return [65,320]; + if(iTeam == 2) return [1435,320]; +} diff --git a/Hazard.c4f/BR_Industrial.c4s/Sky.jpg b/Hazard.c4f/BR_Industrial.c4s/Sky.jpg new file mode 100644 index 00000000..c9074985 Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/Sky.jpg differ diff --git a/Hazard.c4f/BR_Industrial.c4s/StringTblDE.txt b/Hazard.c4f/BR_Industrial.c4s/StringTblDE.txt new file mode 100644 index 00000000..7a55d3a1 --- /dev/null +++ b/Hazard.c4f/BR_Industrial.c4s/StringTblDE.txt @@ -0,0 +1,2 @@ +Left=Rost +Right=Chrom \ No newline at end of file diff --git a/Hazard.c4f/BR_Industrial.c4s/StringTblUS.txt b/Hazard.c4f/BR_Industrial.c4s/StringTblUS.txt new file mode 100644 index 00000000..fe1bdfc1 --- /dev/null +++ b/Hazard.c4f/BR_Industrial.c4s/StringTblUS.txt @@ -0,0 +1,2 @@ +Left=Rust +Right=Chrome \ No newline at end of file diff --git a/Hazard.c4f/BR_Industrial.c4s/Teams.txt b/Hazard.c4f/BR_Industrial.c4s/Teams.txt new file mode 100644 index 00000000..a0cb6847 --- /dev/null +++ b/Hazard.c4f/BR_Industrial.c4s/Teams.txt @@ -0,0 +1,13 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=$Left$ + Color=14699548 + + [Team] + id=2 + Name=$Right$ + Color=16053492 \ No newline at end of file diff --git a/Hazard.c4f/BR_Industrial.c4s/Title.png b/Hazard.c4f/BR_Industrial.c4s/Title.png new file mode 100644 index 00000000..5b5a84ac Binary files /dev/null and b/Hazard.c4f/BR_Industrial.c4s/Title.png differ diff --git a/Hazard.c4f/BR_Industrial.c4s/Title.txt b/Hazard.c4f/BR_Industrial.c4s/Title.txt new file mode 100644 index 00000000..c8c2792f --- /dev/null +++ b/Hazard.c4f/BR_Industrial.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:BR - Industrial +US:BR - Industrial \ No newline at end of file diff --git a/Hazard.c4f/COPYING b/Hazard.c4f/COPYING new file mode 100644 index 00000000..7b0b2f9f --- /dev/null +++ b/Hazard.c4f/COPYING @@ -0,0 +1,23 @@ +Creative Commons Attribution-NonCommercial (CC BY-NC) +http://creativecommons.org/licenses/by-nc/3.0/ + +You are free to: + +Share - copy and redistribute the material in any medium or format +Adapt - remix, transform, and build upon the material +Under the following terms: + +Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +NonCommercial - You may not use the material for commercial purposes. +No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. + +------------------------------------------------------------------------------------ + +Authors +- Newton +- Clonkonaut +- Boni +- Raven +- Matthi +- K-Pone +- Hans-Christian Kuehl \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/ActMap.txt b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/ActMap.txt new file mode 100644 index 00000000..67f77438 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/ActMap.txt @@ -0,0 +1,95 @@ +[Action] # bereit zum Schleusen +Name=Wait +Procedure=FLOAT +Delay=37 +FacetBase=0 +Facet=0,0,40,35,0,0 +FacetTopFace=0 +NextAction=Wait +StartCall=Check + +[Action] # abpumpen +Name=Pump +Procedure=FLOAT +Delay=2 +Length=10 +FacetBase=0 +Facet=0,105,40,35 +FacetTopFace=0 +NextAction=Pump +PhaseCall=Pumping +Sound=Research + + +[Action] # Tore links +Name=OpenLeft +Procedure=FLOAT +Delay=2 +Length=10 +FacetBase=0 +Facet=0,35,40,35 +FacetTopFace=0 +StartCall=SoundOpen +NextAction=LeftOpen +EndCall=LeftOpen + +[Action] +Name=LeftOpen +Procedure=FLOAT +Delay=35 +Length=1 +FacetBase=0 +Facet=360,35,40,35 +FacetTopFace=0 +NextAction=LeftOpen +EndCall=WannaClose + +[Action] +Name=CloseLeft +Procedure=FLOAT +Delay=1 +Length=10 +FacetBase=0 +Facet=0,35,40,35 +FacetTopFace=0 +Reverse=1 +StartCall=Close +EndCall=SoundClose +NextAction=Pump + + +[Action] # Tore rechts +Name=OpenRight +Procedure=FLOAT +Delay=2 +Length=10 +FacetBase=0 +Facet=0,70,40,35 +FacetTopFace=0 +StartCall=SoundOpen +NextAction=RightOpen +EndCall=RightOpen + +[Action] +Name=RightOpen +Procedure=FLOAT +Delay=35 +Length=1 +FacetBase=0 +Facet=360,70,40,35 +FacetTopFace=0 +NextAction=RightOpen +EndCall=WannaClose + +[Action] +Name=CloseRight +Procedure=FLOAT +Delay=1 +Length=10 +FacetBase=0 +Facet=0,70,40,35 +FacetTopFace=0 +Reverse=1 +StartCall=Close +EndCall=SoundClose +NextAction=Pump \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DefCore.txt b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DefCore.txt new file mode 100644 index 00000000..9cc1cdac --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=AIRL +Version=4,9,8,2 +Name=Luftschleuse +Category=C4D_Structure +Width=40 +Height=35 +Offset=-20,-17 +Vertices=4 +VertexX=-20,20,-20,-20 +VertexY=-17,-17,17,17 +VertexFriction=100,100,100,100 +Value=100 +Mass=1000 +Components=METL=3 +SolidMask=80,0,40,35,0,0 +TopFace=40,5,40,27,0,5 +Picture=0,0,40,35 +Exclusive=1 +Construction=1 +HorizontalFix=1 diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DescDE.txt b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DescDE.txt new file mode 100644 index 00000000..9095e469 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DescDE.txt @@ -0,0 +1 @@ +Für den Unterwassereinsatz. Öffnet und schließt automatisch. \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DescUS.txt b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DescUS.txt new file mode 100644 index 00000000..36a14204 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/DescUS.txt @@ -0,0 +1 @@ +Will open and close automatically. \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Graphics.png b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Graphics.png new file mode 100644 index 00000000..9d6c3185 Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Graphics.png differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Names.txt b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Names.txt new file mode 100644 index 00000000..0cf96059 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Luftschleuse +US:Airlock \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Script.c b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Script.c new file mode 100644 index 00000000..1b16b8e7 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Airlock.c4d/Script.c @@ -0,0 +1,84 @@ +#strict + +local iDir, iPos; // iDir: welches Tor als nächstes geöffnet wird; + // iPos: ob es die linke oder rechte Schleuse ist + + +public func SetLeft() { iPos = -1; } +public func SetRight() { iPos = +1; } + +protected func Initialize() { SetAction("Pump"); Close(); } + + +protected func Check() // öffnet je nach Bedarf die Schleusen +{ + // will jemand aus der Schleuse raus? + if(iDir == -1) return(SetAction("OpenLeft")); + if(iDir == +1) return(SetAction("OpenRight")); + + // will jemand in die Schleuse rein? Hierbei haben alle die Vorrang, die von draußen (=Wasser) kommen + if(iPos == -1) { + if(Check4Clonk(-1)) return(SetAction("OpenLeft")); + if(Check4Clonk(+1)) return(SetAction("OpenRight")); + } + else { + if(Check4Clonk(+1)) return(SetAction("OpenRight")); + if(Check4Clonk(-1)) return(SetAction("OpenLeft")); + } +} + +protected func WannaClose() // soll Pumpen einschalten, will aber keine Clonks zerquetschen +{ + var iActDir; + if(GetAction() eq "LeftOpen") iActDir = -1; else iActDir = +1; + + // Clonks gefunden: offen lassen + if(Check4Clonk(iActDir)) return(); + + // Clonks in der Schleuse + if(Check4Clonk(0)) + { + // Schleuse hat zum Passieren geöffnet: Warten bis der Clonk raus ist + if(iDir) return(); + // ansonsten schließen damit geschleust werden kann + iDir = -iActDir; + } + else iDir = 0; + + // schließen + if(iActDir == -1) return(SetAction("CloseLeft")); + if(iActDir == +1) return(SetAction("CloseRight")); +} + +protected func Pumping() // alles dicht: abpumpen +{ + DigFreeRect(GetX()-20,GetY()-17,40,35); + + for(var j=0;j<30;++j) + InsertMaterial(ExtractLiquid(0,RandomX(13,15)),40*iPos,0); + + // genug gepumpt? + for(var i=-14; i<16; ++i) + if(GBackLiquid(0,i)) + return(); + // jupp! + SetAction("Wait"); +} + +protected func SoundOpen() { Sound("Airlock1"); } +protected func SoundClose() { Sound("Airlock2"); } + +private func Check4Clonk(int iD) // sucht nach nicht verfeindeten Clonks die gerne rein oder raus möchten +{ + var pClonk; + while(pClonk = FindObject(0,iD*30-20,-20,40,40,OCF_CrewMember(),0,0,NoContainer(),pClonk)) + if(!Hostile(GetOwner(pClonk),GetOwner())) + // bingo! + return(true); + // niemand da + return(false); +} + +protected func LeftOpen() { SetSolidMask(120,0,40,35); } +protected func RightOpen() { SetSolidMask(160,0,40,35); } +protected func Close() { SetSolidMask(80,0,40,35); } diff --git a/Hazard.c4f/CTF_DeepSea.c4s/DescDE.rtf b/Hazard.c4f/CTF_DeepSea.c4s/DescDE.rtf new file mode 100644 index 00000000..61f27d65 Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/DescUS.rtf b/Hazard.c4f/CTF_DeepSea.c4s/DescUS.rtf new file mode 100644 index 00000000..bcd8253c Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Icon.png b/Hazard.c4f/CTF_DeepSea.c4s/Icon.png new file mode 100644 index 00000000..db63c919 Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/Icon.png differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Landscape.bmp b/Hazard.c4f/CTF_DeepSea.c4s/Landscape.bmp new file mode 100644 index 00000000..ffecf61c Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DefCore.txt b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DefCore.txt new file mode 100644 index 00000000..03152554 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=_REF +Version=4,9,8,2 +Name=Refiller +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DescDE.txt b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DescDE.txt new file mode 100644 index 00000000..01b1b021 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DescDE.txt @@ -0,0 +1 @@ +Gratis Refills für alle. \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DescUS.txt b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DescUS.txt new file mode 100644 index 00000000..1f2e8639 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/DescUS.txt @@ -0,0 +1 @@ +Endless water. \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Graphics.png b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Graphics.png new file mode 100644 index 00000000..a589a3d1 Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Graphics.png differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Names.txt b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Names.txt new file mode 100644 index 00000000..777f2448 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Auffüller +US:Refiller \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Script.c b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Script.c new file mode 100644 index 00000000..bb1174ae --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Refiller.c4d/Script.c @@ -0,0 +1,17 @@ +/*-- Auffüller --*/ + +#strict + +protected func Initialize() +{ + ScheduleCall(this(), "Check", 35); +} + +protected func Check() +{ + if(InLiquid()) return(ScheduleCall(this(), "Check", 35)); + + for(var i=0 ; i < 10 ; i++) + InsertMaterial(Material("Water")); + ScheduleCall(this(), "Check", 2); +} diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Scenario.txt b/Hazard.c4f/CTF_DeepSea.c4s/Scenario.txt new file mode 100644 index 00000000..b8966068 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Scenario.txt @@ -0,0 +1,56 @@ +[Head] +Icon=16 +Title=Deep Sea +Version=4,9,6 +MinPlayer=2 +Origin=Hazard.c4f\CTF_DeepSea.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GCTF=3;GAH_=1 +Rules=CHOS=1 + +[Player1] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=0,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Default +TopOpen=0 +MapWidth=80,0,64,250 +MapHeight=80,0,40,250 +NewStyleLandscape=1 + +[Animals] +Animal=SHRK=2 + +[Weather] +Climate=16,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=CLFS=1;DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Script.c b/Hazard.c4f/CTF_DeepSea.c4s/Script.c new file mode 100644 index 00000000..1409e249 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Script.c @@ -0,0 +1,628 @@ +/*-- Tiefsee --*/ + +#strict + +static Flags; + +func Initialize() +{ + Flags = CreateArray(5); // Index 0 wird nicht benutzt + + // Auffüller + CreateObject(_REF, 1110, 1, -1); + CreateObject(_REF, 1445, 65, -1); + CreateObject(_REF, 1565, 135, -1); + CreateObject(_REF, 1390, 12, -1); + CreateObject(_REF, 590, 581, -1); + // Deko + CreateObject (SHEL, 378, 700, -1); + CreateObject (SHEL, 1850, 521, -1); + CreateObject (SHEL, 1770, 430, -1); + CreateObject (IDOL, 671, 474, -1)->SetR(-45); + CreateObject (SUBB, 439, 1171, -1)->SetR(45); + CreateObject (PLNT, 135, 309, -1); + CreateObject (CCP2, 436, 922, -1); + CreateObject (CCP1, 401, 920, -1); + CreateObject (LTBL, 246, 489, -1); + CreateObject (BED2, 97, 179, -1)->SetCon(50); + CreateObject (BED2, 56, 179, -1); + CreateObject (BED2, 37, 99, -1); + CreateObject (CON1, 29, 490, -1); + CreateObject (CGLO, 2223, 479, -1); + CreateObject (OTBL, 515, 179, -1); + CreateObject (OTBL, 1874, 929, -1); + CreateObject (TELE, 2338, 701, -1)->Deactivate(); + var pCrane = CreateObject (CRN1, 1850, 599, -1); + pCrane->Set(15); + CreateObject (CONS, 1957, 642, -1)->Set(pCrane); + CreateObject (GADG, 2151, 1237, -1); + CreateObject (MONI, 2132, 1225, -1); + CreateObject (MPPJ, 30, 970, -1); + CreateObject (OCHR, 510, 179, -1); + CreateObject (OCHR, 2142, 1239, -1); + CreateObject (PLT2, 74, 181, -1); + CreateObject (PLT2, 2187, 1241, -1); + CreateObject (GTBL, 82, 310, -1); + CreateObject (GTBL, 2140, 1240, -1); + CreateObject (GSBO, 198, 490, -1); + CreateObject (GSBO, 190, 490, -1); + CreateObject (GSBO, 2333, 850, -1); + CreateObject (GSBO, 2327, 850, -1); + CreateObject (GSTA, 2300, 849, -1); + CreateObject (FLGH, 64, 841, -1)->SetRotation(20, 135); + CreateObject (FLGH, 273, 991, -1)->SetRotation(0, 180); + CreateObject (FLGH, 231, 180, -1)->SetRotation(48); + CreateObject (FLGH, 2394, 692, -1)->SetRotation(-80); + CreateObject (FLGH, 2482, 1014, -1)->SetRotation(-45,-90); + CreateObject (CHAR, 54, 309, -1); + CreateObject (CHAR, 179, 99, -1); + CreateObject (CHAR, 2191, 1129, -1); + CreateObject (LCKR, 117, 310, -1); + CreateObject (LCKR, 133, 750, -1); + CreateObject (LCKR, 118, 750, -1); + CreateObject (LCKR, 95, 100, -1); + CreateObject (LCKR, 112, 100, -1); + CreateObject (LCKR, 2396, 1240, -1); + CreateObject (LCKR, 2164, 420, -1); + CreateObject (LCKR, 2290, 420, -1); + CreateObject (LCKR, 2275, 420, -1); + CreateObject (LCKR, 1910, 930, -1); + CreateObject (LCKR, 1890, 937, -1)->SetR(92); + CreateObject (LCKR, 1844, 931, -1)->SetR(-9); + CreateObject (LCKR, 2254, 1130, -1); + CreateObject (LCKR, 2240, 1130, -1); + CreateObject (TABL, 203, 100, -1); + CreateObject (TABL, 151, 749, -1); + CreateObject (TABL, 2214, 1129, -1); + CreateObject (TABL, 2367, 1239, -1); + CreateObject (CRAT, 91, 490, -1); + CreateObject (CRAT, 1735, 700, -1); + CreateObject (CRAT, 1706, 700, -1); + CreateObject (CRAT, 1864, 750, -1); + CreateObject (CRAT, 1887, 723, -1); + CreateObject (CRAT, 1895, 750, -1); + CreateObject (CRAT, 1935, 703, -1); + CreateObject (CRAT, 1984, 701, -1); + CreateObject (CRAT, 1076, 710, -1); + CreateObject (CRAT, 752, 601, -1); + CreateObject (CRAT, 745, 630, -1); + CreateObject (CRAT, 774, 630, -1); + CreateObject (DEB1, 429, 486, -1)->SetR(-50); + CreateObject (DEB1, 458, 491, -1)->SetR(20); + CreateObject (DEB1, 407, 491, -1); + CreateObject (DEB1, 1945, 724, -1)->SetR(173); + CreateObject (DEB1, 1938, 709, -1); + CreateObject (DEB1, 1975, 706, -1)->SetR(-13); + CreateObject (DEB1, 1948, 712, -1)->SetR(-13); + CreateObject (LADR, 315, 1181, -1)->Set(23); + CreateObject (LADR, 476, 1025, -1)->Set(14); + CreateObject (LADR, 375, 958, -1)->Set(14); + CreateObject (LADR, 214, 942, -1)->Set(19); + CreateObject (LADR, 86, 795, -1)->Set(6); + CreateObject (LADR, 186, 737, -1)->Set(6); + CreateObject (LADR, 338, 461, -1)->Set(10); + CreateObject (LADR, 127, 142, -1)->Set(5); + CreateObject (LADR, 596, 201, -1)->Set(12); + CreateObject (LADR, 546, 215, -1)->Set(5); + CreateObject (LADR, 17, 380, -1)->Set(26); + CreateObject (LADR, 76, 427, -1)->Set(6); + CreateObject (LADR, 2298, 1207, -1)->Set(10); + CreateObject (LADR, 2029, 1201, -1)->Set(24); + CreateObject (LADR, 1835, 974, -1)->Set(5); + CreateObject (LADR, 1794, 969, -1)->Set(14); + CreateObject (LADR, 1877, 851, -1)->Set(5); + CreateObject (LADR, 2255, 456, -1)->Set(4); + CreateObject (LADR, 2197, 455, -1)->Set(4); + CreateObject (LADR, 2296, 524, -1)->Set(5); + CreateObject (LADR, 2165, 667, -1)->Set(18); + CreateObject (LADR, 1667, 730, -1)->Set(15); + CreateObject (LADR, 2067, 881, -1)->Set(10); + CreateObject (LADR, 2258, 934, -1)->Set(10); + CreateObject (LADR, 2365, 1105, -1)->Set(24); + CreateObject (LADR, 820, 548, -1)->Set(5); + CreateObject (LADR, 876, 580, -1)->Set(9); + CreateObject (LADR, 1035, 651, -1)->Set(8); + CreateObject (LADR, 937, 746, -1)->Set(30); + CreateObject (LADR, 1108, 821, -1)->Set(14); + CreateObject (LADR, 1167, 749, -1)->Set(20); + CreateObject (LADR, 1229, 762, -1)->Set(9); + CreateObject (CRN1, 2181, 730, -1)->Set(18); + CreateObject (LBDR, 305, 490, -1); + CreateObject (LBDR, 574, 110, -1); + CreateObject (SBBA, 314, 138, -1); + CreateObject (SPVM, 114, 380, -1); + CreateObject (SPVM, 1609, 610, -1); + CreateObject (TOIC, 2479, 1240, -1); + CreateObject (CLVM, 145, 380, -1); + CreateObject (CLVM, 2211, 1240, -1); + CreateObject (STDR, 135, 490, -1); + CreateObject (STDR, 2197, 1060, -1); + CreateObject (STDR, 2432, 1240, -1); + CreateObject (STDR, 2068, 1239, -1); + CreateObject (STDR, 2252, 1240, -1); + CreateObject (SLDR, 456, 380, -1); + CreateObject (SLDR, 2132, 700, -1); + CreateObject (SLDR, 2135, 480, -1); + CreateObject (LFTP, 285, 933, -1); + CreateObject (LFTP, 235, 393, -1); + CreateObject (LFTP, 425, 354, -1); + CreateObject (LFTP, 2090, 394, -1); + CreateObject (LFTP, 2145, 1153, -1); + CreateObject (LFTP, 1955, 1253, -1); + CreateObject (AIRL, 950, 420, -1)->SetLeft(); + CreateObject (AIRL, 521, 663, -1)->SetRight(); + CreateObject (AIRL, 791, 232, -1)->SetRight(); + CreateObject (AIRL, 810, 773, -1)->SetLeft(); + CreateObject (AIRL, 1200, 851, -1)->SetRight(); + CreateObject (AIRL, 1330, 782, -1)->SetRight(); + CreateObject (AIRL, 1591, 753, -1)->SetLeft(); + CreateObject (SCR4, 185, 368, -1); + CreateObject (ALGH, 505, 358, -1)->SetR(180); + CreateObject (ALGH, 695, 178, -1)->SetR(180); + CreateObject (ALGH, 286, 28, -1)->SetR(180); + CreateObject (ALGH, 319, 258, -1)->SetR(180); + CreateObject (ALGH, 566, 868, -1)->SetR(180); + CreateObject (ALGH, 330, 1238, -1)->SetR(180); + CreateObject (ALGH, 392, 638, -1)->SetR(180); + CreateObject (ALGH, 112, 828, -1)->SetR(180); + CreateObject (ALGH, 1638, 718, -1)->SetR(180); + CreateObject (ALGH, 2089, 358, -1)->SetR(180); + CreateObject (ALGH, 1847, 1109, -1)->SetR(180); + CreateObject (ALGH, 1739, 928, -1)->SetR(180); + CreateObject (ALGH, 2144, 948, -1)->SetR(180); + CreateObject (ALGH, 2424, 998, -1)->SetR(180); + CreateObject (ALGH, 1790, 548, -1)->SetR(180); + CreateObject (ALGH, 2266, 558, -1)->SetR(180); + var pRail = CreateObject (RAI1, 377, 850, -1); + pRail->SetRail([1,3,1,3,1,3,1,3]); + pRail->AdjustPart(9,2); + CreateObject (SCR3, 511, 162, -1)->SetClrModulation(RGB(0,200,0)); + CreateObject (BLGH, 78, 279, -1); + CreateObject (LLGH, 215, 484, -1); + CreateObject (BLGH, 423, 230, -1); + CreateObject (CLGH, 71, 21, -1); + CreateObject (CLGH, 158, 641, -1); + CreateObject (BLGH, 370, 892, -1); + CreateObject (LCOM, 512, 111, -1); + CreateObject (LCOM, 527, 111, -1); + CreateObject (FRAM, 487, 100, -1); + CreateObject (FRAM, 552, 101, -1); + CreateObject (MVNT, 132, 709, -1); + CreateObject (SCR2, 1274, 715, -1)->RemoveFrame(); + CreateObject (PSTR, 72, 91, -1); + CreateObject (FENC, 439, 976, -1); + CreateObject (FENC, 379, 976, -1); + CreateObject (STRP, 236, 457, -1)->Set(100, RGB(0,200,0)); + CreateObject (FENC, 319, 976, -1); + CreateObject (FENC, 259, 976, -1); + CreateObject (ESGN, 299, 437, -1); + CreateObject (FIEX, 298, 480, -1); + CreateObject (FENC, 286, 140, -1); + var pScreen = CreateObject (SCR3, 180, 850, -1); + pScreen->SetClrModulation(65535); + pScreen->RemoveFrame(); + pScreen = CreateObject (SCR3, 180, 961, -1); + pScreen->SetClrModulation(65535); + pScreen->RemoveFrame(); + CreateObject (RAI2, 36, 311, -1)->SetRail([1,1,1,2,1,1,1,2,1,1,1]); + CreateObject (MVNT, 161, 432, -1)->SetCon(50); + CreateObject (ENGT, 520, 45, -1)->SetCon(75); + CreateObject (RAI1, 375, 180, -1)->SetRail([1,3,2,2,2,3,1]); + CreateObject (HSGN, 274, 1136, -1); + CreateObject (FENC, 362, 493, -1); + CreateObject (CLGH, 2076, 1001, -1); + CreateObject (CLGH, 2225, 371, -1); + CreateObject (FRAM, 1866, 916, -1); + CreateObject (CLGH, 1872, 881, -1); + var pPipe = CreateObject (PMP2, 2224, 693, -1)->Up(2); + pPipe->Right(0,0,1)->Down(2); + CreateObject (FENC, 2173, 659, -1); + CreateObject (FENC, 2233, 660, -1); + CreateObject (FENC, 2350, 663, -1); + CreateObject (FENC, 2350, 704, -1); + CreateObject (FENC, 2233, 701, -1); + CreateObject (FENC, 2173, 700, -1); + CreateObject (FIEX, 1986, 642, -1); + CreateObject (BLGH, 1812, 682, -1); + CreateObject (FRAM, 2113, 1219, -1); + pScreen = CreateObject (SCR3, 180, 882, -1); + pScreen->SetClrModulation(65535); + pScreen->RemoveFrame(); + pScreen = CreateObject (SCR1, 180, 930, -1); + pScreen->SetClrModulation(65535); + pScreen->RemoveFrame(); + CreateObject (LBGH, 2109, 723, -1); + CreateObject (RAI1, 2037, 812, -1); + CreateObject (RAI1, 2014, 812, -1); + CreateObject (RAI1, 1990, 812, -1); + CreateObject (RAI2, 2043, 892, -1)->SetRailLength(5); + CreateObject (HSGN, 2105, 853, -1)->SetClrModulation(9856050); + CreateObject (FENC, 2338, 851, -1); + CreateObject (FENC, 2290, 851, -1); + pPipe = CreateObject (PIPL, 2373, 895, -1)->Left(2)->Up(); + pPipe->Up(2); + pPipe->Left()->Up()->Right(2)->Up(); + CreateObject (WSHB, 2450, 1241, -1); + CreateObject (VENT, 2427, 1101, -1)->SetCon(45); + CreateObject (STRP, 2188, 1213, -1)->Set(80); + CreateObject (STRP, 2161, 1229, -1)->Set(140); + CreateObject (CLGH, 2144, 1161, -1); + CreateObject (GAT2, 876, 766, -1); + CreateObject (GAT2, 1127, 845, -1); + CreateObject (CLGH, 855, 501, -1); + CreateObject (BLGH, 1200, 735, -1); + CreateObject (CLGH, 1100, 551, -1); + CreateObject (ESGN, 1985, 627, -1); + CreateObject (FIEX, 2179, 1124, -1); + CreateObject (VENT, 1136, 670, -1)->SetCon(30); + CreateObject (FENC, 823, 631, -1); + CreateObject (FENC, 760, 631, -1); + CreateObject (VENT, 2186, 854, -1)->SetCon(30); + CreateObject (HNG2, 2495, 821, -1); + CreateObject (STLC, 0, 0, -1); + CreateObject (DPIP, 0, 0, -1); + CreateObject (STLC, 0, 0, -1); + CreateObject(SWD1, 1370, 1080, -1); + CreateObject(SWD1, 660, 1180, -1); + CreateObject(SWD1, 1360, 470, -1); + CreateObject(SWD2, 1610, 530, -1); + CreateObject(SWD1, 740, 470, -1); + CreateObject(SWD2, 10, 720, -1); + // Waffen & Ausrüstung + PlaceSpawnpoint(ENWP, 100, 170); + PlaceSpawnpoint(ENAP, 80, 170); + PlaceSpawnpoint(PGWP, 280, 380); + PlaceSpawnpoint(STAP, 300, 380); + PlaceSpawnpoint(KRFL, 770, 190); + PlaceSpawnpoint(AIRT, 1070, 660); + PlaceSpawnpoint(GLWP, 1200, 680); + PlaceSpawnpoint(GRAP, 1180, 680); + PlaceSpawnpoint(HARM, 1170, 1200); + PlaceSpawnpoint(ENWP, 200, 740); + PlaceSpawnpoint(ENAP, 220, 740); + PlaceSpawnpoint(PGWP, 590, 1010); + PlaceSpawnpoint(STAP, 610, 1010); + PlaceSpawnpoint(KSLM, 290, 1170); + PlaceSpawnpoint(ENWP, 2170, 1230); + PlaceSpawnpoint(ENAP, 2150, 1230); + PlaceSpawnpoint(PGWP, 2070, 880); + PlaceSpawnpoint(STAP, 2090, 880); + PlaceSpawnpoint(KLAS, 1900, 800); + PlaceSpawnpoint(ENWP, 2170, 410); + PlaceSpawnpoint(ENAP, 2150, 410); + PlaceSpawnpoint(PGWP, 1610, 600); + PlaceSpawnpoint(DRSU, 1980, 640); + PlaceSpawnpoint(MEDI, 1090, 350); + PlaceSpawnpoint(MINE, 660, 550); + PlaceSpawnpoint(MINE, 1430, 840); + PlaceSpawnpoint(GRAP, 760, 680); + PlaceSpawnpoint(GRAP, 1540, 270); + PlaceSpawnpoint(ENAP, 1100, 20); + PlaceSpawnpoint(STAP, 990, 930); + PlaceSpawnpoint(MIWP, 160, 590); + PlaceSpawnpoint(STAP, 180, 590); + PlaceSpawnpoint(GGWP, 410, 1190); + PlaceSpawnpoint(ENAP, 430, 1190); + PlaceSpawnpoint(BZWP, 1780, 1260); + PlaceSpawnpoint(MIAP, 1800, 1260); + PlaceSpawnpoint(GGWP, 1580, 640); + PlaceSpawnpoint(ENAP, 1560, 640); + PlaceBonusSpawnpoint([AMPB,BSKB,HELB,INVB,KAMB,RPFB], 740, 530); + + aHivePos = [[[550, 940], [120, 910], [330, 880]], [[2400, 1100], [2080, 1100], [2200, 900]], [[2300, 600], [2050, 600], [1800, 700]], [[300, 333], [280, 100]], [[1100, 800], [850, 600], [1000, 600]]]; + +} + +static aHivePos; + +public func HivePos(int iAlien) { + var aBase = aHivePos[iAlien % GetLength(aHivePos)]; + return aBase[(iAlien / GetLength(aHivePos)) % GetLength(aBase)]; +} + +public func GoalChosen() +{ + if(FindObject(GAH_)) + { + var alar = CreateObject(ALAR); + alar->SetMaxAliens(14); + // alle kommen ins gleiche Team + for(var i=0; iSet(80,300); + CreateObject(AWRP, 996, 590, -1)->Set(420,840); + CreateObject(AWRP, 1080, 760, -1)->Set(1880,909); + CreateObject(AWRP, 1328, 680, -1)->Set(1718,662); + + for(var i=0; i<10; ++i) + PlaceAnimal(FISH); + + for(var i=0; i SetObjDrawTransform(895, 0, 0, 0, 1000); + pObj = CreateObject(CNS2, 2030, 1240, -1); + pObj2 = CreateObject(CONS, 215, 680, -1); + pGate = CreateObject(_HG2, 700, 728, -1); + pGate2 = CreateObject(_HG1, 255, 1188, -1); + if(Random(2)) { + pObj -> Set(pGate); + pObj2 -> Set(pGate2); + } + else { + pObj -> Set(pGate2); + pObj2 -> Set(pGate); + } + CreateObject(CONS, 1635, 740, -1) -> Set(CreateObject(HNG1, 1480, 538, -1)); + //CreateObject(HNG1, 255, 1188, -1) -> SetObjDrawTransform(350, 0, 0, 0, 1000); + + + // Tür und Schalter + pObj = CreateObject(SWTH, 971, 530, -1); + pGate = CreateObject(SEDR, 1011, 530, -1); + pGate -> Lock(); + pObj -> SetPhase(1); + pObj -> Set(pGate); + + for(var i=0; i<10; ++i) + PlaceAnimal(ALN6); + + var pAlien; + for(pAlien in FindObjects(Find_Or( + Find_And( + Find_ID(ALN6), + Find_Or( + Find_InRect(350, 0, 860-350, 160), + Find_InRect(2240, 0, LandscapeWidth()-2240, 900), + Find_InRect(1820, 420, 2050-1820, 520-420), + Find_InRect(1494, 790, 1650-1494, 860-790), + Find_InRect(0, 1060, 200, LandscapeHeight()-1060), + Find_InRect(330, 670, 580-330, 840-670) + ) + ), + Find_And( + Find_Func("IsAlien"), + Find_InRect(1685, 60, 2124-1685, 220-60) + ) + ))) + pAlien -> RemoveObject(); + + if(FindObject(WPCH)) + { + var wp; + wp = CreateObject(WPVM, 675,230); + AddWares(wp); + wp = CreateObject(WPVM, 840,630); + AddWares(wp); + } + + ScriptGo(1); +} + +private func AddWares(object wp) +{ + // und begrenzte Waren... + wp->RemoveWare(); + wp->AddWare(PIWP,-1); // Pistole + wp->AddWare(ENWP,-1); // Energiegewehr + wp->AddWare(PGWP,-1); // Pumpgun + wp->AddWare(GGWP,-1); // Partikelkanone + wp->AddWare(BZWP,-1); // Bazooka + wp->AddWare(MIWP,-1); // Minigun + wp->AddWare(KRFL,-1); // Waffenteile + wp->AddWare(KSLM,-1); // Schleim + wp->AddWare(FLSH,-1); // Taschenlampe + wp->AddWare(AIRT,-1); // Luft! + wp->AddWare(HARM,-1); // Rüstung + wp->AddWare(DRSU,-1); // Drone + wp->AddWare(MEDI,-1); // Medipack + //wp->SortWare(); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + var wp = FindObject(WPCH); + if(wp) + { + AddWares(wp); + } + + if(FindObject(GAH_)) + { + InitAlienhunt(); + } + else if(FindObject(GCTF)) + { + InitCTF(); + } +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + if(!FindObject(CHOS)) + { + if(FindObject(GCTF)) + { + // Flagge setzen (wenn nicht schon erledigt + if(!Flags[iTeam]) + { + Flags[iTeam] = true; + InitTeamFlag(iTeam); + } + } + else if(FindObject(GAH_)) + { + // alle kommen ins gleiche Team + SetPlayerTeam (iPlr, 1); + iTeam = 1; + } + } + + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + if(iTeam == 1) return [30, 80]; + if(iTeam == 2) return [2400,1220]; + if(iTeam == 3) return [120,720]; + if(iTeam == 4) return [2280, 400]; +} + +/* Flaggenkrams */ + +protected func InitTeamFlag(int iTeam) +{ + var x,y,color; + if(iTeam == 1) + { + x = 285; + y = 140; + color = RGB(0,200,0); + } + if(iTeam == 2) + { + x = 2435; + y = 1130; + color = RGB(0,0,255); + } + if(iTeam == 3) + { + x = 120; + y = 970; + color = 65535; + } + if(iTeam == 4) + { + x = 2275; + y = 700; + color = RGB(255,0,0); + } + CreateFlag(iTeam, x, y, color); +} + +public func FlagReturned(team, clonk) +{ + Alarm(false, team); +} + +public func FlagCaptured(team, enemyteam, clonk) +{ + Alarm(true, team); +} + +public func BaseRect(int team, &x, &y, &width, &height) +{ + if(team == 1) { + x = 0; + y = 0; + width = 800; + height = 520; + } + if(team == 3) { + x = 0; + y = 600; + width = 700; + height = 680; + } + if(team == 4) { + x = 1500; + y = 300; + width = 1000; + height = 440; + } + if(team == 2) { + x = 1500; + y = 760; + width = 1000; + height = 540; + } +} + +public func Alarm(bool alarm, int team) +{ + // welches Team an welcher Position ist, muss noch angepasst werden + + var x,y,width,height; + + BaseRect(team,x,y,width,height); + + // nach Alarmleuchten und Bildschirmen gucken + var pLightObj; + for(var pLightObj in FindObjects(Find_Or(Find_ID(ALGH),Find_ID(SCR1),Find_ID(SCR3)),Find_InRect(x,y,width,height))) + { + // Alarm an und ausmachen, + // Bildschirme rot/blau färben + if(alarm) + { + if(GetID(pLightObj) == ALGH) + pLightObj -> TurnOn(); + else + pLightObj -> SetClrModulation(RGB(255,0,0)); + } + else + { + if(GetID(pLightObj) == ALGH) + pLightObj -> TurnOff(); + else + pLightObj -> SetClrModulation(RGB(0,255,255)); + } + } +} + +protected func Script10() { + var x,y,width,height,alarm; + + for(var i = 4; i > 0; i--) { + BaseRect(i,x,y,width,height); + alarm = ObjectCount2(Find_InRect(x,y,width,height), Find_Func("IsAlien")); + + Alarm(!!alarm, i); + } + goto(0); +} \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/System.c4g/Fish.c b/Hazard.c4f/CTF_DeepSea.c4s/System.c4g/Fish.c new file mode 100644 index 00000000..8d6c938c --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/System.c4g/Fish.c @@ -0,0 +1,7 @@ +#strict +#appendto FISH +#appendto DFSH + +public func RejectEntrance() { + return(1); +} diff --git a/Hazard.c4f/CTF_DeepSea.c4s/System.c4g/Shark.c b/Hazard.c4f/CTF_DeepSea.c4s/System.c4g/Shark.c new file mode 100644 index 00000000..63f1759c --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/System.c4g/Shark.c @@ -0,0 +1,6 @@ +#strict +#appendto SHRK + +public func IsBulletTarget() { + return(1); +} diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Teams.txt b/Hazard.c4f/CTF_DeepSea.c4s/Teams.txt new file mode 100644 index 00000000..acb8ceb7 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Teams.txt @@ -0,0 +1,23 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=Azrael + Color=51200 + + [Team] + id=2 + Name=Gabriel + Color=255 + + [Team] + id=3 + Name=Raphael + Color=65535 + + [Team] + id=4 + Name=Uriel + Color=16711680 \ No newline at end of file diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Title.png b/Hazard.c4f/CTF_DeepSea.c4s/Title.png new file mode 100644 index 00000000..bd6fb75a Binary files /dev/null and b/Hazard.c4f/CTF_DeepSea.c4s/Title.png differ diff --git a/Hazard.c4f/CTF_DeepSea.c4s/Title.txt b/Hazard.c4f/CTF_DeepSea.c4s/Title.txt new file mode 100644 index 00000000..8ab0ac76 --- /dev/null +++ b/Hazard.c4f/CTF_DeepSea.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:AH/CTF - Gamma Breschnew +US:AH/CTF - Gamma Breschnew \ No newline at end of file diff --git a/Hazard.c4f/CTF_Face.c4s/DescDE.rtf b/Hazard.c4f/CTF_Face.c4s/DescDE.rtf new file mode 100644 index 00000000..fe52c3b6 Binary files /dev/null and b/Hazard.c4f/CTF_Face.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/CTF_Face.c4s/DescUS.rtf b/Hazard.c4f/CTF_Face.c4s/DescUS.rtf new file mode 100644 index 00000000..32d8def4 Binary files /dev/null and b/Hazard.c4f/CTF_Face.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/CTF_Face.c4s/Icon.png b/Hazard.c4f/CTF_Face.c4s/Icon.png new file mode 100644 index 00000000..39dbe079 Binary files /dev/null and b/Hazard.c4f/CTF_Face.c4s/Icon.png differ diff --git a/Hazard.c4f/CTF_Face.c4s/Landscape.bmp b/Hazard.c4f/CTF_Face.c4s/Landscape.bmp new file mode 100644 index 00000000..2b7f421e Binary files /dev/null and b/Hazard.c4f/CTF_Face.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/CTF_Face.c4s/Scenario.txt b/Hazard.c4f/CTF_Face.c4s/Scenario.txt new file mode 100644 index 00000000..ea2ff6a7 --- /dev/null +++ b/Hazard.c4f/CTF_Face.c4s/Scenario.txt @@ -0,0 +1,55 @@ +[Head] +Icon=16 +Title=Face +Version=4,9,6 +MinPlayer=1 +Origin=Hazard.c4f\CTF_Face.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GCTF=3 +Rules=CHOS=1 + +[Player1] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Sky +BottomOpen=1 +MapWidth=80,0,64,250 +MapHeight=80,0,40,250 +Liquid=Water-Smooth +Gravity=85,0,10,200 +SkyScrollMode=2 + +[Weather] +Climate=40,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/CTF_Face.c4s/Script.c b/Hazard.c4f/CTF_Face.c4s/Script.c new file mode 100644 index 00000000..d919d3af --- /dev/null +++ b/Hazard.c4f/CTF_Face.c4s/Script.c @@ -0,0 +1,261 @@ +/*-- Face --*/ + +#strict + +static Flags; + +func Initialize() +{ + // Objekte + CreateObject (FLGH, 1335, 316, -1)->SetRotation(0,180); + CreateObject (FLGH, 165, 316, -1)->SetRotation(0,180); + CreateObject (LADR, 1335, 450, -1)->Set(13); + CreateObject (LADR, 165, 450, -1)->Set(13); + var liftp = CreateObject (LFTP, 805, 274, -1); + liftp->DisableVertical(); + liftp->ContactLeft(); + liftp = CreateObject (LFTP, 695, 274, -1); + liftp->DisableVertical(); + liftp->ContactRight(); + //CreateObject (STLH, 1014, 460, -1); + //CreateObject (STLH, 486, 460, -1); + CreateObject (CLGH, 1237, 193, -1); + CreateObject (CLGH, 263, 193, -1); + CreateObject (BLGH, 750, 450, -1); + CreateObject (BLGH, 750, 320, -1); + CreateObject (HSGN, 750, 375, -1)->SetCon(75); + CreateObject (FENC, 1261, 260, -1); + CreateObject (FENC, 1201, 260, -1); + CreateObject (FENC, 239, 260, -1); + CreateObject (FENC, 299, 260, -1); + CreateObject (ENGT, 1306, 385, -1)->SetCon(50); + CreateObject (ENGT, 194, 385, -1)->SetCon(50); + // Warps + CreateObject(AWRP, 260, 450, -1)->Set(210, 250); + CreateObject(AWRP, 170, 120, -1)->Set(210, 250); + CreateObject(AWRP, 170, 280, -1)->Set(200, 490); + CreateObject(AWRP, 170, 220, -1)->Set(230, 90); + CreateObject(AWRP, 110, 480, -1)->Set(230, 90); + + CreateObject(AWRP, 1240, 450, -1)->Set(1290, 250); + CreateObject(AWRP, 1330, 120, -1)->Set(1290, 250); + CreateObject(AWRP, 1330, 280, -1)->Set(1300, 490); + CreateObject(AWRP, 1330, 220, -1)->Set(1270, 90); + CreateObject(AWRP, 1390, 480, -1)->Set(1270, 90); + // Spawnpunkte + PlaceSpawnpoint(GLWP, 280, 610); + PlaceSpawnpoint(GRAP, 300, 610); + PlaceSpawnpoint(ENWP, 240, 490); + PlaceSpawnpoint(ENAP, 260, 490); + PlaceSpawnpoint(STAP, 220, 340); + PlaceSpawnpoint(PGWP, 240, 340); + PlaceSpawnpoint(STAP, 260, 340); + PlaceSpawnpoint(BZWP, 300, 250); + PlaceSpawnpoint(MIAP, 280, 250); + PlaceSpawnpoint(GGWP, 300, 80); + PlaceSpawnpoint(ENAP, 280, 80); + PlaceSpawnpoint(MEDI, 110, 50); + PlaceSpawnpoint(KRFL, 160, 50); + PlaceSpawnpoint(MINE, 360, 400); + + PlaceSpawnpoint(KLAS, 750, 250); + + PlaceSpawnpoint(GLWP, 1220, 610); + PlaceSpawnpoint(GRAP, 1200, 610); + PlaceSpawnpoint(ENWP, 1260, 490); + PlaceSpawnpoint(ENAP, 1240, 490); + PlaceSpawnpoint(STAP, 1280, 340); + PlaceSpawnpoint(PGWP, 1260, 340); + PlaceSpawnpoint(STAP, 1240, 340); + PlaceSpawnpoint(BZWP, 1200, 250); + PlaceSpawnpoint(MIAP, 1220, 250); + PlaceSpawnpoint(GGWP, 1200, 80); + PlaceSpawnpoint(ENAP, 1220, 80); + PlaceSpawnpoint(MEDI, 1390, 50); + PlaceSpawnpoint(KRFL, 1340, 50); + PlaceSpawnpoint(MINE, 1140, 400); + + PlaceSpawnpoint(MEZL, 750, 417); + PlaceSpawnpoint(GSAP, 750, 447); + + PlaceVehicleSpawnpoint(TANK,105,550); + PlaceVehicleSpawnpoint(TANK,1395,550); + + SetSkyParallax(0,150,20); + + Flags = CreateArray(3); + CreateWaypoints(); + return(1); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + // Bei Waffenwahl werden alle Nicht-Munispawns entfernt + var wp = FindObject(WPCH); + if(wp) + { + // und begrenzte Waren... + wp->RemoveWare(); + wp->AddWare(PIWP); // Pistole + wp->AddWare(PGWP); // Pumpgun + wp->AddWare(GLWP); // Granatenwerfer + wp->AddWare(MIWP); // Minigun + wp->AddWare(GGWP); // Partikelkanone + wp->AddWare(BZWP); // Bazooka + wp->AddWare(KLAS); // Laser + wp->AddWare(KRFL); // Waffenteile + wp->AddWare(FLSH); // Taschenlampe + wp->AddWare(MINE); // Lasermine + //wp->SortWare(); + } +} + +/* Flaggen */ + +protected func InitTeamFlag(int iTeam) +{ + var x,y,color; + if(iTeam == 1) + { + x = 180; + y = 500; + color = RGB(255,0,0); + } + if(iTeam == 2) + { + x = 1320; + y = 500; + color = RGB(0,0,255); + } + CreateFlag(iTeam, x, y, color); +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + // Flagge setzen (wenn nicht schon erledigt + if(!Flags[iTeam]) + { + Flags[iTeam] = true; + InitTeamFlag(iTeam); + } + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + if(iTeam == 1) + { + if(Random(3)) return [30,480]; + else return [30,25]; + } + if(iTeam == 2) + { + if(Random(3)) return [1470,480]; + else return [1470,25]; + } +} + +/* KI */ + +protected func CreateWaypoints() +{ + for(var i=0 ; i < 2 ; i++) + { + if(!i) var dir = 1; + else dir = -1; + + var wp1 = CreateWP(1500*i+dir*344,489); + var wp2 = CreateWP(1500*i+dir*735,248); + var wp3 = CreateWP(1500*i+dir*400,120); + var wp4 = CreateWP(1500*i+dir*91,49); + var wp5 = CreateWP(1500*i+dir*177,48); + var wp6 = CreateWP(1500*i+dir*244,89); + var wp7 = CreateWP(1500*i+dir*320,78); + var wp8 = CreateWP(1500*i+dir*181,103); + var wp9 = CreateWP(1500*i+dir*181,203); + var wp10 = CreateWP(1500*i+dir*227,251); + var wp11 = CreateWP(1500*i+dir*318,248); + var wp12 = CreateWP(1500*i+dir*181,264); + var wp13 = CreateWP(1500*i+dir*273,434); + var wp14 = CreateWP(1500*i+dir*118,447); + var wp15 = CreateWP(1500*i+dir*341,338); + var wp16 = CreateWP(1500*i+dir*302,339); + var wp17 = CreateWP(1500*i+dir*186,339); + var wp18 = CreateWP(1500*i+dir*180,490); +// var wp19 = CreateWP(1500*i+dir*792,447); + var wp20 = CreateWP(1500*i+dir*707,447); + var wp21 = CreateWP(1500*i+dir*516,529); + var wp22 = CreateWP(1500*i+dir*290,609); + var wp23 = CreateWP(1500*i+dir*31,489); + + wp1 -> AddPath(wp18); +// wp1 -> AddPath(wp18, Path_Backflip); + wp1 -> AddPath(wp16, Path_Jump); + wp1 -> AddPath(wp21); + wp2 -> AddPath(wp21); + wp2 -> AddPath(wp11, Path_Lift); + wp2 -> AddPath(wp1, 0, 0, 30); + wp3 -> AddPath(wp20); + wp3 -> AddPath(wp7); + wp3 -> AddPath(wp2, Path_Jump, 0, 40); + wp4 -> AddPath(wp5); + wp5 -> AddPath(wp6); + wp5 -> AddPath(wp4); + wp6 -> AddPath(wp8); + wp6 -> AddPath(wp7); + wp6 -> AddPath(wp5, Path_Jump); + wp7 -> AddPath(wp6); + wp7 -> AddPath(wp3); + wp8 -> AddPath(wp10); + wp9 -> AddPath(wp6); + wp10 -> AddPath(wp12); + wp10 -> AddPath(wp9, Path_Jump); + wp10 -> AddPath(wp11); + wp11 -> AddPath(wp10); + wp11 -> AddPath(wp21); + wp11 -> AddPath(wp2, Path_Lift); + wp12 -> AddPath(wp18); + wp13 -> AddPath(wp10); + wp14 -> AddPath(wp6); + wp15 -> AddPath(wp16); + wp15 -> AddPath(wp21); + wp16 -> AddPath(wp1); + wp16 -> AddPath(wp15); + wp16 -> AddPath(wp17); + wp17 -> AddPath(wp18); + wp17 -> AddPath(wp16); + wp18 -> AddPath(wp13); + wp18 -> AddPath(wp17, Path_Jump); + wp18 -> AddPath(wp1); +// wp18 -> AddPath(wp1, Path_Backflip); + wp20 -> AddPath(wp21); + wp21 -> AddPath(wp22); + wp21 -> AddPath(wp1); + wp21 -> AddPath(wp20); + wp22 -> AddPath(wp21); + wp22 -> AddPath(wp23); + wp23 -> AddPath(wp22); + wp23 -> AddPath(wp14, Path_Backflip); + + if(!i) { var spec1 = wp20; var spec2 = wp2; } + else + { + wp20 -> AddPath(spec1, Path_Jump, -1); + spec1 -> AddPath(wp20, Path_Jump, 1); + wp2 -> AddPath(spec2); + spec2 -> AddPath(wp2); + } + } +} diff --git a/Hazard.c4f/CTF_Face.c4s/Sky.jpg b/Hazard.c4f/CTF_Face.c4s/Sky.jpg new file mode 100644 index 00000000..e429fed7 Binary files /dev/null and b/Hazard.c4f/CTF_Face.c4s/Sky.jpg differ diff --git a/Hazard.c4f/CTF_Face.c4s/StringTblDE.txt b/Hazard.c4f/CTF_Face.c4s/StringTblDE.txt new file mode 100644 index 00000000..5439bd34 --- /dev/null +++ b/Hazard.c4f/CTF_Face.c4s/StringTblDE.txt @@ -0,0 +1,2 @@ +Red=Rot +Blue=Blau \ No newline at end of file diff --git a/Hazard.c4f/CTF_Face.c4s/StringTblUS.txt b/Hazard.c4f/CTF_Face.c4s/StringTblUS.txt new file mode 100644 index 00000000..9e3d1dd0 --- /dev/null +++ b/Hazard.c4f/CTF_Face.c4s/StringTblUS.txt @@ -0,0 +1,2 @@ +Red=Red +Blue=Blue \ No newline at end of file diff --git a/Hazard.c4f/CTF_Face.c4s/Teams.txt b/Hazard.c4f/CTF_Face.c4s/Teams.txt new file mode 100644 index 00000000..5c8ed987 --- /dev/null +++ b/Hazard.c4f/CTF_Face.c4s/Teams.txt @@ -0,0 +1,13 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=$Red$ + Color=16711680 + + [Team] + id=2 + Name=$Blue$ + Color=255 \ No newline at end of file diff --git a/Hazard.c4f/CTF_Face.c4s/Title.png b/Hazard.c4f/CTF_Face.c4s/Title.png new file mode 100644 index 00000000..f4ca8d7f Binary files /dev/null and b/Hazard.c4f/CTF_Face.c4s/Title.png differ diff --git a/Hazard.c4f/CTF_Face.c4s/Title.txt b/Hazard.c4f/CTF_Face.c4s/Title.txt new file mode 100644 index 00000000..507ca2bb --- /dev/null +++ b/Hazard.c4f/CTF_Face.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:CTF - Face +US:CTF - Face \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/DescDE.rtf b/Hazard.c4f/CTF_Space.c4s/DescDE.rtf new file mode 100644 index 00000000..535b1384 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/CTF_Space.c4s/DescUS.rtf b/Hazard.c4f/CTF_Space.c4s/DescUS.rtf new file mode 100644 index 00000000..0bc59610 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/CTF_Space.c4s/Icon.png b/Hazard.c4f/CTF_Space.c4s/Icon.png new file mode 100644 index 00000000..39dbe079 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Icon.png differ diff --git a/Hazard.c4f/CTF_Space.c4s/Landscape.bmp b/Hazard.c4f/CTF_Space.c4s/Landscape.bmp new file mode 100644 index 00000000..f51683b4 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/CTF_Space.c4s/Scenario.txt b/Hazard.c4f/CTF_Space.c4s/Scenario.txt new file mode 100644 index 00000000..8a1bce65 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Scenario.txt @@ -0,0 +1,55 @@ +[Head] +Icon=16 +Title=Space +MinPlayer=1 +Origin=Hazard.c4f\CTF_Space.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GCTF=3 +Rules=CHOS=1 + +[Player1] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=90,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Stars +BottomOpen=1 +MapWidth=150,0,64,250 +MapHeight=80,0,40,250 +Gravity=50,0,10,200 + +[Weather] +Climate=40,0,0,100 +YearSpeed=20,10,0,100 +Wind=-100,0,-100,100 + +[Disasters] +Meteorite=2,0,0,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/Script.c b/Hazard.c4f/CTF_Space.c4s/Script.c new file mode 100644 index 00000000..2ca768e9 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Script.c @@ -0,0 +1,351 @@ +/*-- Space --*/ + +#strict + +static Flags; + +protected func Initialize() +{ + // Hier kommt die Sonne! + var s2 = CreateObject(SUN_, LandscapeWidth()/3, LandscapeHeight()/2, -1); + var s1 = CreateObject(SUN_, LandscapeWidth()/3, LandscapeHeight()/2, -1); + + s1->SetClrModulation(RGBa(255,100,0,0)); + s2->SetObjectBlitMode(1); + s2->SetClrModulation(RGBa(255,255,0,0)); + s2->SetRotationSpeed(12); + s2->SetGrowPos(13000); + + SetSkyParallax(30,30); + + // Deko + CreateObject(SCR3, 1020, 555, -1)->SetClrModulation(RGB(255,255,0)); + CreateObject(SCR3, 480, 555, -1)->SetClrModulation(RGB(128,0,128)); +// CreateObject(SUN_, 750, 575, -1); + // Jumppads + CreateObject(JMPD, 67, 730, -1)->Set(67, 5); + CreateObject(JMPD, 1433, 730, -1)->Set(67, -5); + CreateObject(JMPD, 250, 370, -1)->Set(58, 25); + CreateObject(JMPD, 1250, 370, -1)->Set(58, -25); + CreateObject(JMPD, 460, 180, -1)->Set(65, -45); + CreateObject(JMPD, 1040, 180, -1)->Set(65, 45); + CreateObject(JMPD, 510, 390, -1)->Set(58, 25, 90); + CreateObject(JMPD, 990, 390, -1)->Set(58, -25, -90); + // Struktur + CreateObject(LADR, 190, 500, -1)->Set(11); + CreateObject(LADR, 1310, 500, -1)->Set(11); + // Waffen & Ausrüstung + PlaceSpawnpoint(PGWP, 100, 350); + PlaceSpawnpoint(STAP, 110, 350); + PlaceSpawnpoint(PGWP, 1400, 350); + PlaceSpawnpoint(STAP, 1390, 350); + PlaceSpawnpoint(KLAS, 150, 500); + PlaceSpawnpoint(KLAS, 1350, 500); + PlaceSpawnpoint(ENAP, 160, 500); + PlaceSpawnpoint(ENAP, 1340, 500); + PlaceSpawnpoint(STAP, 1390, 350); + PlaceSpawnpoint(JTPK, 750, 350); + PlaceSpawnpoint(GSAP, 735, 350); + PlaceSpawnpoint(GSAP, 765, 350); + PlaceSpawnpoint(MIAP, 670, 90); + PlaceSpawnpoint(MIAP, 830, 90); + PlaceSpawnpoint(BZWP, 750, 20); + PlaceSpawnpoint(GLWP, 90, 110); + PlaceSpawnpoint(GLWP, 1410, 110); + PlaceSpawnpoint(GRAP, 110, 110); + PlaceSpawnpoint(GRAP, 1390, 110); + PlaceSpawnpoint(GRAP, 660, 270); + PlaceSpawnpoint(GRAP, 840, 430); + PlaceSpawnpoint(STAP, 660, 430); + PlaceSpawnpoint(STAP, 840, 270); + PlaceSpawnpoint(KRFL, 480, 550); + PlaceSpawnpoint(KRFL, 1020, 550); + PlaceSpawnpoint(GGWP, 460, 710); + PlaceSpawnpoint(GGWP, 1040, 710); + PlaceSpawnpoint(ENAP, 620, 710); + PlaceSpawnpoint(ENAP, 880, 710); + PlaceSpawnpoint(HARM, 90, 720); + PlaceSpawnpoint(HARM, 1410, 720); + PlaceSpawnpoint(ENWP, 460, 210); + PlaceSpawnpoint(ENWP, 1040, 210); + PlaceSpawnpoint(ENAP, 500, 210); + PlaceSpawnpoint(ENAP, 1000, 210); + PlaceSpawnpoint(MINE, 750, 530); + // Flaggen + Flags = CreateArray(); + + // Alarm-lights + + CreateObject(ALGH,1022,199,-1)->SetR(180); + CreateObject(ALGH,1022,538,-1)->SetR(180); + CreateObject(ALGH,1416,378,-1)->SetR(180); + + CreateObject(ALGH,478,199,-1)->SetR(180); + CreateObject(ALGH,478,538,-1)->SetR(180); + CreateObject(ALGH,84,378,-1)->SetR(180); + + + // Lights + CreateObject(BLGH,1385,628,-1); + CreateObject(BLGH,1020,374,-1); + CreateObject(CLGH,1162,641,-1); + CreateObject(CLGH,1262,434,-1); + CreateObject(FLGH,1351,508,-1)->SetRotation(30); + CreateObject(FLGH,995,518,-1)->SetRotation(-50); + CreateObject(FLGH,991,241,-1)->SetRotation(50,180); + + CreateObject(BLGH,115,628,-1); + CreateObject(BLGH,480,374,-1); + CreateObject(CLGH,338,641,-1); + CreateObject(CLGH,238,434,-1); + CreateObject(FLGH,149,508,-1)->SetRotation(-30); + CreateObject(FLGH,505,518,-1)->SetRotation(50); + CreateObject(FLGH,509,241,-1)->SetRotation(-50,180); + + // Vents + CreateObject(VENT,120,700,-1)->DoCon(-70); + CreateObject(VENT,1380,700,-1)->DoCon(-70); + + // Waypoints + CreateWaypoints(); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + var wp = FindObject(WPCH); + if(wp) + { + // und begrenzte Waren... + wp->RemoveWare(); + wp->AddWare(PIWP); // Pistole + wp->AddWare(ENWP); // Energiegewehr + wp->AddWare(GLWP); // Granatenwerfer + wp->AddWare(GGWP); // Partikelkanone + wp->AddWare(KLAS); // Laser + wp->AddWare(FLSH); // Taschenlampe + wp->AddWare(JTPK); // Jetpack + wp->AddWare(HSHD); // Schild + wp->AddWare(DRSU); // Drone + wp->AddWare(LMIN); // Lasermine + wp->AddWare(SMIN); // Schwarmmine + //wp->SortWare(); + } +} + +/* Flaggen */ + +protected func InitTeamFlag(int iTeam) +{ + var x,y,color; + if(iTeam == 1) + { + x = 90; + y = 420; + color = RGB(128,0,128); + } + if(iTeam == 2) + { + x = 1410; + y = 420; + color = RGB(255,255,0); + } + CreateFlag(iTeam, x, y, color); +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + // Flagge setzen (wenn nicht schon erledigt + if(!Flags[iTeam]) + { + Flags[iTeam] = true; + InitTeamFlag(iTeam); + } + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + if(iTeam == 1) return [80,350]; + if(iTeam == 2) return [1420,350]; +} + +public func FlagReturned(team, clonk) +{ + Alarm(false, team); +} + +public func FlagCaptured(team, enemyteam, clonk) +{ + Alarm(true, team); +} + +public func Alarm(bool alarm, int team) +{ + var x, width = LandscapeWidth()/2; + if(team == 1) x = 0; + if(team == 2) x = LandscapeWidth()/2; + + var alarmobj; + while(alarmobj = FindObject(ALGH,x,0,width,LandscapeHeight(),0,0,0,0,alarmobj)) + { + if(alarm) alarmobj -> TurnOn(); + else alarmobj -> TurnOff(); + } +} + +/* KI */ + +protected func CreateWaypoints() +{ + for(var i=0 ; i < 2 ; i++) + { + if(!i) var dir = 1; + else dir = -1; + + var wp1 = CreateWP(1500*i+dir*90, 350); + var wp2 = CreateWP(1500*i+dir*200, 410); + var wp3 = CreateWP(1500*i+dir*30, 325); + var wp4 = CreateWP(1500*i+dir*240, 360); + var wp5 = CreateWP(1500*i+dir*90, 410); + var wp6 = CreateWP(1500*i+dir*170, 500); + var wp7 = CreateWP(1500*i+dir*260, 500); + var wp8 = CreateWP(1500*i+dir*340, 610); + var wp9 = CreateWP(1500*i+dir*280, 670); + var wp10= CreateWP(1500*i+dir*130, 720); + var wp11= CreateWP(1500*i+dir*70, 720); + var wp12= CreateWP(1500*i+dir*415, 550); + var wp13= CreateWP(1500*i+dir*315, 270); + var wp14= CreateWP(1500*i+dir*405, 210); + var wp15= CreateWP(1500*i+dir*455, 170); + var wp16= CreateWP(1500*i+dir*145, 110); + var wp17= CreateWP(1500*i+dir*20, 110); + var wp18= CreateWP(1500*i+dir*560, 210); + var wp19= CreateWP(1500*i+dir*670, 95); + var wp20= CreateWP(1500*i+dir*680, 270); + var wp21= CreateWP(1500*i+dir*635, 430); + var wp22= CreateWP(1500*i+dir*670, 430); + var wp23= CreateWP(1500*i+dir*515, 510); + var wp24= CreateWP(1500*i+dir*535, 555); + var wp25= CreateWP(1500*i+dir*460, 720); + var wp26= CreateWP(1500*i+dir*640, 575); + var wp27= CreateWP(1500*i+dir*620, 720); + + if(!i) + { + var wp28= CreateWP(750, 355); + var wp29= CreateWP(750, 655); + var spec1 = wp18; + var spec2 = wp19; + var spec3 = wp20; + var spec4 = wp26; + var jtpk1 = Jetpack_Right; + var jtpk2 = Jetpack_UpLeft; + } + else + { + var jtpk1 = Jetpack_Left; + var jtpk2 = Jetpack_UpRight; + } + + wp1 -> AddPath(wp2); + wp1 -> AddPath(wp3); + wp1 -> AddPath(wp4, Path_Jump, 1*dir); + wp2 -> AddPath(wp1, Path_Jump,-1*dir); + wp2 -> AddPath(wp4, Path_Jump, 1*dir); + wp2 -> AddPath(wp5); + wp2 -> AddPath(wp6, Path_MoveTo); + wp2 -> AddPath(wp12); + wp3 -> AddPath(wp1); + wp3 -> AddPath(wp5); + wp4 -> AddPath(wp14); + wp5 -> AddPath(wp2); + wp5 -> AddPath(wp3); + wp6 -> AddPath(wp2, Path_Jump); + wp6 -> AddPath(wp7); + wp6 -> AddPath(wp10); + wp7 -> AddPath(wp6); + wp7 -> AddPath(wp8); + wp7 -> AddPath(wp12, Path_Backflip); + wp8 -> AddPath(wp7, Path_Jump,-1*dir); + wp8 -> AddPath(wp12, Path_Jump, 1*dir); + wp8 -> AddPath(wp25); + wp9 -> AddPath(wp8, Path_Jump, 1*dir); + wp9 -> AddPath(wp10, Path_Jump,-1*dir); + wp9 -> AddPath(wp25); + wp10-> AddPath(wp9, Path_Jump, 1*dir); + wp10-> AddPath(wp11); + wp11-> AddPath(wp6); + wp12-> AddPath(wp2, Path_Jump,-1*dir, 45, jtpk2); // Jetpack! + wp12-> AddPath(wp8); + wp12-> AddPath(wp24); + wp13-> AddPath(wp2); + wp13-> AddPath(wp14, Path_Jump, 1*dir); + wp14-> AddPath(wp3, Path_Backflip,-1*dir); + wp14-> AddPath(wp13); + wp14-> AddPath(wp15, Path_Jump, 1*dir); + wp14-> AddPath(wp18); + wp15-> AddPath(wp16); + wp16-> AddPath(wp8); + wp16-> AddPath(wp14, 0, 1*dir, 50, jtpk1); // Jetpack + wp16-> AddPath(wp17); + wp17-> AddPath(wp16); + wp18-> AddPath(wp14); + wp18-> AddPath(wp19, Path_Jump, 1*dir); + wp18-> AddPath(wp20); + //wp18 + wp19-> AddPath(wp18); + //wp19-> AddPath(wp, Path_Jump, 1*dir); + wp20-> AddPath(wp18, Path_Jump,-1*dir); + wp20-> AddPath(wp28); + //wp20 + wp21-> AddPath(wp20, Path_Jump,-1*dir); + wp21-> AddPath(wp22); + wp21-> AddPath(wp24); + wp22-> AddPath(wp21); + wp22-> AddPath(wp28, Path_Jump, 1*dir); + wp23-> AddPath(wp21, Path_Jump, 1*dir); + wp23-> AddPath(wp26); + wp24-> AddPath(wp12); + wp24-> AddPath(wp23); + wp24-> AddPath(wp26); + wp25-> AddPath(wp8, Path_Jump,-1*dir); + wp25-> AddPath(wp9, Path_Jump,-1*dir); + wp25-> AddPath(wp29, Path_Jump, 1*dir, 20, jtpk1); // Jetpack + wp25-> AddPath(wp27, Path_Jump, 1*dir); + wp26-> AddPath(wp23, Path_Jump,-1*dir); + wp26-> AddPath(wp24); + wp26-> AddPath(wp29); + wp27-> AddPath(wp25, Path_Jump,-1*dir); + wp27-> AddPath(wp29, Path_Jump, 1*dir); + wp28-> AddPath(wp20, Path_Jump, 1*dir); + wp28-> AddPath(wp22); + wp29-> AddPath(wp25, Path_Backflip,-1*dir); + wp29-> AddPath(wp26, Path_Jump,-1*dir); + wp29-> AddPath(wp27); + if(i) + { + spec1 -> AddPath(wp20, Path_Backflip, 1); + spec2 -> AddPath(wp19, Path_Jump, 1); + spec3 -> AddPath(wp18, Path_Jump, 1, 20, Jetpack_Right); // Jetpack + spec3 -> AddPath(wp20, Path_Jump, 1); + spec4 -> AddPath(wp26, Path_Backflip, 1); + wp18 -> AddPath(spec3, Path_Backflip,-1); + wp19 -> AddPath(spec2, Path_Jump,-1); + wp20 -> AddPath(spec1, Path_Jump,-1, 20, Jetpack_Left); // Jetpack + wp20 -> AddPath(spec3, Path_Jump,-1); + wp26 -> AddPath(spec4, Path_Backflip,-1); + } + } +} diff --git a/Hazard.c4f/CTF_Space.c4s/Stars.png b/Hazard.c4f/CTF_Space.c4s/Stars.png new file mode 100644 index 00000000..4587a3ee Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Stars.png differ diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/ActMap.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/ActMap.txt new file mode 100644 index 00000000..6589388d --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/ActMap.txt @@ -0,0 +1,5 @@ +[Action] +Name=Be +Procedure=FLOAT +FacetBase=1 +NextAction=Hold diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DefCore.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DefCore.txt new file mode 100644 index 00000000..54f39ec9 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=SUN_ +Version=4,9,8,2 +Name=The sun +Category=C4D_StaticBack|C4D_Background|C4D_MouseIgnore +Timer=1 +TimerCall=Timer +Width=350 +Height=350 +Offset=-175,-175 +Picture=0,0,350,350 +Rotate=1 +BorderBound=1 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 +NoStabilize=1 + +[Physical] +Float=1000 +CanFly=1 diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DescDE.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DescDE.txt new file mode 100644 index 00000000..3f3a85f3 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine handelsübliche Sonne. \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DescUS.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DescUS.txt new file mode 100644 index 00000000..468f5f3b --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/DescUS.txt @@ -0,0 +1 @@ +A quite normal sun. \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Graphics.png b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Graphics.png new file mode 100644 index 00000000..d353f9c9 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Graphics.png differ diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Names.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Names.txt new file mode 100644 index 00000000..e88af878 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sonne +US:Sun diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Script.c b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Script.c new file mode 100644 index 00000000..535106a3 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/Script.c @@ -0,0 +1,89 @@ +#strict + +local time, con, r, grow, dir, size; + +local erup, er; + +local light; + +public func Initialize() +{ + time = 0; + SetGrowSpeed(600); + SetRotationSpeed(-20); + SetAction("Be"); + SetClrModulation(RGB(0,128,255)); + SetCategory(GetCategory() | C4D_Parallax); + Local(0)= 60; + Local(1)=60; +/* light = AddLightAmbience(400, this()); + light->ChangeColor(RGBa(100,100,255));*/ +} + +public func SetRotationSpeed(d) { dir = d; } +public func SetGrowSpeed(d) { grow = d; } +public func SetGrowPos(d) { size = d; } + +public func Timer() +{ + time++; + + con = 1200+Sin(size,20,100); + + var w = con; + var h = con; + + var fsin = -Sin(r, 1000,100), fcos = Cos(r, 1000,100); + + var xoff = 0; + var yoff = 0; + + var width = +fcos*w/1000, height = +fcos*h/1000; + var xskew = +fsin*h/1000, yskew = -fsin*w/1000; + + var xadjust = +fcos*xoff + fsin*yoff; + var yadjust = -fsin*xoff + fcos*yoff; + + // set matrix values + SetObjDrawTransform ( + width, xskew, xadjust, + yskew, height, yadjust + ); + + r += dir; + size += grow; + if(size > 36000) size -= 36000; + + // Exploeffekte auf der Sonne + if(erup) + { + if(!Random(15)) + erup = false; + + var x,y; + x = -Sin(er + r + RandomX(-15,15), 175 * con * 8 / 10000,100); + y = Cos(er + r + RandomX(-15,15), 175 * con * 8 / 10000,100); + CreateParticle("SunSpark", x, y, x/12, y/12, RandomX(400, 500), RGBa(255,60+Random(80),0,100), this()); + } + else if(!Random(35)) + { + erup = true; + er = Random(360); + } + + // Protuberanzen (!) + if(!Random(500)) + { + var pr = Random(360), x, y, rx, ry; + x = -Sin(pr, 175 * con * 8 / 10000); + y = Cos(pr, 175 * con * 8 / 10000); + for(var i=pr-10 ; i < pr + 10 ; i+=2) + { + rx = -Sin((i-pr)*9+pr, 5); + ry = Cos((i-pr)*9+pr, 5); + CreateParticle("SunFlare", rx + x, ry + y, rx, ry, RandomX(700, 800), RGBa(255,80+Random(32),0,80), this()); + CreateParticle("SunSpark", x, y, rx, ry, RandomX(400, 600), RGBa(255,100+Random(128),0,80), this()); + } + } + +} diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Graphics.png b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Graphics.png new file mode 100644 index 00000000..b5e98c29 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Graphics.png differ diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Names.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Names.txt new file mode 100644 index 00000000..487970d3 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sonnenpartikel +US:Sun spark \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Particle.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Particle.txt new file mode 100644 index 00000000..1b7148c3 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunFlare.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=SunFlare +MaxCount=2000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,25,25,-12,-12 +Repeats=1 +RByV=1 +Additive=1 +AlphaFade=1 +Attach=1 +Parallaxity=60,60 + diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Graphics.png b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Graphics.png new file mode 100644 index 00000000..93730f4c Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Graphics.png differ diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Names.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Names.txt new file mode 100644 index 00000000..487970d3 --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sonnenpartikel +US:Sun spark \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Particle.txt b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Particle.txt new file mode 100644 index 00000000..9b24c4ab --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Sun.c4d/SunSpark.c4d/Particle.txt @@ -0,0 +1,14 @@ +[Particle] +Name=SunSpark +MaxCount=2000 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,12,12,-6,-6 +Repeats=1 +RByV=1 +Additive=1 +AlphaFade=2 +Attach=1 +Parallaxity=60,60 + diff --git a/Hazard.c4f/CTF_Space.c4s/Teams.txt b/Hazard.c4f/CTF_Space.c4s/Teams.txt new file mode 100644 index 00000000..ae23031a --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Teams.txt @@ -0,0 +1,13 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=Alpha + Color=8388736 + + [Team] + id=2 + Name=Beta + Color=16776960 \ No newline at end of file diff --git a/Hazard.c4f/CTF_Space.c4s/Title.png b/Hazard.c4f/CTF_Space.c4s/Title.png new file mode 100644 index 00000000..31044472 Binary files /dev/null and b/Hazard.c4f/CTF_Space.c4s/Title.png differ diff --git a/Hazard.c4f/CTF_Space.c4s/Title.txt b/Hazard.c4f/CTF_Space.c4s/Title.txt new file mode 100644 index 00000000..cb4a5e6b --- /dev/null +++ b/Hazard.c4f/CTF_Space.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:CTF - Centauri S-003 +US:CTF - Centauri S-003 \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/DescDE.rtf b/Hazard.c4f/DEST_EpicVoltage.c4s/DescDE.rtf new file mode 100644 index 00000000..d9dec022 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/DescUS.rtf b/Hazard.c4f/DEST_EpicVoltage.c4s/DescUS.rtf new file mode 100644 index 00000000..73eb2e75 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Icon.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Icon.png new file mode 100644 index 00000000..2d9d9abd Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Icon.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Info.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Info.txt new file mode 100644 index 00000000..b38f6dcb --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Info.txt @@ -0,0 +1,4 @@ +By Atomclonk +Vielen Dank an henry für die Hinweise :) + +ins Hazardpack übernommen und Teile von DEST HighVoltage aus BattleEvolutions reingemischt von Newton \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Map.bmp b/Hazard.c4f/DEST_EpicVoltage.c4s/Map.bmp new file mode 100644 index 00000000..a3071707 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Map.bmp differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Material.c4g/TexMap.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Material.c4g/TexMap.txt new file mode 100644 index 00000000..58c7bd90 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Material.c4g/TexMap.txt @@ -0,0 +1,111 @@ +# Automatically generated texture map +# Contains material-texture-combinations added at runtime +# Import materials from global file as well +OverloadMaterials +# Import textures from global file as well +OverloadTextures + +1=Tunnel-Smooth +2=Tunnel-Rough +3=Water-Liquid +4=Acid-Liquid2 +5=DuroLava-Liquid +6=Granite-Ridge +7=Coal-Swirl +8=FlySand-Smooth +9=Snow-Swirl +10=Snow-Smooth +11=Snow-Flare2 +12=Ice-Structure +13=Earth-Smooth +14=Earth-Rough +15=Rock-Ridge +16=Crystal-Structure +17=FlyAshes-Spots +18=FlySand-Smooth2 +19=Gold-Rough +20=Granite-Rock +21=Ice-Sponge +22=Lava-Liquid +23=Oil-Liquid +24=Water2-Liquid3 +25=BackWall-Bricks1 +26=BackWall-Bricks2 +27=BackWall-Column1 +28=BackWall-Concrete1 +29=BackWall-Grid1 +30=BackWall-Concrete3 +31=BackWall-Concrete4 +32=BackWall-Concrete5 +33=BackWall-Column1 +34=BackWall-Grid2 +35=BackWall-Industrial1 +36=BackWall-Industrial2 +37=BackWall-Industrial3 +38=BackWall-Laboratory1 +39=BackWall-Marble1 +40=BackWall-Metal3 +41=BackWall-Metal2 +42=BackWall-Metal3 +43=BackWall-Metal4 +44=BackWall-Slime1 +45=BackWall-Concrete1 +46=BackWall-Metal4 +47=BackWall-Tiles3 +48=BackWall-Unknown1 +49=BackWall-Stripes +50=Wall-Bricks1 +51=Wall-Bricks2 +52=Wall-Concrete1 +53=Wall-Concrete2 +54=Wall-Concrete3 +55=Wall-Concrete4 +56=Wall-Concrete5 +57=Wall-Industrial1 +58=Wall-Concrete2 +59=Wall-Metal3 +60=Wall-Stripes +61=Wall-Unknown1 +62=Wall-Unknown2 +63=Wall-Structure +64=Wall-Smooth2 +65=WeakWall-Bricks1 +66=WeakWall-Bricks2 +67=WeakWall-Concrete1 +68=WeakWall-Concrete2 +69=WeakWall-Concrete3 +70=WeakWall-Concrete4 +71=WeakWall-Concrete5 +72=WeakWall-Industrial1 +73=WeakWall-Metal2 +74=WeakWall-Metal3 +75=WeakWall-Metal4 +76=WeakWall-Unknown1 +77=WeakWall-Unknown2 +78=WeakWall-Structure +79=WeakWall-Smooth2 +80=Rough-Bricks1 +81=Rough-Concrete2 +82=Rough-Concrete4 +83=BackWall-Metal2 +84=Rough-Unknown1 +85=Rough-Unknown2 +86=BackWall-Stripes +87=Wall-Concrete2 +88=Ore-Structure +89=Snow-Spots +90=Sulphur-Swirl +91=Vehicle-Smooth +92=Acid-Liquid +93=Ashes-Spots +94=BackWall-Smooth +95=BackWall-Grid2 +96=Rain-Liquid +97=Rock-Rough +98=Rough-Smooth +99=Coal-Swirl +100=Sand-Smooth2 +101=Wall-Bricks2 +102=Tunnel-Smooth2 +103=Wall-Smooth +104=WeakWall-Smooth diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/RadioStatic.wav b/Hazard.c4f/DEST_EpicVoltage.c4s/RadioStatic.wav new file mode 100644 index 00000000..fae03a0d Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/RadioStatic.wav differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Scenario.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Scenario.txt new file mode 100644 index 00000000..6df1f8d4 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Scenario.txt differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Script.c b/Hazard.c4f/DEST_EpicVoltage.c4s/Script.c new file mode 100644 index 00000000..eb1a7a6d --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Script.c @@ -0,0 +1,367 @@ +/*-- "Mal endlich 'ne gescheite Map mit Fahrzeugen!" --*/ + +#strict + +static Flags; + +protected func Initialize() +{ + //Gegenstände + SetMap(); + PlaceWeapons(); + + SetSkyParallax(0, 20, 12); + Flags = CreateArray(3); // Index 0 wird nicht benutzt +} + +private func xpos(x,i) +{ + if(!i) var dir = 1; + else dir = -1; + return 3040 * i + dir * x; +} + +protected func SetMap(i) { + + CreateObject(PSGN,580,510)->SetGraphics("HV"); + CreateObject(PSGN,2455,510)->SetGraphics("XPower"); + + CreateObject(HA4K,1520,441,-1); + CreateObject(HA4K,1520,601,-1); + CreateObject(LADR,1521,697,-1)->Set(33); + + CreateObject(FLAK,1522,390,-1)->SetPhase(18); + + CreateObject(RAI1,354,240,-1)->SetRail([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4],1); + CreateObject(RAI1,1002,430,-1)->SetRail([0, 1, 1, 1, 1, 1, 4],1); + CreateObject(RAI1,1420,440,-1)->SetRail([0, 1, 1, 1, 4],1); + CreateObject(RAI1,2521,240,-1)->SetRail([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4],1); + CreateObject(RAI1,1942,430,-1)->SetRail([0, 1, 1, 1, 1, 1, 4],1); + CreateObject(RAI1,1560,440,-1)->SetRail([0, 1, 1, 1, 4],1); + + for(var i=0; i<2; ++i) + { + //Rampen, fein säuberlich von links nach rechts. + DrawMaterialQuad("Wall-Concrete1",xpos(340,i),522,xpos(370,i),510,xpos(370,i),522,xpos(355,i),522,true); + DrawMaterialQuad("Wall-Concrete1",xpos(481,i),522,xpos(451,i),510,xpos(451,i),522,xpos(456,i),522,true); + + + //Warps + CreateObject(AWRP,xpos(580,i),615,-1)->Set(xpos(605,i),410); + + // Generatoren + CreateObject(GNR2,xpos(420,i),700,-1)->TurnOn(); + + //Basis, Türen und Lifts + var a; + var b; + CreateObject(CRAT,xpos(560,i),430,-1); + CreateObject(SLDR,xpos(270,i),490,-1); + CreateObject(SLDR,xpos(275,i),410,-1); + CreateObject(SLDR,xpos(1485,i),440,-1); + CreateObject(SLDR,xpos(275,i),240,-1); + CreateObject(SLDR,xpos(345,i),240,-1)->SetSwitchLock(i, true); + CreateObject(SLDR,xpos(275,i),700,-1); + + CreateObject(RADR,xpos(240,i),150,-1); + CreateObject(FENC,xpos(240,i),150,-1); + + CreateObject(HA4K,xpos(860,i),561,-1); + CreateObject(HA4K,xpos(1040,i),431,-1); + CreateObject(HA4K,xpos(470,i),411,-1); + + CreateObject(LADR,xpos(476,i),476,-1)->Set(8); + CreateObject(LADR,xpos(566,i),670,-1)->Set(6); + CreateObject(LADR,xpos(856,i),620,-1)->Set(7); + + CreateObject(SLDR,xpos(285,i),340,-1)->SetSwitchLock(i, true); + CreateObject(HNG2,xpos(630,i),520,-1)->SetSwitchLock(i, true); + + CreateObject(LFTP,xpos(235,i),533,-1)->SetLimits(265,780); + + //Deko außerhalb der Basis + CreateObject(STDR,xpos(1503,i),520,-1); + CreateObject(LADR,xpos(1046,i),501,-1)->Set(10); + CreateObject(FENC,xpos(1490,i),771,-1); + CreateObject(WNDW,xpos(645,i),440)->SetDir(!i); + CreateObject(WNDW,xpos(1398,i),531,-1)->SetDir(i); + + //Alarmlichter + CreateObject(ALGH,xpos(420,i),290,-1)->SetR(180); + CreateObject(ALGH,xpos(314,i),460,-1)->SetR(180); + CreateObject(ALGH,xpos(542,i),460,-1)->SetR(180); + CreateObject(ALGH,xpos(340,i),580,-1)->SetR(180); + CreateObject(ALGH,xpos(480,i),580,-1)->SetR(180); + + /*--Selbstschussanlagen werden jetzt in ChooserFinished gebaut--*/ + + //Waffen + CreateObject(PRCA,xpos(605,i),340,-1)->SetPhase(26-i*13); + + // bäume + CreateObject(TRE4,xpos(1136,i),415,-1); + CreateObject(TRE4,xpos(901,i),563,-1); + CreateObject(TRE4,xpos(1140,i),575,-1); + CreateObject(TRE4,xpos(1172,i),583,-1); + CreateObject(TRE4,xpos(1293,i),582,-1); + CreateObject(TRE4,xpos(1314,i),592,-1); + CreateObject(TRE4,xpos(1399,i),602,-1); + CreateObject(TRE4,xpos(1356,i),605,-1); + } +} + +public func SetWares(object wp1) +{ + wp1->RemoveWare(); + wp1->AddWare(PIWP,-1); + wp1->AddWare(PGWP,-1); + wp1->AddWare(FTWP,-1); + wp1->AddWare(GLWP,-1); + wp1->AddWare(KRFL,-1); + wp1->AddWare(KSLM,-1); + wp1->AddWare(HARM,-1); + wp1->AddWare(MINE,-1); + wp1->AddWare(MEZL,-1); + wp1->AddWare(ENWP,-1); + wp1->AddWare(MIWP,-1); + wp1->AddWare(BZWP,-1); + wp1->AddWare(KRFL,-1); + wp1->AddWare(AIRS,-1); + wp1->AddWare(MEDI,-1); + wp1->AddWare(HSHD,-1); + wp1->AddWare(JTPK,-1); + wp1->AddWare(DRSU,-1); + wp1->AddWare(KLAS,-1); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + CreateObject(CCP1,1465,520,-1)->Set(5); + + var wp = FindObject(WPCH); + if(wp) + { + SetWares(wp); + + //Waffenautomaten + Füllung + var wp3 = CreateObject(WPVM,1575,520,-1); + + wp3->AddWare(FTWP,-1); + wp3->AddWare(KSLM,-1); + wp3->AddWare(MINE,-1); + wp3->AddWare(MEZL,-1); + wp3->AddWare(ENWP,-1); + wp3->AddWare(AIRS,-1); + wp3->AddWare(NVDN,-1); + wp3->AddWare(HSHD,-1); + wp3->AddWare(MEDI,-1); + } + + if(FindObject(GCTF)) + { + for(var i=0; iSet(2+i*2); + CreateObject(CCP1,xpos(305,i),240,-1)->Set(1+i*2); + + CreateObject(TANK,xpos(410,i),510,-1); + CreateObject(SHTL,xpos(463,i),245,-1); + + var wp1 = CreateObject(WPVM,xpos(405,i),410,-1); + SetWares(wp1); + } + else + { + PlaceVehicleSpawnpoint(TANK,xpos(410,i),500); + PlaceVehicleSpawnpoint(SHTL,xpos(463,i),235); + + var gas2 = FindObject(GAS2); + if(gas2) + { + gas2->AddTarget(FindObject(GNR2,xpos(400,i),650), false, 1000, false, i+1); + gas2->AddTarget(FindObject(HNG2,xpos(630,i),500), true, 500, false, i+1); + } + + // sentry guns if not ctf... + if(!FindObject(GCTF)) + { + var turret1 = CreateObject(SEGU,xpos(237,i),188,-1); + turret1->TurnOn(); + turret1->Arm(RGSA); + turret1->SetTeam(i+1); + if(gas2) gas2->AddTarget(turret1, true, 350, false, i+1); + + var turret2 = CreateObject(SEGU,xpos(408,i),462,-1); + turret2->TurnOn(); + turret2->Arm(RGSA); + turret2->SetTeam(i+1); + if(gas2) gas2->AddTarget(turret2, true, 350, false, i+1); + } + } + } +} + + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + if(!FindObject(CHOS)) + { + if(FindObject(GCTF)) + { + // Flagge setzen (wenn nicht schon erledigt + if(!Flags[iTeam]) + { + Flags[iTeam] = true; + InitTeamFlag(iTeam); + } + } + } + + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + if(iTeam == 1) return [RandomX(310,450), 400]; + if(iTeam == 2) return [RandomX(2590,2730), 400]; +} + +/*--Flaggenkrams--*/ +public func FlagReturned(int Team, object pClonk) +{ + Alarm(false, Team); +} + +public func FlagCaptured(int Team, int EnemyTeam, object pClonk) +{ + Alarm(true, Team); +} + +protected func InitTeamFlag(int iTeam) +{ + var x,y,color; + if(iTeam == 1) + { + x = 410; + y = 700; + color = RGB(255,255,0); + } + if(iTeam == 2) + { + x = 2630; + y = 700; + color = RGB(0,255,255); + } + CreateFlag(iTeam, x, y, GetTeamColor(iTeam)); +} + +public func Alarm(bool alarm, int Team) +{ + var x, width = LandscapeWidth()/2; + if(Team == 1) x = 0; + if(Team == 2) x = LandscapeWidth()/2; + + var alarmobj; + while(alarmobj = FindObject(ALGH,x,0,width,LandscapeHeight(),0,0,0,0,alarmobj)) + { + if(alarm) alarmobj -> TurnOn(); + else alarmobj -> TurnOff(); + } +} + +/* Muni und Bonus */ + +public func PlaceWeapons() +{ + PlaceSpawnpoint(STAP,1452,429); + PlaceSpawnpoint(GRAP,1590,429); + PlaceBonusSpawnpoint([MNYB],1520,699,1500); + PlaceSpawnpoint(MINE,1520,429); + PlaceSpawnpoint(GSAP,1570,589); + PlaceSpawnpoint(GGWP,1505,760); + PlaceSpawnpoint(ENAP,1535,760); + PlaceSpawnpoint(JTPK,1590,590); + PlaceSpawnpoint(HSHD,1470,510); + PlaceSpawnpoint(KLAS,1335,740); + PlaceSpawnpoint(SMIN,1705,740); + + for(var i=0; i<2; ++i) + { + PlaceSpawnpoint(MEZL,xpos(305,i),140); + PlaceSpawnpoint(MIAP,xpos(370,i),229); + PlaceSpawnpoint(GLWP,xpos(295,i),399); + PlaceSpawnpoint(GRAP,xpos(315,i),399); + PlaceSpawnpoint(MIAP,xpos(335,i),399); + PlaceSpawnpoint(ENAP,xpos(355,i),399); + PlaceSpawnpoint(ENWP,xpos(445,i),399); + PlaceSpawnpoint(GRAP,xpos(335,i),509); + PlaceSpawnpoint(MIWP,xpos(580,i),690); + PlaceSpawnpoint(STAP,xpos(550,i),690); + PlaceSpawnpoint(MEDI,xpos(330,i),330); + PlaceSpawnpoint(AIRS,xpos(530,i),220); + PlaceSpawnpoint(HARM,xpos(600,i),420); + PlaceSpawnpoint(PGWP,xpos(565,i),510); + PlaceSpawnpoint(STAP,xpos(595,i),510); + PlaceSpawnpoint(LMIN,xpos(290,i),590); + PlaceSpawnpoint(KRFL,xpos(470,i),330); + PlaceSpawnpoint(KSLM,xpos(510,i),420); + PlaceSpawnpoint(MIAP,xpos(1060,i),419); + PlaceSpawnpoint(BZWP,xpos(1080,i),420); + PlaceSpawnpoint(DRSU,xpos(1070,i),510); + PlaceSpawnpoint(FTWP,xpos(1220,i),550); + PlaceSpawnpoint(GSAP,xpos(1250,i),550); + + } +} + +protected func Script10() { + + var alarm1 = false; + var alarm2 = false; + + for(var obj in FindObjects(Find_InRect(0,0,600,LandscapeHeight()),Find_OCF(OCF_CrewMember))) + { + if(GetPlayerTeam(GetOwner(obj)) != 1) alarm1 = true; + } + for(var obj in FindObjects(Find_InRect(2440,0,600,LandscapeHeight()),Find_OCF(OCF_CrewMember))) + { + if(GetPlayerTeam(GetOwner(obj)) != 2) alarm2 = true; + } + + Alarm(alarm1,1); + Alarm(alarm2,2); + goto(0); +} \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Sky.jpg b/Hazard.c4f/DEST_EpicVoltage.c4s/Sky.jpg new file mode 100644 index 00000000..026fd5e4 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Sky.jpg differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/StringTblDE.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/StringTblDE.txt new file mode 100644 index 00000000..d4513930 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/StringTblDE.txt @@ -0,0 +1,2 @@ +Red=HighVoltage AG +Blue=ExtremePower GmbH diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/StringTblUS.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/StringTblUS.txt new file mode 100644 index 00000000..b533cca1 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/StringTblUS.txt @@ -0,0 +1,2 @@ +Red=HighVoltage Inc. +Blue=ExtremePower Corp. diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Actmap.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Actmap.txt new file mode 100644 index 00000000..c0ee4866 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Actmap.txt @@ -0,0 +1,63 @@ +[Action] +Name=Work +Procedure=FLOAT +Delay=1 +Length=29 +FacetBase=1 +Facet=0,114,114,38,55,49 +NextAction=Work +Sound=Energy +PhaseCall=Working + +[Action] +Name=Start1 +Procedure=FLOAT +Delay=3 +Length=29 +FacetBase=1 +Facet=0,114,114,38,55,49 +NextAction=Start2 +Sound=Energy + +[Action] +Name=Start2 +Procedure=FLOAT +Delay=2 +Length=29 +FacetBase=1 +Facet=0,114,114,38,55,49 +NextAction=Work +Sound=Energy +EndCall=Started + +[Action] +Name=End2 +Procedure=FLOAT +Delay=2 +Length=29 +FacetBase=1 +Facet=0,114,114,38,55,49 +NextAction=End1 +Sound=Energy + +[Action] +Name=End1 +Procedure=FLOAT +Delay=3 +Length=29 +FacetBase=1 +Facet=0,114,114,38,55,49 +NextAction=Offline +Sound=Energy +EndCall=Ended + +[Action] +Name=Offline +Procedure=FLOAT +Delay=0 +Length=1 +FacetBase=1 +Facet=0,114,114,38,55,49 +NextAction=Offline + + diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DefCore.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DefCore.txt new file mode 100644 index 00000000..968846c2 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=GNR2 +Version=4,9,8,2 +Name=Generator +Category=C4D_Structure +MaxUserSelect=1 +Width=243 +Height=114 +Offset=-122,-57 +Vertices=2 +VertexX=-120,120 +VertexY=56,56 +VertexFriction=500,500 +Value=750 +Mass=750 +Components=METL=20 +Picture=243,0,243,114 +StretchGrowth=1 +IncompleteActivity=1 \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DescDE.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DescDE.txt new file mode 100644 index 00000000..dde49a66 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DescDE.txt @@ -0,0 +1 @@ +Effiziente Gerätschaft, wenn es um billigen Strom geht. \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DescUS.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DescUS.txt new file mode 100644 index 00000000..de8f0319 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/DescUS.txt @@ -0,0 +1 @@ +Supplies a station with power. \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Graphics.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Graphics.png new file mode 100644 index 00000000..04ef7552 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Graphics.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Names.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Names.txt new file mode 100644 index 00000000..0f2c2a79 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Generator +US:Generator \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Script.c b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Script.c new file mode 100644 index 00000000..287c6cfc --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Generator.c4d/Script.c @@ -0,0 +1,19 @@ +#strict +#include GNRT + +local lastMalfunction; + + +public func Damage() +{ + var eff = GetEffect("DEST_TargetCheck",this); + var maxdamage; + if(eff) maxdamage = EffectVar(0, this, eff); + else maxdamage = 800; + if(FrameCounter() - lastMalfunction > 10) + { + lastMalfunction = FrameCounter(); + Malfunc(); + } + if(GetDamage() >= maxdamage) Explode(70); +} diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/DefCore.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/DefCore.txt new file mode 100644 index 00000000..3409eea1 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=_SXT +Name=Abort +Version=4,9,5 +Category=1 +Picture=0,0,32,32 \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/Graphics.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/Graphics.png new file mode 100644 index 00000000..2a037b16 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/Graphics.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/Names.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/Names.txt new file mode 100644 index 00000000..f5080c58 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Cancel.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Abbrechen +US:Abort \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DefCore.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DefCore.txt new file mode 100644 index 00000000..65784c1f --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=CCP1 +Version=4,9,8,2 +Name=Panel +Category=C4D_Structure +MaxUserSelect=1 +Width=38 +Height=24 +Offset=-19,-12 +Vertices=2 +VertexY=11,-11 +VertexFriction=100,100 +Value=750 +Mass=800 +Components=METL=15 +Picture=0,24,64,64 +Grab=2 \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DescDE.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DescDE.txt new file mode 100644 index 00000000..3e7da128 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DescDE.txt @@ -0,0 +1 @@ +Für allerei Aufgaben einer Kommandozentrale. Und tatsächlich benutzbar. \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DescUS.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DescUS.txt new file mode 100644 index 00000000..123f3b42 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/DescUS.txt @@ -0,0 +1 @@ +Used to manage all jobs in the command center. And works, really. \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Graphics.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Graphics.png new file mode 100644 index 00000000..1cd8fdc7 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Graphics.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Names.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Names.txt new file mode 100644 index 00000000..217efb5f --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Panel +US:Panel \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Script.c b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Script.c new file mode 100644 index 00000000..6ca7b105 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/Script.c @@ -0,0 +1,137 @@ +/*-- Fahrzeugbesteller --*/ + +#strict 2 + +local location; +local controller; + +local objId; +local team; +local spawnX, spawnY; + +protected func Set(iType) { + location = iType; + + if(location == 1) + { + objId = SHTL; + team = 1; + spawnX = 293; + spawnY = 245; + } + if(location == 2) + { + objId = TANK; + team = 1; + spawnX = 240; + spawnY = 510; + } + if(location == 3) + { + objId = SHTL; + team = 2; + spawnX = 2770; + spawnY = 245; + } + if(location == 4) + { + objId = TANK; + team = 2; + spawnX = 2800; + spawnY = 510; + } + if(location == 5) + { + objId = HNG2; + team = -1; + spawnX = 1520; + spawnY = 600; + } + + SetGraphics(0, 0, objId, GFX_Overlay, GFXOV_MODE_IngamePicture); + SetObjDrawTransform(1000,0,0,0,1000,-85000,0,GFX_Overlay); +} + +private func CheckTeam() +{ + if(team == -1) return true; + return GetPlayerTeam(controller) == team; +} + +public func Grabbed(object pByObject, bool fGrab) +{ + if(fGrab) + ControlUp(pByObject); + return(1); +} + +public func ControlUp(dis) { + controller = GetController(dis); + + if(location == 5) + CreateDoorMenu(dis); + else + CreateBuyMenu(dis); +} + +public func CreateBuyMenu(dis) { + if(!dis) return false; + if(!CheckTeam()) + { + Sound("Error"); + return false; + } + CreateMenu(CPP1, dis, this, C4MN_Extra_Value); + + AddMenuItem(Format("$Buy$",Format("%s", GetName(0, objId))),"BuyStuff",objId,dis,0,0); + AddMenuItem(GetName(0, _SXT),"Abort",_SXT,dis,0); +} + +public func CreateDoorMenu(dis) { + if(!dis) return false; + + CreateMenu(CPP1, dis, this, C4MN_Extra_Value); + + AddMenuItem("$BlcLeft$","BuyDoor",objId,dis,0,-80); + AddMenuItem("$BlcRight$","BuyDoor",objId,dis,0,+80); + AddMenuItem(GetName(0, _SXT),"Abort",_SXT,dis,0); +} + +private func BuyDoor(a, xoffs) +{ + var obj = BuyStuff(a, xoffs); + if(!obj) return; + + var konsole = FindObject(SWTH,AbsX(spawnX+xoffs*3/4),AbsY(spawnY-10)); + konsole->Set(obj); + obj->Lock(true); + var team = 2; + if(xoffs > 0) team = 1; + obj->SetTeam(team); + var gas = FindObject(GAS2); + if(gas) + { + gas->AddTarget(obj, true, 500, false, team); + } +} + +private func BuyStuff(a, xoffs) +{ + if(GetWealth(controller) >= GetValue(0,objId)) + { + if(!FindObject2(Find_ID(objId),Find_AtPoint(AbsX(spawnX)+xoffs, AbsY(spawnY)-10))) + { + var pObj = CreateObject(objId, AbsX(spawnX)+xoffs, AbsY(spawnY),-1); + VehicleSpawnEffect(pObj); + DoWealth(controller,-GetValue(0,objId)); + Sound("RadioStatic"); + Sound("Cash"); + return pObj; + } + } + Sound("Error"); +} + +public func Abort() { + Sound("RadioStatic"); +} diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/StringTblDE.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/StringTblDE.txt new file mode 100644 index 00000000..04072f7b --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/StringTblDE.txt @@ -0,0 +1,3 @@ +BlcLeft=Blockade links +BlcRight=Blockade rechts +Buy=%s kaufen \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/StringTblUS.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/StringTblUS.txt new file mode 100644 index 00000000..456e70a7 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Panel1.c4d/StringTblUS.txt @@ -0,0 +1,3 @@ +BlcLeft=Blockade left +BlcRight=Blockade right +Buy=Buy %s \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/DefCore.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/DefCore.txt new file mode 100644 index 00000000..9b911a03 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=PSGN +Version=4,9,8,2 +Name=Sign +Category=C4D_StaticBack +Width=50 +Height=50 +Offset=-25,-25 +Picture=0,0,50,50 +StretchGrowth=1 diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/Graphics.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/Graphics.png new file mode 100644 index 00000000..ca2e5275 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/Graphics.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/GraphicsHV.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/GraphicsHV.png new file mode 100644 index 00000000..add9477a Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/GraphicsHV.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/GraphicsXPower.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/GraphicsXPower.png new file mode 100644 index 00000000..1ea22a00 Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/GraphicsXPower.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/Names.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/Names.txt new file mode 100644 index 00000000..ed609de0 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Stuff.c4d/Signs.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Gefahrenschild +US:Hazard sign diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/PreventChop.c b/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/PreventChop.c new file mode 100644 index 00000000..4e1e58cd --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/PreventChop.c @@ -0,0 +1,9 @@ +/*-- Prevent Chop --*/ + +#strict +#appendto TREE + +protected func Damage() +{ + return(1); +} diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/guns.c b/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/guns.c new file mode 100644 index 00000000..3cb9c04b --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/guns.c @@ -0,0 +1,12 @@ + +#strict 2 +#appendto PRCA +#appendto FLAK + +public func Damage() { + return; +} + +public func MaxDamage() { return 1000000; } + +public func IsBulletTarget() { return false; } \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/targets.c b/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/targets.c new file mode 100644 index 00000000..95851e7a --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/System.c4g/targets.c @@ -0,0 +1,25 @@ +/*-- Ziele --*/ + +#strict 2 +#appendto SEGU +#appendto GNR2 + +public func MaxDamage() { + var eff = GetEffect("DEST_TargetCheck",this); + if(!eff) return _inherited(...); + + var maxdamage = EffectVar(0, this, eff); + if(!maxdamage) maxdamage = 220; + return maxdamage; +} + +public func IsBulletTarget() { + var eff = GetEffect("DEST_TargetCheck",this); + if(!eff) return _inherited(...); + return true; +} +public func IgnoreFriendlyFire() { + var eff = GetEffect("DEST_TargetCheck",this); + if(!eff) return _inherited(...); + return true; +} \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Teams.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Teams.txt new file mode 100644 index 00000000..00532517 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Teams.txt @@ -0,0 +1,13 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=$Red$ + Color=16776960 + + [Team] + id=2 + Name=$Blue$ + Color=65280 \ No newline at end of file diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Title.png b/Hazard.c4f/DEST_EpicVoltage.c4s/Title.png new file mode 100644 index 00000000..fd5d315c Binary files /dev/null and b/Hazard.c4f/DEST_EpicVoltage.c4s/Title.png differ diff --git a/Hazard.c4f/DEST_EpicVoltage.c4s/Title.txt b/Hazard.c4f/DEST_EpicVoltage.c4s/Title.txt new file mode 100644 index 00000000..c1670393 --- /dev/null +++ b/Hazard.c4f/DEST_EpicVoltage.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:DEST - Epic Voltage +US:DEST - Epic Voltage diff --git a/Hazard.c4f/DM_Baldoon.c4s/Alarm.wav b/Hazard.c4f/DM_Baldoon.c4s/Alarm.wav new file mode 100644 index 00000000..c77653b4 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Alarm.wav differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Author.txt b/Hazard.c4f/DM_Baldoon.c4s/Author.txt new file mode 100644 index 00000000..adf1674d --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Author.txt @@ -0,0 +1 @@ +Marcel Wolf (Wolli) \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/DescDE.rtf b/Hazard.c4f/DM_Baldoon.c4s/DescDE.rtf new file mode 100644 index 00000000..6e15cf8b Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/DescUS.rtf b/Hazard.c4f/DM_Baldoon.c4s/DescUS.rtf new file mode 100644 index 00000000..dc822ce5 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DefCore.txt new file mode 100644 index 00000000..204cbd84 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=_AMB +Version=4,9,8,2 +Name=Ambience +Category=C4D_StaticBack +MaxUserSelect=10 +Timer=1 +TimerCall=Sounding +Width=6 +Height=6 +Offset=-3,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=10 +Mass=10 +Components=_AMB=1 +Picture=6,0,64,64 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DescDE.txt new file mode 100644 index 00000000..e0aa4952 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DescDE.txt @@ -0,0 +1 @@ +Umgebungseffekte. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DescUS.txt new file mode 100644 index 00000000..056c7691 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/DescUS.txt @@ -0,0 +1 @@ +Surrounding effects. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Graphics.png new file mode 100644 index 00000000..f157ae48 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Names.txt new file mode 100644 index 00000000..9ca0ca7c --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ambience +US:Ambience \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Rain.wav b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Rain.wav new file mode 100644 index 00000000..bc1abd4d Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Rain.wav differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Script.c new file mode 100644 index 00000000..9a692f71 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Script.c @@ -0,0 +1,37 @@ +/*-- Ambience --*/ + +#strict + +local iSky; +local iReset; +local bBusy; +static a; + +func Initialize() { + AddEffect("Raining",0,1,1,this()); + return(1); +} + +func Sounding() { + if(iSky<6) bBusy=0; + if(iSky>5) {bBusy=1; iSky=iSky-iReset; if(!Random(256-iSky)) iSky=iSky=RandomX(192,224);} + + SetSkyAdjust(RGBa(255,255,255,iSky),RGB(255,255,255)); + + if(!Random(350)) { + + /*a=FindObjects(Find_Func("IsInfluenced")); + var count=0; + while(count<22) {a[count]->LooseLight(); count++;}*/ + + if(bBusy) return(0); + iReset=RandomX(3,5); + Sound("Thunders*",1); + iSky=RandomX(208,240); + + } +} + +func FxRainingTimer() { + Sound("Rain",1); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Thunders1.wav b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Thunders1.wav new file mode 100644 index 00000000..0d4f247f Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Thunders1.wav differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Thunders2.wav b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Thunders2.wav new file mode 100644 index 00000000..02af2fec Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Ambience.c4d/Thunders2.wav differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DefCore.txt new file mode 100644 index 00000000..61b24d7e --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=_DRA +Version=4,9,8,2 +Name=Abfluss +Category=C4D_StaticBack +MaxUserSelect=10 +Timer=2 +TimerCall=Drain +Width=6 +Height=6 +Offset=-3,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=10 +Mass=10 +Components=_DRA=1 +Picture=6,0,64,64 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DescDE.txt new file mode 100644 index 00000000..17f932ab --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DescDE.txt @@ -0,0 +1 @@ +Saugt Flüssigkeiten ab. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DescUS.txt new file mode 100644 index 00000000..a5ba21ef --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/DescUS.txt @@ -0,0 +1 @@ +Drains liquids. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Graphics.png new file mode 100644 index 00000000..f157ae48 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Names.txt new file mode 100644 index 00000000..9d0a16f5 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Abfluss +US:Drain \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Script.c new file mode 100644 index 00000000..ecdcf280 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Drain.c4d/Script.c @@ -0,0 +1,12 @@ +/*-- Abfluss --*/ + +#strict + +func Initialize() { + + return(1); +} + +func Drain() { + if(!ExtractMaterialAmount(0,0,Material("Acid"),40)) {return(RemoveObject());} +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Names.txt new file mode 100644 index 00000000..8b40bdbf --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Effekte +US:Effects diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DefCore.txt new file mode 100644 index 00000000..a60f920a --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=_RAN +Version=4,9,8,2 +Name=Rain +Category=C4D_StaticBack +MaxUserSelect=10 +Timer=1 +TimerCall=Niederschlag +Width=6 +Height=6 +Offset=-3,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=10 +Mass=10 +Components=_RAN=1 +Picture=8,0,64,64 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DescDE.txt new file mode 100644 index 00000000..95d6bb8c --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DescDE.txt @@ -0,0 +1 @@ +Niederschlag. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DescUS.txt new file mode 100644 index 00000000..d84bb488 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/DescUS.txt @@ -0,0 +1 @@ +Precipitation. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Graphics.png new file mode 100644 index 00000000..1d85b9ff Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Names.txt new file mode 100644 index 00000000..ae7d5da6 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Niederschalg +US:Precipitation \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Script.c new file mode 100644 index 00000000..bc5e845b --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Precipitation.c4d/Script.c @@ -0,0 +1,13 @@ +/*-- Precipitation --*/ + +#strict + +func Niederschlag() { + var count = 1; + while(count) {Precipitation("Rain"); count--;} + } + +func Precipitation(mat) { + CastPXS(mat,1,1,Random(LandscapeWidth()),0); + return(1); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DefCore.txt new file mode 100644 index 00000000..b14706a4 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=_QUE +Version=4,9,8,2 +Name=Quelle +Category=C4D_StaticBack +MaxUserSelect=10 +Timer=4 +TimerCall=WaterCast +Width=6 +Height=6 +Offset=-3,-3 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=10 +Mass=10 +Components=_QUE=1 +Picture=6,0,64,64 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DescDE.txt new file mode 100644 index 00000000..54c7837b --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DescDE.txt @@ -0,0 +1 @@ +Erzeugt Wasser. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DescUS.txt new file mode 100644 index 00000000..a43cc0e5 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/DescUS.txt @@ -0,0 +1 @@ +Creates water. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Graphics.png new file mode 100644 index 00000000..f157ae48 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Names.txt new file mode 100644 index 00000000..789fc7f4 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Quelle +US:Spring \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Script.c new file mode 100644 index 00000000..e8a36a52 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Quelle.c4d/Script.c @@ -0,0 +1,12 @@ +/*-- Quelle --*/ + +#strict + +func Initialize() { + + return(1); +} + +func WaterCast() { + CastPXS("Water",2,5,0,0); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/ActMap.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/ActMap.txt new file mode 100644 index 00000000..a7e71988 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/ActMap.txt @@ -0,0 +1,7 @@ +[Action] +Name=Sparkle +Delay=3 +Facet=0,0,5,5 +Length=3 +EndCall=Process +NextAction=Sparkle diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/DefCore.txt new file mode 100644 index 00000000..8d7a81b5 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=SPRK +Version=4,9,8,2 +Name=Spark +Category=C4D_Vehicle +Width=5 +Height=5 +Offset=-2,-2 +Vertices=1 +VertexFriction=100 +Mass=1 +Picture=0,0,5,5 +StretchGrowth=1 +NoBurnDecay=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Graphics.png new file mode 100644 index 00000000..3642c2ad Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Names.txt new file mode 100644 index 00000000..0d4ce1af --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Funke +US:Spark diff --git a/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Script.c new file mode 100644 index 00000000..518471b5 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Effekte.c4d/Spark.c4d/Script.c @@ -0,0 +1,29 @@ +/*-- Funke --*/ + +#strict + +protected func Process() +{ + if (Random(10)+10 < GetActTime()) DoCon(-25); + return(1); +} + +protected func Completion() +{ + DoCon(Random(100)); + SetAction("Sparkle"); + return(1); +} + +protected func Hit() +{ + return(DoCon(-50)); +} + +/* Globaler Funktionsaufruf */ + +global func Sparkle(int iAmount, int iX, int iY) +{ + CastObjects(SPRK, iAmount/3 +2, iAmount, iX, iY); + return(1); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Icon.png b/Hazard.c4f/DM_Baldoon.c4s/Icon.png new file mode 100644 index 00000000..b1a98afc Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Icon.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Info.txt b/Hazard.c4f/DM_Baldoon.c4s/Info.txt new file mode 100644 index 00000000..3765950d --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Info.txt @@ -0,0 +1,28 @@ +DM - Baldoon v1.0b +----------------- + +Vielen Dank an: +----------------- + +- DarkEagle für den Betatest + +- Clonkonaut +und +- Newton für Verbesserungsvorschläge und Tipps + +----------------- + +Die vorliegende Version des Szenarios wurde mit/für Clonk Rage 4.96.4 [236] entwickelt und getestet. + +Ebenfalls getestet für: + + - CR 4.96.5 [237] + +----------------- + +Es handelt sich um einen Wettbewerbsbeitrag für den "HazardArena2007" - Gestaltungswettbewerb. + +----------------- + +Marcel Wolf +29.05.07 - 00:41 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Map.bmp b/Hazard.c4f/DM_Baldoon.c4s/Map.bmp new file mode 100644 index 00000000..4cec3ba8 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Map.bmp differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/BackWallBright.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/BackWallBright.c4m new file mode 100644 index 00000000..4987bdd0 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/BackWallBright.c4m @@ -0,0 +1,6 @@ +[Material] +Name=BackWallBright +Color=112,112,112,112,112,112,112,112,112 +Shape=0 +OverlayType=2 +Placement=1 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/BackWallShape.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/BackWallShape.c4m new file mode 100644 index 00000000..f24d466c --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/BackWallShape.c4m @@ -0,0 +1,6 @@ +[Material] +Name=BackWallShape +Color=59,59,59,59,59,59,59,59,59 +Shape=2 +OverlayType=2 +Placement=1 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/DescDE.rtf b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/DescDE.rtf new file mode 100644 index 00000000..5b6d556c Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/DescDE.rtf differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/DescUS.rtf b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/DescUS.rtf new file mode 100644 index 00000000..070a7000 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/DescUS.rtf differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Earth.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Earth.c4m new file mode 100644 index 00000000..a2cabeca --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Earth.c4m @@ -0,0 +1,12 @@ +[Material] +Name=Earth +Color=103,83,55,123,99,67,147,115,83 +Shape=2 +Density=50 +Friction=80 +MaxAirSpeed=100 +MaxSlide=1 +Corrode=75 +Soil=1 +Placement=30 +TextureOverlay=Smooth \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/FlyAshes.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/FlyAshes.c4m new file mode 100644 index 00000000..b2146a7a --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/FlyAshes.c4m @@ -0,0 +1,23 @@ +[Material] +Name=FlyAshes +Color=85,78,60,82,80,78,100,96,90 +Shape=2 +Density=50 +Friction=80 +DigFree=1 +BlastFree=1 +Dig2Object=ASHS +Dig2ObjectRatio=200 +Dig2ObjectRequest=1 +Blast2PXSRatio=10 +Instable=1 +MaxAirSpeed=25 +MaxSlide=1 +WindDrift=60 +Corrode=75 +Soil=1 +Placement=20 +TextureOverlay=Spots +PXSGfxSize=6 +PXSGfx=Ashes +PXSGfxRt=0,0,32,32,-16,-16 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/FlySand.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/FlySand.c4m new file mode 100644 index 00000000..8b48c09c --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/FlySand.c4m @@ -0,0 +1,20 @@ +[Material] +Name=FlySand +Color=224,200,140,224,212,136,236,232,148 +Shape=2 +Density=50 +Friction=80 +DigFree=1 +BlastFree=1 +Dig2Object=SAND +Dig2ObjectRatio=200 +Dig2ObjectRequest=1 +Blast2PXSRatio=10 +Instable=1 +MaxAirSpeed=20 +MaxSlide=1 +WindDrift=100 +Corrode=30 +Soil=1 +Placement=20 +TextureOverlay=Smooth2 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Ice.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Ice.c4m new file mode 100644 index 00000000..138bfd98 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Ice.c4m @@ -0,0 +1,22 @@ +[Material] +Name=Ice +Color=0,110,190,0,124,252,0,150,250 +Shape=1 +Density=50 +Friction=15 +DigFree=1 +BlastFree=1 +Blast2Object=ICE1 +Dig2Object=ICE1 +Dig2ObjectRatio=400 +Dig2ObjectRequest=1 +Blast2ObjectRatio=120 +MaxAirSpeed=100 +MaxSlide=1 +Corrode=60 +TempConvStrength=3 +AboveTempConvert=10 +AboveTempConvertDir=1 +AboveTempConvertTo=Water +Placement=21 +TextureOverlay=Sponge diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Snow.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Snow.c4m new file mode 100644 index 00000000..987673f8 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Snow.c4m @@ -0,0 +1,28 @@ +[Material] +Name=Snow +Color=230,230,230,240,240,240,250,250,250 +Shape=2 +Density=50 +Friction=40 +DigFree=1 +BlastFree=1 +Blast2PXSRatio=10 +Instable=1 +MaxAirSpeed=15 +MaxSlide=1 +WindDrift=70 +Corrode=60 +TempConvStrength=3 +InMatConvert=Water +InMatConvertTo=Water +InMatConvertDepth=5 +AboveTempConvert=5 +AboveTempConvertTo=Water +Placement=20 +TextureOverlay=Spots +PXSGfxSize=10 +PXSGfx=Snow +PXSGfxRt=0,0,16,16,-8,-8 +Dig2Object=SNWB +Dig2ObjectRatio=400 +Dig2ObjectRequest=1 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Stripes.png b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Stripes.png new file mode 100644 index 00000000..b88f0ea7 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Stripes.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/TexMap.txt b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/TexMap.txt new file mode 100644 index 00000000..c14f06dd --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/TexMap.txt @@ -0,0 +1,115 @@ +# Static Map Material/Texture Table +# Index +128 for underground materials + +# Original Materials: Range 1 - 15 +# Hazard Materials: Range 24 - 85 + +OverloadMaterials +OverloadTextures + +1=Tunnel-Smooth +2=Tunnel-Rough +3=Water-Liquid +4=Acid-Liquid2 +5=DuroLava-Liquid +6=Granite-Ridge +7=Sand-Swirl +8=FlySand-Smooth +9=Ashes-Swirl +10=FlyAshes-Smooth +11=Snow-Flare2 +12=Ice-Structure +13=Earth-Smooth +14=Earth-Rough +15=Rock-Ridge +16=Rock-Rough +17=Wall-Stripes +18=Acid-Liquid +19=DuroLava-Liquid +24=Water2-Liquid3 +25=BackWall-Bricks1 +26=BackWall-Bricks2 +27=BackWall-Column1 +28=BackWall-Concrete1 +29=BackWall-Concrete2 +30=BackWall-Concrete3 +31=BackWall-Concrete4 +32=BackWall-Concrete5 +33=BackWall-Grid1 +34=BackWall-Grid2 +35=BackWall-Industrial1 +36=BackWall-Industrial2 +37=BackWall-Industrial3 +38=BackWall-Laboratory1 +39=BackWall-Marble1 +40=BackWall-Metal1 +41=BackWall-Metal2 +42=BackWall-Metal3 +43=BackWall-Metal4 +44=BackWall-Slime1 +45=BackWall-Tiles1 +46=BackWall-Tiles2 +47=BackWall-Tiles3 +48=BackWall-Unknown1 +49=BackWall-Unknown2 +50=Wall-Bricks1 +51=Wall-Bricks2 +52=Wall-Concrete1 +53=Wall-Concrete2 +54=Wall-Concrete3 +55=Wall-Concrete4 +56=Wall-Concrete5 +57=Wall-Industrial1 +58=Wall-Metal2 +59=Wall-Metal3 +60=Wall-Metal4 +61=Wall-Unknown1 +62=Wall-Unknown2 +63=Wall-Structure +64=Wall-Smooth2 +65=WeakWall-Bricks1 +66=WeakWall-Bricks2 +67=WeakWall-Concrete1 +68=WeakWall-Concrete2 +69=WeakWall-Concrete3 +70=WeakWall-Concrete4 +71=WeakWall-Concrete5 +72=WeakWall-Industrial1 +73=WeakWall-Metal2 +74=WeakWall-Metal3 +75=WeakWall-Metal4 +76=WeakWall-Unknown1 +77=WeakWall-Unknown2 +78=WeakWall-Structure +79=WeakWall-Smooth2 +80=Rough-Bricks1 +81=Rough-Concrete2 +82=Rough-Concrete4 +83=Rough-Slime1 +84=Rough-Unknown1 +85=Rough-Unknown2 +86=BackWallShape-Bricks1 +87=BackWallShape-Bricks2 +88=BackWallShape-Column1 +89=BackWallShape-Concrete1 +90=BackWallShape-Concrete2 +91=BackWallShape-Concrete3 +92=BackWallShape-Concrete4 +93=BackWallShape-Concrete5 +94=BackWallShape-Grid1 +95=BackWallShape-Grid2 +96=BackWallShape-Industrial1 +97=BackWallShape-Industrial2 +98=BackWallShape-Industrial3 +99=BackWallShape-Laboratory1 +100=BackWallShape-Marble1 +101=BackWallShape-Metal1 +102=BackWallShape-Metal2 +103=BackWallShape-Metal3 +104=BackWallShape-Metal4 +105=BackWallShape-Slime1 +45=BackWall-Tiles1 +46=BackWall-Tiles2 +47=BackWall-Tiles3 +48=BackWall-Unknown1 +49=BackWall-Unknown2 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Tunnel.c4m b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Tunnel.c4m new file mode 100644 index 00000000..ec644192 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Material.c4g/Tunnel.c4m @@ -0,0 +1,7 @@ +[Material] +Name=Tunnel +Color=42,10,5,52,26,5,66,32,6 +Shape=3 +Placement=5 +TextureOverlay=Smooth2 +OverlayType=4 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Scenario.txt b/Hazard.c4f/DM_Baldoon.c4s/Scenario.txt new file mode 100644 index 00000000..af092a27 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Scenario.txt @@ -0,0 +1,60 @@ +[Head] +Icon=16 +Title=DM - Baldoon +Version=4,9,6,4 +MinPlayer=1 +Origin=Hazard.c4f\DM_Baldoon.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GDM_=5;GLMS=5;GTDM=10 +Rules=CHOS=1 + +[Player1] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=MWND=0;MWP2=0;MGWP=0;MVLC=0;RVLT=0;RMMG=0;MMTR=0;MLGT=0;MINV=0;MGHL=0;MGUP=0;MGDW=0;MFFW=0;MFFS=0;MBRG=0;MFFA=0;FRFS=0;EXTG=0;ETFL=0;MQKE=0;CMFG=0 + +[Player2] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=MWND=0;MWP2=0;MGWP=0;MVLC=0;RVLT=0;RMMG=0;MMTR=0;MLGT=0;MINV=0;MGHL=0;MGUP=0;MGDW=0;MFFW=0;MFFS=0;MBRG=0;MFFA=0;FRFS=0;EXTG=0;ETFL=0;MQKE=0;CMFG=0 + +[Player3] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=MWND=0;MWP2=0;MGWP=0;MVLC=0;RVLT=0;RMMG=0;MMTR=0;MLGT=0;MINV=0;MGHL=0;MGUP=0;MGDW=0;MFFW=0;MFFS=0;MBRG=0;MFFA=0;FRFS=0;EXTG=0;ETFL=0;MQKE=0;CMFG=0 + +[Player4] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=MWND=0;MWP2=0;MGWP=0;MVLC=0;RVLT=0;RMMG=0;MMTR=0;MLGT=0;MINV=0;MGHL=0;MGUP=0;MGDW=0;MFFW=0;MFFS=0;MBRG=0;MFFA=0;FRFS=0;EXTG=0;ETFL=0;MQKE=0;CMFG=0 + +[Landscape] +InEarth=BONE=2;LOAM=6;ROCK=8 +InEarthLevel=65,0,0,100 +Sky=Clouds1;Default +BottomOpen=1 +MapWidth=64,0,64,10000 +MapHeight=99,0,40,10000 +Amplitude=10,10,0,100 +Phase=50,50,0,100 +Period=10,10,0,100 +Random=20,20,0,100 +Liquid=Water-Smooth +LiquidLevel=20,30,0,100 +Layers=Rock=7;Rock-Ridge=7;Gold=7;Granite=4;Ore=3;Coal-Swirl=4;Water-Smooth=5;Oil-Smooth=5;Earth-Rough=50;Earth-Smooth2=50 +NewStyleLandscape=1 + +[Weather] +Climate=17,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Script.c new file mode 100644 index 00000000..258701f8 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Script.c @@ -0,0 +1,642 @@ +/*-- DM - Burgruine --*/ + +#strict + +static vent1,vent2; +static light1,light2,light3; +static aTeleporters; + +func Initialize() { + aTeleporters = CreateArray(); + + SetSkyParallax(0,15,0,0,0,SkyPar_Keep(),SkyPar_Keep()); + + //Lichter + CreateObject(CLGH,265,455,-1); + CreateObject(CLGH,585,405,-1); + CreateObject(CLGH,625,405,-1); + CreateObject(CLGH,235,315,-1); + CreateObject(CLGH,565,495,-1); + CreateObject(CLGH,685,535,-1); + CreateObject(CLGH,255,615,-1); + CreateObject(CLGH,305,615,-1); + CreateObject(CLGH,625,925,-1); + CreateObject(CLGH,675,925,-1); + CreateObject(CLGH,725,925,-1); + CreateObject(CLGH,445,465,-1); + CreateObject(CLGH,635,335,-1); + CreateObject(CLGH,635,265,-1); + CreateObject(CLGH,1015,355,-1); + CreateObject(CLGH,1575,365,-1); + CreateObject(CLGH,1785,315,-1); + CreateObject(CLGH,1465,115,-1); + CreateObject(CLGH,1725,585,-1); + CreateObject(CLGH,1725,655,-1); + CreateObject(CLGH,1915,565,-1); + CreateObject(CLGH,1545,685,-1); + CreateObject(LBGH,250,480,-1)->Set(40); + CreateObject(LBGH,350,480,-1)->Set(40); + CreateObject(LBGH,1580,250,-1); + CreateObject(LLGH,1670,930,-1); + CreateObject(LLGH,1890,930,-1); + CreateObject(LLGH,1615,390,-1); + CreateObject(LLGH,1635,390,-1); + CreateObject(LLGH,1615,450,-1); + CreateObject(LLGH,1635,450,-1); + CreateObject(LLGH,1615,510,-1); + CreateObject(LLGH,1635,510,-1); + CreateObject(LLGH,1615,570,-1); + CreateObject(LLGH,1635,570,-1); + CreateObject(LLGH,1615,630,-1); + CreateObject(LLGH,1635,630,-1); + CreateObject(LLGH,1615,690,-1); + CreateObject(LLGH,1635,690,-1); + + //Umwelt/Effektobjekte + CreateObject(SHRK,20,810,-1); + CreateObject(SHRK,120,830,-1); + CreateObject(_WEG,1380,380,-1); + SetCon(110,CreateObject(VINE,60,440,-1)); + SetCon(120,CreateObject(VINE,115,110,-1)); + SetCon(87,CreateObject(VINE,118,165,-1)); + SetCon(104,CreateObject(VINE,112,200,-1)); + SetCon(124,CreateObject(VINE,115,245,-1)); + SetCon(98,CreateObject(VINE,117,270,-1)); + SetCon(105,CreateObject(VINE,115,310,-1)); + SetCon(109,CreateObject(VINE,114,340,-1)); + SetCon(120,CreateObject(VINE,675,190,-1)); + SetCon(87,CreateObject(VINE,678,245,-1)); + SetCon(104,CreateObject(VINE,672,280,-1)); + SetCon(124,CreateObject(VINE,675,325,-1)); + SetCon(98,CreateObject(VINE,677,350,-1)); + SetCon(105,CreateObject(VINE,675,390,-1)); + SetCon(120,CreateObject(VINE,965,320,-1)); + SetCon(87,CreateObject(VINE,968,375,-1)); + SetCon(104,CreateObject(VINE,962,410,-1)); + SetCon(124,CreateObject(VINE,965,455,-1)); + SetCon(78,CreateObject(VINE,967,470,-1)); + SetCon(120,CreateObject(VINE,1055,320,-1)); + SetCon(87,CreateObject(VINE,1058,375,-1)); + SetCon(104,CreateObject(VINE,1052,410,-1)); + SetCon(124,CreateObject(VINE,1055,455,-1)); + SetCon(78,CreateObject(VINE,1057,470,-1)); + SetCon(120,CreateObject(VINE,1435,240,-1)); + SetCon(87,CreateObject(VINE,1438,295,-1)); + SetCon(77,CreateObject(VINE,1434,330,-1)); + SetCon(120,CreateObject(VINE,1405,90,-1)); + SetCon(87,CreateObject(VINE,1408,145,-1)); + SetCon(77,CreateObject(VINE,1404,180,-1)); + CreateConstruction(_FAK,1880,113,-1,100,1); + CreateConstruction(_FAK,1630,193,-1,100,1); + CreateConstruction(_FAK,1390,403,-1,100,1); + CreateConstruction(_FAK,1380,563,-1,100,1); + CreateConstruction(_FAK,1270,683,-1,100,1); + CreateConstruction(_FAK,1240,433,-1,100,1); + CreateConstruction(_FAK,1100,523,-1,100,1); + CreateConstruction(_FAK,1090,783,-1,100,1); + CreateConstruction(_FAK,510,893,-1,100,1); + CreateConstruction(_FAK,500,733,-1,100,1); + CreateConstruction(_FAK,80,563,-1,100,1); + CreateConstruction(_FAK,760,553,-1,100,1); + CreateConstruction(_FAK,930,553,-1,100,1); + + var tre1=5; + while(tre1) {PlaceVegetation(_TR1,0,0,1450,560,100000); tre1--;} + + var tre2=4; + while(tre2) {PlaceVegetation(_TR2,0,0,1450,560,100000); tre2--;} + + var tre3=5; + while(tre3) {PlaceVegetation(_TR3,0,0,1450,560,100000); tre3--;} + + var tre4=2; + while(tre4) {PlaceVegetation(_TR4,0,0,1450,560,100000); tre4--;} + + var tre2b=2; + while(tre2b) {PlaceVegetation(_TR2,1440,0,650,250,100000); tre2b--;} + + var tre3b=3; + while(tre3b) {PlaceVegetation(_TR3,1440,0,650,250,100000); tre3b--;} + + CreateObject(_RAN,10,0,-1); + CreateObject(_AMB,165,550,-1); + CreateObject(_QUE,648,781,-1); + + light1=CreateObject(ALGH,1390,900,-1); + light2=CreateObject(ALGH,1450,900,-1); + light3=CreateObject(ALGH,1510,900,-1); + + vent1=CreateObject(GAT2,1420,920,-1); + vent2=CreateObject(GAT2,1480,920,-1); + + //Spielobjekte + CreateObject(_ART,480,220,-1); + CreateObject(_ART,1795,190,-1); + + //Jumppads + CreateObject(JMPD,1420,100)->Set(100,45); + CreateObject(JMPD,770,960)->Set(82,35); + CreateObject(JMPD,980,330)->Set(140,18); + CreateObject(JMPD,660,190)->Set(130,-20); + CreateObject(JMPD,300,150)->Set(80,30); + CreateObject(JMPD,1030,930)->Set(85,-40); + CreateObject(JMPD,580,190)->Set(110,20); + CreateObject(JMPD,1040,330)->Set(113,-28); + CreateObject(JMPD,1200,445)->Set(98,-15); + CreateObject(JMPD,1210,445)->Set(140,12); + + //Teleporter + var teletarget1=CreateObject(TELE,625,250,-1); + var teletarget2=CreateObject(TELE,1295,940,-1); + teletarget1->SetTarget(teletarget2); + teletarget2->SetTarget(teletarget1); + + aTeleporters[0] = teletarget1; + aTeleporters[1] = teletarget2; + + CreateObject(RADR,160,100,-1); + + //Labor + CreateObject(CONS,1820,920,-1); + CreateObject(LTBL,1780,940,-1); + CreateObject(GADG,1780,920,-1); + CreateObject(GADG,1790,920,-1); + CreateObject(MONI,1770,920,-1); + CreateObject(OPTB,1880,920,-1); + CreateObject(LBPC,1700,950,-1); + CreateObject(FRAM,1760,910,-1); + CreateObject(FRAM,1850,910,-1); + CreateObject(FRAM,1805,910,-1); + CreateObject(GSBO,1860,610,-1); + CreateObject(GSBO,1880,610,-1); + CreateObject(GLST,1380,950,-1); + SetCon(30,CreateObject(VENT,1800,900,-1)); + + //Office + CreateObject(OTBL,1575,330,-1); + CreateObject(OCHR,1550,330,-1); + CreateObject(OCHR,1600,330,-1); + CreateObject(OTBL,1695,380,-1); + CreateObject(OCHR,1670,380,-1); + CreateObject(OCHR,1720,380,-1); + CreateObject(CCP2,1510,230,-1); + CreateObject(DEB1,1750,190,-1); + + //Base + CreateObject(GSTA,415,540,-1); + CreateObject(BED2,625,305,-1); + CreateObject(BED2,625,375,-1); + CreateObject(CLVM,230,540,-1); + CreateObject(SPVM,1560,390,-1); + CreateObject(LCOM,575,480,-1); + CreateObject(LCOM,595,480,-1); + CreateObject(LCOM,615,480,-1); + CreateObject(FIEX,240,330,-1); + CreateObject(FIEX,560,510,-1); + CreateObject(FIEX,670,950,-1); + CreateObject(FIEX,990,540,-1); + CreateObject(FIEX,1620,940,-1); + CreateObject(FIEX,1540,240,-1); + CreateObject(FIEX,1800,290,-1); + CreateObject(GTBL,240,430,-1); + CreateObject(LCKR,650,380,-1); + CreateObject(LCKR,650,310,-1); + CreateObject(SBBA,695,520,-1); + CreateObject(CON1,480,260,-1); + CreateObject(PLNT,330,430,-1); + CreateObject(PLNT,320,550,-1); + CreateObject(PLT2,630,550,-1); + CreateObject(PLT2,1650,340,-1); + CreateObject(PLNT,1740,680,-1); + CreateObject(PLNT,1700,610,-1); + CreateObject(LFTP,1625,540,-1)->SetLimits(395,745); + CreateObject(LFTP,165,550,-1)->SetLimits(155,545);; + var liftp = CreateObject (LFTP, 870, 825, -1); + liftp->DisableVertical(); + liftp->ContactLeft(); + + CreateObject(BRDG,776,560,-1)->Lock(); + CreateObject(BRDG,848,560,-1)->Lock(); + CreateObject(BRDG,920,560,-1)->Lock(); + CreateObject(BRDG,776,571,-1)->Lock(); + CreateObject(BRDG,848,571,-1)->Lock(); + CreateObject(BRDG,920,571,-1)->Lock(); + CreateObject(LADR,592,390,-1)->Set(11); + CreateObject(LADR,1976,260,-1)->Set(11); + CreateObject(LADR,1636,950,-1)->Set(18); + CreateObject(LADR,1471,400,-1)->Set(15); + CreateObject(LADR,1481,250,-1)->Set(20); + CreateObject(LADR,1001,410,-1)->Set(11); + CreateObject(LADR,1021,550,-1)->Set(18); + CreateObject(LADR,1195,740,-1)->Set(29); + CreateObject(LADR,490,560,-1)->Set(11); + CreateObject(LADR,290,440,-1)->Set(13); + CreateObject(LADR,575,660,-1)->Set(13); + CreateObject(TOIC,340,480,-1); + CreateObject(TOIC,320,480,-1); + CreateObject(TOIC,300,480,-1); + CreateObject(TOIC,280,480,-1); + CreateObject(WSHB,240,480,-1); + CreateObject(WSHB,220,480,-1); + + //Türen + CreateObject(STDR,1535,400,-1)->OnDestroyed(); + CreateObject(LBDR,1650,950,-1)->OnDestroyed(); + CreateObject(SLDR,1925,940,-1); + CreateObject(LBDR,1840,620,-1); + CreateObject(STDR,1495,290,-1)->OnDestroyed(); + CreateObject(SLDR,1435,400,-1); + CreateObject(STDR,965,550,-1); + CreateObject(STDR,1055,550,-1); + CreateObject(STDR,585,250,-1); + CreateObject(SLDR,345,670,-1); + CreateObject(STDR,1525,720,-1)->OnDestroyed(); + CreateObject(STDR,1565,720,-1); + CreateObject(SLDR,1165,510,-1); + CreateObject(STDR,575,390,-1); + CreateObject(STDR,705,560,-1); + CreateObject(STDR,535,560,-1); + CreateObject(STDR,665,560,-1)->OnDestroyed(); + CreateObject(STDR,545,480,-1); + CreateObject(STDR,205,480,-1); + CreateObject(STDR,205,340,-1); + CreateObject(STDR,205,160,-1); + + //Fenster + CreateObject(_WIN,270,420,-1); + CreateObject(_WIN,620,300,-1); + CreateObject(_WIN,620,370,-1); + CreateObject(_WIN,580,460,-1); + CreateObject(_WIN,630,460,-1); + CreateObject(_WIN,1940,600,-1); + CreateObject(_WIN,1890,600,-1); + CreateObject(_WIN,1780,360,-1); + CreateObject(_WIN,1720,380,-1); + CreateObject(_WIN,1610,330,-1); + CreateObject(_WIN,1500,380,-1); + CreateObject(_WIN,1500,340,-1); + CreateObject(_WIN,1490,230,-1); + CreateObject(_WIN,1460,200,-1); + CreateObject(_WIN,1460,150,-1); + CreateObject(_WIN,280,650,-1); + CreateObject(_WIN,1010,390,-1); + CreateObject(_WIN,170,180,-1); + CreateObject(_WIN,160,240,-1); + CreateObject(_WIN,170,300,-1); + CreateObject(_WIN,160,360,-1); + CreateObject(_WIN,170,420,-1); + CreateObject(_WIN,160,480,-1); + CreateObject(_WIN,170,540,-1); + CreateObject(_WIN,370,540,-1); + CreateObject(_WIN,270,540,-1); + CreateObject(_WIN,470,540,-1); + CreateObject(_WIN,630,540,-1); + + // Waffen & Ausrüstung + PlaceSpawnpoint(AIRS,80,848); + PlaceSpawnpoint(AIRS,1960,83); + PlaceSpawnpoint(BZWP,1500,238); + PlaceSpawnpoint(BZWP,140,88); + PlaceSpawnpoint(MIAP,1520,238); + PlaceSpawnpoint(MIAP,160,88); + PlaceSpawnpoint(ENWP,300,548); + if(GetPlayerCount()>5) PlaceSpawnpoint(ENWP,1440,708); + PlaceSpawnpoint(ENAP,320,548); + if(GetPlayerCount()>5) PlaceSpawnpoint(ENAP,1460,708); + PlaceSpawnpoint(ENAP,1660,818); + PlaceSpawnpoint(FTWP,610,378); + PlaceSpawnpoint(FTWP,1900,608); + PlaceSpawnpoint(GSAP,630,378); + PlaceSpawnpoint(GSAP,1920,608); + PlaceSpawnpoint(GSAP,230,333); + PlaceSpawnpoint(GLWP,610,178); + PlaceSpawnpoint(GLWP,660,948); + PlaceSpawnpoint(GRAP,680,948); + PlaceSpawnpoint(GRAP,250,148); + PlaceSpawnpoint(GRAP,630,178); + PlaceSpawnpoint(MIWP,1880,313); + PlaceSpawnpoint(MIWP,1440,958); + PlaceSpawnpoint(STAP,1460,958); + PlaceSpawnpoint(STAP,1900,313); + PlaceSpawnpoint(GGWP,280,778); + PlaceSpawnpoint(ENAP,300,778); + PlaceSpawnpoint(PGWP,1370,548); + if(GetPlayerCount()>5) PlaceSpawnpoint(PGWP,280,428); + PlaceSpawnpoint(STAP,1390,548); + if(GetPlayerCount()>5) PlaceSpawnpoint(STAP,300,428); + PlaceSpawnpoint(STAP,1720,468); + PlaceSpawnpoint(MINE,500,718); + PlaceSpawnpoint(MINE,1850,938); + PlaceSpawnpoint(JTPK,220,428); + PlaceSpawnpoint(JTPK,1750,938); + PlaceSpawnpoint(KRFL,510,878); + PlaceSpawnpoint(KRFL,1630,178); + PlaceSpawnpoint(KLAS,830,548); + PlaceSpawnpoint(KLAS,1720,608); + PlaceSpawnpoint(KSLM,1160,748); + //PlaceSpawnpoint(FLSH,460,778); + if(GetPlayerCount()>5) PlaceSpawnpoint(MEDI,550,238); + PlaceSpawnpoint(MEDI,1000,538); + if(GetPlayerCount()>7) PlaceSpawnpoint(MEDI,1720,678); + PlaceSpawnpoint(HARM,1010,318); + PlaceSpawnpoint(AIRS,1130,498); + PlaceBonusSpawnpoint([AEXB,BSKB,HELB,KAMB], 1510, 798, 2000); + PlaceBonusSpawnpoint([AMPB,HSTB,INVB,RPFB], 250, 658, 2000); + + PlaceWaypoints(); + + return(1); +} + +func PlaceWaypoints() +{ + var wp1 = CreateWP(1417,90); + var wp2 = CreateWP(1839,610); + var wp3 = CreateWP(1658,679); + var wp4 = CreateWP(1813,680); + var wp5 = CreateWP(1918,609); + var wp6 = CreateWP(1956,167); + var wp7 = CreateWP(1968,265); + var wp8 = CreateWP(1502,238); + var wp9 = CreateWP(1677,194); + var wp10 = CreateWP(1452,88); + var wp11 = CreateWP(1959,82); + var wp12 = CreateWP(1794,199); + var wp13 = CreateWP(1549,238); + var wp14 = CreateWP(1658,607); + var wp15 = CreateWP(1224,426); + var wp16 = CreateWP(1185,435); + var wp17 = CreateWP(1484,391); + var wp18 = CreateWP(1594,391); + var wp19 = CreateWP(1659,389); + var wp20 = CreateWP(1489,282); + var wp21 = CreateWP(1602,342); + var wp22 = CreateWP(1648,342); + var wp23 = CreateWP(1766,274); + var wp24 = CreateWP(1875,311); + var wp25 = CreateWP(1922,314); + var wp26 = CreateWP(1657,513); + var wp27 = CreateWP(999,534); + var wp28 = CreateWP(657,180); + var wp29 = CreateWP(638,548); + var wp30 = CreateWP(505,549); + var wp31 = CreateWP(574,548); + var wp32 = CreateWP(464,548); + var wp33 = CreateWP(166,537); + var wp34 = CreateWP(418,469); + var wp35 = CreateWP(620,378); + var wp36 = CreateWP(202,145); + var wp37 = CreateWP(288,140); + var wp38 = CreateWP(641,180); + var wp39 = CreateWP(582,180); + var wp40 = CreateWP(140,89); + var wp41 = CreateWP(231,326); + var wp42 = CreateWP(222,428); + var wp43 = CreateWP(321,429); + var wp44 = CreateWP(515,468); + var wp45 = CreateWP(1407,546); + var wp46 = CreateWP(1017,319); + var wp47 = CreateWP(1540,388); + var wp48 = CreateWP(1590,711); + var wp49 = CreateWP(1215,578); + var wp50 = CreateWP(1215,653); + var wp51 = CreateWP(1134,498); + var wp52 = CreateWP(1185,744); + var wp53 = CreateWP(991,797); + var wp54 = CreateWP(249,656); + var wp55 = CreateWP(507,717); + var wp56 = CreateWP(554,680); + var wp57 = CreateWP(764,947); + var wp58 = CreateWP(596,944); + var wp59 = CreateWP(544,877); + var wp60 = CreateWP(463,912); + var wp61 = CreateWP(356,892); + var wp62 = CreateWP(361,787); + var wp63 = CreateWP(752,796); + var wp64 = CreateWP(459,767); + var wp65 = CreateWP(289,774); + var wp66 = CreateWP(197,819); + var wp67 = CreateWP(627,238); + var wp68 = CreateWP(1036,319); + var wp69 = CreateWP(986,320); + var wp70 = CreateWP(1651,752); + var wp71 = CreateWP(1657,821); + var wp72 = CreateWP(1849,938); + var wp73 = CreateWP(1818,936); + var wp74 = CreateWP(1652,939); + var wp75 = CreateWP(1608,939); + var wp76 = CreateWP(1297,941); + var wp77 = CreateWP(1038,919); + wp1 -> AddPath(wp11, Path_MoveTo, 1); + wp2 -> AddPath(wp5, Path_MoveTo, 1); + wp2 -> AddPath(wp14, Path_Backflip, -1); + wp2 -> AddPath(wp3, Path_MoveTo, -1); + wp3 -> AddPath(wp4, Path_MoveTo, 1); + wp3 -> AddPath(wp48, Path_MoveTo, -1); + wp3 -> AddPath(wp18, Path_Lift, -1); + wp3 -> AddPath(wp19, Path_Lift, 1); + wp3 -> AddPath(wp26, Path_Lift, -1); + wp4 -> AddPath(wp3, Path_MoveTo, -1); + wp4 -> AddPath(wp14, Path_Jump, -1); + wp4 -> AddPath(wp2, Path_Jump, 1); + wp4 -> AddPath(wp2, Path_MoveTo, 1); + wp5 -> AddPath(wp2, Path_MoveTo, -1); + wp6 -> AddPath(wp12, Path_MoveTo, -1); + wp8 -> AddPath(wp10, Path_Jump, -1); + wp8 -> AddPath(wp13, Path_MoveTo, 1); + wp9 -> AddPath(wp12, Path_Jump, 1); + wp9 -> AddPath(wp23, Path_MoveTo, 1); + wp9 -> AddPath(wp13, Path_MoveTo, -1); + wp10 -> AddPath(wp1, Path_MoveTo, -1); + wp10 -> AddPath(wp8, Path_MoveTo, 1); + wp10 -> AddPath(wp9, Path_Jump, 1); + wp10 -> AddPath(wp13, Path_Jump, 1); + wp11 -> AddPath(wp12, Path_MoveTo, -1); + wp12 -> AddPath(wp6, Path_Jump, 1); + wp12 -> AddPath(wp9, Path_MoveTo, -1); + wp13 -> AddPath(wp8, Path_MoveTo, -1); + wp13 -> AddPath(wp9, Path_Jump, 1); + wp14 -> AddPath(wp48, Path_Lift, -1); + wp14 -> AddPath(wp18, Path_Lift, -1); + wp14 -> AddPath(wp19, Path_Lift, 1); + wp15 -> AddPath(wp17, Path_MoveTo, 1); + wp17 -> AddPath(wp20, Path_Jump, 1); + wp17 -> AddPath(wp15, Path_MoveTo, -1); + wp18 -> AddPath(wp47, Path_MoveTo, -1); + wp18 -> AddPath(wp19, Path_Backflip, 1); + wp18 -> AddPath(wp48, Path_Lift, -1); + wp18 -> AddPath(wp26, Path_Lift, 1); + wp18 -> AddPath(wp14, Path_Lift, 1); + wp18 -> AddPath(wp3, Path_Lift, 1); + wp19 -> AddPath(wp24, Path_MoveTo, 1); + wp19 -> AddPath(wp18, Path_Backflip, -1); + wp19 -> AddPath(wp26, Path_Lift, -1); + wp19 -> AddPath(wp48, Path_Lift, -1); + wp19 -> AddPath(wp14, Path_Lift, -1); + wp19 -> AddPath(wp3, Path_Lift, -1); + wp21 -> AddPath(wp22, Path_Jump, 1); + wp21 -> AddPath(wp20, Path_Jump, -1); + wp22 -> AddPath(wp21, Path_Jump, -1); + wp22 -> AddPath(wp23, Path_MoveTo, 1); + wp22 -> AddPath(wp23, Path_Jump, 1); + wp23 -> AddPath(wp9, Path_Jump, -1); + wp23 -> AddPath(wp22, Path_MoveTo, -1); + wp24 -> AddPath(wp23, Path_Jump, -1); + wp24 -> AddPath(wp19, Path_MoveTo, -1); + wp24 -> AddPath(wp25, Path_MoveTo, 1); + wp25 -> AddPath(wp7, Path_Jump, 1); + wp25 -> AddPath(wp24, Path_MoveTo, -1); + wp26 -> AddPath(wp18, Path_Lift, -1); + wp26 -> AddPath(wp19, Path_Lift, 1); + wp26 -> AddPath(wp48, Path_Lift, -1); + wp26 -> AddPath(wp3, Path_Lift, 1); + wp27 -> AddPath(wp29, Path_MoveTo, -1); + wp27 -> AddPath(wp51, Path_MoveTo, 1); + wp27 -> AddPath(wp46, Path_Jump, 1); + wp28 -> AddPath(wp40, Path_MoveTo, -1); + wp29 -> AddPath(wp30, Path_Jump, -1); + wp29 -> AddPath(wp27, Path_MoveTo, 1); + wp30 -> AddPath(wp29, Path_Jump, 1); + wp30 -> AddPath(wp31, Path_MoveTo, 1); + wp31 -> AddPath(wp30, Path_MoveTo, -1); + wp31 -> AddPath(wp56, Path_MoveTo, -1); + wp32 -> AddPath(wp30, Path_MoveTo, 1); + wp32 -> AddPath(wp33, Path_MoveTo, -1); + wp32 -> AddPath(wp44, Path_Jump, 1); + wp33 -> AddPath(wp36, Path_Lift, 1); + wp33 -> AddPath(wp41, Path_Lift, 1); + wp33 -> AddPath(wp32, Path_MoveTo, 1); + wp34 -> AddPath(wp32, Path_MoveTo, 1); + wp35 -> AddPath(wp32, Path_MoveTo, -1); + wp36 -> AddPath(wp41, Path_Lift, 1); + wp36 -> AddPath(wp33, Path_Lift, -1); + wp36 -> AddPath(wp37, Path_MoveTo, 1); + wp37 -> AddPath(wp38, Path_MoveTo, 1); + wp38 -> AddPath(wp28, Path_MoveTo, 1); + wp38 -> AddPath(wp39, Path_MoveTo, -1); + wp38 -> AddPath(wp27, Path_Jump, 1); + wp39 -> AddPath(wp46, Path_MoveTo, 1); + wp41 -> AddPath(wp36, Path_Lift, -1); + wp41 -> AddPath(wp33, Path_Lift, -1); + wp41 -> AddPath(wp43, Path_MoveTo, 1); + wp42 -> AddPath(wp43, Path_MoveTo, 1); + wp43 -> AddPath(wp34, Path_MoveTo, 1); + wp43 -> AddPath(wp42, Path_MoveTo, -1); + wp43 -> AddPath(wp41, Path_Jump, -1); + wp44 -> AddPath(wp35, Path_Jump, 1); + wp45 -> AddPath(wp49, Path_MoveTo, -1); + wp45 -> AddPath(wp47, Path_Jump, 1); + wp46 -> AddPath(wp29, Path_Jump, -1); + wp46 -> AddPath(wp51, Path_Jump, 1); + wp46 -> AddPath(wp68, Path_MoveTo, 1); + wp46 -> AddPath(wp69, Path_MoveTo, -1); + wp47 -> AddPath(wp17, Path_Jump, -1); + wp47 -> AddPath(wp45, Path_MoveTo, -1); + wp47 -> AddPath(wp18, Path_MoveTo, 1); + wp47 -> AddPath(wp17, Path_Backflip, -1); + wp48 -> AddPath(wp50, Path_MoveTo, -1); + wp48 -> AddPath(wp18, Path_Lift, 1); + wp48 -> AddPath(wp19, Path_Lift, 1); + wp48 -> AddPath(wp26, Path_Lift, 1); + wp48 -> AddPath(wp14, Path_Lift, 1); + wp48 -> AddPath(wp3, Path_Jump, 1); + wp48 -> AddPath(wp70, Path_MoveTo, 1); + wp49 -> AddPath(wp51, Path_MoveTo, -1); + wp49 -> AddPath(wp52, Path_MoveTo, -1); + wp49 -> AddPath(wp45, Path_MoveTo, 1); + wp50 -> AddPath(wp48, Path_MoveTo, 1); + wp51 -> AddPath(wp49, Path_MoveTo, 1); + wp51 -> AddPath(wp50, Path_MoveTo, 1); + wp51 -> AddPath(wp52, Path_MoveTo, 1); + wp51 -> AddPath(wp27, Path_MoveTo, -1); + wp51 -> AddPath(wp16, Path_Jump, 1); + wp52 -> AddPath(wp50, Path_Jump, 1); + wp52 -> AddPath(wp49, Path_Jump, 1); + wp52 -> AddPath(wp51, Path_Jump, 1); + wp52 -> AddPath(wp53, Path_MoveTo, -1); + wp53 -> AddPath(wp63, Path_Lift, -1); + wp53 -> AddPath(wp52, Path_MoveTo, 1); + wp54 -> AddPath(wp55, Path_MoveTo, 1); + wp55 -> AddPath(wp54, Path_Jump, -1); + wp55 -> AddPath(wp56, Path_MoveTo, 1); + wp55 -> AddPath(wp64, Path_MoveTo, -1); + wp56 -> AddPath(wp55, Path_MoveTo, -1); + wp56 -> AddPath(wp31, Path_Jump, 1); + wp57 -> AddPath(wp53, Path_MoveTo, 1); + wp58 -> AddPath(wp57, Path_MoveTo, 1); + wp59 -> AddPath(wp58, Path_MoveTo, 1); + wp60 -> AddPath(wp59, Path_MoveTo, 1); + wp61 -> AddPath(wp60, Path_MoveTo, 1); + wp62 -> AddPath(wp61, Path_MoveTo, -1); + wp63 -> AddPath(wp64, Path_MoveTo, -1); + wp63 -> AddPath(wp53, Path_Lift, 1); + wp64 -> AddPath(wp55, Path_Jump, 1); + wp64 -> AddPath(wp65, Path_MoveTo, -1); + wp64 -> AddPath(wp62, Path_MoveTo, -1); + wp64 -> AddPath(wp63, Path_MoveTo, 1); + wp65 -> AddPath(wp62, Path_MoveTo, 1); + wp65 -> AddPath(wp64, Path_MoveTo, 1); + wp66 -> AddPath(wp65, Path_MoveTo, 1); + wp67 -> AddPath(wp76, Path_MoveTo, 1); + wp67 -> SetArriveCommand(0, 0, "Enter", aTeleporters[0], 0, 0); + wp68 -> AddPath(wp38, Path_MoveTo, -1); + wp69 -> AddPath(wp10, Path_MoveTo, 1); + wp70 -> AddPath(wp48, Path_Jump, -1); + wp71 -> AddPath(wp75, Path_MoveTo, -1); + wp71 -> AddPath(wp74, Path_MoveTo, -1); + wp71 -> AddPath(wp70, Path_Jump, 1); + wp72 -> AddPath(wp73, Path_MoveTo, -1); + wp73 -> AddPath(wp72, Path_MoveTo, 1); + wp73 -> AddPath(wp74, Path_MoveTo, -1); + wp74 -> AddPath(wp73, Path_MoveTo, 1); + wp74 -> AddPath(wp75, Path_MoveTo, -1); + wp74 -> AddPath(wp71, Path_Jump, -1); + wp75 -> AddPath(wp74, Path_MoveTo, 1); + wp75 -> AddPath(wp71, Path_Jump, 1); + wp75 -> AddPath(wp76, Path_MoveTo, -1); + wp76 -> AddPath(wp67, Path_MoveTo, -1); + wp76 -> SetArriveCommand(0, 0, "Enter", aTeleporters[1], 0, 0); + wp76 -> AddPath(wp75, Path_MoveTo, 1); + wp76 -> AddPath(wp77, Path_MoveTo, -1); + wp77 -> AddPath(wp63, Path_MoveTo, -1); + wp77 -> AddPath(wp76, Path_MoveTo, 1); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + if(FindObject(WPCH)) + FindObject(WPCH)->RemoveWare(AIRT); +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + // Anzahl Zufallpositionen, iTeam verwendet für spezielle Teamstartpositionen + var rand = Random(10); + if(!rand) return [190,90]; + if(!--rand) return [90, 430]; + if(!--rand) return [610, 380]; + if(!--rand) return [450, 770]; + if(!--rand) return [990, 400]; + if(!--rand) return [1140, 940]; + if(!--rand) return [1320, 560]; + if(!--rand) return [1870, 610]; + if(!--rand) return [1650, 340]; + if(!--rand) return [1440, 90]; +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Sky.jpg b/Hazard.c4f/DM_Baldoon.c4s/Sky.jpg new file mode 100644 index 00000000..10972e0f Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Sky.jpg differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/ConsoleControl.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/ConsoleControl.c new file mode 100644 index 00000000..0b5b5cee --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/ConsoleControl.c @@ -0,0 +1,36 @@ +/*-- Console Control --*/ + +#strict +#appendto CONS + +func Initialize() { + target =CreateObject(_HN2,-240,35,-1); + CreateObject(HNG2,-490,35,-1)->Open(); + return(_inherited()); +} + +protected func ControlDig(pClonk) +{ + + [$Control$] + if(smashed || GetEffect("EMPShock", this())) + { + Sound("Electric"); + Fling(pClonk, RandomX(-2,2), -2); + return(); + } + + if(console1_busy) return(0); + if(!target) return(Sound("CatapultSet")); + + CreateMenu(GetID(target), pClonk, target, 0, Format("$Control$: %s", GetName(target)), 0, 1); + for(var i = 1, desc ; desc = target ->~ConsoleControl(i) ; i++) + { + //Aufrufenden Clonk und uns selbst dem Zielobjekt übergeben. Dies kann es in ConsoleController abrufen +// target->~ConsoleController(this(), pClonk); + // Zielobjekt muss für ConsoleControl(i) jeweils den Namen der Aktion zurückgeben, wichtig: i beginnt bei 1 + AddMenuItem(desc, Format("ConsoleControlled(%d, %d, %d)", i, ObjectNumber(pClonk), ObjectNumber(this())), GetID(), pClonk, 0, 0, "$Control$"); + // Zielobjekt bekommt Aufruf: ConsoleControll(i) und muss das dann verarbeiten + } + return(1); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/HazardPhysical.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/HazardPhysical.c new file mode 100644 index 00000000..62e67106 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/HazardPhysical.c @@ -0,0 +1,9 @@ +/*-- NewPhysical --*/ + +#strict +#appendto HZCK + +func Initialize() { + SetPhysical("CanChop",0,2); + return(_inherited()); + } diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/LightEffect.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/LightEffect.c new file mode 100644 index 00000000..444a70b0 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/LightEffect.c @@ -0,0 +1,49 @@ +/*-- Light Effect --*/ + +#strict +#appendto CLGH + +/*-- Deckenlicht --*/ + +func Initialize() { + var disabled=0; + if(!Random(10)) disabled=1; + if(!disabled) { + var light; + light = AddLightAmbience(55); + light->ChangeGraphics("Half"); + light->SetR(180);} + if(disabled) AddEffect("RegainLight",this(),1,1,this()); + return(1); +} + +global func Influence() { + +} + +func FxLooseLightTimer() { + if(!Random(10)) { //Influence(); + while(FindObject(LIGH,-10,-10,20,20)) RemoveObject(FindObject(LIGH,-10,-10,20,20)); + RemoveEffect("LooseLight",this()); + + if(!Random(6)) { + Sound("Rip"); + CastObjects(SPRK, 5, 30, RandomX(-3,3),4); + } + + AddEffect("RegainLight",this(),1,1,this());} +} + +func FxRegainLightTimer() { + if(Random(35)) return(0); + var light; + light = AddLightAmbience(55); + light->ChangeGraphics("Half"); + light->SetR(180); + AddEffect("LooseLight",this(),1,1,this()); + RemoveEffect("RegainLight",this()); + +} + +public func IsInfluenced() { return(true); } +public func IsLamp() { return(true); } diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/LightRotation.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/LightRotation.c new file mode 100644 index 00000000..719bc1ba --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/LightRotation.c @@ -0,0 +1,9 @@ +/*-- LightRotation --*/ + +#strict +#appendto ALGH + +func Initialize() { + SetR(180,this()); + return(_inherited()); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/PlacementCorrection.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/PlacementCorrection.c new file mode 100644 index 00000000..d96fc15d --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/PlacementCorrection.c @@ -0,0 +1,13 @@ +/*-- Placement Correction --*/ +/*-- Vernichtet die in der Erde platzierten Objekte wenn sie zu nahe an der Erdoberfläche liegen --*/ + +#strict +#appendto ROCK +#appendto LOAM +#appendto BONE + +func Initialize() { + if(!GBackSolid(-6,-6) || !GBackSolid(6,-6) || !GBackSolid(6,6) || !GBackSolid(-6,6)) RemoveObject(); + if(GBackLiquid(-6,-6) || GBackLiquid(6,-6) || GBackLiquid(6,6) || GBackLiquid(-6,6)) RemoveObject(); + return(1); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/PreventChop.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/PreventChop.c new file mode 100644 index 00000000..4e1e58cd --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/PreventChop.c @@ -0,0 +1,9 @@ +/*-- Prevent Chop --*/ + +#strict +#appendto TREE + +protected func Damage() +{ + return(1); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/StringTblDE.txt b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/StringTblDE.txt new file mode 100644 index 00000000..e3f1dfc3 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/StringTblDE.txt @@ -0,0 +1 @@ +Control=Bedienen diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/StringTblUS.txt b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/StringTblUS.txt new file mode 100644 index 00000000..860b7933 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/StringTblUS.txt @@ -0,0 +1 @@ +Control=Control diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/TorAutomatik.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/TorAutomatik.c new file mode 100644 index 00000000..af0ab407 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/TorAutomatik.c @@ -0,0 +1,44 @@ +/*-- TorAutomatik --*/ + +#strict +#appendto _HN2 + +static iCount; +static console1_busy; + +func Initialize() { + iCount=55; + SetAction("GateOpen"); + return(); +} + +protected func Close() +{ + console1_busy=1; + var pGate2=FindObject(HNG2,-300,-50,100,100); + if(pGate2) pGate2->Close(); + light1->TurnOn(); + light2->TurnOn(); + light3->TurnOn(); + vent1->StartWater(); + vent2->StartWater(); + Sound("Alarm"); + AddEffect("CloseAutomatic",0,1,35,this()); + + return(_inherited()); +} + +func FxCloseAutomaticTimer() { + var pGate2=FindObject(HNG2,-300,-50,100,100); + //Message("%d",0,iCount); + iCount--; + if( iCount==20) { + CreateObject(_DRA,-120,50,-1); + vent1->StopWater(); + vent2->StopWater(); + light1->TurnOff(); + light2->TurnOff(); + light3->TurnOff(); + } + if(!iCount) {iCount=55; console1_busy=0; pGate2->Open(); SetAction("GateOpen"); return(RemoveEffect("CloseAutomatic"));} +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/System.c4g/WaterVent.c b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/WaterVent.c new file mode 100644 index 00000000..a81c4102 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/System.c4g/WaterVent.c @@ -0,0 +1,16 @@ +/*-- Watervent --*/ + +#strict +#appendto GAT2 + +func StartWater() { + AddEffect("Water",0,1,5,this()); +} + +func FxWaterTimer() { + CastPXS("Acid",30,20,0,0); +} + +func StopWater() { + RemoveEffect("Water"); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Teams.txt b/Hazard.c4f/DM_Baldoon.c4s/Teams.txt new file mode 100644 index 00000000..fbfe5f6b --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Teams.txt @@ -0,0 +1,4 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 +AutoGenerateTeams=1 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Title.png b/Hazard.c4f/DM_Baldoon.c4s/Title.png new file mode 100644 index 00000000..b8311f0a Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Title.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DefCore.txt new file mode 100644 index 00000000..0b1ba5b4 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DefCore.txt @@ -0,0 +1,18 @@ +[DefCore] +id=_FAK +Version=4,9,8,2 +Name=Fackel +Category=C4D_Structure +MaxUserSelect=10 +Timer=3 +TimerCall=Effect +Width=5 +Height=46 +Offset=-2,-23 +Vertices=2 +VertexY=22,-23 +VertexFriction=50,50 +Value=15 +Mass=30 +Components=WOOD=1 +Picture=0,0,5,46 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DescDE.txt new file mode 100644 index 00000000..85df71c8 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DescDE.txt @@ -0,0 +1 @@ +Erhellt die Umgebung. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DescUS.txt new file mode 100644 index 00000000..f64bb8b2 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/DescUS.txt @@ -0,0 +1 @@ +Lightens the ambience. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Graphics.png new file mode 100644 index 00000000..c7d14a79 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Names.txt new file mode 100644 index 00000000..0469cba6 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Lichtblitz +US:Flash diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Particle.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Particle.txt new file mode 100644 index 00000000..42f3dd17 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Flash.c4d/Particle.txt @@ -0,0 +1,12 @@ +[Particle] +Name=LightFlash2 +MaxCount=500 +InitFn=StdInit +ExecFn=StdExec +DrawFn=Std +Face=0,0,128,128,-64,-64 +Delay=0 +Repeats=1 +GravityAcc=0 +AlphaFade=0 +Additive=1 \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Graphics.png new file mode 100644 index 00000000..f4ad369b Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Names.txt new file mode 100644 index 00000000..b566f0e9 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fackel +US:Torch \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Script.c new file mode 100644 index 00000000..71420088 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fackel.c4d/Script.c @@ -0,0 +1,15 @@ +/*-- Fackel --*/ + +#strict + +local light; + +func Initialize() { +CreateParticle("LightFlash2",0,-21,0,0,1500,RGBa(255,255,1128,64)); + return(1); +} + +func Effect() { + CreateParticle("Fire",RandomX(-2,2),-21,0,RandomX(-6,-12),RandomX(40,60),RGBa(255,RandomX(224,255),0,128)); + CreateParticle("Fire2",RandomX(-2,2),-21,0,RandomX(-8,-14),RandomX(40,60),RGBa(255,255,255,64)); + } diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DefCore.txt new file mode 100644 index 00000000..4013f27b --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DefCore.txt @@ -0,0 +1,16 @@ +[DefCore] +id=_WIN +Version=4,9,8,2 +Name=Fenster +Category=C4D_StaticBack +MaxUserSelect=10 +Width=20 +Height=20 +Offset=-10,-10 +Vertices=1 +VertexY=1 +VertexFriction=20 +Value=10 +Mass=10 +Components=METL=1 +Picture=0,0,20,20 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DescDE.txt new file mode 100644 index 00000000..c74ede44 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DescDE.txt @@ -0,0 +1 @@ +Zum Durchschauen. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DescUS.txt new file mode 100644 index 00000000..289e73c4 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/DescUS.txt @@ -0,0 +1 @@ +To look through. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Graphics.png new file mode 100644 index 00000000..a0e243df Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Names.txt new file mode 100644 index 00000000..6259b07a --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Fenster +US:Window \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Script.c new file mode 100644 index 00000000..cc354fc8 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Fenster.c4d/Script.c @@ -0,0 +1,26 @@ +/*-- Fenster --*/ + +#strict + +#strict + +local smashed; + +public func IsBulletTarget(id id) { + if(id == HMIS) + return(0); + if(!smashed) return(!Random(3)); + else + return(0); +} + +protected func Damage() { + // Ist schon kaputt + if(smashed) return(); + // Zersplittern + Sound("Glass"); + for(var i = 0 ; i < 10 ; i++) + CastParticles("SplinterGlass", 1, 35, RandomX(-20,20), -5, 20, 20, RGBa(255,255,255,0), RGBa(255,255,255,0)); + // Glas kaputt + smashed = true; +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Names.txt new file mode 100644 index 00000000..f3c2c74f --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Umwelt +US:Ambience diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/ActMap.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/ActMap.txt new file mode 100644 index 00000000..93a96869 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/ActMap.txt @@ -0,0 +1,9 @@ +[Action] +Name=Vine +Directions=1 +Length=10 +Delay=0 +Facet=0,0,18,64 +FacetBase=0 +NextAction=Vine +StartCall= diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DefCore.txt new file mode 100644 index 00000000..020c762e --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=VINE +Version=4,9,8,2 +Name=Vine +Category=C4D_StaticBack|C4D_SelectVegetation +MaxUserSelect=10 +Width=18 +Height=64 +Offset=-9 +Vertices=2 +VertexY=0,63 +VertexFriction=50,50 +Value=2 +Mass=40 +Components=WOOD=1 +Picture=0,0,18,64 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DescDE.txt new file mode 100644 index 00000000..7f3d12ce --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DescDE.txt @@ -0,0 +1 @@ +Kletterhilfe für den Urwaldclonk und Dekoration für Hazard-Arenas. diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DescUS.txt new file mode 100644 index 00000000..5f34d007 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/DescUS.txt @@ -0,0 +1 @@ +Scaling route for the jungle clonk and decoration for Hazard-Arenas diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Graphics.png new file mode 100644 index 00000000..b8e918dd Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Names.txt new file mode 100644 index 00000000..87028377 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Liane +US:Vine diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Script.c new file mode 100644 index 00000000..26072954 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Vine.c4d/Script.c @@ -0,0 +1,25 @@ +/*-- Liane --*/ + +#strict + +protected func Construction() +{ + // Zufälliges Aussehen + SetAction("Vine"); + SetPhase(Random(10)); + // In Kürze Position anpassen + AddEffect("AdjustGrowthPos", this(), 1, 1, this()); +} + +public func GetVineLength() +{ + return (GetCon() * GetDefCoreVal("Height") / 100); +} + +public func FxAdjustGrowthPosTimer() +{ + // Effekt entfernen + RemoveEffect("AdjustGrowthPos", this()); + // Y-Position anpassen (Wachstumsverschiebung der Engine ausgleichen) + SetPosition(GetX(), GetY() + GetVineLength()); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DefCore.txt new file mode 100644 index 00000000..b9269a78 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DefCore.txt @@ -0,0 +1,17 @@ +[DefCore] +id=_WEG +Version=4,9,8,2 +Name=Wegweiser +Category=C4D_Structure|C4D_SelectBuilding|C4D_SelectKnowledge|C4D_SelectVegetation +Width=11 +Height=26 +Offset=-5,-13 +Vertices=4 +VertexX=-5,-13,5,-13 +VertexY=5,12,-5,12 +VertexFriction=50,50,50,50 +Value=20 +Mass=100 +Components=WOOD=2 +Picture=0,0,11,26 +Grab=2 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DescDE.txt new file mode 100644 index 00000000..e1e7f801 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DescDE.txt @@ -0,0 +1,3 @@ +Weist den Weg! + +Auf Doppelgraben sieht man die Nachricht auf dem Schild. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DescUS.txt new file mode 100644 index 00000000..ec395e15 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/DescUS.txt @@ -0,0 +1,3 @@ +Shows the way! + +Use double click on "dig" for reading the message on the signpost! diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Graphics.png new file mode 100644 index 00000000..78ddf2e2 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Names.txt new file mode 100644 index 00000000..646af04a --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Wegweiser +US:Signpost diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Script.c new file mode 100644 index 00000000..5e2f1af8 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/Script.c @@ -0,0 +1,22 @@ +/*-- Wegweiser --*/ + +#strict +//#include BAS1 + +local count; + +protected func Initialize() { + count=70; +return(1); +} + +public func ControlDigDouble() { + Message("$Restricted$",this()); + //AddEffect("RingTrick",this(),1,1,this()); +return(1); +} + +func FxRingTrickTimer() { + count--; + if(count<1) return(Explode(39,this())); + } diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/StringTblDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/StringTblDE.txt new file mode 100644 index 00000000..1f0d55e6 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Restricted=Betreten Verboten! diff --git a/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/StringTblUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/StringTblUS.txt new file mode 100644 index 00000000..ad6ee924 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Umwelt.c4d/Wegweiser.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Restricted=Restricted Area! \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DefCore.txt new file mode 100644 index 00000000..8d1c2ec6 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DefCore.txt @@ -0,0 +1,21 @@ +[DefCore] +id=_ART +Version=4,9,8,2 +Name=Artillerie +Category=C4D_Structure +MaxUserSelect=10 +Timer=3 +TimerCall=Rotation +Width=41 +Height=18 +Offset=-20,-9 +Vertices=4 +VertexX=20,-20,20,-20 +VertexY=0,0,8,8 +VertexFriction=60,60,60,60 +Value=250 +Mass=500 +Components=METL=4 +Picture=0,0,41,18 +Construction=1 +Grab=2 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DescDE.txt new file mode 100644 index 00000000..3eef4f82 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DescDE.txt @@ -0,0 +1 @@ +Tödliche Fernwaffe. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DescUS.txt new file mode 100644 index 00000000..e9dcd46b --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/DescUS.txt @@ -0,0 +1 @@ +Deadly long-range weapon. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DefCore.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DefCore.txt new file mode 100644 index 00000000..f32cd60a --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DefCore.txt @@ -0,0 +1,19 @@ +[DefCore] +id=_GSS +Version=4,9,8,2 +Name=Geschoss +Category=C4D_Object +MaxUserSelect=10 +Timer=1 +TimerCall=ResetRotation +Width=5 +Height=15 +Offset=-4,-7 +Vertices=2 +VertexY=7,-7 +VertexFriction=50,50 +Value=15 +Mass=50 +Components=FLNT=5 +Picture=0,0,5,15 +Rotate=1 diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DescDE.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DescDE.txt new file mode 100644 index 00000000..c44a2d3d --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DescDE.txt @@ -0,0 +1 @@ +Geschoss für die Artillerie. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DescUS.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DescUS.txt new file mode 100644 index 00000000..8c08ef2d --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/DescUS.txt @@ -0,0 +1 @@ +Bullet for artillery. \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Graphics.png new file mode 100644 index 00000000..16af89c2 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Names.txt new file mode 100644 index 00000000..7d17d328 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Geschoss +US:Bullet \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Script.c new file mode 100644 index 00000000..b799f78b --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Geschoss.c4d/Script.c @@ -0,0 +1,28 @@ +/*-- Geschoss --*/ + +#strict + +func Initialize() { + return(1); +} + +func ResetRotation() { + SetR(Angle(GetX(),GetY(),GetX()+GetXDir(),GetY()+GetYDir()),this()); +} + +func Hit() { + for(var i=RandomX(10,15); i>0; --i) + { + var obj=CreateObject(CGFR, 0, 0, GetController()); + var xdir = RandomX(-70,70); + var ydir = RandomX(-70,70); + var angle = Angle(0,0,xdir,ydir); + + obj->SetExplodeSize(10+Random(10)); + SetSpeed(xdir, ydir, obj); + if(!Random(2)) + CreateSmokeTrail(RandomX(20,30),angle+RandomX(-30,30),0,0,this()); + } + + Explode(45); +} diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/ActMap.txt" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/ActMap.txt" new file mode 100644 index 00000000..c64dd702 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/ActMap.txt" @@ -0,0 +1,15 @@ +[Action] +Name=Backdraft +Facet=0,0,6,68,0,0 +Length=6 +Delay=1 +NextAction=Redraft + +[Action] +Name=Redraft +Facet=0,0,6,68,0,0 +Length=6 +Delay=3 +Reverse=1 +NextAction=Idle +EndCall=EjectBullet \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DefCore.txt" new file mode 100644 index 00000000..9e170edf --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DefCore.txt" @@ -0,0 +1,18 @@ +[DefCore] +id=_GES +Version=4,9,8,2 +Name=Geschütz +Category=C4D_StaticBack +MaxUserSelect=10 +Width=6 +Height=68 +Offset=-3,-34 +Vertices=3 +VertexX=0,3,-3 +VertexY=-33,33,33 +VertexFriction=50,50,50 +Value=100 +Mass=150 +Components=METL=2 +Picture=0,0,6,68 +Rotate=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DescDE.txt" new file mode 100644 index 00000000..1c3f63a4 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DescDE.txt" @@ -0,0 +1 @@ +Das Herz der Artillerie. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DescUS.txt" new file mode 100644 index 00000000..41eb7b6b --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/DescUS.txt" @@ -0,0 +1 @@ +Heart of an artillery. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Graphics.png" new file mode 100644 index 00000000..b813253b Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Names.txt" new file mode 100644 index 00000000..81fa877f --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Geschütz +US:Cannon \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Script.c" new file mode 100644 index 00000000..f4723065 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Gesch\303\274tz.c4d/Script.c" @@ -0,0 +1,12 @@ +/*-- Geschütz --*/ + +#strict + +func Initialize() { + + return(1); +} + +func EjectBullet() { + CreateParticle("BulletCasing",0,0,RandomX(-30,0),RandomX(-30,-10),40); +} diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Graphics.png b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Graphics.png new file mode 100644 index 00000000..d3dec248 Binary files /dev/null and b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Names.txt new file mode 100644 index 00000000..79b6bbed --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Artillerie +US:Artillery \ No newline at end of file diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Script.c b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Script.c new file mode 100644 index 00000000..5f70e410 --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Artillerie.c4d/Script.c @@ -0,0 +1,69 @@ +/*-- Artillerie --*/ + +#strict + +local pCannon; +local bRotate,bDirection; +local iCooldown; + +func Initialize() { + + pCannon=CreateObject(_GES,0,49,-1); + SetR(RandomX(-44,44),pCannon); + return(1); +} + +func Rotation() { + +iCooldown--; + +if(!bRotate) return(0); + +if(GetR(pCannon)> 45) {bRotate=0; SetR(GetR(pCannon)-1,pCannon); Sound("CannonStop"); return(0);} +if(GetR(pCannon)<-45) {bRotate=0; SetR(GetR(pCannon)+1,pCannon); Sound("CannonStop"); return(0);} + +if(bDirection==0) {Sound("CannonRotation"); SetR(GetR(pCannon)+1,pCannon);} +if(bDirection==1) {Sound("CannonRotation"); SetR(GetR(pCannon)-1,pCannon);} + +} + +func ControlRight() { + bRotate=1; + bDirection=0; +} + +func ControlLeft() { + bRotate=1; + bDirection=1; +} + +func ControlDown() { + bRotate=0; + Sound("CannonStop"); +} + +func ControlUp() { + ControlDown(); +} + +func ControlDig(object byObj) { + if(iCooldown > 0) return(1); + iCooldown=50; + var iX=Sin(GetR(pCannon),34); + var iY=-Cos(GetR(pCannon),34)-3; + + Sound("Blast2"); + var pProjectile=CreateObject(_GSS,iX,iY,GetOwner(FindObject(HZCK,0,0,0,0,0,"Push",this()))); + SetPlrView(GetController(byObj),pProjectile); + SetXDir( Sin(GetR(pCannon),RandomX(14,16)),pProjectile,1); + SetYDir(-Cos(GetR(pCannon),RandomX(14,16)),pProjectile,1); + SetPlrView(GetOwner(FindObject(HZCK,0,0,0,0,0,"Push",this())),pProjectile); + ObjectSetAction(pCannon,"Backdraft"); + CreateParticle("LightFlash",iX,iY,0,0,500,RGBa(255,255,255,32)); + var iSmoke1=14; + while(iSmoke1) {CreateParticle("Smoke",iX,iY,0,0,RandomX(50,100),RGB(96,96,96)); iSmoke1--;} + MuzzleFlash(RandomX(30,75),this(),iX,iY,GetR(pCannon)); +} + + + diff --git a/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Names.txt b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Names.txt new file mode 100644 index 00000000..a576f94a --- /dev/null +++ b/Hazard.c4f/DM_Baldoon.c4s/Waffen.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Waffen +US:Weapons diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/ActMap.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/ActMap.txt" new file mode 100644 index 00000000..4fa8e2a7 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/ActMap.txt" @@ -0,0 +1,4 @@ +[Action] +Name=Locked +Facet=72,0,72,11 +Length=1 \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/DefCore.txt" new file mode 100644 index 00000000..5248ca0d --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/DefCore.txt" @@ -0,0 +1,21 @@ +[DefCore] +id=BRDB +Version=4,9,8,2 +Name=BurnedBridge +Category=C4D_Structure +Width=72 +Height=11 +Offset=-36,-5 +Vertices=3 +VertexX=-32,31,-24 +VertexY=-5,0,5 +VertexCNAT=5,6,9 +VertexFriction=100,100,20,20 +Value=1 +Mass=100 +Components=WOOD=2 +Picture=0,0,72,11 +BlastIncinerate=50 +Grab=1 +Rotate=1 +Float=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/Graphics.png" new file mode 100644 index 00000000..b886e56f Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/Names.txt" new file mode 100644 index 00000000..48f52a5c --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Burned.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Verbranntes Brückensegment +US:Burned bridge segment diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DefCore.txt" new file mode 100644 index 00000000..06c95db1 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DefCore.txt" @@ -0,0 +1,22 @@ +[DefCore] +id=BRDG +Version=4,9,8,2 +Name=Bridge +Category=C4D_Vehicle|C4D_SelectVehicle|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=5 +Width=72 +Height=11 +Offset=-36,-5 +Vertices=4 +VertexX=-36,35,-36,35 +VertexY=-5,-5,5,5 +VertexCNAT=5,6,9,10 +VertexFriction=100,100,20,20 +Value=5 +Mass=100 +Components=WOOD=2 +Picture=0,14,70,50 +BurnTo=BRDB +Rebuy=1 +Grab=1 +Float=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DescDE.txt" new file mode 100644 index 00000000..f8a5f52c --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DescDE.txt" @@ -0,0 +1 @@ +Vorsichtig an Kanten heranschieben. Doppelklick 'Graben' zum Verankern. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DescUS.txt" new file mode 100644 index 00000000..d36e7f62 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/DescUS.txt" @@ -0,0 +1 @@ +Double click 'dig' to lock segments in place. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Graphics.png" new file mode 100644 index 00000000..bc623432 Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Names.txt" new file mode 100644 index 00000000..48a30ac7 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Brückensegment +US:Bridge segment diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Script.c" new file mode 100644 index 00000000..b7533c8d --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/Script.c" @@ -0,0 +1,64 @@ +/*-- Brückensegment --*/ + +#strict + +local is_locked; // Ist im Boden verankert? + +protected func Initialize() { + // Im Freien erzeugte Brückensegmente sind verankert + if (!Contained()) + Lock(1, 1); + return(1); +} + +protected func Entrance() { + // Im Behälter: lösen + Release(1); + return(1); +} + +public func ControlDigDouble(caller) { + [$TxtLock$] + // Wenn verankert lösen + if (is_locked) Release(); + // sonst verankern + else Lock(); + return(1); +} + +private func Lock(quiet, dont_descend) { + SetAction("Locked"); + SetSolidMask(0, 11, 72, 3); + is_locked = 1; + + if (!quiet) + Sound("Connect"); + + // Verankern + if (!dont_descend) + if (!GBackSolid(0, 11)) + SetPosition(GetX(), GetY()+11); + return(1); +} + +private func Release(quiet, dont_ascend) { + SetAction("Idle"); + SetSolidMask(); + is_locked = 0; + + if (!quiet) + Sound("Connect"); + + // Aus der Erde lösen + if (!dont_ascend) { + var ascend_pixels = 0; + while (Stuck() && (++ascend_pixels < 12)) + SetPosition(GetX(), GetY()-1); + } + + return(1); +} + +public func IsBridge() { return(1); } + +public func IsLocked() { return(is_locked); } diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/StringTblDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/StringTblDE.txt" new file mode 100644 index 00000000..54f0a2ad --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/StringTblDE.txt" @@ -0,0 +1 @@ +TxtLock=Verankern \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/StringTblUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/StringTblUS.txt" new file mode 100644 index 00000000..208ddfa1 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Bridge.c4d/StringTblUS.txt" @@ -0,0 +1 @@ +TxtLock=Lock in place \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/ActMap.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/ActMap.txt" new file mode 100644 index 00000000..81495dd2 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/ActMap.txt" @@ -0,0 +1,25 @@ +[Action] +Name=GateStill +Facet=0,0,10,60 +Length=11 +Delay=0 +NextAction=Hold + +[Action] +Name=GateOpen +Facet=0,0,10,60 +Length=11 +Delay=5 +PhaseCall=CheckSolidMask +EndCall=Opened +Sound=Elevator + +[Action] +Name=GateClose +Facet=0,0,10,60 +Length=11 +Delay=5 +PhaseCall=CheckSolidMask +EndCall=Stop +Reverse=1 +Sound=Elevator \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DefCore.txt" new file mode 100644 index 00000000..0ff0cecf --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DefCore.txt" @@ -0,0 +1,15 @@ +[DefCore] +id=_HN2 +Version=4,9,8,2 +Name=HangarGate +Category=C4D_StaticBack +Width=10 +Height=60 +Offset=-5,-30 +Vertices=2 +VertexY=-30,30 +VertexFriction=100,100 +Mass=200 +Components=METL=7 +SolidMask=0,0,10,60,0,0 +Picture=0,60,64,64 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DescDE.txt" new file mode 100644 index 00000000..22978d33 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DescDE.txt" @@ -0,0 +1 @@ +Schweres Metalltor. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DescUS.txt" new file mode 100644 index 00000000..6e5db345 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/DescUS.txt" @@ -0,0 +1 @@ +Reinforced metal gate. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Graphics.png" new file mode 100644 index 00000000..fb005bac Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Names.txt" new file mode 100644 index 00000000..3566b9db --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Hangartor +US:Hangar gate \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Script.c" new file mode 100644 index 00000000..08506138 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/Script.c" @@ -0,0 +1,62 @@ +/*-- Hangartor --*/ + +#strict + +protected func Initialize() +{ + SetAction("GateStill"); +} + +public func Open() // Aufmachen +{ + var phase = GetPhase(); + SetAction("GateOpen"); + SetPhase(phase); + CheckSolidMask(); +} + +protected func Opened() +{ + SetAction("GateStill"); + SetPhase(11); + StopSound(); + CheckSolidMask(); +} + +public func Close() // Zumachen +{ + var phase = 11-GetPhase(); + SetAction("GateClose"); + SetPhase(phase); + CheckSolidMask(); +} + +public func Stop() // Sofort stoppen +{ + var phase = GetPhase(); + SetAction("GateStill"); + SetPhase(phase); + StopSound(); + CheckSolidMask(); +} + +public func ConsoleControl(int i) +{ + //if(i == 1) return("$Open$"); + if(i == 1) return("$Close$"); + //if(i == 3) return("$Stop$"); +} + +public func ConsoleControlled(int i) +{ + //if(i == 1 && GetAction() ne "GateOpen") Open(); + if(i == 1 && GetAction() ne "GateClose") Close(); + //if(i == 3 && GetAction() ne "GateStill") Stop(); +} + +private func StopSound() { Sound("Discharge"); } + +private func CheckSolidMask() +{ + SetSolidMask(10*GetPhase(), 0, 10, 60, 0, 0); +} diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/StringTblDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/StringTblDE.txt" new file mode 100644 index 00000000..67794b47 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/StringTblDE.txt" @@ -0,0 +1,3 @@ +Open=Öffnen +Close=Schleuse Schließen +Stop=Stop diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/StringTblUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/StringTblUS.txt" new file mode 100644 index 00000000..3b403294 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/HangarGate2.c4d/StringTblUS.txt" @@ -0,0 +1,3 @@ +Open=Open +Close=Close Lock +Stop=Stop diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Names.txt" new file mode 100644 index 00000000..b680b57f --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Überladungen +US:Overloaded diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DefCore.txt" new file mode 100644 index 00000000..c3da973d --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DefCore.txt" @@ -0,0 +1,18 @@ +[DefCore] +id=PIWP +Version=4,9,8,2 +Name=Pistol +Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase +MaxUserSelect=2 +Width=12 +Height=7 +Offset=-6,-4 +Vertices=1 +VertexY=2 +VertexFriction=100 +Value=8 +Mass=10 +Components=METL=1 +Picture=0,9,64,64 +Rebuy=1 +Collectible=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DescDE.txt" new file mode 100644 index 00000000..659d8013 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DescDE.txt" @@ -0,0 +1 @@ +Die Sturmpistole gehört zur Standardausrüstung eines Hazardclonks. Für die nötige Durchschlagskraft sorgt der eingebaute kleine Granatenwerfer. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DescUS.txt" new file mode 100644 index 00000000..6e8fcbde --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/DescUS.txt" @@ -0,0 +1 @@ +The assault pistol is a part of the standard equipment of a Hazardclonk. Awesome firepower is granted through the small built-in grenade launcher. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Graphics.png" new file mode 100644 index 00000000..a871df37 Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Names.txt" new file mode 100644 index 00000000..b3999a3c --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Sturmpistole +US:Assault pistol \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Script.c" new file mode 100644 index 00000000..c7c0f724 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Script.c" @@ -0,0 +1,268 @@ +/*-- Pistole --*/ + +#strict + +#include WEPN + +local rifleupgrade, lasupgrade, slimeupgrade; + +// Anzeige in der Hand +public func HandSize() { return(800); } +public func HandX() { return(5500); } +public func HandY() { return(-1000); } + +public func OnReload(int i) +{ + if(i == 1) Sound("PistolLoad"); + if(i == 2) Sound("PistolLoad"); + if(i == 3) Sound("GrenadeLoad"); + if(i == 4) Sound("SlimeLoad"); + if(i == 5) Sound("GrenadeLoad"); +} + +public func FMData1(int data) +{ + if(data == FM_Name) return("$Standard$"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(12); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(18); + if(data == FM_Condition) return(!lasupgrade); + + if(data == FM_Damage) return(19); + + return(Default(data)); +} + +public func BotData1(int data) +{ + if(data == BOT_Range) return(480); + + return(Default(data)); +} + +//Laser +public func FMData2(int data) +{ + if(data == FM_Name) return("$Laser$"); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(10); + + if(data == FM_Reload) return(50); + if(data == FM_Recharge) return(16); + + if(data == FM_Condition) return(lasupgrade); + + if(data == FM_Damage) return(26); + + return(Default(data)); +} + +public func BotData2(int data) +{ + if(data == BOT_Range) return(350); + if(data == BOT_DmgType) return(DMG_Energy); + + return(Default(data)); +} + +//Granate +public func FMData3(int data) +{ + if(data == FM_Name) return("$GrenadeLauncher$"); + if(data == FM_AmmoID) return(GRAM); + if(data == FM_AmmoLoad) return(1); + + if(data == FM_Reload) return(80); + + if(data == FM_Condition) return(!slimeupgrade); + + if(data == FM_Damage) return(30); + + return(Default(data)); +} + +public func BotData3(int data) +{ + if(data == BOT_Range) return(350); + if(data == BOT_DmgType) return(DMG_Energy); + + return(Default(data)); +} + +public func FMData4(int data) +{ + if(data == FM_Name) return("$Slime$"); + if(data == FM_AmmoID) return(STAM); + if(data == FM_AmmoLoad) return(10); + + if(data == FM_Reload) return(80); + if(data == FM_Recharge) return(20); + + if(data == FM_Condition) return(slimeupgrade); + + if(data == FM_Damage) return(20); + + return(Default(data)); +} + +public func BotData4(int data) +{ + if(data == BOT_Range) return(50); + if(data == BOT_DmgType) return(DMG_Bio); + if(data == BOT_Ballistic) return(true); + if(data == BOT_Power) return(BOT_Power_1); + + return(Default(data)); +} + +public func FMData5(int data) +{ + if(data == FM_Name) return("$Teleport$"); + if(data == FM_AmmoID) return(ENAM); + if(data == FM_AmmoLoad) return(10); + if(data == FM_AmmoUsage) return(2); + if(data == FM_Reload) return(50); + if(data == FM_Recharge) return(50); + + if(data == FM_Condition) return(rifleupgrade); + + //if(data == FM_Damage) return(20); + + return(Default(data)); +} + +public func BotData5(int data) +{ + if(data == BOT_Range) return(0); + if(data == BOT_DmgType) return(); + if(data == BOT_Power) return(); + + return(Default(data)); +} + +public func Fire1() // Projektilschuss +{ + var user = GetUser(); + var angle = user->AimAngle(20) + RandomX(-1,+1); + var x,y; user->WeaponEnd(x,y); + var ammo = CreateObject(SHT1,x,y,GetController(user)); + ammo->Launch(angle,250,600,5,300,GetFMData(FM_Damage, 1)); + + // Effekte + MuzzleFlash(40,user,x,y,angle); + var dir = GetDir(user)*2-1; + BulletCasing(dir*6,3,-dir*5,-20,5); + + // Sound + Sound("Pistol"); +} + +public func Fire2() // Laserschuss +{ + var user = GetUser(); + var angle = user->AimAngle(5); + var x,y; user->WeaponEnd(x,y); + var dir = GetDir(user)*2-1; + var laser = CreateObject(LASR,x,y,GetController(user)); + laser->Set(angle,8,350,15,this()); + // Effekte + MuzzleFlash(40,user,x,y,angle,RGB(255,32,0)); + + // Sound + Sound("LaserShot",0,laser); +} + +public func Fire3() // Granatenwerfer +{ + var user = GetUser(); + var dir = GetDir(user)*2-1; + var angle = user->AimAngle(5) + RandomX(-5,5); + var x,y; user->WeaponEnd(x,y); + + var xdir = Sin(angle,50); + var ydir = -Cos(angle,50); + + // Create & launch + var grenade=CreateObject(GREN, x+xdir/10,y+ydir/10, GetController(user)); + grenade->Launch(xdir+GetXDir(user)/2,ydir+GetYDir(user)/2, GetFMData(FM_Damage, 3)); + + Sound("GrenadeFire"); +} + +public func Fire4() // Schleimschuss +{ + var user = GetUser(); + var dir = GetDir(user)*2-1; + var angle = user->AimAngle(5) + RandomX(-5,5); + var x,y; user->WeaponEnd(x,y); + + var xdir = Sin(angle,50); + var ydir = -Cos(angle,50); + + // Create & launch + var slime=CreateObject(SLST, x+xdir/10,y+ydir/10, GetController(user)); + slime->Launch(xdir+GetXDir(user)/2,ydir+GetYDir(user)/2,GetFMData(FM_Damage, 4)); + + // Sound + Sound("SlimeShot"); +} + +public func Fire5() // Teleporter +{ + var user = GetUser(); + var dir = GetDir(user)*2-1; + var angle = user->AimAngle(5) + RandomX(-5,5); + var x,y; user->WeaponEnd(x,y); + + var xdir = Sin(angle,75); + var ydir = -Cos(angle,75); + + // Create & launch + var teleport=CreateObject(_TEL, x+xdir/10,y+ydir/10, GetController(user)); + teleport->Launch(xdir+GetXDir(user)/2,ydir+GetYDir(user)/2, GetFMData(FM_Damage, 3)); + SetCursor(GetOwner(user),teleport); + SetPlrView(GetOwner(user),teleport); + SetComDir(COMD_Down(),user); + + Sound("GrenadeFire"); +} + +/* Treffer-Callbacks */ + +public func LaserStrike(object pTarget) { // Laser trifft + if(pTarget) + DoDmg(GetFMData(FM_Damage, 2), DMG_Energy, pTarget); + return(1); +} + +/* Upgrade */ + +public func IsUpgradeable(id uid) { + if(uid == KLAS && !lasupgrade) return("$KLASUpgradeDesc$"); + if(uid == KSLM && !slimeupgrade) return("$KSLMUpgradeDesc$"); + if(uid == KRFL && !rifleupgrade) return("$KRFLUpgradeDesc$"); +} + +public func Upgrade(id uid) { + var own = GetOwner(Contained()); + if(uid == KLAS) { + SetFireMode(2); + lasupgrade=true; + if(Contained()) HelpMessage(own, "$KLASUpgraded$", Contained()); + return(true); + } + if(uid == KSLM) { + SetFireMode(4); + slimeupgrade=true; + if(Contained()) HelpMessage(own, "$KSLMUpgraded$", Contained()); + return(true); + } + if(uid == KRFL) { + SetFireMode(5); + rifleupgrade=true; + if(Contained()) HelpMessage(own, "$TeleportUpgraded$", Contained()); + return(true); + } +} diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/StringTblDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/StringTblDE.txt" new file mode 100644 index 00000000..5f88be5f --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/StringTblDE.txt" @@ -0,0 +1,13 @@ +Standard=Einzelschuss +GrenadeLauncher=Granatenwerfer +Laser=Laser +Slime=Schleim +Teleport=Translocator + +KLASUpgradeDesc=Ersetzt den Schussmechanismus durch einen Laser. +KSLMUpgradeDesc=Ersetzt den Granatenmechanismus durch Schleimschüsse. +KRFLUpgradeDesc=Fügt den Translocator Mechanismus hinzu. + +KLASUpgraded=Schussmechanismus durch|einen Laser ersetzt. +KSLMUpgraded=Granatenmechanismus durch|Schleimwerfer ersetzt. +TeleportUpgraded=Translocator hinzugefügt. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/StringTblUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/StringTblUS.txt" new file mode 100644 index 00000000..45870436 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/StringTblUS.txt" @@ -0,0 +1,13 @@ +Standard=Single shots +GrenadeLauncher=Grenade launcher +Laser=Laser +Slime=Slime +Teleport=Translocator + +KLASUpgradeDesc=Replaces the fire mechanism with a laser. +KSLMUpgradeDesc=Replaces the grenade mechanism with slime shots. +KRFLUpgradeDesc=Adds the translocator mechanism. + +KLASUpgraded=Replaced the fire mechanism with a laser. +KSLMUpgraded=Replaced the grenade mechanism with slime thrower. +TeleportUpgraded=Added Translocator. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DefCore.txt" new file mode 100644 index 00000000..68ab2ef4 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DefCore.txt" @@ -0,0 +1,19 @@ +[DefCore] +id=_TEL +Version=4,9,8,2 +Name=Teleprojektil +Category=C4D_Vehicle +MaxUserSelect=10 +Timer=1 +TimerCall=CheckCursor +Width=5 +Height=5 +Offset=-2,-2 +Vertices=5 +VertexX=0,-1,-1,1,1 +VertexY=0,-1,1,-1,1 +VertexCNAT=0,5,9,6,10 +VertexFriction=0,20,20,20,20 +Mass=3 +Picture=5,0,64,64 +BorderBound=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DescDE.txt" new file mode 100644 index 00000000..a4186f3d --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DescDE.txt" @@ -0,0 +1 @@ +Teleportiert den Clonk. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DescUS.txt" new file mode 100644 index 00000000..95cb0541 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/DescUS.txt" @@ -0,0 +1 @@ +Teleports the Clonk. \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Graphics.png" new file mode 100644 index 00000000..2b2265d6 Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Names.txt" new file mode 100644 index 00000000..45bd42cb --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Teleprojektil +US:Teleprojectile \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Script.c" new file mode 100644 index 00000000..22f8c579 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/Script.c" @@ -0,0 +1,49 @@ +/*-- Teleprojektil --*/ + +#strict + +local iRemoveTimer; +local user; + +func Initialize() +{ +user=GetCrew(GetController()); +iRemoveTimer=175; +SetPlrViewRange(50); +} + +func Hit() +{ + Sound("Bip"); +} + +func ControlDigDouble() +{ + //var user= + var xpos=GetX(); + var ypos=GetY(); + + if(GBackSolid(-2,-20) || GBackSolid(2,-20) || GBackSolid(0,-10)) {Message("$BadPlace$",user); SetCursor(GetController(),user); return(RemoveObject());} + + DrawParticleLine("XSpark",0,0,GetX(user)-xpos,GetY(user)-ypos,1,50,RGBa(255,0,0,128),RGBa(0,255,0,128)); + SetPosition(xpos,ypos-12,user); + SetCursor(GetController(),user); + RemoveObject(); + Sound("Electric"); + CastObjects(SPRK,20,30,0,-20); + Sound("Fire1"); + +} + +func Launch(int xdir, int ydir, int iDmg) +{ + SetSpeed(xdir, ydir); +} + +func CheckCursor() { + iRemoveTimer--; + if(!iRemoveTimer) {SetCursor(GetController(),user); RemoveObject();} + //if(!GetCursor(GetOwner(this()))==this()) RemoveObject(); +} + +func IsBouncy() { return(true); } diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/StringTblDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/StringTblDE.txt" new file mode 100644 index 00000000..79f3dd85 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/StringTblDE.txt" @@ -0,0 +1 @@ +BadPlace=Zielort ungeeignet \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/StringTblUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/StringTblUS.txt" new file mode 100644 index 00000000..7ff47493 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Pistol.c4d/Teleprojektil.c4d/StringTblUS.txt" @@ -0,0 +1 @@ +BadPlace=Target location unsuitable \ No newline at end of file diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DefCore.txt" new file mode 100644 index 00000000..dab22ed9 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DefCore.txt" @@ -0,0 +1,26 @@ +[DefCore] +id=_TR1 +Version=4,9,8,2 +Name=Tree1 +Category=C4D_StaticBack|C4D_SelectVegetation +MaxUserSelect=10 +Timer=350 +TimerCall=Seed +Width=72 +Height=73 +Offset=-36,-36 +Vertices=3 +VertexX=-2,-10,10 +VertexY=29,-26,-26 +VertexFriction=50,50,50 +FireTop=10 +Value=5 +Mass=400 +Components=WOOD=7 +Picture=0,0,72,73 +Growth=1 +Grab=1 +Rotate=1 +Chop=1 +Float=1 +StretchGrowth=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DescDE.txt" new file mode 100644 index 00000000..a6f65548 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DescDE.txt" @@ -0,0 +1 @@ +Kann gefällt und zu Holz zersägt werden. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DescUS.txt" new file mode 100644 index 00000000..748354a5 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/DescUS.txt" @@ -0,0 +1 @@ +Chop down and cut to wood. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Graphics.png" new file mode 100644 index 00000000..02458e8f Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Names.txt" new file mode 100644 index 00000000..94964eee --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Baum +US:Tree diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Script.c" new file mode 100644 index 00000000..212c8f21 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree1.c4d/Script.c" @@ -0,0 +1,9 @@ +/*-- Baum --*/ + +#strict + +#include TREE + +func Initialize() { + SetGraphics(0,this(),TRE1); +} diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DefCore.txt" new file mode 100644 index 00000000..3c8e6c4b --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DefCore.txt" @@ -0,0 +1,26 @@ +[DefCore] +id=_TR2 +Version=4,9,8,2 +Name=Tree2 +Category=C4D_StaticBack|C4D_SelectVegetation +MaxUserSelect=10 +Timer=350 +TimerCall=Seed +Width=40 +Height=56 +Offset=-20,-28 +Vertices=3 +VertexX=2,-5,5 +VertexY=22,-23,-23 +VertexFriction=50,50,50 +FireTop=20 +Value=3 +Mass=300 +Components=WOOD=5 +Picture=0,0,40,56 +Growth=2 +Grab=1 +Rotate=1 +Chop=1 +Float=1 +StretchGrowth=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DescDE.txt" new file mode 100644 index 00000000..a6f65548 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DescDE.txt" @@ -0,0 +1 @@ +Kann gefällt und zu Holz zersägt werden. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DescUS.txt" new file mode 100644 index 00000000..748354a5 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/DescUS.txt" @@ -0,0 +1 @@ +Chop down and cut to wood. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Graphics.png" new file mode 100644 index 00000000..02458e8f Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Names.txt" new file mode 100644 index 00000000..94964eee --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Baum +US:Tree diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Script.c" new file mode 100644 index 00000000..f371ac55 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree2.c4d/Script.c" @@ -0,0 +1,9 @@ +/*-- Baum --*/ + +#strict + +#include TREE + +func Initialize() { + SetGraphics(0,this(),TRE2); +} diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DefCore.txt" new file mode 100644 index 00000000..f98cb51a --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DefCore.txt" @@ -0,0 +1,26 @@ +[DefCore] +id=_TR3 +Version=4,9,8,2 +Name=Tree3 +Category=C4D_StaticBack|C4D_SelectVegetation +MaxUserSelect=10 +Timer=350 +TimerCall=Seed +Width=52 +Height=75 +Offset=-26,-37 +Vertices=3 +VertexX=-14,9,-2 +VertexY=-26,-26,31 +VertexFriction=50,50,50 +FireTop=30 +Value=5 +Mass=350 +Components=WOOD=5 +Picture=0,0,52,75 +Growth=2 +Grab=1 +Rotate=1 +Chop=1 +Float=1 +StretchGrowth=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DescDE.txt" new file mode 100644 index 00000000..a6f65548 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DescDE.txt" @@ -0,0 +1 @@ +Kann gefällt und zu Holz zersägt werden. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DescUS.txt" new file mode 100644 index 00000000..748354a5 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/DescUS.txt" @@ -0,0 +1 @@ +Chop down and cut to wood. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Graphics.png" new file mode 100644 index 00000000..02458e8f Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Names.txt" new file mode 100644 index 00000000..94964eee --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Baum +US:Tree diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Script.c" new file mode 100644 index 00000000..5e5a0eec --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree3.c4d/Script.c" @@ -0,0 +1,9 @@ +/*-- Baum --*/ + +#strict + +#include TREE + +func Initialize() { + SetGraphics(0,this(),TRE3); +} diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/ActMap.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/ActMap.txt" new file mode 100644 index 00000000..425e9c03 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/ActMap.txt" @@ -0,0 +1,33 @@ +[Action] +Name=Initialize +Directions=2 +FlipDir=1 +Length=20 +Delay=1 +FacetBase=1 +NextAction=Still +PhaseCall=Initializing + +[Action] +Name=Still +Directions=2 +FlipDir=1 +Length=1 +Delay=50 +Facet=0,0,40,56 +FacetBase=0 +NextAction=Still +StartCall=Still + +[Action] +Name=Breeze +Directions=2 +FlipDir=1 +Length=20 +Delay=5 +Facet=0,0,40,56 +FacetBase=0 +NextAction=Breeze +StartCall=Breeze + + diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DefCore.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DefCore.txt" new file mode 100644 index 00000000..209a11b0 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DefCore.txt" @@ -0,0 +1,27 @@ +[DefCore] +id=_TR4 +Version=4,9,8,2 +Name=Coniferous +Category=C4D_StaticBack|C4D_SelectVegetation +MaxUserSelect=10 +Timer=350 +TimerCall=Seed +Width=40 +Height=56 +Offset=-20,-28 +Vertices=3 +VertexX=-4,-2,4 +VertexY=20,-15,15 +VertexFriction=50,50,50 +FireTop=5 +Value=4 +Mass=350 +Components=WOOD=3 +Picture=0,0,40,56 +Growth=2 +Grab=1 +Rotate=1 +Chop=1 +Float=1 +StretchGrowth=1 +IncompleteActivity=1 diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DescDE.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DescDE.txt" new file mode 100644 index 00000000..a6f65548 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DescDE.txt" @@ -0,0 +1 @@ +Kann gefällt und zu Holz zersägt werden. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DescUS.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DescUS.txt" new file mode 100644 index 00000000..748354a5 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/DescUS.txt" @@ -0,0 +1 @@ +Chop down and cut to wood. diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Graphics.png" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Graphics.png" new file mode 100644 index 00000000..02458e8f Binary files /dev/null and "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Graphics.png" differ diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Names.txt" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Names.txt" new file mode 100644 index 00000000..e71332b1 --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Names.txt" @@ -0,0 +1,2 @@ +DE:Nadelbaum +US:Coniferous tree diff --git "a/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Script.c" "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Script.c" new file mode 100644 index 00000000..840965fc --- /dev/null +++ "b/Hazard.c4f/DM_Baldoon.c4s/\303\234berladungen.c4d/Tree4.c4d/Script.c" @@ -0,0 +1,44 @@ +/*-- Nadelbaum --*/ + +#strict + +#include TREE + +func Initialize() { + SetGraphics(0,this(),TRE4); +} + +/* Initialisierung */ + +protected func Construction() +{ + // Bewegungsschwelle + Local(0)=Random(10); + // Aktionszeitoffset + Local(1)=Random(20); + // Verzögerte Initialisierung + SetAction("Initialize"); + // Ausrichtung + SetDir(Random(2)); + return(0); +} + +private func Initializing() +{ + if (GetPhase() == Local(0)) SetAction("Still"); + return(1); +} + +/* Bewegung (Wind) */ + +private func Still() +{ + if (Abs(GetWind()) > 49 + Local(0)) SetAction("Breeze"); + return(1); +} + +private func Breeze() +{ + if (Abs(GetWind()) < 50 + Local(0)) SetAction("Still"); + return(1); +} diff --git a/Hazard.c4f/DM_Factory.c4s/DescDE.rtf b/Hazard.c4f/DM_Factory.c4s/DescDE.rtf new file mode 100644 index 00000000..d89f88c6 Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/DM_Factory.c4s/DescUS.rtf b/Hazard.c4f/DM_Factory.c4s/DescUS.rtf new file mode 100644 index 00000000..1e570dfe Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DefCore.txt b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DefCore.txt new file mode 100644 index 00000000..f571c62e --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DefCore.txt @@ -0,0 +1,13 @@ +[DefCore] +id=FNNL +Version=4,9,8,2 +Name=Funnel +Category=C4D_StaticBack +Timer=1 +TimerCall=Reek +Width=10 +Height=10 +Offset=-5,-5 +Rotate=1 +Oversize=1 +NoStabilize=1 diff --git a/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DescDE.txt b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DescDE.txt new file mode 100644 index 00000000..7bc57493 --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DescDE.txt @@ -0,0 +1 @@ +Stinkt ganz gewaltig. \ No newline at end of file diff --git a/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DescUS.txt b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DescUS.txt new file mode 100644 index 00000000..7dc9428f --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/DescUS.txt @@ -0,0 +1 @@ +Massive reek. \ No newline at end of file diff --git a/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Graphics.png b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Graphics.png new file mode 100644 index 00000000..a6171d47 Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Names.txt b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Names.txt new file mode 100644 index 00000000..9625158c --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Schlot +US:Funnel diff --git a/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Script.c b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Script.c new file mode 100644 index 00000000..39162b83 --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Funnel.c4d/Script.c @@ -0,0 +1,19 @@ +/*-- Rauch --*/ + +#strict + + +public func Reek() { + + var size = GetCon(); + + var dirrand = RandomX(-size/15,size/15); + var xdir = +Sin(GetR()+dirrand,size/4); + var ydir = -Cos(GetR()+dirrand,size/4); + + CreateParticle("Thrust",0,0,xdir,ydir,RandomX(size*4/5,size),RGBa(255,200,200,60),0,0); + + //CreateParticle("Smoke2",0,0,xdir,ydir,RandomX(size,size*5/4),RGBa(220,200,180,0),0,0); + Smoke(0,0,size/5); + +} \ No newline at end of file diff --git a/Hazard.c4f/DM_Factory.c4s/Icon.png b/Hazard.c4f/DM_Factory.c4s/Icon.png new file mode 100644 index 00000000..b1a98afc Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/Icon.png differ diff --git a/Hazard.c4f/DM_Factory.c4s/Landscape.bmp b/Hazard.c4f/DM_Factory.c4s/Landscape.bmp new file mode 100644 index 00000000..6d93b5e7 Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/DM_Factory.c4s/Scenario.txt b/Hazard.c4f/DM_Factory.c4s/Scenario.txt new file mode 100644 index 00000000..5aadb56a --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Scenario.txt @@ -0,0 +1,50 @@ +[Head] +Icon=16 +Title=Factory +MinPlayer=1 +Origin=Hazard.c4f\DM_Factory.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GLMS=5;GTDM=10 +Rules=CHOS=1 + +[Player1] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Sky +MapWidth=80,0,64,250 +MapHeight=80,0,40,250 + +[Weather] +Climate=40,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/DM_Factory.c4s/Script.c b/Hazard.c4f/DM_Factory.c4s/Script.c new file mode 100644 index 00000000..7962239a --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Script.c @@ -0,0 +1,334 @@ +/*-- Fabrik --*/ + +#strict + +func Initialize() +{ + // Deko + CreateObject(CON1, 958, 740, -1); + CreateObject(CON1, 650, 750, -1); + CreateObject(CON1, 758, 750, -1); + CreateObject(CON1, 480, 180, -1); + CreateObject(CON1, 530, 180, -1); + CreateObject(CON1, 495, 144, -1); + CreateObject(CRN1, 335, 68, -1)->Set(8); + CreateObject(CRN1, 680, 68, -1)->Set(10); + //CreateObject(ENGT, 240, 160, -1); + //CreateObject(HSGN, 820, 430, -1); + //CreateObject(GSTA, 160, 450, -1); + //CreateObject(VENT, 200, 410, -1)->SetCon(25); + //CreateObject(CLVM, 240, 740, -1); + //CreateObject(SPVM, 200, 740, -1); + //CreateObject(GAT2, 540, 720, -1); + + CreateObject(GSTA, 278, 590, -1); + CreateObject(GSTA, 228, 590, -1); + CreateObject(GSTA, 178, 590, -1); + + CreateObject(LBGH, 250, 610, -1); + CreateObject(LBGH, 730, 660, -1); + CreateObject(LBGH, 520, 460, -1); + CreateObject(LBGH, 680, 320, -1); + CreateObject(LBGH, 450, 200, -1)->Set(150); + CreateObject(LBGH, 730, 60, -1); + CreateObject(LBGH, 350, 60, -1); + + CreateObject(FENC, 150, 593, -1); + CreateObject(FENC, 210, 593, -1); + CreateObject(FENC, 270, 593, -1); + CreateObject(FENC, 330, 593, -1); + + //CreateObject(ENGT, 155, 660, -1)->SetClrModulation(RGB(190,185,185)); + + //CreateObject(BART, 610, 640, -1)->SetRail([1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1]); + + CreateObject(LADR, 255, 410, -1)->Set(9); + CreateObject(LADR, 195, 130, -1)->Set(9); + CreateObject(LADR, 460, 330, -1)->Set(5); + CreateObject(LADR, 825, 100, -1)->Set(7); + CreateObject(LADR, 570, 520, -1)->Set(6); + + // Jumppads + CreateObject(JMPD, 986, 716, -1)->Set(75, -25); + CreateObject(JMPD, 490, 750, -1)->Set(80, 25); + CreateObject(JMPD, 482, 750, -1)->Set(100, -25); + CreateObject(JMPD, 618, 650, -1)->Set(99, 35); + CreateObject(JMPD, 906, 500, -1)->Set(80, -45, -90); + CreateObject(JMPD, 886, 650, -1)->Set(80, -15); + CreateObject(JMPD, 834, 520, -1)->Set(60, 25, 90); + CreateObject(JMPD, 986, 450, -1)->Set(120, -75); + CreateObject(JMPD, 350, 600, -1)->Set(100, 60); + CreateObject(JMPD, 466, 540, -1)->Set(75, -20, -90); + CreateObject(JMPD, 386, 460, -1)->Set(100, 35); + CreateObject(JMPD, 124, 360, -1)->Set(70, 15); + CreateObject(JMPD, 825, 510, -1)->Set(110, 10); + CreateObject(JMPD, 254, 300, -1)->Set(85, 32); + CreateObject(JMPD, 750, 310, -1)->Set(85, 15); + CreateObject(JMPD, 726, 450, -1)->Set(80, 45); + CreateObject(JMPD, 494, 450, -1)->Set(80, 15); + // Waffen & Ausrüstung + PlaceSpawnpoint(PGWP, 240, 730); + PlaceSpawnpoint(STAP, 220, 730); + PlaceSpawnpoint(GRAP, 510, 730); + PlaceSpawnpoint(GLWP, 710, 630); + PlaceSpawnpoint(GRAP, 730, 630); + PlaceSpawnpoint(KSLM, 940, 700); + PlaceSpawnpoint(BZWP, 940, 430); + PlaceSpawnpoint(MIAP, 960, 430); + PlaceSpawnpoint(GLWP, 200, 170); + PlaceSpawnpoint(GRAP, 220, 170); + PlaceSpawnpoint(KLAS, 970, 270); + PlaceSpawnpoint(DRSU, 950, 340); + PlaceSpawnpoint(ENWP, 600, 430); + PlaceSpawnpoint(ENAP, 620, 430); + PlaceSpawnpoint(MINE, 160, 420); + PlaceSpawnpoint(GGWP, 200, 250); + PlaceSpawnpoint(ENAP, 180, 250); + PlaceSpawnpoint(KLAS, 490, 110); + PlaceSpawnpoint(MEDI, 680, 170); + PlaceSpawnpoint(MIWP, 930, 170); + PlaceSpawnpoint(STAP, 910, 170); + PlaceSpawnpoint(HARM, 710, 745); + PlaceSpawnpoint(JTPK, 150, 580); + PlaceSpawnpoint(GSAP, 170, 580); + PlaceSpawnpoint(KRFL, 140, 510); + PlaceSpawnpoint(ENAP, 230, 340); + PlaceSpawnpoint(GRAP, 670, 290); + PlaceSpawnpoint(STAP, 610, 170); + PlaceBonusSpawnpoint([AEXB], 330, 40, 2000); + PlaceBonusSpawnpoint([AMPB], 700, 40, 2000); + PlaceBonusSpawnpoint([BSKB,HSTB,HELB,RPFB,INVB], 70, 510); + + // Reek + CreateObject(FNNL,906,51,-1)->SetCon(200); + CreateObject(FNNL,976,169,-1)->SetCon(150); + CreateObject(FNNL,486,338,-1)->SetCon(150); + CreateObject(FNNL,346,392,-1)->SetCon(250); + CreateObject(FNNL,47,346,-1)->SetCon(150); + CreateObject(FNNL,136,114,-1)->SetCon(200); + CreateObject(FNNL,196,38,-1)->SetCon(150); + + // Sky + SetSkyParallax(0,15,15); + // Wegpunkte + CreateWaypoints(); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + var wp = FindObject(WPCH); + if(wp) + { + // und begrenzte Waren... + wp->RemoveWare(); + wp->AddWare(PIWP); // Pistole + wp->AddWare(GLWP); // Granatenwerfer + wp->AddWare(MIWP); // Minigun + wp->AddWare(BZWP); // Bazooka + wp->AddWare(KLAS); // Laser + wp->AddWare(KRFL); // Waffenteile + wp->AddWare(FLSH); // Taschenlampe + wp->AddWare(JTPK); // Jetpack + wp->AddWare(HARM); // Rüstung + wp->AddWare(HSHD); // Schild + wp->AddWare(DRSU); // Drone + wp->AddWare(MINE); // Mine + //wp->SortWare(); + } + +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + // Anzahl Zufallpositionen, iTeam verwendet für spezielle Teamstartpositionen + var rand = Random(8); + if(!rand) return [50,720]; + if(!--rand) return [610,690]; + if(!--rand) return [820,610]; + if(!--rand) return [260,570]; + if(!--rand) return [480,500]; + if(!--rand) return [970,330]; + if(!--rand) return [850,160]; + if(!--rand) return [390,140]; +} + +/* KI */ + +protected func CreateWaypoints() +{ + var wp1 = CreateWP(326,579); + var wp2 = CreateWP(330,38); + var wp3 = CreateWP(698,37); + var wp4 = CreateWP(190,169); + var wp5 = CreateWP(304,171); + var wp6 = CreateWP(495,99); + var wp7 = CreateWP(758,170); + var wp8 = CreateWP(958,170); + var wp9 = CreateWP(832,169); + var wp10 = CreateWP(750,288); + var wp11 = CreateWP(799,288); + var wp12 = CreateWP(712,288); + var wp13 = CreateWP(646,287); + var wp14 = CreateWP(521,431); + var wp15 = CreateWP(937,268); + var wp16 = CreateWP(949,338); + var wp17 = CreateWP(729,428); + var wp18 = CreateWP(496,431); + var wp19 = CreateWP(969,267); + var wp20 = CreateWP(686,430); + var wp21 = CreateWP(985,430); + var wp22 = CreateWP(932,429); + var wp23 = CreateWP(389,438); + var wp24 = CreateWP(83,509); + var wp25 = CreateWP(113,437); + var wp26 = CreateWP(484,511); + var wp27 = CreateWP(622,630); + var wp28 = CreateWP(883,630); + var wp29 = CreateWP(835,629); + var wp30 = CreateWP(669,629); + var wp31 = CreateWP(982,697); + var wp32 = CreateWP(936,696); + var wp33 = CreateWP(709,727); + var wp34 = CreateWP(229,728); + var wp35 = CreateWP(62,728); + var wp36 = CreateWP(133,580); + var wp37 = CreateWP(445,727); + var wp38 = CreateWP(477,728); + var wp39 = CreateWP(498,727); + var wp40 = CreateWP(534,727); + var wp41 = CreateWP(234,579); + var wp42 = CreateWP(140,509); + var wp43 = CreateWP(362,576); + var wp44 = CreateWP(293,438); + var wp45 = CreateWP(233,339); + var wp46 = CreateWP(125,335); + var wp47 = CreateWP(202,251); + var wp48 = CreateWP(308,280); + var wp49 = CreateWP(258,281); + var wp50 = CreateWP(384,169); + wp1 -> AddPath(wp41, Path_MoveTo, -1); + wp1 -> AddPath(wp43, Path_MoveTo, 1); + wp1 -> AddPath(wp37, Path_Jump, 1); + wp2 -> AddPath(wp6, Path_MoveTo, 1); + wp2 -> AddPath(wp4, Path_MoveTo, -1); + wp3 -> AddPath(wp6, Path_MoveTo, -1); + wp3 -> AddPath(wp9, Path_MoveTo, 1); + wp4 -> AddPath(wp5, Path_MoveTo, 1); + wp4 -> AddPath(wp45, Path_MoveTo, 1); + wp4 -> AddPath(wp35, Path_Jump, -1); + wp5 -> AddPath(wp50, Path_Jump, 1); + wp5 -> AddPath(wp4, Path_MoveTo, -1); + wp6 -> AddPath(wp50, Path_MoveTo, -1); + wp6 -> AddPath(wp7, Path_MoveTo, 1); + wp6 -> AddPath(wp3, Path_Jump, 1, 10, 3); + wp6 -> AddPath(wp2, Path_Jump, -1, 10, 2); + wp7 -> AddPath(wp9, Path_Jump, 1); + wp7 -> AddPath(wp6, Path_MoveTo, -1); + wp7 -> AddPath(wp32, Path_MoveTo, 1); + wp8 -> AddPath(wp9, Path_MoveTo, -1); + wp8 -> AddPath(wp19, Path_MoveTo, 1); + wp9 -> AddPath(wp8, Path_MoveTo, 1); + wp9 -> AddPath(wp7, Path_Jump, -1); + wp10 -> AddPath(wp8, Path_MoveTo, 1); + wp11 -> AddPath(wp12, Path_Jump, -1); + wp11 -> AddPath(wp16, Path_Backflip, 1); + wp11 -> AddPath(wp10, Path_MoveTo, -1); + wp12 -> AddPath(wp13, Path_MoveTo, -1); + wp12 -> AddPath(wp11, Path_Jump, 1); + wp12 -> AddPath(wp10, Path_MoveTo, 1); + wp13 -> AddPath(wp14, Path_Jump, -1); + wp13 -> AddPath(wp12, Path_MoveTo, 1); + wp13 -> AddPath(wp44, Path_Jump, -1, 40, 1); + wp13 -> AddPath(wp37, Path_Backflip, -1); + wp14 -> AddPath(wp18, Path_MoveTo, -1); + wp14 -> AddPath(wp37, Path_Jump, -1); + wp14 -> AddPath(wp20, Path_MoveTo, 1); + wp15 -> AddPath(wp30, Path_MoveTo, -1); + wp15 -> AddPath(wp11, Path_Backflip, -1); + wp16 -> AddPath(wp19, Path_Jump, -1); + wp17 -> AddPath(wp16, Path_MoveTo, 1); + wp18 -> AddPath(wp13, Path_MoveTo, 1); + wp19 -> AddPath(wp15, Path_MoveTo, -1); + wp20 -> AddPath(wp48, Path_MoveTo, -1, 1, 10); + wp20 -> AddPath(wp17, Path_MoveTo, 1); + wp20 -> AddPath(wp14, Path_MoveTo, -1); + wp20 -> AddPath(wp14, Path_MoveTo, -1); + wp20 -> AddPath(wp29, Path_Jump, 1); + wp21 -> AddPath(wp20, Path_MoveTo, -1); + wp22 -> AddPath(wp21, Path_MoveTo, 1); + wp22 -> AddPath(wp19, Path_Jump, -1); + wp22 -> AddPath(wp30, Path_Backflip, -1); + wp23 -> AddPath(wp13, Path_MoveTo, 1); + wp24 -> AddPath(wp25, Path_MoveTo, 1); + wp24 -> AddPath(wp35, Path_MoveTo, -1); + wp25 -> AddPath(wp44, Path_MoveTo, 1); + wp25 -> AddPath(wp24, Path_MoveTo, -1, -1, 5); + wp25 -> AddPath(wp35, Path_MoveTo, -1); + wp26 -> AddPath(wp41, Path_Backflip, -1); + wp26 -> AddPath(wp40, Path_MoveTo, 1); + wp27 -> AddPath(wp20, Path_MoveTo, 1); + wp28 -> AddPath(wp22, Path_MoveTo, 1); + wp29 -> AddPath(wp30, Path_MoveTo, -1); + wp29 -> AddPath(wp28, Path_MoveTo, 1); + wp29 -> AddPath(wp32, Path_Jump, 1); + wp30 -> AddPath(wp29, Path_MoveTo, 1); + wp30 -> AddPath(wp27, Path_MoveTo, -1); + wp30 -> AddPath(wp40, Path_Jump, -1); + wp31 -> AddPath(wp29, Path_MoveTo, -1); + wp32 -> AddPath(wp33, Path_MoveTo, -1); + wp32 -> AddPath(wp31, Path_MoveTo, 1); + wp33 -> AddPath(wp40, Path_MoveTo, -1); + wp33 -> AddPath(wp32, Path_MoveTo, 1); + wp34 -> AddPath(wp37, Path_MoveTo, 1); + wp34 -> AddPath(wp35, Path_MoveTo, -1); + wp35 -> AddPath(wp34, Path_MoveTo, 1); + wp35 -> AddPath(wp36, Path_Jump, 1); + wp36 -> AddPath(wp35, Path_MoveTo, -1); + wp36 -> AddPath(wp41, Path_MoveTo, 1); + wp37 -> AddPath(wp34, Path_MoveTo, -1); + wp37 -> AddPath(wp40, Path_Jump, 1); + wp37 -> AddPath(wp38, Path_MoveTo, 1); + wp38 -> AddPath(wp41, Path_MoveTo, -1); + wp39 -> AddPath(wp30, Path_MoveTo, 1); + wp40 -> AddPath(wp33, Path_MoveTo, 1); + wp40 -> AddPath(wp37, Path_Jump, -1); + wp40 -> AddPath(wp39, Path_MoveTo, -1); + wp41 -> AddPath(wp36, Path_MoveTo, -1); + wp41 -> AddPath(wp42, Path_Jump, 10, 2, 1); + wp41 -> AddPath(wp1, Path_MoveTo, 1); + wp42 -> AddPath(wp41, Path_MoveTo, 1); + wp43 -> AddPath(wp44, Path_MoveTo, -1); + wp44 -> AddPath(wp45, Path_Jump, -1); + wp44 -> AddPath(wp25, Path_MoveTo, -1); + wp44 -> AddPath(wp23, Path_MoveTo, 1); + wp45 -> AddPath(wp44, Path_MoveTo, 1); + wp45 -> AddPath(wp46, Path_MoveTo, -1); + wp46 -> AddPath(wp47, Path_MoveTo, 1); + wp47 -> AddPath(wp48, Path_MoveTo, 1); + wp47 -> AddPath(wp45, Path_MoveTo, 1, 1, 10); + wp47 -> AddPath(wp14, Path_Jump, 1, 10, 1); + wp48 -> AddPath(wp49, Path_MoveTo, -1); + wp48 -> AddPath(wp47, Path_Jump, -1); + wp48 -> AddPath(wp20, Path_MoveTo, 1, 1, 10); + wp49 -> AddPath(wp50, Path_MoveTo, 1); + wp50 -> AddPath(wp6, Path_MoveTo, 1); + wp50 -> AddPath(wp48, Path_MoveTo, -1); + wp50 -> AddPath(wp5, Path_Jump, -1); +} diff --git a/Hazard.c4f/DM_Factory.c4s/Sky.jpg b/Hazard.c4f/DM_Factory.c4s/Sky.jpg new file mode 100644 index 00000000..af1ada86 Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/Sky.jpg differ diff --git a/Hazard.c4f/DM_Factory.c4s/Teams.txt b/Hazard.c4f/DM_Factory.c4s/Teams.txt new file mode 100644 index 00000000..fbfe5f6b --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Teams.txt @@ -0,0 +1,4 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 +AutoGenerateTeams=1 \ No newline at end of file diff --git a/Hazard.c4f/DM_Factory.c4s/Title.png b/Hazard.c4f/DM_Factory.c4s/Title.png new file mode 100644 index 00000000..ff978d45 Binary files /dev/null and b/Hazard.c4f/DM_Factory.c4s/Title.png differ diff --git a/Hazard.c4f/DM_Factory.c4s/Title.txt b/Hazard.c4f/DM_Factory.c4s/Title.txt new file mode 100644 index 00000000..599e0318 --- /dev/null +++ b/Hazard.c4f/DM_Factory.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:DM - Forsak IV +US:DM - Forsak IV \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/DescDE.rtf b/Hazard.c4f/DM_KillingDay.c4s/DescDE.rtf new file mode 100644 index 00000000..fd79d80f Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/DescUS.rtf b/Hazard.c4f/DM_KillingDay.c4s/DescUS.rtf new file mode 100644 index 00000000..e0730ac5 Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/DefCore.txt b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/DefCore.txt new file mode 100644 index 00000000..9db34cb4 --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=_GNC +Name=Gun control +Version=4,9,5 +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,64,64 \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Graphics.png b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Graphics.png new file mode 100644 index 00000000..a727e2ce Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Graphics.png differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Names.txt b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Names.txt new file mode 100644 index 00000000..b91edb44 --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Geschützsteuerung +US:Gun control \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Script.c b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Script.c new file mode 100644 index 00000000..ecb470f5 --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/Script.c @@ -0,0 +1,21 @@ +/*-- Geschützsteuerung --*/ + +#strict + +local on; + +public func ConsoleControl(int i) +{ + if(i == 1) + { + if(on) return("$TurnOff$"); + else return("$TurnOn$"); + } +} + +public func ConsoleControlled() +{ + for(var gun in FindObjects(Find_ID(SEGU))) + gun->ConsoleControlled(1); + on = !on; +} diff --git a/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/StringTblDE.txt b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/StringTblDE.txt new file mode 100644 index 00000000..4f7b9945 --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/StringTblDE.txt @@ -0,0 +1,2 @@ +TurnOn=Geschütze einschalten +TurnOff=Geschütze ausschalten \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/StringTblUS.txt b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/StringTblUS.txt new file mode 100644 index 00000000..4632db3e --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Guns.c4d/StringTblUS.txt @@ -0,0 +1,2 @@ +TurnOn=Turn on guns +TurnOff=Turn off guns \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/Icon.png b/Hazard.c4f/DM_KillingDay.c4s/Icon.png new file mode 100644 index 00000000..b1a98afc Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/Icon.png differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/Landscape.bmp b/Hazard.c4f/DM_KillingDay.c4s/Landscape.bmp new file mode 100644 index 00000000..0a184d56 Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/Scenario.txt b/Hazard.c4f/DM_KillingDay.c4s/Scenario.txt new file mode 100644 index 00000000..486a050a --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Scenario.txt @@ -0,0 +1,51 @@ +[Head] +Icon=16 +Title=Killing day +MinPlayer=1 +Origin=Hazard.c4f\DM_KillingDay.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GLMS=5;GTDM=10 +Rules=CHOS=1 + +[Player1] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Sky +MapWidth=80,0,64,250 +MapHeight=80,0,40,250 +SkyScrollMode=2 + +[Weather] +Climate=11,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/Script.c b/Hazard.c4f/DM_KillingDay.c4s/Script.c new file mode 100644 index 00000000..37625048 --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Script.c @@ -0,0 +1,381 @@ +/*-- Schlachtfest --*/ + +#strict + +func Initialize() +{ + CreateObject (CON1, 601, 70, -1); + CreateObject (FLGH, 782, 739, -1); + CreateObject (LADR, 541, 387, -1)->Set(9); + CreateObject (LADR, 123, 740, -1)->Set(14); + CreateObject (LADR, 956, 745, -1)->Set(19); + CreateObject (LADR, 1157, 610, -1)->Set(23); + CreateObject (LADR, 916, 430, -1)->Set(20); + CreateObject (LADR, 136, 470, -1)->Set(22); + CreateObject (LADR, 526, 630, -1)->Set(16); + CreateObject (LADR, 701, 631, -1)->Set(16); + CreateObject (LADR, 584, 491, -1)->Set(14); + CreateObject (LADR, 692, 471, -1)->Set(13); + CreateObject (ENGT, 287, 285, -1)->SetCon(50); + CreateObject (CCP2, 924, 632, -1); + CreateObject (GSTA, 1033, 429, -1); + CreateObject (GSTA, 997, 429, -1); + CreateObject (LCKR, 319, 400, -1); + CreateObject (LCKR, 337, 400, -1); + CreateObject (LCKR, 944, 430, -1); + CreateObject (CHAR, 319, 629, -1); + CreateObject (GSBO, 212, 400, -1); + CreateObject (GSBO, 223, 400, -1); + CreateObject (CRN1, 522, 98, -1)->Set(5); + CreateObject (CCP1, 253, 180, -1); + CreateObject (CRAT, 401, 400, -1); + CreateObject (CRAT, 478, 400, -1); + CreateObject (TABB, 1085, 133, -1); + CreateObject (TABL, 346, 629, -1); + CreateObject (JMPD, 302, 180, -1)->Set(75,35); + CreateObject (SBBA, 797, 261, -1); + CreateObject (CLVM, 293, 630, -1); + CreateObject (SPVB, 1117, 130, -1); + CreateObject (SLDR, 1075, 170, -1); + CreateObject (SLDR, 175, 220, -1); + CreateObject (SLDR, 215, 220, -1); + CreateObject (STDR, 232, 300, -1); + CreateObject (LBDR, 843, 581, -1); + CreateObject (LBDR, 242, 631, -1); + CreateObject (LBDR, 414, 630, -1); + CreateObject (LFTP, 1105, 291, -1)->SetAutoLimits(); + CreateObject (LFTP, 35, 190, -1)->SetAutoLimits(); + CreateObject (RAI3, 759, 190, -1); + CreateObject (BLGH, 1106, 327, -1); + CreateObject (BLGH, 955, 545, -1); + CreateObject (CLGH, 332, 581, -1); + CreateObject (CLGH, 300, 451, -1); + CreateObject (CLGH, 389, 451, -1); + CreateObject (BLGH, 87, 118, -1); + CreateObject (BLGH, 216, 117, -1); + CreateObject (HSGN, 1005, 287, -1)->SetCon(50); + CreateObject (AWRP, 271, 298, -1)->Set(1091, 94); + CreateObject (AWRP, 755, 578, -1)->Set(66, 466); + CreateObject (FIEX, 422, 305, -1); + CreateObject (VENT, 1002, 390, -1)->SetCon(25); + CreateObject (GAT2, 199, 714, -1); + CreateObject (LCOM, 385, 615, -1); + CreateObject (LCOM, 385, 629, -1); + CreateObject (RAI1, 129, 151, -1)->SetRailLength(2); + CreateObject (VENT, 279, 70, -1)->SetCon(25); + CreateObject (RAI1, 169, 180, -1)->SetRailLength(3); + CreateObject (WSHB, 871, 130, -1); + CreateObject (STLC, 0, 0, -1); + CreateObject(CONS, 490, 60, -1)->Set(CreateObject(_GNC,1,1,-1)); + CreateObject(SEGU, 430, 121, -1)->Arm(MGSA); + CreateObject(SEGU, 630, 121, -1)->Arm(MGSA); + + // Waffen und Ausrüstung + PlaceSpawnpoint(ENWP, 240, 170); + PlaceSpawnpoint(ENAP, 225, 170); + PlaceSpawnpoint(STAP, 190, 50); + PlaceSpawnpoint(KSLM, 230, 290); + PlaceSpawnpoint(GRAP, 210, 290); + PlaceSpawnpoint(GRAP, 360, 500); + PlaceSpawnpoint(GLWP, 380, 500); + PlaceSpawnpoint(MIAP, 60, 470); + PlaceSpawnpoint(BZWP, 320, 750); + PlaceSpawnpoint(MIAP, 340, 750); + PlaceSpawnpoint(STAP, 890, 740); + PlaceSpawnpoint(PGWP, 1030, 420); + PlaceSpawnpoint(STAP, 1050, 420); + PlaceSpawnpoint(KLAS, 810, 570); + PlaceSpawnpoint(GGWP, 540, 60); + PlaceSpawnpoint(ENAP, 560, 60); + PlaceSpawnpoint(FTWP, 1070, 120); + PlaceSpawnpoint(GSAP, 1090, 120); + PlaceSpawnpoint(GSAP, 1180, 90); + PlaceSpawnpoint(JTPK, 1060, 280); + PlaceSpawnpoint(MEDI, 640, 250); + PlaceSpawnpoint(MINE, 430, 260); + PlaceSpawnpoint(KRFL, 300, 390); + PlaceSpawnpoint(HSHD, 710, 370); + PlaceSpawnpoint(MEZL, 670, 639); + PlaceSpawnpoint(GSAP, 655, 639); + + PlaceWP(); + //Debug + //WaypointsVisible(1); +} + +func PlaceWP() { + var wp1 = CreateWP(1055,746); + var wp2 = CreateWP(914,492); + var wp3 = CreateWP(1118,116); + var wp4 = CreateWP(1071,277); + var wp5 = CreateWP(1074,418); + var wp6 = CreateWP(945,419); + var wp7 = CreateWP(882,490); + var wp8 = CreateWP(802,239); + var wp9 = CreateWP(876,190); + var wp10 = CreateWP(1176,158); + var wp11 = CreateWP(1055,160); + var wp12 = CreateWP(1140,597); + var wp13 = CreateWP(761,564); + var wp14 = CreateWP(1009,674); + var wp15 = CreateWP(919,618); + var wp16 = CreateWP(542,730); + var wp17 = CreateWP(420,751); + var wp18 = CreateWP(936,693); + var wp19 = CreateWP(95,617); + var wp20 = CreateWP(183,616); + var wp21 = CreateWP(938,749); + var wp22 = CreateWP(866,736); + var wp23 = CreateWP(481,707); + var wp24 = CreateWP(152,751); + var wp25 = CreateWP(166,553); + var wp26 = CreateWP(124,483); + var wp27 = CreateWP(66,466); + var wp28 = CreateWP(230,479); + var wp29 = CreateWP(504,500); + var wp30 = CreateWP(551,501); + var wp31 = CreateWP(511,620); + var wp32 = CreateWP(521,394); + var wp33 = CreateWP(70,286); + var wp34 = CreateWP(263,284); + var wp35 = CreateWP(160,288); + var wp36 = CreateWP(161,390); + var wp37 = CreateWP(854,280); + var wp38 = CreateWP(724,369); + var wp39 = CreateWP(561,391); + var wp40 = CreateWP(333,229); + var wp41 = CreateWP(141,207); + var wp42 = CreateWP(70,207); + var wp43 = CreateWP(639,250); + var wp44 = CreateWP(338,80); + var wp45 = CreateWP(71,60); + var wp46 = CreateWP(268,169); + var wp47 = CreateWP(431,257); + var wp48 = CreateWP(557,58); + var wp49 = CreateWP(526,307); + var wp50 = CreateWP(399,303); + var wp51 = CreateWP(603,499); + var wp52 = CreateWP(666,470); + var wp53 = CreateWP(673,641); + var wp54 = CreateWP(724,502); + var wp55 = CreateWP(583,709); + wp1 -> AddPath(wp21, Path_MoveTo, -1); + wp2 -> AddPath(wp15, Path_MoveTo, -1); + wp3 -> AddPath(wp10, Path_MoveTo, 1); + wp3 -> AddPath(wp9, Path_MoveTo, -1); + wp4 -> AddPath(wp11, Path_MoveTo, -1); + wp4 -> AddPath(wp10, Path_MoveTo, 1); + wp4 -> AddPath(wp5, Path_MoveTo, 1); + wp4 -> AddPath(wp37, Path_MoveTo, -1); + wp5 -> AddPath(wp6, Path_MoveTo, -1); + wp5 -> AddPath(wp4, Path_MoveTo, -1); + wp5 -> AddPath(wp12, Path_MoveTo, 1); + wp6 -> AddPath(wp5, Path_MoveTo, 1); + wp6 -> AddPath(wp7, Path_MoveTo, -1); + wp6 -> AddPath(wp37, Path_Jump, -1); + wp6 -> AddPath(wp4, Path_Jump, -1); + wp6 -> AddPath(wp52, Path_MoveTo, -1); + wp6 -> AddPath(wp54, Path_MoveTo, -1); + wp7 -> AddPath(wp2, Path_MoveTo, 1); + wp8 -> AddPath(wp37, Path_MoveTo, -1); + wp8 -> AddPath(wp43, Path_MoveTo, 1); + wp8 -> AddPath(wp9, Path_Jump, 1); + wp9 -> AddPath(wp11, Path_MoveTo, 1); + wp9 -> AddPath(wp8, Path_MoveTo, -1); + wp10 -> AddPath(wp4, Path_MoveTo, -1); + wp10 -> AddPath(wp3, Path_Jump, -1); + wp10 -> AddPath(wp11, Path_MoveTo, -1); + wp11 -> AddPath(wp9, Path_MoveTo, -1); + wp11 -> AddPath(wp4, Path_MoveTo, 1); + wp11 -> AddPath(wp10, Path_MoveTo, 1); + wp12 -> AddPath(wp14, Path_MoveTo, -1); + wp12 -> AddPath(wp5, Path_Jump, 1); + wp13 -> AddPath(wp27, Path_MoveTo, -1); + wp14 -> AddPath(wp12, Path_Jump, 1); + wp14 -> AddPath(wp21, Path_MoveTo, -1); + wp14 -> AddPath(wp18, Path_MoveTo, -1); + wp14 -> AddPath(wp1, Path_MoveTo, 1); + wp15 -> AddPath(wp13, Path_Jump, -1); + wp15 -> AddPath(wp13, Path_MoveTo, -1); + wp16 -> AddPath(wp23, Path_Jump, -1); + wp16 -> AddPath(wp17, Path_MoveTo, -1); + wp16 -> AddPath(wp55, Path_MoveTo, 1); + wp17 -> AddPath(wp24, Path_MoveTo, -1); + wp17 -> AddPath(wp23, Path_Jump, 1); + wp17 -> AddPath(wp16, Path_MoveTo, 1); + wp18 -> AddPath(wp15, Path_Jump, 1); + wp18 -> AddPath(wp14, Path_MoveTo, 1); + wp19 -> AddPath(wp24, Path_MoveTo, 1); + wp19 -> AddPath(wp25, Path_Jump, 1); + wp19 -> AddPath(wp20, Path_MoveTo, 1); + wp20 -> AddPath(wp24, Path_MoveTo, -1); + wp20 -> AddPath(wp31, Path_MoveTo, 1); + wp20 -> AddPath(wp28, Path_Jump, 1); + wp20 -> AddPath(wp19, Path_MoveTo, -1); + wp21 -> AddPath(wp15, Path_Jump, 1); + wp21 -> AddPath(wp22, Path_MoveTo, -1); + wp21 -> AddPath(wp14, Path_Jump, 1); + wp22 -> AddPath(wp18, Path_Jump, 1); + wp22 -> AddPath(wp55, Path_MoveTo, -1); + wp22 -> AddPath(wp21, Path_MoveTo, 1); + wp23 -> AddPath(wp17, Path_MoveTo, -1); + wp23 -> AddPath(wp16, Path_MoveTo, 1); + wp24 -> AddPath(wp17, Path_MoveTo, 1); + wp24 -> AddPath(wp20, Path_Jump, -1); + wp24 -> AddPath(wp19, Path_Jump, -1); + wp25 -> AddPath(wp19, Path_MoveTo, 1); + wp25 -> AddPath(wp20, Path_MoveTo, 1); + wp26 -> AddPath(wp27, Path_MoveTo, -1); + wp26 -> AddPath(wp28, Path_Backflip, 1); + wp26 -> AddPath(wp25, Path_MoveTo, 1); + wp26 -> AddPath(wp36, Path_Jump, 1); + wp26 -> AddPath(wp35, Path_Jump, 1); + wp26 -> AddPath(wp33, Path_Jump, 1); + wp27 -> AddPath(wp26, Path_MoveTo, 1); + wp28 -> AddPath(wp29, Path_MoveTo, 1); + wp28 -> AddPath(wp26, Path_Backflip, -1); + wp28 -> AddPath(wp25, Path_MoveTo, 1); + wp29 -> AddPath(wp31, Path_MoveTo, 1); + wp29 -> AddPath(wp28, Path_MoveTo, -1); + wp29 -> AddPath(wp30, Path_MoveTo, 1); + wp30 -> AddPath(wp31, Path_MoveTo, -1); + wp30 -> AddPath(wp29, Path_MoveTo, -1); + wp30 -> AddPath(wp39, Path_Jump, 1); + wp30 -> AddPath(wp51, Path_MoveTo, 1); + wp31 -> AddPath(wp20, Path_MoveTo, -1); + wp31 -> AddPath(wp30, Path_Jump, 1); + wp31 -> AddPath(wp29, Path_Jump, 1); + wp31 -> AddPath(wp55, Path_MoveTo, 1); + wp32 -> AddPath(wp36, Path_MoveTo, -1); + wp32 -> AddPath(wp49, Path_Jump, 1); + wp32 -> AddPath(wp39, Path_MoveTo, 1); + wp33 -> AddPath(wp36, Path_MoveTo, 1); + wp33 -> AddPath(wp26, Path_MoveTo, 1); + wp33 -> AddPath(wp42, Path_MoveTo, 1); + wp33 -> AddPath(wp45, Path_MoveTo, 1); + wp33 -> AddPath(wp42, Path_MoveTo, 0); + wp33 -> AddPath(wp35, Path_MoveTo, 1); + wp34 -> AddPath(wp3, Path_MoveTo, 1); + wp35 -> AddPath(wp26, Path_MoveTo, -1); + wp35 -> AddPath(wp36, Path_MoveTo, 1); + wp35 -> AddPath(wp34, Path_MoveTo, 1); + wp35 -> AddPath(wp33, Path_MoveTo, -1); + wp36 -> AddPath(wp33, Path_Jump, -1); + wp36 -> AddPath(wp35, Path_Jump, -1); + wp36 -> AddPath(wp32, Path_MoveTo, 1); + wp37 -> AddPath(wp38, Path_MoveTo, -1); + wp37 -> AddPath(wp8, Path_Jump, -1); + wp37 -> AddPath(wp4, Path_MoveTo, 1); + wp37 -> AddPath(wp6, Path_MoveTo, 1); + wp38 -> AddPath(wp37, Path_Jump, 1); + wp38 -> AddPath(wp52, Path_MoveTo, -1); + wp38 -> AddPath(wp51, Path_MoveTo, -1); + wp39 -> AddPath(wp49, Path_Jump, -1); + wp39 -> AddPath(wp32, Path_MoveTo, -1); + wp39 -> AddPath(wp30, Path_MoveTo, -1); + wp40 -> AddPath(wp47, Path_Jump, 1); + wp40 -> AddPath(wp41, Path_MoveTo, -1); + wp40 -> AddPath(wp50, Path_MoveTo, 1); + wp41 -> AddPath(wp42, Path_MoveTo, -1); + wp41 -> AddPath(wp40, Path_MoveTo, 1); + wp41 -> AddPath(wp46, Path_Jump, 1); + wp42 -> AddPath(wp33, Path_MoveTo, -1); + wp42 -> AddPath(wp41, Path_MoveTo, 1); + wp42 -> AddPath(wp45, Path_MoveTo, 1); + wp42 -> AddPath(wp33, Path_MoveTo, 0); + wp43 -> AddPath(wp8, Path_MoveTo, 1); + wp43 -> AddPath(wp49, Path_MoveTo, -1); + wp44 -> AddPath(wp45, Path_MoveTo, -1); + wp44 -> AddPath(wp48, Path_Jump, 1); + wp44 -> AddPath(wp48, Path_Backflip, 1); + wp45 -> AddPath(wp33, Path_MoveTo, -1); + wp45 -> AddPath(wp44, Path_MoveTo, 1); + wp45 -> AddPath(wp42, Path_MoveTo, -1); + wp46 -> AddPath(wp48, Path_MoveTo, 1); + wp46 -> AddPath(wp41, Path_MoveTo, -1); + wp47 -> AddPath(wp40, Path_Jump, -1); + wp47 -> AddPath(wp50, Path_MoveTo, -1); + wp48 -> AddPath(wp40, Path_MoveTo, -1); + wp48 -> AddPath(wp43, Path_MoveTo, 1); + wp49 -> AddPath(wp50, Path_Jump, -1); + wp49 -> AddPath(wp50, Path_Backflip, -1); + wp49 -> AddPath(wp32, Path_MoveTo, -1); + wp49 -> AddPath(wp39, Path_MoveTo, 1); + wp49 -> AddPath(wp43, Path_MoveTo, 1); + wp50 -> AddPath(wp47, Path_Jump, 1); + wp50 -> AddPath(wp32, Path_MoveTo, 1); + wp50 -> AddPath(wp40, Path_MoveTo, -1); + wp51 -> AddPath(wp52, Path_Jump, 1); + wp51 -> AddPath(wp30, Path_MoveTo, -1); + wp51 -> AddPath(wp39, Path_Jump, -1); + wp51 -> AddPath(wp53, Path_MoveTo, 1); + wp52 -> AddPath(wp6, Path_MoveTo, 1); + wp52 -> AddPath(wp38, Path_Jump, 1); + wp52 -> AddPath(wp38, Path_Jump, 1); + wp52 -> AddPath(wp51, Path_MoveTo, -1); + wp52 -> AddPath(wp39, Path_Jump, -1); + wp52 -> AddPath(wp54, Path_MoveTo, 1); + wp53 -> AddPath(wp13, Path_Jump, 1); + wp53 -> AddPath(wp54, Path_Jump, 1); + wp53 -> AddPath(wp55, Path_MoveTo, -1); + wp54 -> AddPath(wp53, Path_MoveTo, -1); + wp54 -> AddPath(wp52, Path_MoveTo, -1); + wp54 -> AddPath(wp6, Path_MoveTo, 1); + wp55 -> AddPath(wp22, Path_MoveTo, 1); + wp55 -> AddPath(wp16, Path_MoveTo, -1); + wp55 -> AddPath(wp53, Path_Jump, 1); + wp55 -> AddPath(wp31, Path_Jump, -1); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); + + var wp = FindObject(WPCH); + if(wp) + { + // und begrenzte Waren... + wp->RemoveWare(); + wp->AddWare(PIWP); // Pistole + wp->AddWare(PGWP); // Pumpgun + wp->AddWare(FTWP); // Flammenwerfer + wp->AddWare(MIWP); // Minigun + wp->AddWare(MEZL); // Mezl + wp->AddWare(KLAS); // Laser + wp->AddWare(KRFL); // Waffenteile + + wp->AddWare(FLSH); // Taschenlampe + wp->AddWare(HARM); // Rüstung + wp->AddWare(MINE); // Mine + //wp->SortWare(); + } +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + // Anzahl Zufallpositionen, iTeam verwendet für spezielle Teamstartpositionen + var rand = Random(8); + if(!rand) return [270,150]; + if(!--rand) return [170,280]; + if(!--rand) return [60,460]; + if(!--rand) return [380,620]; + if(!--rand) return [50,730]; + if(!--rand) return [600,680]; + if(!--rand) return [970,400]; + if(!--rand) return [1120,100]; +} diff --git a/Hazard.c4f/DM_KillingDay.c4s/Sky.jpg b/Hazard.c4f/DM_KillingDay.c4s/Sky.jpg new file mode 100644 index 00000000..3a3158e5 Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/Sky.jpg differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/Teams.txt b/Hazard.c4f/DM_KillingDay.c4s/Teams.txt new file mode 100644 index 00000000..fbfe5f6b --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Teams.txt @@ -0,0 +1,4 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 +AutoGenerateTeams=1 \ No newline at end of file diff --git a/Hazard.c4f/DM_KillingDay.c4s/Title.png b/Hazard.c4f/DM_KillingDay.c4s/Title.png new file mode 100644 index 00000000..6531c4b5 Binary files /dev/null and b/Hazard.c4f/DM_KillingDay.c4s/Title.png differ diff --git a/Hazard.c4f/DM_KillingDay.c4s/Title.txt b/Hazard.c4f/DM_KillingDay.c4s/Title.txt new file mode 100644 index 00000000..472b362b --- /dev/null +++ b/Hazard.c4f/DM_KillingDay.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:DM - Schlachtfest +US:DM - Killing day \ No newline at end of file diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/DescDE.rtf b/Hazard.c4f/DOM_TransmitTower.c4s/DescDE.rtf new file mode 100644 index 00000000..2b022150 Binary files /dev/null and b/Hazard.c4f/DOM_TransmitTower.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/DescUS.rtf b/Hazard.c4f/DOM_TransmitTower.c4s/DescUS.rtf new file mode 100644 index 00000000..2734406d Binary files /dev/null and b/Hazard.c4f/DOM_TransmitTower.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Icon.png b/Hazard.c4f/DOM_TransmitTower.c4s/Icon.png new file mode 100644 index 00000000..97b834a5 Binary files /dev/null and b/Hazard.c4f/DOM_TransmitTower.c4s/Icon.png differ diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Map.bmp b/Hazard.c4f/DOM_TransmitTower.c4s/Map.bmp new file mode 100644 index 00000000..beaace69 Binary files /dev/null and b/Hazard.c4f/DOM_TransmitTower.c4s/Map.bmp differ diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Scenario.txt b/Hazard.c4f/DOM_TransmitTower.c4s/Scenario.txt new file mode 100644 index 00000000..066e06d6 --- /dev/null +++ b/Hazard.c4f/DOM_TransmitTower.c4s/Scenario.txt @@ -0,0 +1,53 @@ +[Head] +Icon=16 +Title=Transmit Tower +MinPlayer=1 +Origin=Hazard.c4f\DOM_TransmitTower.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Goals=GDOM=4 +Rules=CHOS=1 + +[Player1] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player2] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player3] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Player4] +Wealth=60,0,0,250 +Crew=HZCK=1 +Magic=ROCK=1 + +[Landscape] +VegetationLevel=100,0,0,100 +InEarthLevel=65,0,0,100 +Sky=Pollute1 +MapWidth=80,0,64,250 +MapHeight=80,0,40,250 +Phase=0,0,0,100 +Period=0,0,0,100 +Liquid=Water-Smooth + +[Weather] +Climate=40,0,0,100 +YearSpeed=20,10,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Script.c b/Hazard.c4f/DOM_TransmitTower.c4s/Script.c new file mode 100644 index 00000000..90b57071 --- /dev/null +++ b/Hazard.c4f/DOM_TransmitTower.c4s/Script.c @@ -0,0 +1,366 @@ +/*-- Domination --*/ + +#strict + +func Initialize() +{ + CreateObject (CCP1, 96, 990, -1); + CreateObject (GLST, 890, 990, -1); + CreateObject (FLGH, 600, 679, -1)->SetRotation(50); + CreateObject (FLGH, 402, 679, -1)->SetRotation(-50); + CreateObject (GSBO, 500, 410, -1); + CreateObject (CRAT, 307, 850, -1); + CreateObject (CRAT, 692, 850, -1); + CreateObject (CRAT, 501, 680, -1); + CreateObject (LCKR, 43, 920, -1); + CreateObject (GSTA, 79, 319, -1); + CreateObject (GSTA, 910, 319, -1); + CreateObject (JMPD, 19, 569, -1)->Set(90, 50, 90); + CreateObject (JMPD, 302, 649, -1)->Set(60, -40, -90); + CreateObject (JMPD, 25, 320, -1)->Set(80, 30); + CreateObject (JMPD, 975, 320, -1)->Set(80, -30); + CreateObject (JMPD, 981, 569, -1)->Set(90, -50, -90); + CreateObject (JMPD, 698, 649, -1)->Set(60, 40, 90); + CreateObject (JMPD, 25, 850, -1)->Set(100, 30); + CreateObject (JMPD, 975, 850, -1)->Set(100, -30); + CreateObject (LADR, 265, 210, -1)->Set(8); + CreateObject (LADR, 140, 280, -1)->Set(9); + CreateObject (LADR, 735, 210, -1)->Set(8); + CreateObject (LADR, 860, 280, -1)->Set(9); + CreateObject (LADR, 500, 380, -1)->Set(15); + CreateObject (LADR, 635, 270, -1)->Set(16); + CreateObject (LADR, 365, 270, -1)->Set(16); + CreateObject (LADR, 565, 645, -1)->Set(48); + CreateObject (LADR, 435, 645, -1)->Set(48); + CreateObject (LADR, 825, 990, -1)->Set(19); + CreateObject (LADR, 175, 990, -1)->Set(19); + CreateObject (LADR, 630, 930, -1)->Set(11); + CreateObject (LADR, 370, 930, -1)->Set(11); + CreateObject (LFTP, 225, 860, -1)->SetLimits(396,846); + CreateObject (LFTP, 775, 860, -1)->SetLimits(396,846); + CreateObject (CLGH, 500, 870, -1); + CreateObject (BLGH, 950, 760, -1); + CreateObject (BLGH, 50, 760, -1); + CreateObject (CLGH, 79, 860, -1); + CreateObject (CLGH, 921, 860, -1); + CreateObject (LBGH, 500, 160, -1); + CreateObject (BLGH, 880, 120, -1); + CreateObject (BLGH, 120, 120, -1); + CreateObject (FENC, 691, 390, -1); + CreateObject (FENC, 751, 390, -1); + CreateObject (FENC, 811, 390, -1); + CreateObject (FENC, 310, 390, -1); + CreateObject (FENC, 250, 390, -1); + CreateObject (FENC, 190, 390, -1); + CreateObject (FIEX, 954, 911, -1); + CreateObject (ESGN, 953, 890, -1); + CreateObject (STRP, 505, 901, -1)->Set(50, RGB(45,76,154), 1); + CreateObject (SCR2, 501, 755, -1)->RemoveFrame(); + CreateObject (RAI2, 286, 501, -1)->SetRail([1,2,1,2,1,2,1,2,1,2,1,2,1,1,1,2,1,2,1,2,1,2,1,2,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1]); + CreateObject (RAI1, 665, 680, -1)->SetRailLength(4); + CreateObject (RAI1, 257, 680, -1)->SetRailLength(4); + CreateObject (HSGN, 501, 590, -1); + CreateObject (MVNT, 500, 454, -1)->SetCon(50); + CreateObject (VENT, 500, 234, -1)->SetCon(50); + // Spawnpunkte + PlaceSpawnpoint(ENWP, 90, 80); + PlaceSpawnpoint(ENAP, 110, 80); + PlaceSpawnpoint(KSLM, 60, 140); + PlaceSpawnpoint(MINE, 220, 80); + PlaceSpawnpoint(PGWP, 70, 310); + PlaceSpawnpoint(STAP, 90, 310); + PlaceSpawnpoint(GRAP, 210, 200); + PlaceSpawnpoint(ENWP, 100, 910); + PlaceSpawnpoint(ENAP, 120, 910); + PlaceSpawnpoint(KRFL, 100, 980); + PlaceSpawnpoint(PGWP, 280, 670); + PlaceSpawnpoint(STAP, 300, 670); + PlaceSpawnpoint(LMIN, 50, 670); + PlaceSpawnpoint(GRAP, 290, 810); + PlaceSpawnpoint(STAP, 370, 340); + + PlaceSpawnpoint(GLWP, 500, 490); + PlaceSpawnpoint(MEDI, 480, 490); + PlaceSpawnpoint(GRAP, 520, 490); + PlaceSpawnpoint(BZWP, 500, 920); + PlaceSpawnpoint(MIAP, 480, 920); + PlaceSpawnpoint(MIAP, 520, 920); + PlaceSpawnpoint(MIWP, 500, 50); + PlaceSpawnpoint(STAP, 435, 60); + PlaceSpawnpoint(STAP, 565, 60); + PlaceSpawnpoint(HARM, 500, 400); + PlaceSpawnpoint(KLAS, 500, 640); + + PlaceSpawnpoint(ENWP, 910, 80); + PlaceSpawnpoint(ENAP, 890, 80); + PlaceSpawnpoint(KSLM, 940, 140); + PlaceSpawnpoint(MINE, 780, 80); + PlaceSpawnpoint(PGWP, 930, 310); + PlaceSpawnpoint(STAP, 910, 310); + PlaceSpawnpoint(GRAP, 790, 200); + PlaceSpawnpoint(ENWP, 900, 910); + PlaceSpawnpoint(ENAP, 880, 910); + PlaceSpawnpoint(KRFL, 900, 980); + PlaceSpawnpoint(PGWP, 720, 670); + PlaceSpawnpoint(STAP, 700, 670); + PlaceSpawnpoint(LMIN, 950, 670); + PlaceSpawnpoint(GRAP, 710, 810); + PlaceSpawnpoint(STAP, 630, 340); + + PlaceSpawnpoint(LMIN, 500, 710); + PlaceSpawnpoint(SMIN, 90, 490); + PlaceSpawnpoint(SMIN, 980, 490); + + PlaceSpawnpoint(DRSU, 100, 590); + PlaceSpawnpoint(DRSU, 885, 590); + + PlaceSpawnpoint(MEDI, 500, 150); + PlaceSpawnpoint(MEDI, 500, 850); + + PlaceBonusSpawnpoint([AMPB,BSKB,HSTB,HSTB,HELB,RPFB], 775, 290); + PlaceBonusSpawnpoint([AMPB,BSKB,HSTB,HSTB,HELB,RPFB], 225, 290); + // Das Wichtigste: + CreateDominationPoint(500, 150, 1); + CreateDominationPoint(500, 485, 5); + CreateDominationPoint(500, 850, 4); + + CreateWaypoints(); + + // Sky + SetSkyParallax(0,20,20); + + return(1); +} + +public func CreateWaypoints() +{ + var wp1 = CreateWP(279,140); + var wp2 = CreateWP(344,140); + var wp3 = CreateWP(388,260); + var wp4 = CreateWP(108,80); + var wp5 = CreateWP(22,140); + var wp6 = CreateWP(204,200); + var wp7 = CreateWP(100,308); + var wp8 = CreateWP(404,341); + var wp9 = CreateWP(278,380); + var wp10 = CreateWP(184,381); + var wp11 = CreateWP(411,670); + var wp12 = CreateWP(324,670); + var wp13 = CreateWP(301,490); + var wp14 = CreateWP(52,590); + var wp15 = CreateWP(174,590); + var wp16 = CreateWP(501,920); + var wp17 = CreateWP(275,668); + var wp18 = CreateWP(200,850); + var wp19 = CreateWP(140,980); + var wp20 = CreateWP(99,910); + var wp21 = CreateWP(499,839); + var wp22 = CreateWP(103,838); + var wp23 = CreateWP(721,140); + var wp24 = CreateWP(656,140); + var wp25 = CreateWP(612,260); + var wp26 = CreateWP(500,490); + var wp27 = CreateWP(892,80); + var wp28 = CreateWP(978,140); + var wp29 = CreateWP(796,200); + var wp30 = CreateWP(900,308); + var wp31 = CreateWP(596,341); + var wp32 = CreateWP(722,380); + var wp33 = CreateWP(816,381); + var wp34 = CreateWP(589,670); + var wp35 = CreateWP(676,670); + var wp36 = CreateWP(699,490); + var wp37 = CreateWP(948,590); + var wp38 = CreateWP(826,590); + var wp39 = CreateWP(725,668); + var wp40 = CreateWP(803,850); + var wp41 = CreateWP(860,980); + var wp42 = CreateWP(901,910); + var wp43 = CreateWP(893,838); + var wp44 = CreateWP(497,50); + var wp45 = CreateWP(501,140); + wp1 -> AddPath(wp2, Path_MoveTo, 1); + wp1 -> AddPath(wp6, Path_MoveTo, -1); + wp2 -> AddPath(wp3, Path_MoveTo, 1); + wp2 -> AddPath(wp1, Path_MoveTo, -1); + wp2 -> AddPath(wp44, Path_Jump, 1); + wp2 -> AddPath(wp45, Path_MoveTo, 1); + wp3 -> AddPath(wp8, Path_MoveTo, 1); + wp3 -> AddPath(wp2, Path_Jump, -1); + wp3 -> AddPath(wp25, Path_MoveTo, 1); + wp4 -> AddPath(wp5, Path_MoveTo, -1); + wp4 -> AddPath(wp6, Path_MoveTo, 1); + wp5 -> AddPath(wp4, Path_Jump, 1); + wp5 -> AddPath(wp6, Path_MoveTo, 1); + wp6 -> AddPath(wp9, Path_MoveTo, 1); + wp6 -> AddPath(wp5, Path_Jump, -1); + wp6 -> AddPath(wp1, Path_MoveTo, 1); + wp7 -> AddPath(wp6, Path_Jump, 1); + wp8 -> AddPath(wp9, Path_MoveTo, -1); + wp8 -> AddPath(wp3, Path_Jump, 1); + wp8 -> AddPath(wp26, Path_MoveTo, 1); + wp8 -> AddPath(wp11, Path_MoveTo, 1); + wp9 -> AddPath(wp8, Path_MoveTo, 1); + wp9 -> AddPath(wp10, Path_Jump, -1); + wp9 -> AddPath(wp17, Path_MoveTo, -1); + wp9 -> AddPath(wp15, Path_MoveTo, -1); + wp9 -> AddPath(wp18, Path_MoveTo, -1); + wp10 -> AddPath(wp7, Path_Jump, -1); + wp10 -> AddPath(wp9, Path_Jump, 1); + wp10 -> AddPath(wp15, Path_MoveTo, -1); + wp10 -> AddPath(wp17, Path_MoveTo, 1); + wp10 -> AddPath(wp18, Path_MoveTo, 1); + wp11 -> AddPath(wp18, Path_MoveTo, -1); + wp11 -> AddPath(wp12, Path_Jump, -1); + wp11 -> AddPath(wp26, Path_Jump, 1); + wp11 -> AddPath(wp8, Path_Jump, 1); + wp11 -> AddPath(wp3, Path_Jump, 1); + wp11 -> AddPath(wp34, Path_MoveTo, 1); + wp12 -> AddPath(wp17, Path_MoveTo, -1); + wp12 -> AddPath(wp11, Path_Jump, 1); + wp13 -> AddPath(wp14, Path_Backflip, -1); + wp13 -> AddPath(wp15, Path_Jump, -1); + wp13 -> AddPath(wp26, Path_MoveTo, 1); + wp13 -> AddPath(wp17, Path_MoveTo, -1); + wp14 -> AddPath(wp15, Path_MoveTo, 1); + wp14 -> AddPath(wp13, Path_Jump, -1); + wp15 -> AddPath(wp17, Path_MoveTo, 1); + wp15 -> AddPath(wp14, Path_MoveTo, -1); + wp15 -> AddPath(wp10, Path_MoveTo, 1); + wp15 -> AddPath(wp9, Path_MoveTo, 1); + wp16 -> AddPath(wp18, Path_MoveTo, -1); + wp16 -> AddPath(wp40, Path_MoveTo, -1); + wp17 -> AddPath(wp12, Path_MoveTo, 1); + wp17 -> AddPath(wp15, Path_MoveTo, 1); + wp17 -> AddPath(wp9, Path_MoveTo, 1); + wp17 -> AddPath(wp9, Path_MoveTo, 1); + wp17 -> AddPath(wp10, Path_MoveTo, -1); + wp17 -> AddPath(wp18, Path_MoveTo, -1); + wp18 -> AddPath(wp20, Path_MoveTo, -1); + wp18 -> AddPath(wp19, Path_MoveTo, -1); + wp18 -> AddPath(wp21, Path_MoveTo, 1); + wp18 -> AddPath(wp16, Path_MoveTo, 1); + wp18 -> AddPath(wp22, Path_MoveTo, -1); + wp18 -> AddPath(wp17, Path_MoveTo, 1); + wp18 -> AddPath(wp15, Path_MoveTo, -1); + wp19 -> AddPath(wp18, Path_MoveTo, 1); + wp20 -> AddPath(wp18, Path_MoveTo, 1); + wp21 -> AddPath(wp18, Path_MoveTo, -1); + wp21 -> AddPath(wp40, Path_MoveTo, -1); + wp22 -> AddPath(wp17, Path_Jump, -1); + wp23 -> AddPath(wp24, Path_MoveTo, -1); + wp23 -> AddPath(wp29, Path_MoveTo, 1); + wp24 -> AddPath(wp25, Path_MoveTo, -1); + wp24 -> AddPath(wp23, Path_MoveTo, 1); + wp24 -> AddPath(wp45, Path_MoveTo, -1); + wp24 -> AddPath(wp44, Path_Jump, -1); + wp25 -> AddPath(wp31, Path_MoveTo, -1); + wp25 -> AddPath(wp24, Path_Jump, 1); + wp25 -> AddPath(wp3, Path_MoveTo, -1); + wp26 -> AddPath(wp36, Path_MoveTo, 1); + wp26 -> AddPath(wp31, Path_Jump, 1); + wp26 -> AddPath(wp25, Path_Jump, 1); + wp26 -> AddPath(wp34, Path_MoveTo, 1); + wp26 -> AddPath(wp13, Path_MoveTo, -1); + wp26 -> AddPath(wp8, Path_Jump, -1); + wp26 -> AddPath(wp3, Path_Jump, -1); + wp26 -> AddPath(wp11, Path_MoveTo, -1); + wp27 -> AddPath(wp28, Path_MoveTo, 1); + wp27 -> AddPath(wp29, Path_MoveTo, -1); + wp28 -> AddPath(wp27, Path_Jump, -1); + wp28 -> AddPath(wp29, Path_MoveTo, -1); + wp29 -> AddPath(wp32, Path_MoveTo, -1); + wp29 -> AddPath(wp28, Path_Jump, 1); + wp29 -> AddPath(wp23, Path_MoveTo, -1); + wp30 -> AddPath(wp29, Path_Jump, -1); + wp31 -> AddPath(wp32, Path_MoveTo, 1); + wp31 -> AddPath(wp25, Path_Jump, -1); + wp31 -> AddPath(wp26, Path_MoveTo, -1); + wp31 -> AddPath(wp34, Path_MoveTo, -1); + wp32 -> AddPath(wp31, Path_MoveTo, 1); + wp32 -> AddPath(wp33, Path_Jump, 1); + wp32 -> AddPath(wp39, Path_MoveTo, 1); + wp32 -> AddPath(wp38, Path_MoveTo, 1); + wp32 -> AddPath(wp40, Path_MoveTo, 1); + wp33 -> AddPath(wp30, Path_Jump, 1); + wp33 -> AddPath(wp32, Path_Jump, -1); + wp33 -> AddPath(wp38, Path_MoveTo, 1); + wp33 -> AddPath(wp39, Path_MoveTo, -1); + wp33 -> AddPath(wp40, Path_MoveTo, -1); + wp34 -> AddPath(wp40, Path_MoveTo, 1); + wp34 -> AddPath(wp35, Path_Jump, 1); + wp34 -> AddPath(wp26, Path_Jump, -1); + wp34 -> AddPath(wp31, Path_Jump, -1); + wp34 -> AddPath(wp25, Path_Jump, -1); + wp34 -> AddPath(wp11, Path_MoveTo, -1); + wp35 -> AddPath(wp39, Path_MoveTo, 1); + wp35 -> AddPath(wp34, Path_Jump, -1); + wp36 -> AddPath(wp39, Path_MoveTo, 1); + wp36 -> AddPath(wp37, Path_Backflip, 1); + wp36 -> AddPath(wp38, Path_Jump, 1); + wp36 -> AddPath(wp26, Path_MoveTo, -1); + wp37 -> AddPath(wp38, Path_MoveTo, -1); + wp37 -> AddPath(wp36, Path_Jump, 1); + wp38 -> AddPath(wp39, Path_MoveTo, -1); + wp38 -> AddPath(wp37, Path_MoveTo, 1); + wp38 -> AddPath(wp33, Path_MoveTo, -1); + wp38 -> AddPath(wp32, Path_MoveTo, -1); + wp39 -> AddPath(wp35, Path_MoveTo, -1); + wp39 -> AddPath(wp38, Path_MoveTo, -1); + wp39 -> AddPath(wp32, Path_MoveTo, -1); + wp39 -> AddPath(wp32, Path_MoveTo, -1); + wp39 -> AddPath(wp33, Path_MoveTo, 1); + wp39 -> AddPath(wp40, Path_MoveTo, 1); + wp40 -> AddPath(wp42, Path_MoveTo, 1); + wp40 -> AddPath(wp41, Path_MoveTo, 1); + wp40 -> AddPath(wp21, Path_MoveTo, -1); + wp40 -> AddPath(wp16, Path_MoveTo, -1); + wp40 -> AddPath(wp43, Path_MoveTo, 1); + wp40 -> AddPath(wp39, Path_MoveTo, -1); + wp40 -> AddPath(wp38, Path_MoveTo, 1); + wp41 -> AddPath(wp40, Path_MoveTo, -1); + wp42 -> AddPath(wp40, Path_MoveTo, -1); + wp43 -> AddPath(wp39, Path_Jump, 1); + wp44 -> AddPath(wp2, Path_MoveTo, 1); + wp44 -> AddPath(wp24, Path_MoveTo, -1); + wp45 -> AddPath(wp24, Path_MoveTo, 1); + wp45 -> AddPath(wp2, Path_MoveTo, -1); +} + +/* Regelwähler */ + +public func ChooserFinished() +{ + Arena_ChooserFinished(); +} + +/* Relaunch */ + +protected func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam) +{ + for(var i=0, pCrew ; pCrew = GetCrew(iPlr, i) ; i++) + RelaunchPlayer(iPlr, pCrew, -1, iTeam); +} + +public func RelaunchPlayer(int iPlr, object pCrew, int iKiller, int iTeam) +{ + Arena_RelaunchPlayer(iPlr, pCrew, iKiller, iTeam); +} + +public func RelaunchPosition(int iTeam) +{ + var rand = Random(3); + if(iTeam == 1) + { + if(!rand--) return [70,80]; + else if(!rand--) return [30,910]; + else return [70,590]; + } + if(iTeam == 2) + { + if(!rand--) return [930,80]; + else if(!rand--) return [970,910]; + else return [930,590]; + } +} + diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Sky.jpg b/Hazard.c4f/DOM_TransmitTower.c4s/Sky.jpg new file mode 100644 index 00000000..581d65e0 Binary files /dev/null and b/Hazard.c4f/DOM_TransmitTower.c4s/Sky.jpg differ diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/StringTblDE.txt b/Hazard.c4f/DOM_TransmitTower.c4s/StringTblDE.txt new file mode 100644 index 00000000..fee5097e --- /dev/null +++ b/Hazard.c4f/DOM_TransmitTower.c4s/StringTblDE.txt @@ -0,0 +1,2 @@ +Red=Blutwipf-Bande +Blue=Chaos-Clonk-Club \ No newline at end of file diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/StringTblUS.txt b/Hazard.c4f/DOM_TransmitTower.c4s/StringTblUS.txt new file mode 100644 index 00000000..4c729d01 --- /dev/null +++ b/Hazard.c4f/DOM_TransmitTower.c4s/StringTblUS.txt @@ -0,0 +1,2 @@ +Red=Bloodwipf-Gang +Blue=Chaos-Clonk-Club \ No newline at end of file diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Teams.txt b/Hazard.c4f/DOM_TransmitTower.c4s/Teams.txt new file mode 100644 index 00000000..5c8ed987 --- /dev/null +++ b/Hazard.c4f/DOM_TransmitTower.c4s/Teams.txt @@ -0,0 +1,13 @@ +[Teams] +Active=1 +AllowTeamSwitch=0 + + [Team] + id=1 + Name=$Red$ + Color=16711680 + + [Team] + id=2 + Name=$Blue$ + Color=255 \ No newline at end of file diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Title.png b/Hazard.c4f/DOM_TransmitTower.c4s/Title.png new file mode 100644 index 00000000..f4dca9b2 Binary files /dev/null and b/Hazard.c4f/DOM_TransmitTower.c4s/Title.png differ diff --git a/Hazard.c4f/DOM_TransmitTower.c4s/Title.txt b/Hazard.c4f/DOM_TransmitTower.c4s/Title.txt new file mode 100644 index 00000000..5c643f26 --- /dev/null +++ b/Hazard.c4f/DOM_TransmitTower.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:DOM - Zetha Basis +US:DOM - Zetha Base \ No newline at end of file diff --git a/Hazard.c4f/DescDE.rtf b/Hazard.c4f/DescDE.rtf new file mode 100644 index 00000000..dbf4f375 Binary files /dev/null and b/Hazard.c4f/DescDE.rtf differ diff --git a/Hazard.c4f/DescUS.rtf b/Hazard.c4f/DescUS.rtf new file mode 100644 index 00000000..c4644eb5 Binary files /dev/null and b/Hazard.c4f/DescUS.rtf differ diff --git a/Hazard.c4f/Graphics.c4g/Control.png b/Hazard.c4f/Graphics.c4g/Control.png new file mode 100644 index 00000000..309d3f1a Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Control.png differ diff --git a/Hazard.c4f/Graphics.c4g/Crew.png b/Hazard.c4f/Graphics.c4g/Crew.png new file mode 100644 index 00000000..cd97744b Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Crew.png differ diff --git a/Hazard.c4f/Graphics.c4g/CursorLarge.png b/Hazard.c4f/Graphics.c4g/CursorLarge.png new file mode 100644 index 00000000..e9dc287a Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/CursorLarge.png differ diff --git a/Hazard.c4f/Graphics.c4g/CursorMedium.png b/Hazard.c4f/Graphics.c4g/CursorMedium.png new file mode 100644 index 00000000..b7f44ca9 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/CursorMedium.png differ diff --git a/Hazard.c4f/Graphics.c4g/CursorSmall.png b/Hazard.c4f/Graphics.c4g/CursorSmall.png new file mode 100644 index 00000000..e902b5c8 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/CursorSmall.png differ diff --git a/Hazard.c4f/Graphics.c4g/DescDE.rtf b/Hazard.c4f/Graphics.c4g/DescDE.rtf new file mode 100644 index 00000000..4a1920d5 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/DescDE.rtf differ diff --git a/Hazard.c4f/Graphics.c4g/DescUS.rtf b/Hazard.c4f/Graphics.c4g/DescUS.rtf new file mode 100644 index 00000000..f992a381 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/DescUS.rtf differ diff --git a/Hazard.c4f/Graphics.c4g/Energy.png b/Hazard.c4f/Graphics.c4g/Energy.png new file mode 100644 index 00000000..8d63255c Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Energy.png differ diff --git a/Hazard.c4f/Graphics.c4g/EnergyBars.png b/Hazard.c4f/Graphics.c4g/EnergyBars.png new file mode 100644 index 00000000..0f6684e0 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/EnergyBars.png differ diff --git a/Hazard.c4f/Graphics.c4g/Exit.png b/Hazard.c4f/Graphics.c4g/Exit.png new file mode 100644 index 00000000..531aae3f Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Exit.png differ diff --git a/Hazard.c4f/Graphics.c4g/GUICaption.png b/Hazard.c4f/Graphics.c4g/GUICaption.png new file mode 100644 index 00000000..d2fcd02b Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/GUICaption.png differ diff --git a/Hazard.c4f/Graphics.c4g/GUIProgress.png b/Hazard.c4f/Graphics.c4g/GUIProgress.png new file mode 100644 index 00000000..233fb6b0 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/GUIProgress.png differ diff --git a/Hazard.c4f/Graphics.c4g/GUIScroll.png b/Hazard.c4f/Graphics.c4g/GUIScroll.png new file mode 100644 index 00000000..bf8b79c9 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/GUIScroll.png differ diff --git a/Hazard.c4f/Graphics.c4g/Logo.png b/Hazard.c4f/Graphics.c4g/Logo.png new file mode 100644 index 00000000..c1079769 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Logo.png differ diff --git a/Hazard.c4f/Graphics.c4g/Menu.png b/Hazard.c4f/Graphics.c4g/Menu.png new file mode 100644 index 00000000..b3632689 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Menu.png differ diff --git a/Hazard.c4f/Graphics.c4g/Options.png b/Hazard.c4f/Graphics.c4g/Options.png new file mode 100644 index 00000000..c7538df9 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Options.png differ diff --git a/Hazard.c4f/Graphics.c4g/Player.png b/Hazard.c4f/Graphics.c4g/Player.png new file mode 100644 index 00000000..d16f4541 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Player.png differ diff --git a/Hazard.c4f/Graphics.c4g/Score.png b/Hazard.c4f/Graphics.c4g/Score.png new file mode 100644 index 00000000..213de896 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/Score.png differ diff --git a/Hazard.c4f/Graphics.c4g/SelectMark.png b/Hazard.c4f/Graphics.c4g/SelectMark.png new file mode 100644 index 00000000..5d9cf701 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/SelectMark.png differ diff --git a/Hazard.c4f/Graphics.c4g/UpperBoard.png b/Hazard.c4f/Graphics.c4g/UpperBoard.png new file mode 100644 index 00000000..87f42488 Binary files /dev/null and b/Hazard.c4f/Graphics.c4g/UpperBoard.png differ diff --git a/Hazard.c4f/LoaderTank.jpg b/Hazard.c4f/LoaderTank.jpg new file mode 100644 index 00000000..f6630069 Binary files /dev/null and b/Hazard.c4f/LoaderTank.jpg differ diff --git a/Hazard.c4f/Material.c4g/Acid.c4m b/Hazard.c4f/Material.c4g/Acid.c4m new file mode 100644 index 00000000..cd9989d5 --- /dev/null +++ b/Hazard.c4f/Material.c4g/Acid.c4m @@ -0,0 +1,12 @@ +[Material] +Name=Acid +Color=20,190,20,20,200,20,20,210 +ColorAnimation=1 +Density=25 +Instable=1 +MaxAirSpeed=25 +MaxSlide=10000 +WindDrift=30 +Corrosive=75 +Placement=10 +TextureOverlay=Liquid \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/Ashes.c4m b/Hazard.c4f/Material.c4g/Ashes.c4m new file mode 100644 index 00000000..a198fdfe --- /dev/null +++ b/Hazard.c4f/Material.c4g/Ashes.c4m @@ -0,0 +1,15 @@ +[Material] +Name=Ashes +Color=90,78,40,82,80,78,100,96,90 +Shape=2 +Density=50 +Friction=80 +MaxAirSpeed=25 +MaxSlide=1 +WindDrift=60 +Corrode=75 +Soil=1 +Placement=30 +TextureOverlay=Spots +PXSGfx=Ashes +PXSGfxRt=0,0,32,32,-16,-16 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/BackWall.c4m b/Hazard.c4f/Material.c4g/BackWall.c4m new file mode 100644 index 00000000..c4bf0651 --- /dev/null +++ b/Hazard.c4f/Material.c4g/BackWall.c4m @@ -0,0 +1,6 @@ +[Material] +Name=BackWall +Color=59,59,59,59,59,59,59,59,59 +Shape=0 +OverlayType=2 +Placement=5 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/Bricks1.png b/Hazard.c4f/Material.c4g/Bricks1.png new file mode 100644 index 00000000..3ebc812f Binary files /dev/null and b/Hazard.c4f/Material.c4g/Bricks1.png differ diff --git a/Hazard.c4f/Material.c4g/Bricks2.png b/Hazard.c4f/Material.c4g/Bricks2.png new file mode 100644 index 00000000..2fb0c35d Binary files /dev/null and b/Hazard.c4f/Material.c4g/Bricks2.png differ diff --git a/Hazard.c4f/Material.c4g/Column1.png b/Hazard.c4f/Material.c4g/Column1.png new file mode 100644 index 00000000..53943fe3 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Column1.png differ diff --git a/Hazard.c4f/Material.c4g/Concrete1.png b/Hazard.c4f/Material.c4g/Concrete1.png new file mode 100644 index 00000000..21dcd573 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Concrete1.png differ diff --git a/Hazard.c4f/Material.c4g/Concrete2.png b/Hazard.c4f/Material.c4g/Concrete2.png new file mode 100644 index 00000000..7b269e90 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Concrete2.png differ diff --git a/Hazard.c4f/Material.c4g/Concrete3.png b/Hazard.c4f/Material.c4g/Concrete3.png new file mode 100644 index 00000000..37b3fc75 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Concrete3.png differ diff --git a/Hazard.c4f/Material.c4g/Concrete4.png b/Hazard.c4f/Material.c4g/Concrete4.png new file mode 100644 index 00000000..0e86eb62 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Concrete4.png differ diff --git a/Hazard.c4f/Material.c4g/Concrete5.png b/Hazard.c4f/Material.c4g/Concrete5.png new file mode 100644 index 00000000..5d149cfc Binary files /dev/null and b/Hazard.c4f/Material.c4g/Concrete5.png differ diff --git a/Hazard.c4f/Material.c4g/ContaminatedWater.c4m b/Hazard.c4f/Material.c4g/ContaminatedWater.c4m new file mode 100644 index 00000000..ce8dbf53 --- /dev/null +++ b/Hazard.c4f/Material.c4g/ContaminatedWater.c4m @@ -0,0 +1,14 @@ +[Material] +Name=Water2 +Color=38,136,237,38,136,237,38,136,237 +Alpha=120,150,170,130,160,180 +ColorAnimation=1 +Density=25 +Instable=1 +MaxAirSpeed=25 +MaxSlide=10000 +WindDrift=30 +Corrosive=20 +Extinguisher=1 +Placement=10 +TextureOverlay=Liquid3 diff --git a/Hazard.c4f/Material.c4g/DescDE.rtf b/Hazard.c4f/Material.c4g/DescDE.rtf new file mode 100644 index 00000000..5b6d556c Binary files /dev/null and b/Hazard.c4f/Material.c4g/DescDE.rtf differ diff --git a/Hazard.c4f/Material.c4g/DescUS.rtf b/Hazard.c4f/Material.c4g/DescUS.rtf new file mode 100644 index 00000000..070a7000 Binary files /dev/null and b/Hazard.c4f/Material.c4g/DescUS.rtf differ diff --git a/Hazard.c4f/Material.c4g/DuroLava.c4m b/Hazard.c4f/Material.c4g/DuroLava.c4m new file mode 100644 index 00000000..fb9e450d --- /dev/null +++ b/Hazard.c4f/Material.c4g/DuroLava.c4m @@ -0,0 +1,15 @@ +[Material] +Name=DuroLava +Color=245,220,15,251,220,15,248,230,18 +ColorAnimation=1 +Density=25 +Instable=1 +MaxAirSpeed=50 +MaxSlide=10000 +WindDrift=30 +Incindiary=1 +Placement=10 +TextureOverlay=Liquid +Alpha=30,15,10,30,15,10,30,15,10,30,15,10,30,15,10,30,15,10 +PXSGfx=Lava +PXSGfxRt=0,0,32,32,-16,-16 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/Earth.c4m b/Hazard.c4f/Material.c4g/Earth.c4m new file mode 100644 index 00000000..a9a9dbb7 --- /dev/null +++ b/Hazard.c4f/Material.c4g/Earth.c4m @@ -0,0 +1,12 @@ +[Material] +Name=Earth +Color=87,55,23,107,71,35,131,87,51 +Shape=2 +Density=50 +Friction=80 +MaxAirSpeed=100 +MaxSlide=1 +Corrode=75 +Soil=1 +Placement=30 +TextureOverlay=Smooth \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/FlyAshes.c4m b/Hazard.c4f/Material.c4g/FlyAshes.c4m new file mode 100644 index 00000000..441b4a79 --- /dev/null +++ b/Hazard.c4f/Material.c4g/FlyAshes.c4m @@ -0,0 +1,20 @@ +[Material] +Name=FlyAshes +Color=85,78,60,82,80,78,100,96,90 +Shape=2 +Density=50 +Friction=80 +DigFree=1 +BlastFree=1 +Blast2PXSRatio=10 +Instable=1 +MaxAirSpeed=25 +MaxSlide=1 +WindDrift=60 +Corrode=75 +Soil=1 +Placement=20 +TextureOverlay=Spots +PXSGfxSize=6 +PXSGfx=Ashes +PXSGfxRt=0,0,32,32,-16,-16 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/FlySand.c4m b/Hazard.c4f/Material.c4g/FlySand.c4m new file mode 100644 index 00000000..af1142e1 --- /dev/null +++ b/Hazard.c4f/Material.c4g/FlySand.c4m @@ -0,0 +1,17 @@ +[Material] +Name=FlySand +Color=224,200,140,224,212,136,236,232,148 +Shape=2 +Density=50 +Friction=80 +DigFree=1 +BlastFree=1 +Blast2PXSRatio=10 +Instable=1 +MaxAirSpeed=20 +MaxSlide=1 +WindDrift=100 +Corrode=30 +Soil=1 +Placement=20 +TextureOverlay=Smooth2 diff --git a/Hazard.c4f/Material.c4g/Grid1.png b/Hazard.c4f/Material.c4g/Grid1.png new file mode 100644 index 00000000..2b17a226 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Grid1.png differ diff --git a/Hazard.c4f/Material.c4g/Grid2.png b/Hazard.c4f/Material.c4g/Grid2.png new file mode 100644 index 00000000..8875709c Binary files /dev/null and b/Hazard.c4f/Material.c4g/Grid2.png differ diff --git a/Hazard.c4f/Material.c4g/Industrial1.png b/Hazard.c4f/Material.c4g/Industrial1.png new file mode 100644 index 00000000..5f8b910a Binary files /dev/null and b/Hazard.c4f/Material.c4g/Industrial1.png differ diff --git a/Hazard.c4f/Material.c4g/Industrial2.png b/Hazard.c4f/Material.c4g/Industrial2.png new file mode 100644 index 00000000..40029606 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Industrial2.png differ diff --git a/Hazard.c4f/Material.c4g/Industrial3.png b/Hazard.c4f/Material.c4g/Industrial3.png new file mode 100644 index 00000000..2add14cc Binary files /dev/null and b/Hazard.c4f/Material.c4g/Industrial3.png differ diff --git a/Hazard.c4f/Material.c4g/Laboratory1.png b/Hazard.c4f/Material.c4g/Laboratory1.png new file mode 100644 index 00000000..5eced5f8 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Laboratory1.png differ diff --git a/Hazard.c4f/Material.c4g/Liquid2.png b/Hazard.c4f/Material.c4g/Liquid2.png new file mode 100644 index 00000000..6a3c7940 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Liquid2.png differ diff --git a/Hazard.c4f/Material.c4g/Liquid3.png b/Hazard.c4f/Material.c4g/Liquid3.png new file mode 100644 index 00000000..7e62a0ab Binary files /dev/null and b/Hazard.c4f/Material.c4g/Liquid3.png differ diff --git a/Hazard.c4f/Material.c4g/Marble1.png b/Hazard.c4f/Material.c4g/Marble1.png new file mode 100644 index 00000000..d575fb81 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Marble1.png differ diff --git a/Hazard.c4f/Material.c4g/Metal1.png b/Hazard.c4f/Material.c4g/Metal1.png new file mode 100644 index 00000000..ab7703a3 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Metal1.png differ diff --git a/Hazard.c4f/Material.c4g/Metal2.png b/Hazard.c4f/Material.c4g/Metal2.png new file mode 100644 index 00000000..8ed5e9d8 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Metal2.png differ diff --git a/Hazard.c4f/Material.c4g/Metal3.png b/Hazard.c4f/Material.c4g/Metal3.png new file mode 100644 index 00000000..b0a5f238 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Metal3.png differ diff --git a/Hazard.c4f/Material.c4g/Metal4.png b/Hazard.c4f/Material.c4g/Metal4.png new file mode 100644 index 00000000..20e03d3a Binary files /dev/null and b/Hazard.c4f/Material.c4g/Metal4.png differ diff --git a/Hazard.c4f/Material.c4g/Rain.c4m b/Hazard.c4f/Material.c4g/Rain.c4m new file mode 100644 index 00000000..2443b082 --- /dev/null +++ b/Hazard.c4f/Material.c4g/Rain.c4m @@ -0,0 +1,19 @@ +[Material] +Name=Rain +Color=7,35,140,7,35,140,7,35,140 +Alpha=0,0,0,0,0,0 +ColorAnimation=1 +Density=25 +Instable=1 +MaxAirSpeed=25 +MaxSlide=10000 +WindDrift=30 +Corrode=100 +Extinguisher=1 +Placement=10 +TextureOverlay=Liquid + +[Reaction] +Type=Convert +TargetSpec=SemiSolid +ExecMask=-1 diff --git a/Hazard.c4f/Material.c4g/Rock.c4m b/Hazard.c4f/Material.c4g/Rock.c4m new file mode 100644 index 00000000..ae8cfbfe --- /dev/null +++ b/Hazard.c4f/Material.c4g/Rock.c4m @@ -0,0 +1,10 @@ +[Material] +Name=Rock +Color=86,86,86,106,106,106,126,126,126 +Shape=3 +Density=50 +Friction=100 +MaxAirSpeed=100 +MaxSlide=250 +Placement=50 +TextureOverlay=Rough diff --git a/Hazard.c4f/Material.c4g/Rough.c4m b/Hazard.c4f/Material.c4g/Rough.c4m new file mode 100644 index 00000000..60746ee8 --- /dev/null +++ b/Hazard.c4f/Material.c4g/Rough.c4m @@ -0,0 +1,6 @@ +[Material] +Name=Rough +Color=59,59,59,59,59,59,59,59,59 +Shape=2 +OverlayType=3 +Placement=10 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/Sand.c4m b/Hazard.c4f/Material.c4g/Sand.c4m new file mode 100644 index 00000000..ed7a09aa --- /dev/null +++ b/Hazard.c4f/Material.c4g/Sand.c4m @@ -0,0 +1,12 @@ +[Material] +Name=Sand +Color=204,180,120,204,192,116,216,212,128 +Shape=2 +Density=50 +Friction=80 +MaxAirSpeed=100 +MaxSlide=1 +Corrode=30 +Soil=1 +Placement=30 +TextureOverlay=Smooth2 diff --git a/Hazard.c4f/Material.c4g/Slime1.png b/Hazard.c4f/Material.c4g/Slime1.png new file mode 100644 index 00000000..a27be4f8 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Slime1.png differ diff --git a/Hazard.c4f/Material.c4g/Stripes.png b/Hazard.c4f/Material.c4g/Stripes.png new file mode 100644 index 00000000..e11c0f95 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Stripes.png differ diff --git a/Hazard.c4f/Material.c4g/Structure.png b/Hazard.c4f/Material.c4g/Structure.png new file mode 100644 index 00000000..0d7f2f2c Binary files /dev/null and b/Hazard.c4f/Material.c4g/Structure.png differ diff --git a/Hazard.c4f/Material.c4g/TexMap.txt b/Hazard.c4f/Material.c4g/TexMap.txt new file mode 100644 index 00000000..ca463826 --- /dev/null +++ b/Hazard.c4f/Material.c4g/TexMap.txt @@ -0,0 +1,89 @@ +# Static Map Material/Texture Table +# Index +128 for underground materials + +# Original Materials: Range 1 - 15 +# Hazard Materials: Range 24 - 85 + +OverloadMaterials +OverloadTextures + +1=Tunnel-Smooth +2=Tunnel-Rough +3=Water-Liquid +4=Acid-Liquid2 +5=DuroLava-Liquid +6=Granite-Ridge +7=Sand-Swirl +8=FlySand-Smooth +9=Ashes-Swirl +10=FlyAshes-Smooth +11=Snow-Flare2 +12=Ice-Structure +13=Earth-Smooth +14=Earth-Rough +15=Rock-Ridge + +24=Water2-Liquid3 +25=BackWall-Bricks1 +26=BackWall-Bricks2 +27=BackWall-Column1 +28=BackWall-Concrete1 +29=BackWall-Concrete2 +30=BackWall-Concrete3 +31=BackWall-Concrete4 +32=BackWall-Concrete5 +33=BackWall-Grid1 +34=BackWall-Grid2 +35=BackWall-Industrial1 +36=BackWall-Industrial2 +37=BackWall-Industrial3 +38=BackWall-Laboratory1 +39=BackWall-Marble1 +40=BackWall-Metal1 +41=BackWall-Metal2 +42=BackWall-Metal3 +43=BackWall-Metal4 +44=BackWall-Slime1 +45=BackWall-Tiles1 +46=BackWall-Tiles2 +47=BackWall-Tiles3 +48=BackWall-Unknown1 +49=BackWall-Unknown2 +50=Wall-Bricks1 +51=Wall-Bricks2 +52=Wall-Concrete1 +53=Wall-Concrete2 +54=Wall-Concrete3 +55=Wall-Concrete4 +56=Wall-Concrete5 +57=Wall-Industrial1 +58=Wall-Metal2 +59=Wall-Metal3 +60=Wall-Metal4 +61=Wall-Unknown1 +62=Wall-Unknown2 +63=Wall-Structure +64=Wall-Smooth2 +65=WeakWall-Bricks1 +66=WeakWall-Bricks2 +67=WeakWall-Concrete1 +68=WeakWall-Concrete2 +69=WeakWall-Concrete3 +70=WeakWall-Concrete4 +71=WeakWall-Concrete5 +72=WeakWall-Industrial1 +73=WeakWall-Metal2 +74=WeakWall-Metal3 +75=WeakWall-Metal4 +76=WeakWall-Unknown1 +77=WeakWall-Unknown2 +78=WeakWall-Structure +79=WeakWall-Smooth2 +80=Rough-Bricks1 +81=Rough-Concrete2 +82=Rough-Concrete4 +83=Rough-Slime1 +84=Rough-Unknown1 +85=Rough-Unknown2 +86=BackWall-Stripes +87=Wall-Stripes \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/Tiles1.png b/Hazard.c4f/Material.c4g/Tiles1.png new file mode 100644 index 00000000..98cbd583 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Tiles1.png differ diff --git a/Hazard.c4f/Material.c4g/Tiles2.png b/Hazard.c4f/Material.c4g/Tiles2.png new file mode 100644 index 00000000..f4b74f24 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Tiles2.png differ diff --git a/Hazard.c4f/Material.c4g/Tiles3.png b/Hazard.c4f/Material.c4g/Tiles3.png new file mode 100644 index 00000000..231f57d6 Binary files /dev/null and b/Hazard.c4f/Material.c4g/Tiles3.png differ diff --git a/Hazard.c4f/Material.c4g/Tunnel.c4m b/Hazard.c4f/Material.c4g/Tunnel.c4m new file mode 100644 index 00000000..1a14256b --- /dev/null +++ b/Hazard.c4f/Material.c4g/Tunnel.c4m @@ -0,0 +1,7 @@ +[Material] +Name=Tunnel +Color=42,10,5,52,26,5,66,32,6 +Shape=2 +Placement=5 +TextureOverlay=Smooth2 +OverlayType=4 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/Unknown1.png b/Hazard.c4f/Material.c4g/Unknown1.png new file mode 100644 index 00000000..0978650f Binary files /dev/null and b/Hazard.c4f/Material.c4g/Unknown1.png differ diff --git a/Hazard.c4f/Material.c4g/Unknown2.png b/Hazard.c4f/Material.c4g/Unknown2.png new file mode 100644 index 00000000..491eb33a Binary files /dev/null and b/Hazard.c4f/Material.c4g/Unknown2.png differ diff --git a/Hazard.c4f/Material.c4g/Wall.c4m b/Hazard.c4f/Material.c4g/Wall.c4m new file mode 100644 index 00000000..6430d838 --- /dev/null +++ b/Hazard.c4f/Material.c4g/Wall.c4m @@ -0,0 +1,10 @@ +[Material] +Name=Wall +Color=108,108,108,108,108,108,108,108,108 +Shape=0 +Density=50 +Friction=100 +MaxAirSpeed=100 +MaxSlide=250 +OverlayType=2 +Placement=40 \ No newline at end of file diff --git a/Hazard.c4f/Material.c4g/WeakWall.c4m b/Hazard.c4f/Material.c4g/WeakWall.c4m new file mode 100644 index 00000000..9f900569 --- /dev/null +++ b/Hazard.c4f/Material.c4g/WeakWall.c4m @@ -0,0 +1,13 @@ +[Material] +Name=WeakWall +Color=118,118,118,118,118,118,118,118,118 +Shape=0 +Density=50 +Friction=80 +BlastFree=1 +Blast2Object= +Blast2ObjectRatio= +BlastShiftTo=BackWall +MaxAirSpeed=100 +OverlayType=2 +Placement=45 \ No newline at end of file diff --git a/Hazard.c4f/Music.c4g/Axel F Remix.ogg b/Hazard.c4f/Music.c4g/Axel F Remix.ogg new file mode 100644 index 00000000..567721c0 Binary files /dev/null and b/Hazard.c4f/Music.c4g/Axel F Remix.ogg differ diff --git a/Hazard.c4f/Music.c4g/Battlezone.ogg b/Hazard.c4f/Music.c4g/Battlezone.ogg new file mode 100644 index 00000000..68de5a4c Binary files /dev/null and b/Hazard.c4f/Music.c4g/Battlezone.ogg differ diff --git a/Hazard.c4f/Music.c4g/DescDE.rtf b/Hazard.c4f/Music.c4g/DescDE.rtf new file mode 100644 index 00000000..8e01aad1 Binary files /dev/null and b/Hazard.c4f/Music.c4g/DescDE.rtf differ diff --git a/Hazard.c4f/Music.c4g/DescUS.rtf b/Hazard.c4f/Music.c4g/DescUS.rtf new file mode 100644 index 00000000..3f25b800 Binary files /dev/null and b/Hazard.c4f/Music.c4g/DescUS.rtf differ diff --git a/Hazard.c4f/Music.c4g/Desert in Space.ogg b/Hazard.c4f/Music.c4g/Desert in Space.ogg new file mode 100644 index 00000000..31d75ffe Binary files /dev/null and b/Hazard.c4f/Music.c4g/Desert in Space.ogg differ diff --git a/Hazard.c4f/Music.c4g/On a Razor-Blade.ogg b/Hazard.c4f/Music.c4g/On a Razor-Blade.ogg new file mode 100644 index 00000000..e1eea9b8 Binary files /dev/null and b/Hazard.c4f/Music.c4g/On a Razor-Blade.ogg differ diff --git a/Hazard.c4f/Music.c4g/Origin of Silence.ogg b/Hazard.c4f/Music.c4g/Origin of Silence.ogg new file mode 100644 index 00000000..6a569c85 Binary files /dev/null and b/Hazard.c4f/Music.c4g/Origin of Silence.ogg differ diff --git a/Hazard.c4f/Music.c4g/Quick Charge.ogg b/Hazard.c4f/Music.c4g/Quick Charge.ogg new file mode 100644 index 00000000..2b9ca574 Binary files /dev/null and b/Hazard.c4f/Music.c4g/Quick Charge.ogg differ diff --git a/Hazard.c4f/Music.c4g/Reflective Motion.ogg b/Hazard.c4f/Music.c4g/Reflective Motion.ogg new file mode 100644 index 00000000..abb24000 Binary files /dev/null and b/Hazard.c4f/Music.c4g/Reflective Motion.ogg differ diff --git a/Hazard.c4f/Music.c4g/The Matrix.ogg b/Hazard.c4f/Music.c4g/The Matrix.ogg new file mode 100644 index 00000000..9e7f672e Binary files /dev/null and b/Hazard.c4f/Music.c4g/The Matrix.ogg differ diff --git a/Hazard.c4f/Music.c4g/The Underworld.ogg b/Hazard.c4f/Music.c4g/The Underworld.ogg new file mode 100644 index 00000000..65442fdc Binary files /dev/null and b/Hazard.c4f/Music.c4g/The Underworld.ogg differ diff --git a/Hazard.c4f/Music.c4g/Warpfield - Spaces Remix.ogg b/Hazard.c4f/Music.c4g/Warpfield - Spaces Remix.ogg new file mode 100644 index 00000000..a2fa02d9 Binary files /dev/null and b/Hazard.c4f/Music.c4g/Warpfield - Spaces Remix.ogg differ diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DefCore.txt b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DefCore.txt new file mode 100644 index 00000000..4e7819c8 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DefCore.txt @@ -0,0 +1,9 @@ +[DefCore] +id=_DIA +Version=4,9,8,2 +Name=Dialogue +Category=C4D_StaticBack +Width=1 +Height=1 +Offset=-1,-1 +Picture=0,0,64,64 diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DescDE.txt b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DescDE.txt new file mode 100644 index 00000000..1bdbe63a --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DescDE.txt @@ -0,0 +1 @@ +Regelt Gespräche. \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DescUS.txt b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DescUS.txt new file mode 100644 index 00000000..645bf31e --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/DescUS.txt @@ -0,0 +1 @@ +Manages dialogs. \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Graphics.png b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Graphics.png new file mode 100644 index 00000000..dfc2b446 Binary files /dev/null and b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Graphics.png differ diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Names.txt b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Names.txt new file mode 100644 index 00000000..94ac78c6 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Dialog +US:Dialogue \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Script.c b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Script.c new file mode 100644 index 00000000..d92cc417 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/Script.c @@ -0,0 +1,140 @@ +/*-- NPC-Gespräch --*/ + +#strict + +static const MENU_DecID = _MD1; + +local ChatCount, pPartner; + +/* Initialisierung */ + +protected func Initialize() +{ + ChatCount = CreateArray(GetChatCount()); + Initialized(); // Falls man Gespräche anfangs zurückhalten will +} + +/* Gespräch */ + +public func ActivateEntrance(object pBy) +{ + SetCommand(pBy, "None"); + if(!(GetOCF(pBy) & OCF_CrewMember)) return(); + if(pPartner) return(); + // Gespräch mit Spieler + pPartner = pBy; + // Menü + if(!CreateMenu(GetID(), pPartner, this(), 0, "", 0, 3, false)) return(); + // Einträge + var szPortrait = GetMenuPortrait(this()); + // Portrait + AddMenuItem(szPortrait, "", NONE, pPartner, 0, 0, "", 5, 0, 0); + // Begrüßungsgelaber + var greeting = Format("<%s>|%s", GetName(this()), Greeting()); + AddMenuItem(greeting, "", NONE, pPartner, 0, 0, "", 512, 0, 0); + // mögliche Gespräche + var i = 0; + for(var chat in ChatCount) + { + if(!chat) + { + AddMenuItem(ChatHeader(i), Format("StartChat(%d)", i), GetID(), pPartner, 0, 0, 0, 512); + } + i++; + } + // Standard + AddAnswer(pPartner, "$Cancel$", "EndChat", NONE,-1); + //SetMenuDecoration(); + SetMenuTextProgress(GetLength(GetName())+1, pPartner); +} + +protected func GetMenuPortrait(object pBy) +{ + var szPortrait, szText; + + if(GetOwner(pBy) != NO_OWNER) + { + } + else + { + // Gegenstände haben, so vermute ich mal, nur 1 Portrait (ansonsten halt überladen) + szPortrait = "1"; + } + + szText = Format("Portrait:%i::%x::%s", GetID(), GetColorDw(pBy), szPortrait); + return(szText); +} + +/* Weiterer Gesprächsverlauf */ + +// Dialogbox erstellen +public func CreateDialogBox(object pTarget, string szText, object pWho) +{ + // Parameter + if(!pTarget) + if(!(pTarget = pPartner)) + return(); + if(!szText) + return(); + if(!pWho) + pWho = this(); + // Menü + if(!CreateMenu(GetID(), pPartner, this(), 0, "", 0, 3, false)) return(); + // Einträge + var szPortrait = GetMenuPortrait(pWho); + // Portrait + AddMenuItem(szPortrait, "", NONE, pPartner, 0, 0, "", 5, 0, 0); + // Was man zu sagen hat + AddMenuItem(szText, "", NONE, pPartner, 0, 0, "", 512); + // Standard + //SetMenuDecoration(); + SetMenuTextProgress(GetLength(GetName(pWho))+1, pPartner); + return(true); +} + +public func AddAnswer(object pTarget, string szText, string szFunc, id idItem, vParam) +{ + // Parameter + if(!pTarget) + if(!(pTarget = pPartner)) + return(); + if(!szText) + return(); + if(!szFunc) + return(); + // Eintrag anfügen + if(AddMenuItem(szText, szFunc, idItem, pTarget, 0, vParam, "", 512)) + return(true); +} + +public func EndChat(id dummy, int i) +{ + pPartner = 0; + // Kann noch für besondere Dinge benutzt werden + ChatFinished(i); +} + +/* Kontrolle von Gesprächen */ + +public func CloseChat(int i) // Schließt ein Gespräch ab (kann dann nicht mehr geführt werden) +{ + ChatCount[i] = true; +} + +public func OpenChat(int i) // Eröffnet ein Gespräch (kann dann geführt werden) +{ + ChatCount[i] = false; +} + +/* Status */ + +public func Initialized() {} // Um Gespräche zurück zu halten +public func GetChatCount() {} // Anzahl Gespräche, die man führen kann +public func Greeting() {} // Begrüßung +public func ChatHeader(int i) {} // Gesprächsbeginne (0 - x) + +public func StartChat(int i) {} // Gesprächsbeginn (0 - x) + +public func MenuQueryCancel() { return(true); } + +public func ChatFinished(int i) {} // Wenn Gespräche beendet werden diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/StringTblDE.txt b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/StringTblDE.txt new file mode 100644 index 00000000..4b14bbd7 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/StringTblDE.txt @@ -0,0 +1 @@ +Cancel=Abbrechen \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/StringTblUS.txt b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/StringTblUS.txt new file mode 100644 index 00000000..e6761c8b --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Dialogue.c4d/StringTblUS.txt @@ -0,0 +1 @@ +Cancel=Cancel \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/ActMap.txt b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/ActMap.txt new file mode 100644 index 00000000..a80288d3 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/ActMap.txt @@ -0,0 +1,39 @@ +[Action] +Name=FrameDecoTopLeft +Facet=1,2,10,24,-5,-10 + +[Action] +Name=FrameDecoTop +Facet=11,2,79,9,0,-9 + +[Action] +Name=FrameDecoTopRight +Facet=90,2,9,24,0,-10 + +[Action] +Name=FrameDecoRight +Facet=90,25,9,50,0,0 + +[Action] +Name=FrameDecoBottomRight +Facet=90,75,9,24,0,-15 + +[Action] +Name=FrameDecoBottom +Facet=11,90,79,9,0,0 + +[Action] +Name=FrameDecoBottomLeft +Facet=1,75,10,24,-5,-15 + +[Action] +Name=FrameDecoLeft +Facet=1,25,10,50,-5,0 + +[Action] +Name=FrameDecoWall +Facet=10,10,80,80 + + + + diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DefCore.txt b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DefCore.txt new file mode 100644 index 00000000..f2418857 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=HZDC +Name=Hazard Deco +Version=4,9,5,4 +Category=1 +Width=1 +Height=1 +Mass=1 +Picture=0,0, + diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DescDE.txt b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DescDE.txt new file mode 100644 index 00000000..34b137da --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DescDE.txt @@ -0,0 +1 @@ +Dekoration für Menüs. \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DescUS.txt b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DescUS.txt new file mode 100644 index 00000000..50ac4568 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/DescUS.txt @@ -0,0 +1 @@ +Decoraton for menus. \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Graphics.png b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Graphics.png new file mode 100644 index 00000000..f73953da Binary files /dev/null and b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Graphics.png differ diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Names.txt b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Names.txt new file mode 100644 index 00000000..4267457a --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Menüdeko +US:Menu deco diff --git a/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Script.c b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Script.c new file mode 100644 index 00000000..9833a443 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/MenuDeco.c4d/Script.c @@ -0,0 +1,8 @@ +/*-- Deco --*/ + +#strict + +protected func FrameDecorationBackClr() +{ + return(RGBa(50,50,50,128)); +} diff --git a/Hazard.c4f/ScenObjects.c4d/Names.txt b/Hazard.c4f/ScenObjects.c4d/Names.txt new file mode 100644 index 00000000..397b7a31 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Szenarienobjekte +US:Scenario Objects diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/ActMap.txt b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/ActMap.txt new file mode 100644 index 00000000..c80675a7 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Attach +Procedure=ATTACH +Length=1 +Delay=0 +FacetBase=1 \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DefCore.txt b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DefCore.txt new file mode 100644 index 00000000..080c01a4 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=TALK +Name=Talker +Version=4,9,5 +Category=C4D_Object +Width=20 +Height=20 +Offset=-10,-10 +Vertices=1 +VertexY=1 +Entrance=-10,-10,20,20 \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DescDE.txt b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DescDE.txt new file mode 100644 index 00000000..97c3c67d --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DescDE.txt @@ -0,0 +1 @@ +Das Sprichmichan ist dafür zuständig, dass man auch mit Leuten reden kann. \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DescUS.txt b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DescUS.txt new file mode 100644 index 00000000..ab06d92e --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/DescUS.txt @@ -0,0 +1 @@ +The Talktome allows to talk to NPCs. \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Graphics.png b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Graphics.png new file mode 100644 index 00000000..69892f39 Binary files /dev/null and b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Graphics.png differ diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Names.txt b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Names.txt new file mode 100644 index 00000000..ee1310d6 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Sprichmichan +US:Talktome \ No newline at end of file diff --git a/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Script.c b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Script.c new file mode 100644 index 00000000..b2e9d329 --- /dev/null +++ b/Hazard.c4f/ScenObjects.c4d/Talker.c4d/Script.c @@ -0,0 +1,45 @@ +/*-- Talker --*/ + +#strict +#include _DIA + +local talkto, greet, answer; + +func Initialized() +{ + SetVisibility(VIS_None); +} + +public func Set(object target, string greeting, string ok) +{ + SetAction("Attach",target); + SetName(GetName(target)); + greet = greeting; + answer = ok; + talkto = target; +} + +/* Chatfunktionalität */ + +public func Greeting() { return(greet); } +public func GetChatCount() { return(1); } + +public func ChatHeader(int i) +{ + return(answer); +} + +public func GetMenuPortrait() +{ + return(Format("Portrait:%i::%x::%s", GetID(talkto), GetColorDw(talkto), "1")); +} + +public func StartChat(int i) +{ + EndChat(); +} + +public func ChatFinished(int i) +{ + GameCall("ChatFinished",talkto,i,this()); +} diff --git a/Hazard.c4f/Title.png b/Hazard.c4f/Title.png new file mode 100644 index 00000000..d87203de Binary files /dev/null and b/Hazard.c4f/Title.png differ diff --git a/Hazard.c4f/Title.txt b/Hazard.c4f/Title.txt new file mode 100644 index 00000000..7d9b21a3 --- /dev/null +++ b/Hazard.c4f/Title.txt @@ -0,0 +1,2 @@ +DE:Hazard +US:Hazard \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Ack.wav b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Ack.wav new file mode 100644 index 00000000..94ba6785 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Ack.wav differ diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/ActMap.txt b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/ActMap.txt new file mode 100644 index 00000000..4ae7683a --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/ActMap.txt @@ -0,0 +1,20 @@ +[Action] +Name=Off +Delay=1 +Length=1 +Facet=0,0,60,60 +NextAction=Off + +[Action] +Name=Noise +Delay=2 +Length=3 +Facet=60,0,60,60 +NextAction=Noise + +[Action] +Name=On +Delay=1 +Length=1 +Facet=240,0,60,60 +NextAction=On \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/DefCore.txt b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/DefCore.txt new file mode 100644 index 00000000..be25fcd8 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=CSCR +Version=4,9,8,2 +Name=CommunicationScreen +Category=C4D_StaticBack +Width=60 +Height=60 +Offset=-30,-30 +Picture=240,0,60,60 +StretchGrowth=1 +IncompleteActivity=1 +Oversize=1 diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Graphics.png b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Graphics.png new file mode 100644 index 00000000..bcdaea52 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Graphics.png differ diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Names.txt b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Names.txt new file mode 100644 index 00000000..bf6f0eec --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Kommunikationsschirm +US:Communication Screen \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Portrait1.png b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Portrait1.png new file mode 100644 index 00000000..44e5278c Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Portrait1.png differ diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Script.c b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Script.c new file mode 100644 index 00000000..7b65b494 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/Script.c @@ -0,0 +1,139 @@ +/*-- Kommunikationsschirm --*/ + +#strict + +#include _DIA + +local state; +static process; + +func Initialize() { + SetAction("Off"); + + SetName("Commander"); + + AddFrame(); + return(_inherited()); +} + +func Greeting() { + if(process == 0) return("$Intro1$"); + if(process == 2) return("$Tutor1$"); + if(process == 3) return("$Tutor2$"); + if(process == 4) return("$Tutor4$"); + if(process == 5) return("$Tutor7$"); + if(process == 6) return("$Tutor8$"); + if(process == 7) return("$Tutor10$"); + if(process == 8) return("$Tutor11$"); + if(process == 9) return("$Tutor12$"); + if(process == 10) return("$Tutor14$"); + if(process == 11) return("$Tutor17$"); + if(process == 12) return("$Tutor18$"); + if(process == 13) return("$Tutor19$"); + if(process == 14) return("$Tutor20$"); + if(process == 15) return("$Tutor25$"); + if(process == 16) return("$Tutor27$"); + if(process == 17) return("$Tutor28$"); + if(process == 18) return("$Tutor30$"); + if(process == 19) return(Format("$TutorEND$",GetName(GetCrew()))); +} + +func GetChatCount() { return(1); } + +func GetMenuPortrait() { + return("Portrait:CSCR::0000ff::1"); +} + +func ChatHeader() { + if(process == 2 || process == 5 || process == 7 || process == 8 || process == 13 || process == 16 || process == 19) + return("Okay"); + else + return("$Continue$"); +} + +func StartChat(int i) { + if(process == 0) { + state = 0; + CreateDialogBox(0,"$Intro2$"); + AddAnswer(0,"$Continue$","Dialog",CSCR); + } + else if(process == 3) { + CreateDialogBox(0,"$Tutor3$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(process == 4) { + state = 1; + CreateDialogBox(0,"$Tutor5$"); + AddAnswer(0,"$Continue$","Dialog",CSCR); + } + else if(process == 6) { + CreateDialogBox(0,"$Tutor9$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(process == 8) { + CreateDialogBox(0,"$Tutor11b$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(process == 9) { + CreateDialogBox(0,"$Tutor13$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(process == 10) { + state = 2; + CreateDialogBox(0,"$Tutor15$"); + AddAnswer(0,"$Continue$","Dialog",CSCR); + } + else if(process == 14) { + state = 3; + CreateDialogBox(0,"$Tutor21$"); + AddAnswer(0,"$Continue$","Dialog",CSCR); + } + else if(process == 15) { + CreateDialogBox(0,"$Tutor26$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(process == 17) { + CreateDialogBox(0,"$Tutor29$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(process == 18) { + CreateDialogBox(0,"$Tutor31$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else + EndChat(); +} + +func Dialog() { + if(state == 0) { + CreateDialogBox(0,"$Intro3$"); + AddAnswer(0,"Okay","EndChat",SCCK); + } + else if(state == 1) { + CreateDialogBox(0,"$Tutor6$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(state == 2) { + CreateDialogBox(0,"$Tutor16$"); + AddAnswer(0,"Okay","EndChat",TARG); + } + else if(state == 3) { + CreateDialogBox(0,"$Tutor22$"); + AddAnswer(0,"Okay","Dialog",CSCR); + state = 4; + } + else if(state == 4) { + CreateDialogBox(0,"$Tutor23$"); + AddAnswer(0,"Okay","Dialog",CSCR); + state = 5; + } + else if(state == 5) { + CreateDialogBox(0,"$Tutor24$"); + AddAnswer(0,"Okay","EndChat",TARG); + } +} + +func ChatFinished() { + process++; + Sound("Ack",1); +} diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/StringTblDE.txt b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/StringTblDE.txt new file mode 100644 index 00000000..3d072b04 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/StringTblDE.txt @@ -0,0 +1,54 @@ +Continue=Weiter +Intro1=Stillgestanden Soldat! Willkommen im Ausbildungscenter. +Intro2=Mein name ist Grodon Freimann, ich bin der leitende Offizier hier, und dein Ausbilder heute. Jetzt darfst du auch mal mit dem Spielzeug der großen Jungs spielen. +Intro3=Als erstes brauchst du eine Waffe. Geh zum Doc, er wird dir eine geben. Spring einfach auf die Leiter und kletter hinauf. Danach fährst du mit dem Lift nach oben, und nimmst den rechten Ausgang. + +Tutor1=Sehr schön. Aber dir fehlt noch Munition. Sammel das Munitionspaket dort vorne auf und verfrachte die Munition per \"DoppelGraben\" in deinen Munitionsvorrat. + +Tutor2=Du kannst deinen Munitionsvorrat auf der linken Seite des Bildschirms sehen. +Tutor3=Jetzt geht's erst richtig los. Lad deine Pistole per \"Werfen\" nach, und schieß die Zielscheibe, die diese aufopfernde Drohne netterweise hält, ab. + +Tutor4=Gut, das war ja noch leicht. Aber diesmal ist es nicht so einfach. +Tutor5=Da oben kommst du so nicht ran, hier kommt der \"Zielmodus\" zum Einsatz. +Tutor6=Dazu stellst du dich hin, und drückst 3mal auf \"Stop\". Danach kannst du sogar mit der Pistole zielen. Zeig uns was du kannst. + +Tutor7=Sehr gut. Jetzt wird's interessant. Du darfst nun den Granatenwerfer ausprobieren. Steig dazu in den Teleporter rechts und aktiviere ihn auf \"Springen\". + +Tutor8=Da hinten liegt er. Doch um ihn zu bekommen, musst du zuerst dieses Hindernis überwinden. Es wird dir nicht gelingen einfach rüberzuspringen. +Tutor9=Erinnerst du dich an das, was du bei deiner Eliteausbildung gelernt hast? Richtig, der Flip. Stell dich an die Kante, und probiere einen Rückwärtssprung (laufe dazu kurz von der Kante weg und drücke dann nach hinten und Springen). Das gleiche geht auch vorwärts. + +Tutor10=Okay, du hast ihn. Da drüben ist die Drohne, versuch sie zu treffen. + +Tutor11=Und weil's so schön war, gleich nochmal. Aber Granaten sind doch langweilig, oder? Die machen wir mit Splittergranaten platt. Der Granatwerfer wurde dafür bereits aufgerüstet. Zum Aufrüsten kommen wir später noch. +Tutor11b=Lade das Magazin mit Splittergranaten und dann Feuer frei! + +Tutor12=Ui, das war zu viel für die arme Drohne. Aber sieh mal, was sie da fallen gelassen hat. Das sieht mir ganz nach einem Laser aus. +Tutor13=Zum Glück verwenden wir überall Standardbauteile. Mit dem Laser kannst du deine Pistole aufrüsten. Dazu nimmst du ihn einfach, und aktivierst ihn auf \"Doppelgraben\". + +Tutor14=Nun ist deine Pistole in der Lage Laserschüsse abzugeben. Jedoch fehlt es dir an der nötigen Energie. Geh wieder zurück an die Oberfläche; wir haben dort neue Ausrüstung für dich hinterlegt. +Tutor15=Wenn du nun die Schussmodusauswahl öffnest (mittels \"Doppelgraben\"), siehst du, dass der normale Schuss verschwunden ist, und stattdessen ein Laser-Schussmodus dort ist. Dieser ist jedoch ausgegraut, da du keine Munition dafür hast. +Tutor16=Außerdem wird dir auffallen, dass da noch ein 2. Schussmodus ist. Deine Pistole ist in der Lage Granaten zu verschießen. Frag mich nicht, wie sie das tut, unsere Wissenschaftler sind eben einfach gut. + +Tutor17=Dies ist ein Jetpack. Es ermöglicht dir, dich mit einem kurzen Schub nach oben oder nach vorne/hinten zu bewegen. Um es zu verwenden legst du es per \"DoppelGraben\" an. Danach drücke im Sprung \"DoppelRauf\" oder \"DoppelLinks/Rechts\". +Tutor18=Versuche nun den Vorsprung dort rechts zu erreichen. + +Tutor19=Okay, jetzt wird's Zeit, den Laser einzusetzen. + +Tutor20=Bumm, die Nächste. Wenn du so weitermachst, werden wir bald keine Drohnen mehr haben. +Tutor21=Schau mal, noch ein Laser. Aber du hast nichts zum Aufrüsten. Sieh mal was die Drohen dort oben in ihren Klauen hält: einen Raketenwerfer. +Tutor22=Der Raketenwerfer lässt sich mit dem Laser aufrüsten. Er kann dann zielsuchende Raketen verschießen. +Tutor23=Die Pistole brauchst du jetzt nicht mehr. Und Granaten sind auch alle weg. Aber du hast noch Energie. Der Granatenwerfer kann EMP-Granaten verschießen (wenn man das entsprechende Upgrade verwendet - wir waren so nett und haben das für dich übernommen) und damit kannst du die Drohne außer Kraft setzen, um an den Raketenwerfer zu kommen. +Tutor24=Deine Aufgabe ist es jetzt, an den Raketenwerfer ranzukommen und ihn aufzurüsten. + +Tutor25=Sehr gut. Mit zielsuchenden Raketen kann man auch Ziele treffen, die weiter weg sind und zu denen der Weg nicht frei ist. +Tutor26=Rechts ist ein alter Lagerraum. Dort wartet das nächste Ziel auf dich. + +Tutor27=Nun kommen wir zur Partikelkanone. Sie wartet auf dem Plateau links auf dich. + +Tutor28=Ihr primärer Schussmodus ist ein starker Energiestrahl, der es erlaubt, mehrere Ziele auf einmal zu treffen. +Tutor29=Der sekundäre Schussmodus feuert einen Energieball ab, der alle technischen Geräte auf seinem Weg außer Kraft setzt, ähnlich der EMP-Granate. Probier's aus! + +Tutor30=Du hast es fast geschafft. Kommen wir zur Mutter aller Schusswaffen: der Minigun! +Tutor31=Wir werden dir jetzt eine geben und reichlich Munition. Rate mal, was du damit machen wirst. ;) + +TutorEND=Gratuliere, du hast es geschafft. Nun bist du ein einigermaßen gut ausgebildeter Hazard. Dein erster Einsatz wartet bereits auf dich, %s. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/StringTblUS.txt b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/StringTblUS.txt new file mode 100644 index 00000000..8958d88f --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/CommunicationScreen.c4d/StringTblUS.txt @@ -0,0 +1,54 @@ +Continue=Continue +Intro1=Halt, soldier! Welcome to the training center. +Intro2=My name is Grodon Freimann, I'm the one in charge here. And your instructor today. Now you're going to have a bit fun with the big guns. +Intro3=At first you need a weapon. Meet the doc, he'll give you one. Just jump on the ladder and climb up to him. Then you use the lift and take the exit to the right. + +Tutor1=Good. But you're lacking ammunition. Collect the ammo packet there and transfer the ammo into your ammobag. To do so, press \"Dig\" twice. + +Tutor2=You're able to check your ammo supplies on the left side of your screen. +Tutor3=Now you're ready, let's start. Load your weapon via \"Throw\" and shoot the target. + +Tutor4=Well done, but that was easy. +Tutor5=You can't simply shoot up there. Now it's time to use the \"Aiming-mode\". +Tutor6=To do so, you press \"Down\" three times. You can aim with all weapons like this! Show us what you can do. + +Tutor7=Well done, well done. Now it's getting interesting, you get to try out the grenade launcher. Enter the teleporter to the right. + +Tutor8=It's lying back there. But to get it, you have to overcome this obstacle. You wont be able to simply jump over it. +Tutor9=Do you remember your elite training? Right, it's time for the backflip! Go to the edge, walk left, and try to jump backwards (run shortly away from the edge and press backwards und jump). The same is possible forwards. + +Tutor10=Okay, you got it! There's the drone, eliminate the target. + +Tutor11=Well, wasn't that fun? But plain grenades are boring, aren't they? The next one'll be reduced to dust by a cluster grenade! The grenadelauncher has already been upgraded. We'll come to upgrading later. +Tutor11b=Load the cluster grenades and then fire at will! + +Tutor12=Wham, poor drone. But look, it lost something. Looks like a laser. +Tutor13=Luckily we use standard components everywhere. You can upgrade your pistol with the laser. To do so, choose the Laser and press \"Double Dig\". + +Tutor14=Now your pistol shoots with a laser! But to do so, you need energy. Go back to the surface, new equipment awaits you. +Tutor15=Open the firemode-menu via \"Double Dig\". You'll see, that the standard shot is gone and that there's a laser-firemode instead. But it's grayed out, because you don't have ammo for it. +Tutor16=If you haven't noticed yet: the pistol also has a second firemode. It's able to shoot grenades! Don't ask me how, our scientists are just good. + +Tutor17=This is a jetpack. It allows you to move rapidly with short boosts. To use it, equip it by pressing \"Double Dig\". Then press \"Double Jump\" or \"Double Left/Right\" while jumping. +Tutor18=Try to reach that edge up to your right now. + +Tutor19=Okay, now it's time to use the laser. + +Tutor20=Boom, the next one down. If you continue like that, we'll run out of drones. +Tutor21=Look, another laser. But you don't have a weapon to upgrade. But look what the drone up there is holding! A bazooka! +Tutor22=The bazooka is upgradeable with a laser. It's able to shoot homing missiles then. +Tutor23=You don't need the pistol anymore, also you're out of grenades. However, you still got some energy. The grenade launcher is able to shoot EMP-grenades (if you used an upgrade - we've already done that now). Take out the drone with that, go on and try! +Tutor24=Your goal is to get the bazooka and upgrade it. + +Tutor25=Well done. With homing missiles you can hit targets that you can't hit in a straight line because the path is blocked. +Tutor26=To the right, there's an old storage. Your next target awaits you there. + +Tutor27=Here comes the particle cannon! This lovely weapon is waiting for you on the plateau to the left. + +Tutor28=The primary firemode is a strong energy ray, that allows to hit multiple targets at the same time. +Tutor29=The secondary firemode fires an energyball that disables all technical devices, just like the EMP-Grenade. Try it out! + +Tutor30=You made it. Now here's the mother of all weapons: the minigun! +Tutor31=We'll give you one. And lots of ammonition. now guess what's your target... ;) + +TutorEND=Congratulation, you made it. You're a pretty well trained Hazard now. Your first mission awaits you, %s. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/DescDE.rtf b/Hazard.c4f/Tutorial.c4s/DescDE.rtf new file mode 100644 index 00000000..7326538a Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/DescDE.rtf differ diff --git a/Hazard.c4f/Tutorial.c4s/DescUS.rtf b/Hazard.c4f/Tutorial.c4s/DescUS.rtf new file mode 100644 index 00000000..234c562a Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/DescUS.rtf differ diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/DefCore.txt b/Hazard.c4f/Tutorial.c4s/Doc.c4d/DefCore.txt new file mode 100644 index 00000000..b2fc4f6b --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/DefCore.txt @@ -0,0 +1,14 @@ +[DefCore] +id=CDOC +Version=4,9,8,2 +Name=Doc +Category=C4D_Living +Width=16 +Height=20 +Offset=-8,-10 +Vertices=7 +VertexX=0,0,0,-2,2,-4,4 +VertexY=0,-7,9,-3,-3,3,3 +VertexCNAT=64,4,8,1,2,1,2 +VertexFriction=300,300,100,300,300,300,300 +Entrance=-8,-10,16,20 diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/DescDE.txt b/Hazard.c4f/Tutorial.c4s/Doc.c4d/DescDE.txt new file mode 100644 index 00000000..c7c500f6 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/DescDE.txt @@ -0,0 +1 @@ +Der Doc! \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/DescUS.txt b/Hazard.c4f/Tutorial.c4s/Doc.c4d/DescUS.txt new file mode 100644 index 00000000..f5a3e5d7 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/DescUS.txt @@ -0,0 +1 @@ +Teh Doc! \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/Graphics.png b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Graphics.png new file mode 100644 index 00000000..6fc4f579 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Graphics.png differ diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/Names.txt b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Names.txt new file mode 100644 index 00000000..429104d5 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Doc +US:Doc \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/Portrait1.png b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Portrait1.png new file mode 100644 index 00000000..5f94ee04 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Portrait1.png differ diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/Script.c b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Script.c new file mode 100644 index 00000000..8216d812 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/Script.c @@ -0,0 +1,31 @@ +/*-- Doc --*/ + +#strict + +#include _DIA + +func Greeting() { + if(process > 2) + return("$egg$"); + return("$Greet$"); +} + +func GetChatCount() { return(1); } + +func ChatHeader() { + return("$Weapon$"); +} + +func StartChat() { + CreateDialogBox(0,"$Doc$"); + AddAnswer(0,"$Thx$","EndChat",PIWP,0); + CreateContents(PIWP,pPartner); + CloseChat(); +} + +public func ChatFinished(int i) +{ + if(i == 0) { + process++; + } +} diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/StringTblDE.txt b/Hazard.c4f/Tutorial.c4s/Doc.c4d/StringTblDE.txt new file mode 100644 index 00000000..a87adfe7 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/StringTblDE.txt @@ -0,0 +1,5 @@ +Greet=Tag, ich bin der Doc. +Weapon=Ich komme wegen der Waffe. +Doc=Ah, wieder ein neues Versuchskaninchen.. Äh, ein neuer Soldat meine ich. Ich weiß schon Bescheid. Hier ist deine Waffe. Unser neuester Pistolenprototyp, Codenamen \"Schakal\", frisch aus dem Labor. +Thx=Danke +egg=Ich bin eine Leihgabe der RedWolf Design GmbH! \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Doc.c4d/StringTblUS.txt b/Hazard.c4f/Tutorial.c4s/Doc.c4d/StringTblUS.txt new file mode 100644 index 00000000..fe12112d --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Doc.c4d/StringTblUS.txt @@ -0,0 +1,5 @@ +Greet=Greetings, I'm the Doc. +Weapon=I'm here for the weapon. +Doc=Ah, a new guena pig.. Erm, a new soldier. I'm already informed. Here's you weapon. Our newest pistol-prototype, codename \"Schakal\", straight from the lab. +Thx=Thanks +egg=I belong to RedWolf Design GmbH! \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Landscape.bmp b/Hazard.c4f/Tutorial.c4s/Landscape.bmp new file mode 100644 index 00000000..94bb13af Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/Landscape.bmp differ diff --git a/Hazard.c4f/Tutorial.c4s/RainLoop.wav b/Hazard.c4f/Tutorial.c4s/RainLoop.wav new file mode 100644 index 00000000..e46d7b62 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/RainLoop.wav differ diff --git a/Hazard.c4f/Tutorial.c4s/Scenario.txt b/Hazard.c4f/Tutorial.c4s/Scenario.txt new file mode 100644 index 00000000..70f65dba --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Scenario.txt @@ -0,0 +1,47 @@ +[Head] +Icon=16 +Title=Tutorial +Version=4,9,6 +MaxPlayer=1 +Origin=Hazard.c4f\Tutorial.c4s + +[Definitions] +Definition1=Objects.c4d +Definition2=Hazard.c4d + +[Game] +StructNeedEnergy=0 +Rules=SURR=1 + +[Player1] +Crew=HZCK=1 + +[Player2] +Crew=HZCK=1 + +[Player3] +Crew=HZCK=1 + +[Player4] +Crew=HZCK=1 + +[Landscape] +Vegetation=TRE4=2;TRB1=1;TRB2=1;TRB3=1 +VegetationLevel=26,0,0,100 +InEarth=FLNT=1;GOLD=2;LOAM=1;ROCK=2 +InEarthLevel=1,0,0,100 +Sky=Pyroclastic1 +TopOpen=0 +MapWidth=80,0,64,250 +MapHeight=80,0,40,250 +SkyScrollMode=1 + +[Weather] +Climate=0,0,0,100 +StartSeason=24,0,0,100 +YearSpeed=0,0,0,100 +Wind=1,100,-100,100 + +[Environment] +Objects=DARK=1 + \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Script.c b/Hazard.c4f/Tutorial.c4s/Script.c new file mode 100644 index 00000000..eed8a921 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Script.c @@ -0,0 +1,461 @@ +/*-- Tutorial --*/ + +#strict + +static screen, doc, door1, drone, tele, tele2, killcounter; +static process; + +func Initialize() { + LaunchRain(980, Material("Rain"), 1000, 80)->SetCategory(1); + + CreateObject(TIM1, 1075, 460, -1)->Sound("RainLoop", 0,0,50,0, 1); + + screen = CreateObject(CSCR,283,819,0); + doc = CreateObject (CDOC, 521, 790, -1); + doc->SetDir(DIR_Left); + + CreateObject(RAI1,918,80,-1)->SetRail([0, 1, 4],1); + CreateObject(LADR,1880,220,-1)->Set(10); + CreateObject(WNDW,1608,231,-1); + CreateObject(RAI1,490,240,-1)->SetRail([0, 1, 1, 1, 1, 1, 4],1); + CreateObject(CONS,500,322,-1); + CreateObject(X5RK,280,596,-1); + CreateObject(X5ST,282,618,-1)->SetDir(0); + CreateObject(TRE4,1775,465,-1); + CreateObject(TRE4,1821,456,-1); + CreateObject(TRB3,1846,456,-1); + CreateObject(TRE4,1874,460,-1); + CreateObject(TRE4,1521,527,-1); + CreateObject(TRE4,1526,525,-1); + CreateObject(TRB3,1680,496,-1); + CreateObject(TRB2,1823,483,-1); + CreateObject(TRE4,1920,478,-1); + CreateObject(LADR,560,570,-1)->Set(4); + CreateObject(LFTP,675,553,-1); + CreateObject(TRE4,1463,534,-1); + CreateObject(TRE4,1517,530,-1); + CreateObject(TRE4,1562,536,-1); + CreateObject(SLDR,587,600,-1)->Lock(); + CreateObject(PKEY,609,594,-1); + CreateObject(FENC,782,601,-1); + CreateObject(FENC,842,601,-1); + CreateObject(FENC,902,601,-1); + CreateObject(FENC,962,601,-1); + CreateObject(FENC,1120,601,-1); + CreateObject(SBBA,1395,599,-1)->SetDir(0); + CreateObject(VENT,25,669,-1)->SetCon(35); + CreateObject(VENT,505,669,-1)->SetCon(35); + CreateObject(LADR,315,710,-1)->Set(4); + CreateObject(CCP1,570,690,-1); + + CreateObject(SEDR,640,690,-1)->Lock(); + CreateObject(SEDR,710,690,-1)->Lock(); + CreateObject(SEDR,710,800,-1)->Lock(); + CreateObject(SEDR,709,910,-1)->Lock(); + + CreateObject(PSTR,811,702,-1)->Set(2,3); + CreateObject(BED2,836,709,-1); + CreateObject(BED2,879,709,-1); + CreateObject(BED2,921,709,-1); + + // ceiling lights + CreateObject(CLGH,790,745,-1); + CreateObject(CLGH,783,644,-1); + CreateObject(CLGH,904,645,-1); + CreateObject(CLGH,1004,815,-1); + CreateObject(CLGH,506,854,-1); + CreateObject(CLGH,602,854,-1); + CreateObject(CLGH,1005,870,-1); + + CreateObject(ENGT,1057,766,-1); + CreateObject(LADR,398,910,-1)->Set(15); + CreateObject(LBDR,452,791,-1); + CreateObject(GLST,499,790,-1); + CreateObject(GLST,474,790,-1); + CreateObject(LLGH,539,774,-1); + CreateObject(MONI,587,778,-1); + CreateObject(LTBL,593,789,-1); + CreateObject(CHAR,796,799,-1); + CreateObject(CLVM,753,800,-1); + CreateObject(CHAR,844,799,-1)->SetDir(1); + CreateObject(TABL,820,799,-1); + CreateObject(PSTR,802,785,-1)->Set(0,2); + CreateObject(STDR,875,801,-1); + CreateObject(LFTP,905,788,-1); + CreateObject(GSBO,1017,770,-1); + CreateObject(GSBO,1026,770,-1); + CreateObject(GAT2,166,812,-1); + CreateObject(BLGH,210,839,-1); + CreateObject(SCR2,283,859,-1); + CreateObject(BLGH,352,840,-1); + CreateObject(GAT2,736,842,-1); + CreateObject(GAT2,832,844,-1); + CreateObject(STDR,935,861,-1); + CreateObject(FIEX,993,853,-1); + CreateObject(LCKR,1039,860,-1); + CreateObject(LCKR,1024,860,-1); + CreateObject(LCKR,1009,860,-1); + + CreateObject(LCKR,1054,860,-1); + CreateObject(CCP2,734,910,-1); + CreateObject(CCP1,779,910,-1); + CreateObject(PLT2,848,911,-1); + CreateObject(CCP1,814,910,-1); + CreateObject(STDR,876,911,-1); + CreateObject(TABL,968,859,-1); + + CreateObject(LFTP,675,923,-1); + CreateObject(STDR,937,920,-1); + CreateObject(WSHB,959,920,-1); + CreateObject(WSHB,979,920,-1); + CreateObject(TOIC,1009,920,-1); + CreateObject(TOIC,1049,920,-1); + CreateObject(TOIC,1029,920,-1)->SetDir(1); + + door1 = CreateObject(SLDR,735,600,-1); + door1->Lock(0); + + tele = CreateObject(TELE,1045,601,-1); + tele2 = CreateObject(TELE,1367,971,-1); + tele->Deactivate(); + tele->SetTarget(tele2); + tele2->Activate(); + tele2->SetTarget(tele); + + CreateObject(FLGH,1470,960,-1)->SetRotation(-45); + CreateObject(FLGH,1550,960,-1)->SetRotation(30); + + CreateObject(JMPD,1511,932,-1)->Set(50,250,180); + CreateObject(JMPD,1490,986,-1)->Set(30,-45); + CreateObject(JMPD,1510,986,-1)->Set(50,-70); + + CreateObject(GRAP,1580,970,-1); + + CreateObject(GLWP,1600,971,-1); + + var wl = CreateObject (ALGH, 710, 580, -1); + wl->SetR(180); + wl->TurnOn(); + + CreateObject(STAP, 850, 590,-1); + + SetDarkness(0); + + ScriptGo(1); + + return(1); +} + +func InitializePlayer(int iPlr) { + var clonk = GetCrew(iPlr); + clonk->SetPosition(50,899); + SetCrewEnabled(0, clonk); +} + +func Script1() { + SetCommand(GetCrew(),"MoveTo",screen); + SetMaxPlayer(2); + CreateScriptPlayer("$Drones$", RGB(1,1,1), 2, 15); +} + +func Script10() { + SetHostility(0,1, true, true); + screen->SetAction("Noise"); +} + +func Script15() { + screen->SetAction("On"); +} + +func Script17() { + screen->ActivateEntrance(GetCrew()); + SetCrewEnabled(1,GetCrew()); + SelectCrew(0,GetCrew(),1); +} + +func Script18() { + if(!process) + return(goto(18)); + screen->SetAction("Noise"); +} + +func Script23() { + screen->SetAction("Off"); +} + +func Script24() { + if(process < 2) return(goto(24)); + door1->Unlock(); +} + +func Script25() { + if(GetX(GetCrew()) < 750) + return(goto(25)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + door1->Close(); + door1->Lock(); +} + +func Script26() { + if(FindObject(STAP)) + return(goto(26)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + drone = CreateObject(TDRO,950,585,-1); + PlaceSpawnpoint(STAP, 850, 590)->LocalN("spawntimer")=500; +} + +func Script30() { + if(FindObject(TARG)) + return(goto(30)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + drone = CreateObject(TDRO,1040,480,-1); +} + +func Script31() { + if(FindObject(TARG)) + return(goto(31)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + tele->Activate(); + RemoveAll(SPNP); +} + +func Script32() { + if(GetX(GetCrew()) < 1400) + return(goto(32)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + tele2->Deactivate(); +} + +func Script33() { + if(FindObject(GRAP) || !FindContents(GLWP,GetCrew())) + return(goto(33)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + drone = CreateObject(TDRO,1710,915,-1); + PlaceSpawnpoint(GRAP, 1580, 965)->LocalN("spawntimer")=500; +} + +func Script35() { + if(FindObject(TARG)) + return(goto(35)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + FindObject(GLWP)->SetFireMode(2); + + drone = CreateObject(TDRO,1420,930); + drone->SetDir(1); + drone->LocalN("drop")=KLAS; +} + +func Script36() { + if(FindObject(TARG)) + return(goto(36)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + RemoveAll(SPNP); +} + +func Script37() { + if(FindObject(KLAS)) + return(goto(37)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + PlaceSpawnpoint(JTPK,850,590); + PlaceSpawnpoint(ENAP,900,590); + CreateObject(MEDI,925,600); + + tele2->Activate(); +} + +func Script40() { + if(!FindContents(JTPK,GetCrew())) + return(goto(40)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + tele->Deactivate(); +} + +func Script43() { + if(FindContents(JTPK,GetCrew())) + return(goto(43)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); +} + +func Script45() { + if(GetX(GetCrew()) < 1070 && GetY(GetCrew()) > 450) + return(goto(45)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + //Muni wegnehmen *hidez* + DoAmmo(STAM,-GetAmmo(STAM,GetCrew()),GetCrew()); + DoAmmo(GRAM,-GetAmmo(GRAM,GetCrew()),GetCrew()); + DoAmmo(GRAM,-GetAmmo(GRAM,FindObject(GLWP)),FindObject(GLWP)); + + CreateObject(TDRO,1180,450,-1)->StartMoving(0,1,0,25); + CreateObject(TDRO,1250,450,-1)->StartMoving(0,-1,0,25); + CreateObject(TDRO,1320,450,-1)->StartMoving(0,1,0,25); + drone = CreateObject(TDRO,1390,450,-1); + drone->StartMoving(0,-1,0,25); + drone->LocalN("drop")=KLAS; +} + +func Script46() { + if(FindObject(TARG)) + return(goto(46)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + drone = CreateObject(TDRO,1250,350,-1); + drone->StartMoving(1,1,50,20,25,0); + drone->LocalN("drop")=BZWP; + FindObject(TARG)->SetGraphics(0,0,BZWP); + + RemoveObject(Contained(FindObject(ENAP))); + RemoveObject(FindObject(PIWP)); + + PlaceSpawnpoint(ENAP,1075,450); +} + +func Script47() { + if(FindObject(KLAS)) + return(goto(47)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + RemoveObject(FindObject(GLWP)); + + PlaceSpawnpoint(MIAP,1375,590); + drone = CreateObject(TDRO,1645,675,-1); + //Zielsuch-Hack *cough* + drone->SetCategory(C4D_Living); + drone->SetAlive(1); +} + +func Script48() { + if(FindObject(TARG)) + return(goto(48)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + RemoveObject(Contained(FindObject(MIAP))); + RemoveObject(FindObject(BZWP)); + + GetCrew()->SetAction("Walk"); + + CreateObject(GGWP,1075,450); +} + + +func Script49() { + if(!FindContents(GGWP,GetCrew())) + return(goto(49)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + for(var x; x < 10; x++) { + CreateObject(TDRO,1180+30*x,450,-1)->StartMoving(1,1,15,15,7); + if(x < 8 ) CreateObject(TDRO,980-30*x,450,-1)->StartMoving(-1,-1,15,15,0,7); + } +} + +func Script50() { + if(FindObject(TARG)) + return(goto(50)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + GetCrew()->SetAction("Walk"); + + RemoveObject(Contained(FindObject(ENAP))); + RemoveObject(FindObject(GGWP)); + + var mg = CreateObject(MIWP,GetX(GetCrew()),GetDefBottom(GetCrew())); + AddEffect("MinigunMegarammoBonus",GetCursor(),190,0,GetCursor()); + AddSpawnEffect(mg); + //vieeeel ammo. + DoAmmo(STAM,500,mg); + DoAmmo(STAM,300,GetCrew()); +} + +func Script51() { + var x,y; + for(x=0; x < 5; x++) + for(y=0; y < 5; y++) + CreateObject(TDRO, 850+x*20, 400+y*20, -1)->SetDir(1); +} + +func Script52() { + var x,y; + for(x=0; x < 5; x++) + for(y=0; y < 5; y++) + CreateObject(TDRO, 1230+x*20, 400+y*20, -1); +} + +func Script53() { + var x,y; + for(x=0; x < 24; x++) + for(y=0; y < 5; y++) + CreateObject(TDRO, 850+x*20, 300+y*20, -1)->SetDir(x < 12); +} + +func Script54() { + if(FindObject(TARG)) + return(goto(54)); + + screen->ActivateEntrance(GetCrew()); + SetComDir(COMD_Stop,GetCrew()); + + GetCrew()->SetAction("Walk"); +} + +func Script55() { + if(process < 19) + return(goto(55)); +} + +func Script65() { + Sound("Applause"); + DoCrewExp(100,GetCrew()); + EliminatePlayer(1); + GameOver(); +} + +global func FxMinigunMegarammoBonusFMData(object pTarget, int iEffectNumber, int iData, value) { + if(GetID(Contents(0,pTarget)) != MIWP) + return(value); + if(iData == FM_AmmoLoad) return(500); + return(value); +} diff --git a/Hazard.c4f/Tutorial.c4s/StringTblDE.txt b/Hazard.c4f/Tutorial.c4s/StringTblDE.txt new file mode 100644 index 00000000..c9a91351 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/StringTblDE.txt @@ -0,0 +1 @@ +Drones=Drohnen \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/StringTblUS.txt b/Hazard.c4f/Tutorial.c4s/StringTblUS.txt new file mode 100644 index 00000000..1308b6be --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/StringTblUS.txt @@ -0,0 +1 @@ +Drones=Drones \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/System.c4g/Granatenwerfer.c b/Hazard.c4f/Tutorial.c4s/System.c4g/Granatenwerfer.c new file mode 100644 index 00000000..e50ec92d --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/System.c4g/Granatenwerfer.c @@ -0,0 +1,30 @@ +/*-- Granatenwerfer --*/ + + +#strict +#appendto GLWP + +public func IsUpgradeable(id uid) { return(false); } + +func FMData1(int data) { + if(data == FM_Condition) + return(process <= 8); + return(_inherited(data)); +} + +func FMData2(int data) { + if(data == FM_Condition) + return(process > 8); + return(_inherited(data)); +} + +func FMData5(int data) { + if(data == FM_Condition) + return(process >= 14); + + return(_inherited(data)); +} + +func FMData3(int data) { if(data == FM_Condition) return(false); return(_inherited(data)); } +func FMData4(int data) { if(data == FM_Condition) return(false); return(_inherited(data)); } +func FMData6(int data) { if(data == FM_Condition) return(false); return(_inherited(data)); } diff --git a/Hazard.c4f/Tutorial.c4s/System.c4g/StringTblDE.txt b/Hazard.c4f/Tutorial.c4s/System.c4g/StringTblDE.txt new file mode 100644 index 00000000..666b56c9 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/System.c4g/StringTblDE.txt @@ -0,0 +1,15 @@ +Grenade=Granate +FragGrenade=Splittergranate +Napalm=Napalmgranate +EMP=EMP Granate +Napalm=Napalmgranate +Slime=Schleimgranate +Laser=Lasergranate + +KSLMUpgradeDesc=Erweitert den Granatwerfer um Schleimgranaten +KLASUpgradeDesc=Erweitert den Granatwerfer um EMP- und Lasergranaten +KRFLUpgradeDesc=Erweitert den Granatwerfer um Splitter- und Napalmgranaten + +KSLMUpgraded=Granatwerfer kann jetzt|Schleimgranaten verschießen. +KLASUpgraded=Granatwerfer kann jetzt|EMP- und Lasergranaten verschießen. +KRFLUpgraded=Granatwerfer verschießt nun|Splitter- und Napalmgranaten. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/System.c4g/StringTblUS.txt b/Hazard.c4f/Tutorial.c4s/System.c4g/StringTblUS.txt new file mode 100644 index 00000000..87828023 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/System.c4g/StringTblUS.txt @@ -0,0 +1,15 @@ +Grenade=Grenade +FragGrenade=Frag grenade +Napalm=Napalm grenade +EMP=EMP grenade +Napalm=Napalm grenade +Slime=Slime grenade +Laser=Laser grenade + +KSLMUpgradeDesc=Add slime grenades +KLASUpgradeDesc=Add EMP and laser grenades +KRFLUpgradeDesc=Add fragment and napalm grenades + +KSLMUpgraded=Grenade launcher can now shoot slime grenades. +KLASUpgraded=Grenade launcher can now shoot EMP an laser grenades. +KRFLUpgraded=Grenade launcher can now shoot fragment and napalm grenades. diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/ActMap.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/ActMap.txt new file mode 100644 index 00000000..204e178a --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/ActMap.txt @@ -0,0 +1,19 @@ +[Action] +Name=Fly +Procedure=FLOAT +Facet=0,0,17,15 +Directions=2 +FlipDir=1 +Length=1 +Delay=1 +NextAction=Fly + +[Action] +Name=Falling +Procedure=NONE +Facet=0,0,17,15 +Directions=2 +FlipDir=1 +Length=1 +Delay=1 +NextAction=Falling \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DefCore.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DefCore.txt new file mode 100644 index 00000000..0ba4ff09 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DefCore.txt @@ -0,0 +1,26 @@ +[DefCore] +id=TDRO +Version=4,9,8,2 +Name=Zielscheibendrohne +Category=C4D_Vehicle +Timer=1 +TimerCall=Move +Width=17 +Height=15 +Offset=-8,-7 +Vertices=4 +VertexX=0,0,8,-8 +VertexY=7,-7 +VertexFriction=40,40,40,40 +Value=40 +Mass=30 +Components=METL=3;KRFL=1 +Picture=0,0,17,15 +Float=1 +BorderBound=7 +Pathfinder=1 +NoTransferZones=1 + +[Physical] +Float=210 +CanFly=1 diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DescDE.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DescDE.txt new file mode 100644 index 00000000..3e5b807b --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DescDE.txt @@ -0,0 +1 @@ +Hält Zielscheiben. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DescUS.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DescUS.txt new file mode 100644 index 00000000..1b8cfdf6 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/DescUS.txt @@ -0,0 +1 @@ +Holder of the target. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Graphics.png b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Graphics.png new file mode 100644 index 00000000..4eca8b26 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Graphics.png differ diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Names.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Names.txt new file mode 100644 index 00000000..f215d547 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Drone +US:Drone \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Script.c b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Script.c new file mode 100644 index 00000000..f869d771 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Script.c @@ -0,0 +1,68 @@ +/*-- Zielscheibendrone --*/ + +#strict + +local drop, move; +local xpos, ypos, x,y,xdir,ydir, xrange, yrange; + +func Hit() { + var target; + if(target = FindObject(TARG,0,0,0,0,0,0,this())) + target->Damage(); + + Explode(20); +} + +func Damage() +{ + Hit(); +} + +func IsMachine() { return(1); } + +func EMPShock() { + SetAction("Falling"); + move = 0; +} + +func Initialize() { + SetAction("Fly"); + FadeIn(0,0,50); + var targ = CreateObject(TARG, 0,0, 1); + targ->SetAction("Attach",this()); +} + +func JobDone() { + if(drop) { + CreateObject(drop); + Explode(20); + Sound("Blast3"); + } + FadeOut(0,0,50); +} + +func StartMoving(Dirx, Diry, Rangex, Rangey, xstart, ystart) { + xdir = Dirx; + ydir = Diry; + xrange = Rangex; + yrange = Rangey; + x = xstart; + y = ystart; + xpos = GetX(); + ypos = GetY(); + move = 1; +} + +func Move() { + if(!move) + return(); + + x += xdir; + y += ydir; + if(Abs(x) >= xrange) + xdir *= -1; + if(Abs(y) >= yrange) + ydir *= -1; + + SetPosition(xpos+x, ypos+y); +} diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/ActMap.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/ActMap.txt new file mode 100644 index 00000000..b6caf31b --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Attach +Procedure=ATTACH +Delay=0 +Length=1 +Facet=0,0,13,13 \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DefCore.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DefCore.txt new file mode 100644 index 00000000..887791e2 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DefCore.txt @@ -0,0 +1,11 @@ +[DefCore] +id=TARG +Version=4,9,8,2 +Name=Target +Category=C4D_Vehicle +Width=13 +Height=13 +Offset=-6,-6 +Vertices=1 +VertexY=-1 +Picture=0,0,13,13 diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DescDE.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DescDE.txt new file mode 100644 index 00000000..8bd659a1 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DescDE.txt @@ -0,0 +1 @@ +Eine Zielscheibe. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DescUS.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DescUS.txt new file mode 100644 index 00000000..55ed5c09 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/DescUS.txt @@ -0,0 +1 @@ +A Target. \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Graphics.png b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Graphics.png new file mode 100644 index 00000000..25638ba7 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Graphics.png differ diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Names.txt b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Names.txt new file mode 100644 index 00000000..cda81638 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Zielscheibe +US:Target \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Script.c b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Script.c new file mode 100644 index 00000000..45e298e3 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/TargetDrone.c4d/Target.c4d/Script.c @@ -0,0 +1,19 @@ +/*-- Zielscheibe --*/ + +#strict + +func IsBulletTarget() { return(1); } + +func Initialize() { + //Zielscheibe dem Scriptspieler zuordnen + SetOwner(1); +} + +func Damage() { + Sound("ArrowHit"); + + CastParticles("Splinter",5,30,0,0,25,35,RGB(255,0,0)); + if(GetActionTarget()) + GetActionTarget()->JobDone(); + RemoveObject(); +} diff --git a/Hazard.c4f/Tutorial.c4s/Teams.txt b/Hazard.c4f/Tutorial.c4s/Teams.txt new file mode 100644 index 00000000..63b92e98 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Teams.txt @@ -0,0 +1,6 @@ +[Teams] +Active=0 +AllowHostilityChange=0 +AllowTeamSwitch=0 +AutoGenerateTeams=0 +MaxScriptPlayers=0 \ No newline at end of file diff --git a/Hazard.c4f/Tutorial.c4s/Title.png b/Hazard.c4f/Tutorial.c4s/Title.png new file mode 100644 index 00000000..919f3677 Binary files /dev/null and b/Hazard.c4f/Tutorial.c4s/Title.png differ diff --git a/Hazard.c4f/Tutorial.c4s/Title.txt b/Hazard.c4f/Tutorial.c4s/Title.txt new file mode 100644 index 00000000..220765b2 --- /dev/null +++ b/Hazard.c4f/Tutorial.c4s/Title.txt @@ -0,0 +1,2 @@ +DE:Tutorial +US:Tutorial \ No newline at end of file diff --git a/Hazard.c4f/Version.txt b/Hazard.c4f/Version.txt new file mode 100644 index 00000000..c44ae7bb --- /dev/null +++ b/Hazard.c4f/Version.txt @@ -0,0 +1 @@ +4.9.10.13 diff --git a/clonk_content_license.txt b/clonk_content_license.txt index e7562698..1b2602e9 100644 --- a/clonk_content_license.txt +++ b/clonk_content_license.txt @@ -1,10 +1,10 @@ -Clonk game content is available under the following license: +Clonk game content made by RedWolf Design is available under the following license: Creative Commons Attribution-NonCommercial (CC BY-NC) http://creativecommons.org/licenses/by-nc/4.0/ This applies to graphics, audio data, scripting, and text found in the -game release packages (usually packed inside c4f, c4g, and c4d group files). +game release packages of RedWolf Design (usually packed inside c4f, c4g, and c4d group files). You are free to: Share — copy and redistribute the material in any medium or format @@ -15,3 +15,23 @@ Under the following terms: license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. + +The license above is applicable to game content created by RedWolf Design. The following +RedWolf Design game content is used in this repository for LegacyClonk: + - Fantasy.c4d + - Fantasy.c4f + - FarWorlds.c4d + - FarWorlds.c4f + - Knights.c4d + - Knights.c4f + - Material.c4g + - Melees.c4f + - Missions.c4f + - Music.c4g + - Objects.c4d + - Races.c4f + - Sound.c4g + - Tutorial.c4f + - Western.c4d + - Western.c4f + - Worlds.c4f diff --git a/third_party/Hazard/changes2.5.txt b/third_party/Hazard/changes2.5.txt new file mode 100644 index 00000000..e6067dc7 --- /dev/null +++ b/third_party/Hazard/changes2.5.txt @@ -0,0 +1,296 @@ +rev 2043: +* Feuer-Modus des Flammenwerfers wieder leicht schwächer gemacht (-15%) (#12973) +* Raketen und Granaten können nicht mit Feuer oder Bio zerstört werden (#12973) +! fix wenn das Shuttle geladene Waffen hat und mann dann ausstieg, kam man nicht mehr rein +! Shuttle ist dicht (kein Wasser, keine Lava wirkt auf den Clonk) ++ Aussteigen aus Panzer per Kontextmenü möglich (#12975) +! Position einer Tür in DEST Epic Voltage korrigiert (#12976) +! Hazardclonk kann wieder aus dem Wasser springen (#12968) +! Nullpointer im Laser gefixt (#12966) + +rev 2035: +! (Mehr) Rückwärtskompatibilität, v.A. QuakeR +! Fix Kontrolle übergeben zum gerittenen Objekt +! Fix Syntax-Fehler in Kran +* Eroberungszeit für Domination Punkt leicht verringert +* Mit Projektilwaffen kann man Materialien wegballern, ein bischen - eher für den grafischen Effekt +! Drone verschwindet korrekt bei Arena-Regel +! Panzer und Shuttle gehören wieder keinem Besitzer wenn der Fahrer ausgestiegen ist +! Fix Nachladeprobleme bei der KI +! Fix Sound einer automatischen Waffe bleibt wenn die Drone deaktiviert wird während sie schießt +* AS Skynet: + ! Geld wird zurückgesetzt wenn die Teams wechseln (wichtig für WeaponChoice) + * Computer-Ziele sind nun schwerer, Sentry-Guns leichter abzuschießen + ! Nach Wechsel der Teams spawnen bei WeaponChoice nicht neue Waffen + ! (hoffentlich) den 0,0-Bug behoben + + Waffenautomaten werden bei WeaponChoice platziert + ! Landschaft gefixt +* Minigun wieder ganz leicht schwächer gemacht (-12%) +! Fix Killnachricht für Crew die nicht in einem Team ist + +rev 2015: +! Fix Syntax-Fehler in EpicVoltage ++ Sounds fürs Flagge stehlen, wieder zurückbringen und Ziel zerstören (Assault) ++ Neues Upgrade für den Raketenwerfer! +! KI Fixes: + ! KI switcht nicht mehr pausenlos Waffen durch + ! KI bleibt nicht mehr stecken wenn ihm die Munition ausgeht während sie zielt + ! KI lädt nicht mehr wie blöd Waffen nach + ! KI dreht sich nurnoch zu Gegnern um wenn sie nicht im "(Weg)laufmodus" ist +* Rebalance Waffen. Die größeren Änderungen (in Klammern welche die schon vorher erwähnt wurden): + * +20% Nachladezeit, -30% benötigte Ammo für Partikelkanone(, Schaden anders) + * -50% benötigte Ammo für Pumpgun(, Explosivschuss hat sehr begrenzte Reichweite) + * +25% Schaden für Kettensäge + * -25% Schaden für Energiegewehr und mit Laser(, +25% Reichweite für Laser) + * +25% Reichweite und +20% Schaden für Flammenwerfer + * +50% Schaden für Minigun(!), (-50% Streuung) + * -20% Schaden für Pistole, -50%(!) Schaden für Laser, +40% Schaden für Bioschleimwerfer + * +15% Schaden, -15% Reichweite für Pumpgun + * Lasergranate geht eine halbe Sekunde später los + * (Panzer kann 50% mehr Schaden ab) + * (-50% Schaden des Cluster-Schusses des Granatenwerfers bei direktem Treffer) +* Langes Kill-Logging disabled by default (enable mit STAT_LogEnabled = true), ersetzt durch: + + kurze Kill-Nachrichten sichtbar für Killer und Opfer als Message +* Name des Fahrers des Shuttles/Panzers wird nurnoch für alle Spieler AUSSER den Fahrer angezeigt +! Fix Texmap in AH Predator +! Fix Stack Overflow in Arocit ++ Beiss-Sound für Aliens +! Fix einen Wegpunkt in Schlachtfest +! Fehlenden Sound für zweiten Schussmodus des Flammenwerfern hinzugefügt +! Sounds beim Auswählen von Waffen im Waffenautomaten und Waffenwahl werden nun für die richtigen Spieler abgespielt +! Desync behoben + +rev 1990: +* Schadenseffekt für Generator (schießt Blitze wenn er Schaden bekommt) +! Flaggen in Gamma Breschnew werden nur platziert wenn das Spielzielt CTF ist +* Zetha Basis: + * Karte und Hintergrund aufgeräumt (Hintergund u.a. weniger hell damit man ihn vom Vordergrund unterscheiden kann) + * Mehr Medipacks, Minen und Dronen auf der Karte + * ein weiterer Spawnpunkt in der Mitte + * Zeit zur Eroberung eines Punktes leicht erhöht + + KI auswählbar! + ! KI-Taktik für DOM Spielziel überarbeitet +* EpicVoltage + * Karte verkleinert; kein Geschütz mehr direkt vor der Tür womit man das eigene Tor kaputt machen kann + ! Man kann sich nun nciht mehr hinter den unzerstörbaren Geschützen verstecken + * Die Konsole in der Mitte zum Kauf der Barrikaden ist nun auch dort wenn man Waffenwahl nciht aktiviert hat + ! Fix CTF Spielziel in EpicVoltage + * Die Barrikaden kann man nun von innen öffnen + * Auch die Barrikaden haben nun Lebensanzeigen +* "Bewachen" über Kontextmenü deaktiviert +! Man kann nun icht mehr aus FlyAshes und FlySand unzerstörbares Ashes und Sand ausgraben +! Effect-Leak (Aiming) im Hazard gefixt +* Panzer + ! kann keine Clonks überrollen, die wo drin sind (z.B. in einem anderen Panzer) + * kann nurnoch 2 Lenkraketen hintereinander schießen vorm neu nachladen + ! bleibt nicht mehr an vertikalen Wänden kleben + ! wackelt weniger auf der Landschaft +* Shuttle + ! kippelt nicht mehr so rum + * schießt etwas kleinere Raketen + + cooler hover-Effekt +! Flak ist nun wieder benutzbar wenn der vorherige Benutzer gewaltsam (Explosion, Tod) von derselben entfernt wurde +* Vehikel-Spawnpunkt spawnt nun erst ein neues Fahrzeug wenn das alte zerstört wurde (nach etwa 2 min) +! Fix nullpointer in Drone +! KI Fixes: + ! KI springt nun nicht mehr durch Leitern durch ohne sie benutzen zu können + ! Transferzones des Fahrstuhls gefixt. KI kann sie nun ordentlich benutzen + ! Spiel friert nciht mehr ein bei KI + Waffenwahl + ! KI bleibt nicht mehr auf dem Fahrstuhl stecken wenn sie auf dem Fahrstuhl neue Befehle erhält + ! Ein Pathfinder-Problem gefixt + ! Fix BR, CTF und DOM-Taktik wurde evtl. überschrieben mit Default-Taktik + ! Wenn die KI nicht zielen kann oder will, schießt sie nicht wenn sie den Feind nur mit Zielen treffen würde + ! Wenn die KI nicht zielt aber schießt, schießt sie nicht wenn der Feind zu weit weg ist um ihn mit der eigenen Waffe zu treffen + ! KI (und mit Maus) bleibt nicht mehr an Leiter stecken ++ WaypointsVisible()-Funktion erweitert. Die Visualisierungd er Wegpunkte beinhaltet nun auch die (initialie) Richtung GetPathDir() +! Domination: nach dem Scoring wird nun auch visuell der Capture-Progress zurückgesetzt ++ KI-Gedöhns kann man nun leichter debuggen. meinHazardClonk->TellMeWhatYouDo(true); +! Fix Spieler spawnen manchmal an Position 0,0 + +rev 1944: +* Kaufmenü beim Waffenautomaten öffnet sich nun sofort beim Anfassen +! Bei TopOpen=0 bleibt das Shuttle nicht mehr hängen +* Panzer und Shuttle-Preise angepasst +! Man kann in den Fenstern nicht mehr hängenbleiben +* Fadenkreuze aus den Title.pngs der Szenarien rausretuschiert ++ Neues Szenario: DEST - Epic Voltage. Großteils von TDM - Epic übernommen, Konzepte von DEST_HighVoltage übernommen + + Spielbar zusätzlich zu Team DM und CTF auch als DEST + * Karte verbessert/verschönert. Ist nun eine Winterlandschaft + * voll kompatibel zum Spiel mit oder ohne Waffenwahl, mit oder ohne Munition etc. + * Vehikel-Kauf-Station überarbeitet - klarer als solche erkennbar + * Man kann nicht mehr mit dem Shuttle über die Landschaft hinweg fliegen + ! Airstrikes funktionieren mit TopOpen=0 + * Türen zur Basis schließen alle automatisch und sind von innen per Schalter aufmachbar + ! Türen die sich automatisch öffnen tun dies auch für Clonks in Panzern + + Neues Spielziel: Zerstörung. Eine Mischung aus Assault und CTF. Übernommen aus DEST_HighVoltage und erweitert + + Luke aus TDM Epic ins Hauptpaket übernommen +! Wenn die Flaggenbasis weg ist, wird die Flagge bei Verschwinden nicht mehr neu erstellt +* "Relaunches" in Last Man Standing und Alien Hunt werden nun als "Leben" bezeichnet (weil 1 "Relaunch" = Spieler eliminiert nach 1 Tod) ++ Für Gamma Breschnew gibt es nun wahlweise einen zweiten Spielmodus: Alien hunt + + Code aus AH_DeepSea aus BattleEvolutions übernommen. Danke an Luchs + * Beschreibung, Name und Icons von Gamma Breschnew angepasst + + Alien Hunt ist nun komplett kompatibel zur Regel- und Spielzielauswahl + + Anzahl der erlaubten Relaunches ist per Regel und Spielzielauswahl einstellbar + + Aliens zu töten bringt nun Geld (analog zum Geld für Kills in Deathmatches), welches man in Waffen per Waffenwahl investieren kann + + Neue Regel "Alien Army" aus BattleEvolutions übernommen und erweitert. Damit kann man einstellen wie viele Nester spawnen sollen + + Waffenautomaten in AH-Szenarien platziert, damit man auch ohne Relaunches neue Waffen kaufen kann +* Die ganzen Relaunch Funktionen sind nun zusammengefasst in der System.c4g weil es immer die gleichen sind (--duplicate code) ++ Wenn man Arena Boni einsammelt, wird kurz deren Beschreibung angezeigt +* Mit der klassischen Steuerung kann man jetzt 66% genauer zielen +* der Hazardclonk kann etwas schneller laufen wenn er die Kettensäge an hat ++ neues Upgrade für den Flammenwerfer +* Ein direkter Treffer mit der Clustergranate bedeutet nun dass die Granate wie eine normale Granate explodiert +* Drone schießt auch wenn der Winkel der Waffe nicht 100% in die Richtung des Zieles zeigt +! Morsesound des Airstrikes ist nun eine korrekte WAV ++ Panzer und Shuttle zeigen nun an wer im Vehikel drin sitzt +! Fix manchmal teleportiert der Teleporter die Clonks in das Fundament +* (mehr) gehackten Code für die Bombing Run Bombe aus Hazardclonk entfernt ++ Der Hazardclonk kann nun (ganze) Ammopakete ablegen + + +rev 1888: ++ Den Panzer gibt es nun in CTF Face (er respawnt nach 3 Minuten) +* Balancing Änderungen + * Panzer kann 50% mehr Schaden ab. Das Überrollen von Clonks macht Schaden (man kann auch durch Aliens fahren) + * Energiegewehr mit Laserupgrade schießt 25% weiter + * Explosive Schüsse der Pumpgun haben nun genauso eine begrenzte Reichweite wie der normale Schuss + * Streuung der Minigun um 50% reduziert + * Der Strahl der Partikelkanone bleibt kürzer da ++ Rework des Domination-Spielzieles. + * Einnehmen eines einzelnen Markers dauert nun eine bestimmte Zeit (vorerst 6 Sekunden) + + der Einnehm-Status wird im HUD und als Progressbar angezeigt + ! Fix es können beliebig viele Marker positioniert werden (war vorher schon theoretisch möglich) + * in DOM Zetha Basis gibt es nurnoch 3 Marker, alle in der Mitte +! KI checkt regelmäßig ob er Waffen nachladen muss. Danke an Serpens66. +! KI sollte nun mit Bazookas (=Waffen mit denen man zielen MUSS) schießen können. Danke an Serpens66. ++ Tolle neue Grafiken für die einzelnen "Pimped" Waffen +* Licht benutzt nun SetObjDrawTransform um sich größer/kleiner zu machen statt DoCon. Das sollte die Lichter im Entwicklermodus weniger nervig machen. +! Der Kopf des Wurmes kann nicht merh außerhalb der Landschaft geraten. Danke an Serpens66. +! Sind der Panzer und das Shuttle innerhalb eines Gebäudes, können ihre (internen) Einzelteile weder verkauft noch aktiviert werden. Danke an Serpens66. +! Größere Hitbox für die Sentry Gun. Danke an Serpens66. +! Clonk stirbt nicht innerhalb von Sekunden wenn er immerzu wieder angezündet wird. Danke an Serpens66. +! Öfter auf Anzeige der Bewaffnung des Clonks prüfen. Danke an Serpens66. ++ CTF Flaggen werden standardmäßig nicht in Gebäude genommen sondern fallengelassen. Spezielles Verhalten möglich: + * CanCarryFlag() des Gebäudes liefert true zurück: Flagge wird außen für alle sichtbar rangehängt + * CanCarryFlag() des Gebäudes liefert -1 zurück: wie in Hazard 2.0, Flagge ist mit Clonk im Gebäude + + Panzer und Shuttle können Flaggen tragen +! Kontrolle von angefassten Waffen korrigiert: + ! Es können nicht mehrere Clonks gleichzeitig die Waffe kontrollieren (auch nicht mit der Maus) + ! die angefasste Waffe wird im HUD nur angezeigt wenn man derjenige ist der sie kontrolliert + ! Fehlermeldungen gefixt + * der zweite Clonk der es versucht, kann die Waffe garnicht erst anfassen +! seltene Fehlermeldung behoben wenn der Panzer explodiert während jemand drin sitzt + + +rev 1866: +! AS Skynet ist jetzt kompatibel zu Regeln: Waffenwahl, keine Munition und InstaGIB +* KI Menü leicht verbessert + ! Fix beim AI Menü konnte man es u.U. schaffen, das ganz Menü zu schließen + * bessere Anzeige wie viele Bots schon ausgewählt wurden +! Host-Identifikation für die Regelauswahl. Danke an Clonk-Geist +! Man kann keine Sachen mehr in den Spawner am Anfang des Spieles packen +! Die Raketen hatten keine ingame-Grafik. Wieso hat dis bisher niemand bemerkt? +! Crash in der Lasergranate gefixt! (Genauer gesagt: Bei reflektierenden Laserstrahlen) +! Fehlermeldung bei der KI gefixt wenn der Anführer fehlt +! Bei Laufzeitbeitritt wird sofort das Goal HUD für den beitretenden Spieler aktualisiert (GetHUDInfo muss also safe aufzurufen sein auch wenn das Team noch nicht komplett initialisiert ist) +! Panzer pausiert das Nachladen wenn er von EMP getroffen wird (wie das Shuttle) +* HUD überarbeitet. Danke an K-Pone/ModernClonker + * bunter: jeder Munitionstyp hat eine unterschiedliche Farbe. Color-coded for you convenience. + + coole neue Animation für Elektro-basierte Waffen + + coole neue Animation für Benzin-basierte Waffen + + coole neue Animation wenn man neue Ammo einsammelt + + coole neue Animation wenn man Ammo verbraucht (durch Waffe) + + bei nicht-Waffen wird stattdessen der Beschreibungstext angezeigt + * Beschreibungstexte angepasst dass die hilfreicher sind wenn sie dann im HUD angezeigt werden + * Munitionsanzeige nach oben verschoben (um Platz für den Beschreibungstext zu schaffen) + + schönere zum HUD passende Energiebalken hinzugefügt + ! Das HUD wird korrekt upgedatet wenn Inventar gelöscht wird + ! Beim durchschalten der Crew wird das HUD upgedated + ! Waffen updaten nicht direkt das HUD des Clonks sondern benachrichtigen nur den Clonk dass er das tun soll. (Der Clonk kann nämlich durchaus mehrere Waffen haben die sich grad updaten. Diese würden in Konflikt kommen) + + +* ID hacks für BR-Bombe durch Callbacks RejectShift() (=kann nicht abgewählt werden) und IsAlwaysCollectable() (=kann immer aufgenommen werden) ersetzt. Danke ans CMC-Team +* IsJumping() beinhaltet auch das Fliegen mit dem Jetpack. (D.h. Jetpackflug verhält sich wie Springen) +! Sichergestellt dass das Fadenkreuz beim Entfernen des Clonks mitentfernt wird. +! Der Verursacher dessen dass der Hazard angezündet wird, wird an DoDmg weitergereicht. (Löst "Feuer-hat-falschen-Besitzer" Bugs). Danke ans CMC Team +! Hazardclonk löscht nicht mehr bei Tod zufällig globale Effekte. Danke an End. +! Hazardclonk verliert seine Ausrüstung bei Tod +! Hazardclonk ruft korrekt OnClonkDeath callback auf, wie normale Clonks +* Beim Durchswitchen des Inventars während im Zielmodus wird der Zielmodus beibehalten solange CanAim() true zurückgibt (vorher: wenn IsWeapon() true zurückgibt). Danke ans CMC-Team +* Auch bei Doppelgraben und ControlSpecial vergisst der Hazardclonk nun seine MacroCommands. +* ControlSpecial im Hazardclonk wird an den Container weitergegeben +* Extra.c4g entfernt. Musik und Grafiken sind jetzt im Rundenordner. ++ Einige Grafiken aus ModernClonkers HazardSkin übernommen und einige leicht verändert. +* Einige sehr "dreckige" Materialgrafiken etwas sauberer gemacht. +! Portraitgrafik wird bei Relaunch korrekt von der Armored-Grafik auf die Standardgrafik zurückgesetzt +* Hazardclonk kann nun Unterwasser graben +! Waffen rufen OnAutoStop auf wenn sie deselektiert werden. Behebt komische Sounds bei der Motorsäge +! Das große Fenster hat nun von Anfang an eine SolidMask. + +* Titel-Grafiken aus Objektdefinitionen entfernt, stattdessen sind die Titelgrafiken jetzt reguläre Picture-Grafiken in der Graphics.png +* Drone umgeschrieben und Fehler korrigiert. + ! hat nun korrekte Resistenzen gegen Schadenstypen + ! bleibt weniger leicht hängen + * ist etwas langsamer (etwa so schnell wie der Clonk) + + schöne Partikeleffekte bei Navigieren, Schweben und Nachladen + + lädt am Anfang automatisch seine Waffe nach (falls nicht geladen) (#1859) + * Zielsuchverhalten verbessert. Ist aber "blind" für Ziele über sich + * Fliegt nun eine ganze Ecke über dem Clonk - wenn möglich + * Fliegt nicht mehr zum Feind hin sondern bleibt beim zu beschützendem Clonk + ! erkennt (meist) falls ein befreundeter Clonk direkt in der Schusslinie ist (und schießt dann nicht) + ! Benutzung von automatischen Waffen (Minigun, Flammenwerfer,...) gefixt. Minigun+Drone ist so geil... :-] + ! Anzeige der Waffe unten an der Drone korrigiert + * Die Entfernung auf der die Drone Feinde beschießt ist abhängig von der Waffe (maximal aber 250. Überladbar.) + ! Zum-Clonk-Beamen gefixt + ! Nicht-aktivierte Dronen die einem Feind gehören werden nicht mehr als Bedrohung wahrgenommen + + Der Clonk kann nun über das Kontextmenü seine Drone eine Position bewachen lassen + + Per Script kann man autonome Dronen erstellen die ohne zu-beschützenden Clonk funktionieren + * Drone ist teurer + * Drone dreht seine Waffe langsamer zum Ziel + * Drone kann nun auch mit der Bazooka umgehen +* Teleporterskript erneuert und aufgeräumt + + Ein Teleporter kann als "privat" deklariert werden und ist damit nicht über die Konsole anwählbar + * Teleporter die verfeindeten Spielern gehören, sind ebenfalls nicht anwählbar + ! Während des beamens und Ausfadens wird nun die Einfärbung des Objekts beibehalten. Danke an K-Pone. + + Beam-Effekt verschönert +! Probleme im Tutorial beseitigt (#1686) + ! Laser landet hinter Jumppad + ! Man kann keine Scriptspieler mehr in der Lobby auswählen + ! unrichtige Texte korrigiert + * Landschaft und Deko verschönert (u.A. Raketenbasis platziert) + ! man kann nicht ohne Jetpack auf den Vorsprung kommen + ! es wird kein Benzin mehr (für das Jetpack gespawnt) +! Verhalten der Lasergranate leicht verändert, evtl. berüchtigten Absturz behoben +! Einige Typos und unschöne Übersetzungen korrigiert +! Die KI wählt nun die korrekte Waffe als die effektivste gegen Feinde aus. Danke an B_E (#11289) +! Tisch, Stuhl, Kommode, Berserker und Arocit fangen kein Feuer mehr wenn jemand OnDmg() aufruft. (OnHit ist der richtige Aufruf) +! Doppelt im Inventar des Clonks vorhandene Waffen bei Start der Waffenwahl werden nicht doppelt zum Menü hinzugefügt. Danke an Gurkenglas (#2474) +! Der Verursacher von Schaden durch DoDmg wird an DoEnergy weitergereicht. Danke an ModernClonker. (#1092) +! Das Shuttle bricht das Nachladen ab wenn man es verlässt. Dies behebt dass man es dann nicht mehr betreten kann. Danke an ModernClonker. (#2002) +! Der Panzer bricht das Nachladen auch ab wenn man ihn verlässt. ++ Panzer und Shuttle machen automatisch das Licht an/aus beim einsteigen/rausgehen wenn Dunkelheit aktiviert ist. ++ Shuttle Jetflamme etwas verschönert +! komischen Effekt beseitigt wenn man das Flutlicht des Shuttles an hat und das Shuttle betritt oder verlässt +! Auch der Wurm fadet langsam aus nachdem er gestorben ist (wie alles andere auch). Danke an K-Pone. +* Wurm "erstickt" langsam in solids. (Sonst wäre er in dem Fall unsterblich, da nur der Kopf getoffen werden kann). Danke an K-Pone. +! Einfadende Objekte sind nun garantiert im ersten Frame unsichtbar. Danke ans CMC-Team +* Es kann nun eine Fadeout-/Fadein-Geschwindigkeit angegeben werden +! beitretende Spieler sehen nun auch die Respawnpunkte der Waffen wenn die "Waffen bleiben"-Regel aktiviert ist. Danke ans CMC-Team. ++ NoArenaRemove() callback hinzugefügt für Objekte die nicht von der "Arena" Regel entfernt werden sollen. Übernommen von CMC. ++ GetArenaRemoveTime() callback hinzugefügt für Objekte die eine eigene Zeit festlegen wollen bis sie entfernt werden. (Hack für Drone entfernt) +! Eine vertikal verlaufende Liftplate checkt nun auch ob es innerhalb seiner unteren Grenze ist. Danke an Foaly. +! Check beim Upgrade der Pumpgun korrigiert. (#1809) +* Bei aktiviertem Düsternis-Umweltobjekt bekommt der Clonk keine Taschenlampe mehr (#1951) +! KIs laufen nicht mehr manchmal in Schleifen. (#12900) Danke an Foaly ++ Bei Ändern der Ammo: callback an Objekt "OnAmmoChange" +! Alarmsirene wackelt nicht mehr beim an- und ausschalten (#2085) +! Minen explodieren nun auch wenn ein Clonk daran an einer Leiter vorbeiklettert (#2081) +! Partikelkanone wirft nun keinen Fehler mehr wenn man sie in die Wand steckt und feuert (sondern feuert nicht) +! Kran stoppt nun auch in Y-Richtung wenn man Graben drückt (#1851) +* ID hack beim Kran entfernt. Konsolen haben einen neuen Callback: IsConsole() {return true;} (#1852) +* HUD performance verbessert +* weniger Startgeld in Forsak IV, Schlachtfest und Zetha Base +* ein paar andere Waffen in Schlachtfest +* einige Hindernisse in Skynet hinzugefügt um einen Rush weniger leicht zu machen +* Bildschirme verstecken sich nicht mehr hinter Milchglas ++ AddDamageEffect hat nun einen zweiten Parameter: size diff --git a/third_party/Hazard/readme.txt b/third_party/Hazard/readme.txt new file mode 100644 index 00000000..df1f04f0 --- /dev/null +++ b/third_party/Hazard/readme.txt @@ -0,0 +1,53 @@ +Zur Geschichte +====================== + +Vor langer Zeit, als Clonk noch 8bit war, brachte Redwolf Design ein futuristisches Zusatzpack namens Hazard heraus. Mit diesem Pack spielte man bewaffnete Clonks in Raumstationen und durfte Aliens und Mitspieler mit abgefahrenen Waffen über den Haufen schießen. +In Hazard fielen aber viele Elemente, die man an Clonk liebte, einfach weg. Das Zusatzpack beschränkte sich nur auf den bloßen Clonk zu Clonk Kampf und war dabei auch noch recht unausbalanciert. Das Hazardpack wurde gerne als unclonkig bezeichnet, trotzdem haben mehrere Clonker aus der Community Szenarien für das Hazardpack erstellt. Jedenfalls hat es die Community inspiriert, weitere Ballerpacks zu programmieren, wie zum Beispiel das GWE-Update für Hazard von DukeAufDune. Das bekannteste und beliebteste ist wohl aber das EKE-Pack von Mirosch. +Obwohl für Clonk Endeavour alle Zusatzpakete neu aufgelegt wurden, kam für Clonk Endeavour kein Hazardpack raus: Matthes erklärte, dass es für das Hazardpack auch kein offizielles Remake geben würde. Obwohl der größte Teil des Hazardteam um Matthi aus Mitarbeitern von Clonk Endeavour bestand, blieb das Hazardpack ein inoffizielles Remake des Hazardpacks: Das Remake hat bis auf den Hazardclonk jedoch wenig mit dem Original zu tun. Wir haben von null angefangen und uns auch von Packs aus der Community inspirieren (vor allem vom EKE-Pack) lassen. + +Lizenz +====================== + +CC-BY-NC 3.0 + +Mitwirkende +====================== + +Projektleitung +---------------------- + Newton + +Scripting +---------------------- + Newton + Clonkonaut + Boni + Raven + +Grafiken +---------------------- + Matthi + Raven + Newton + +Musik +---------------------- + K-Pone + Hans-Christian Kühl + + +Weiter vielen Dank an +---------------------- +1.0: +* Matthes, Sven2 und Clonk-Karl für kleinere Beiträge zum Projekt +* DukeAufDune für das Rendering des Hazardclonks +* und Hans-Christian Kühl für die klassische Hazard-Musik +1.5: +* Zapper, KKenny und Wolli für aufgenommene Szenarien +2.0: +* Yomisei für die tolle Shuttle-Physik +2.5: +* K-Pone für die tolle Musik +* K-Pone, Luchs und Ace für aufgenommene Szenarien +* ModernClonker für einige Grafiken aus seinem Hazard-Skinpaket +* End, Foaly, Serpens66, B_E und viele mehr aus der Clonkforge und Clonkspot Community für Unterstützung beim Sammeln der Bugfixes \ No newline at end of file