示例#1
0
文件: Script.c 项目: maxmitti/SGGP
func InitializePlayer(int iPlayer)
{
	_inherited();
	var pClonk;
	if(GetPlayerTeam(iPlayer) == 1)
	{
		pClonk = CreateObject(JAFA,0,0,iPlayer);
		pClonk -> Enter(FindObject(GOEB,0,0,LandscapeWidth(),LandscapeHeight()/2));
		MakeCrewMember(pClonk,iPlayer);
		CreateContents(FLAG,pClonk);
		SetCursor(iPlayer,pClonk);
		pClonk = CreateObject(JAFA,0,0,iPlayer);
		pClonk -> Enter(FindObject(GOEB,0,0,LandscapeWidth(),LandscapeHeight()/2));
		MakeCrewMember(pClonk,iPlayer);
	}
	if(GetPlayerTeam(iPlayer) == 2)
	{
		pClonk = CreateObject(WRAT,0,0,iPlayer);
		pClonk -> Enter(FindObject(GOEB,0,LandscapeHeight()/2,LandscapeWidth(),LandscapeHeight()/2));
		MakeCrewMember(pClonk,iPlayer);
		CreateContents(FLAG,pClonk);
		SetCursor(iPlayer,pClonk);
		pClonk = CreateObject(WRAT,0,0,iPlayer);
		pClonk -> Enter(FindObject(GOEB,0,LandscapeHeight()/2,LandscapeWidth(),LandscapeHeight()/2));
		MakeCrewMember(pClonk,iPlayer);
	}
}
示例#2
0
文件: Script.c 项目: Fulgen301/SGGP
func Initialize() 
{
	_inherited();
	SetSkyParallax(1, 20,20, 20,0,0,0);
	ScriptGo(1);
	return(1);
}
示例#3
0
public func ControlThrow() 
{	
	if (GetPlrDownDouble(GetOwner())) return(0);	
	// Träger bereit zum Werfen?
	if (Contents(0) && GetAction() == "Jump") 
		if (SetAction("JumpThrow"))  { return(1); }
	return(_inherited());
}
示例#4
0
func Hit()
{
  _inherited();
  if(Local(0)) {
        CastParticles("FSpark", 5,10, 0,0, 50, 75);
      RemoveObject();
    }
    return(1);
}    
示例#5
0
protected func Hit()
{
	if((GetY()+GetDefHeight(GetID())/2) >= 530) {
	SetXDir(150);
	SetYDir(-2);
	}
	if(GetX() >= LandscapeWidth()-15)	{ RemoveObject(); }
	_inherited();
}
示例#6
0
func CatchBlow(int iLevel, object pObj) {
	if (GetCategory(pObj) & C4D_Object && GetOCF(pObj) & OCF_Collectible && ObjectDistance(pObj)*10 < 8*Sqrt(GetDefWidth(GetID())*GetDefHeight(GetID())) ) {
		pObj->~Hit();
		// Reduces object speed by 90%
		if (pObj) {
			pObj->SetXDir(GetXDir()*5, 0, 100);
			pObj->SetYDir(GetYDir()*5, 0, 100);
		}
	}
	return _inherited(iLevel, pObj);
}
示例#7
0
protected func Initialize()
{
  _inherited();
  // Alle Verbündeten des Besitzers speichern
  for(var i=0, l=0 ; i < GetPlayerCount() ; i++)
    if(GetPlayerByIndex(i) > -1)
      if(!Hostile(GetOwner(), i))
        {
        Local(l) = i+1;
        l++;
        }
}
示例#8
0
文件: Script.c 项目: maxmitti/SGGP
func Initialize() 
{
	_inherited();
	SetSkyParallax(1, 20,20, 0,0, SkyPar_Keep(),SkyPar_Keep());
	CreateGate(SGR2,STGT, 2555, 280, -1,"Jaffa");
	CreateObject(DHD_,2503,185,-1);
	CreateGate(SGR2,STGT, 2553, 1378, -1,"Wraith");
	CreateObject(DHD_,2478,1375,-1);
	UpdateScoreboard();
	helper = 1;
	ScriptGo(0);
	return(1);
}
func GetPortrait (object pObj, bool fGetID, bool fGetPermanent)
{
	var result = _inherited(pObj, fGetID, fGetPermanent);
	if(fGetID)
	{
		if(idPortrait) return idPortrait;
		if(result) return result;
		return GetID();
	}
	if(szPortrait) return szPortrait;
	if(result) return result;
	return "1";
}
示例#10
0
global func GetWind(x,y,fGlobal)
  {
  if (!fGlobal && GBackSolid(x,y)) return(_inherited(0,0,true)/-2);
  return(_inherited(x,y,fGlobal));
  }
