Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 |
//============================================================================= // Spawnpoint. //Used by Creature Factories for spawning monsters //============================================================================= class SpawnPoint extends NavigationPoint; #exec Texture Import File=Textures\SpwnAI.pcx Name=S_SpawnP Mips=Off Flags=2 var ThingFactory factory; function bool Create() { local pawn newcreature; local CreatureFactory pawnFactory; local pawn creature; local actor temp, A; local rotator newRot; if ( factory.bCovert && PlayerCanSeeMe() ) //make sure no player can see this return false; temp = Spawn(factory.prototype); if (temp == None) return false; newRot = rot(0,0,0); newRot.yaw = rotation.yaw; temp.SetRotation(newRot); temp.event = factory.tag; temp.tag = factory.itemtag; newcreature = pawn(temp); if( Event != '' ) foreach AllActors( class 'Actor', A, Event ) A.Trigger( Self, Instigator ); if ( factory.bFalling ) temp.SetPhysics(PHYS_Falling); if (newcreature == None) return true; pawnFactory = CreatureFactory(factory); if (pawnFactory == None) { log("Error - use creature factory to spawn pawns"); return true; } if (ScriptedPawn(newcreature) != None) { ScriptedPawn(newcreature).Orders = pawnFactory.Orders; ScriptedPawn(newcreature).OrderTag = pawnFactory.OrderTag; ScriptedPawn(newcreature).SetEnemy(pawnFactory.enemy); ScriptedPawn(newcreature).Alarmtag = pawnFactory.AlarmTag; } else newcreature.enemy = pawnFactory.enemy; if (newcreature.enemy != None) newcreature.lastseenpos = newcreature.enemy.location; newcreature.SetMovementPhysics(); if ( newcreature.Physics == PHYS_Walking) newcreature.SetPhysics(PHYS_Falling); return true; } defaultproperties { bDirectional=True Texture=Texture'UnrealShare.S_SpawnP' SoundVolume=128 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |