Mukkan Yhtio wrote:
I have written the following code the spawn the "npc_turret_floor" entity.
No, you haven't, you've written code to spawn "npc_floor_turret", not
"npc_turret_floor"...
CNPC_FloorTurret *pEntity = (CNPC_FloorTurret*) CreateEntityByName(
"npc_floor_turret" );
After calling CreateEntityByName(), you might want to check if the
returned pointer is NULL...
CNPC_FloorTurret *pEntity = (CNPC_FloorTurret*) CreateEntityByName(
"npc_floor_turret" );
if( pEntity )
{
pEntity->Spawn();
pEntity->SetLocalOrigin( local_origin );
pEntity->SetLocalAngles( local_angles );
pEntity->AddSpawnFlags( 0x00000020 );
}
--
Jeffrey "botman" Broome
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders