#1
|
|||||||||||
|
|||||||||||
Neutral
Waffen-Besitzer
Wie kann ich bei einem Actor prüfen, ob er(im Falle einer Waffe oder muni) einem Pawn gehört ??
|
#2
|
||||||||||||
|
||||||||||||
Neutral
Normalerweise reicht
Code:
if ( derActor.Owner == derPawn ) // jup, er isses else // nope, es gehört ihm nicht (besser spät als nie... )
__________________
Unreal Wiki: The Unreal Engine Documentation Site <+SK|Burnie`sI> Kennt einer speziellen trick wie man Rosinen aus müsli rausbekommt (query me) |
#3
|
|||||||||||
|
|||||||||||
Neutral
Und wie kann ich Pruefen, ob der Actor ueberhaupt irgendjemandem gehoert oder nur in der Gegend rumliegt??
Mit if(theActor.owner == 'none'){ } funzts nicht, da erzaehlter beim ucc was von wegen unpassende Operation und bricht ab. |
#4
|
||||||||||||
|
||||||||||||
Neutral
Das muss
Code:
if ( theActor.Owner == None ) ... Alles was in einfache Hochkommata eingeschlossen ist wird als "Name"-Wert angesehen (z.B. DamageType).
__________________
Unreal Wiki: The Unreal Engine Documentation Site <+SK|Burnie`sI> Kennt einer speziellen trick wie man Rosinen aus müsli rausbekommt (query me) |
#5
|
|||
|
|||
Wieso funzts dann so nicht :
unction bool AlwaysKeep(Actor Other) { local bool bTemp; if ( NextMutator != None ) return ( NextMutator.AlwaysKeep(Other) ); return false; } function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if ( Other.IsA('Weapon') ) { if( Other.IsA(WeaponName) && Other.Owner != None) { Weapon(Other).PickupAmmoCount = Weapon(Other).AmmoName.Default.MaxAmmo; return true; }; return false; } if ( Other.IsA('Ammo') ) { if( Other.IsA(AmmoName) && Other.Owner != None) { Ammo(Other).AmmoAmount = Ammo(Other).MaxAmmo/2; return true; }; return false; } bSuperRelevant = 0; return true; } defaultproperties { WeaponName=minigun2 AmmoName=Miniammo DefaultWeapon=Class'Botpack.minigun2' } Wenn ichs so mache, gibts im ganzen Level ueberhauptkeine Waffen und muni(gut), aber die Pawns haben auch keine(schlecht). |
#6
|
|||
|
|||
Wieso funzts dann so nicht :
unction bool AlwaysKeep(Actor Other) { local bool bTemp; if ( NextMutator != None ) return ( NextMutator.AlwaysKeep(Other) ); return false; } function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if ( Other.IsA('Weapon') ) { if( Other.IsA(WeaponName) && Other.Owner != None) { Weapon(Other).PickupAmmoCount = Weapon(Other).AmmoName.Default.MaxAmmo; return true; }; return false; } if ( Other.IsA('Ammo') ) { if( Other.IsA(AmmoName) && Other.Owner != None) { Ammo(Other).AmmoAmount = Ammo(Other).MaxAmmo/2; return true; }; return false; } bSuperRelevant = 0; return true; } defaultproperties { WeaponName=minigun2 AmmoName=Miniammo DefaultWeapon=Class'Botpack.minigun2' } Wenn ichs so mache, gibts im ganzen Level ueberhauptkeine Waffen und muni(gut), aber die Pawns haben auch keine(schlecht). |
#7
|
|||
|
|||
Wieso funzts dann so nicht :
unction bool AlwaysKeep(Actor Other) { local bool bTemp; if ( NextMutator != None ) return ( NextMutator.AlwaysKeep(Other) ); return false; } function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if ( Other.IsA('Weapon') ) { if( Other.IsA(WeaponName) && Other.Owner != None) { Weapon(Other).PickupAmmoCount = Weapon(Other).AmmoName.Default.MaxAmmo; return true; }; return false; } if ( Other.IsA('Ammo') ) { if( Other.IsA(AmmoName) && Other.Owner != None) { Ammo(Other).AmmoAmount = Ammo(Other).MaxAmmo/2; return true; }; return false; } bSuperRelevant = 0; return true; } defaultproperties { WeaponName=minigun2 AmmoName=Miniammo DefaultWeapon=Class'Botpack.minigun2' } Wenn ichs so mache, gibts im ganzen Level ueberhauptkeine Waffen und muni(gut), aber die Pawns haben auch keine(schlecht). |
#8
|
|||
|
|||
Wieso funzts dann so nicht :
unction bool AlwaysKeep(Actor Other) { local bool bTemp; if ( NextMutator != None ) return ( NextMutator.AlwaysKeep(Other) ); return false; } function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if ( Other.IsA('Weapon') ) { if( Other.IsA(WeaponName) && Other.Owner != None) { Weapon(Other).PickupAmmoCount = Weapon(Other).AmmoName.Default.MaxAmmo; return true; }; return false; } if ( Other.IsA('Ammo') ) { if( Other.IsA(AmmoName) && Other.Owner != None) { Ammo(Other).AmmoAmount = Ammo(Other).MaxAmmo/2; return true; }; return false; } bSuperRelevant = 0; return true; } defaultproperties { WeaponName=minigun2 AmmoName=Miniammo DefaultWeapon=Class'Botpack.minigun2' } Wenn ichs so mache, gibts im ganzen Level ueberhauptkeine Waffen und muni(gut), aber die Pawns haben auch keine(schlecht). |
#9
|
|||
|
|||
Wieso funzts dann so nicht :
unction bool AlwaysKeep(Actor Other) { local bool bTemp; if ( NextMutator != None ) return ( NextMutator.AlwaysKeep(Other) ); return false; } function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if ( Other.IsA('Weapon') ) { if( Other.IsA(WeaponName) && Other.Owner != None) { Weapon(Other).PickupAmmoCount = Weapon(Other).AmmoName.Default.MaxAmmo; return true; }; return false; } if ( Other.IsA('Ammo') ) { if( Other.IsA(AmmoName) && Other.Owner != None) { Ammo(Other).AmmoAmount = Ammo(Other).MaxAmmo/2; return true; }; return false; } bSuperRelevant = 0; return true; } defaultproperties { WeaponName=minigun2 AmmoName=Miniammo DefaultWeapon=Class'Botpack.minigun2' } Wenn ichs so mache, gibts im ganzen Level ueberhauptkeine Waffen und muni(gut), aber die Pawns haben auch keine(schlecht). |
#10
|
|||
|
|||
Wieso funzts dann so nicht :
unction bool AlwaysKeep(Actor Other) { local bool bTemp; if ( NextMutator != None ) return ( NextMutator.AlwaysKeep(Other) ); return false; } function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if ( Other.IsA('Weapon') ) { if( Other.IsA(WeaponName) && Other.Owner != None) { Weapon(Other).PickupAmmoCount = Weapon(Other).AmmoName.Default.MaxAmmo; return true; }; return false; } if ( Other.IsA('Ammo') ) { if( Other.IsA(AmmoName) && Other.Owner != None) { Ammo(Other).AmmoAmount = Ammo(Other).MaxAmmo/2; return true; }; return false; } bSuperRelevant = 0; return true; } defaultproperties { WeaponName=minigun2 AmmoName=Miniammo DefaultWeapon=Class'Botpack.minigun2' } Wenn ichs so mache, gibts im ganzen Level ueberhauptkeine Waffen und muni(gut), aber die Pawns haben auch keine(schlecht). |
Themen-Optionen | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Waffen als Pickups? | Madze | TO Mapping | 9 | 14. November 2002 17:19 |
Alle Zeitangaben in WEZ +2. Es ist jetzt 03:13 Uhr.
Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd. - Copyright 1998-2016 by splash .de (unrealEXTREME.de)
Unreal II - The Awakening, Unreal Tournament 2004, Gears of War, Unreal Tournament 3 (c) Epic Games, Inc.
Alle Rechte vorbehalten - Datenschutz - Impressum
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd. - Copyright 1998-2016 by splash .de (unrealEXTREME.de)
Unreal II - The Awakening, Unreal Tournament 2004, Gears of War, Unreal Tournament 3 (c) Epic Games, Inc.
Alle Rechte vorbehalten - Datenschutz - Impressum