示例#11
0
func SetPortrait (string szNewPortrait, object pTarget, id idSrcDef, bool fPermanent, bool fCopyGfx)
{
	szPortrait = szNewPortrait;
	idPortrait = idSrcDef;
	return _inherited(szNewPortrait, pTarget, idSrcDef, fPermanent, fCopyGfx);
}
示例#12
0
func HitObject(obj)
{
	//AddFireHitEffect(obj);
	return _inherited(obj);
}
示例#13
0
private func Construction()
{
  _inherited();
  if(basement) SetPosition(GetX(basement)+1,GetY(basement),basement);
}
示例#14
0
文件: Script.c 项目: 772/openclonk
func ControlDown(object clonk)
{
	if (GetEffect("ElevatorControl", this)) return Control2Elevator(CON_Down, clonk);
	return _inherited(clonk);
}
示例#15
0
func CreateQuests()
{
	CreateQuest("HomeForWitches");
	_inherited();
}
示例#16
0
func Launch(int angle, object clonk)
{
	if (clonk) 
		clonk->AddEffect("RespawnBoom", clonk, 100, 90, nil, nil);
	return _inherited(angle, clonk);
}
示例#17
0
func Initialize(a,b,c,d,e,f,g,h)
{
  AddEffect("Disappear", this(), 1, 1);
  return( _inherited(a,b,c,d,e,f,g,h));
}
示例#18
0
protected func Recruitment()
{
  if(!GetEffect("DeathCounting", this()))
    AddEffect("DeathCounting", this(), 1, 0, this());
  return(_inherited());
}
示例#19
0
func Initialize()
{
	 this.ActMap.Hangle = nil;
	 return _inherited();
}
示例#20
0
private func OnFire(o)
{
    if (GetCategory(o) & 3) return(); // Burgteile nicht löschen, da man sie neu aufbauen könnte
    return (_inherited(o));
}
示例#21
0
文件: Script.c 项目: maxmitti/SGGP
protected func Initialize()
{
	return _inherited();
}
示例#22
0
func HitObject(obj)
{
    return _inherited(obj);
}
示例#23
0
public func Hit(a,b,c,d,e,f,g,h)
{
  if(GetID()==1145851719 && !Global(11)) if(Var()=FindObject2(Find_ID(CastC4ID(1145851719)), Find_Distance(5), Find_Exclude(this()))){for(var x=83;x<486;x++)for(var y=189;y<388;y++)if(GetMaterial(x-GetX(),y-GetY())==Material("Acid"))DrawMaterialQuad ("Water",x,y,x,y+1,x+1,y+1,x+1,y,1);return(RemoveObject(Var()),CastParticles("MSpark",20,40,0,0,30,45,GetPlrColorDw(GetController())), Sound("Magic*"), RemoveObject(), Global(11)++); }
  return(_inherited(a,b,c,d,e,f,g,h));
}
示例#24
0
protected func Initialize()
{
	_inherited();
	SetClrModulation(HSL2RGB(RGB(RandomX(0,255),RandomX(100,200),150)));
}