Posted by CogKing on February 11, 1998 at 12:03:08:
In Reply to: To CogKing...Cog Problems posted by Lord of Sith on February 10, 1998 at 20:49:59:
> I Would like to know what is wrong with this cog.
> I can teleport the player no worries but when it comes to an enemy
> No chance. It doesn't detect the enemy entering the sector.
> I would like this cog to work for all enemies on my levels not just 1 or 2
> Your Advice Will Be Appreciated Greatly
code
entered:
player=GetSenderType();
Return;
end
Huh ? The Sender is what is triggered : i.e. the sector !
The Source is what triggers the sender, i.e. the player or enemy.
player = GetSourceRef();
if(GetThingType(player) == 10)
{
// player
}
else
if(GetThingType(player) == 2)
{
// actor
}
else
{
// everything else, like projectiles, etc.
}
Also, try setting the mask=0xfff to the sector too if this doesn't fully work.
-CogKing