Advertisement
vinifr

Danger 01

Nov 23rd, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. -------------------------------------------------------
  2. function DangerArea:OnEnterArea(entity, areaID)
  3.     local EntityClass = System.GetEntityClass(entity.id);
  4.     local EntityPlayer = System.GetEntity(entity.id);
  5.     local targetPosition = {};
  6.    
  7.     --Log("OnEnterArea, position ".. table.tostring(entity:GetPos()));
  8.     if EntityClass ~= nil then
  9.         Log("EntityClass "..EntityClass);      
  10.     end
  11.    
  12.     if (EntityClass == "Player" or EntityClass == "Human" or EntityClass == "HMMWV") then
  13.         EntityPlayer:AddImpulse(-1, EntityPlayer:GetCenterOfMassPos(), {x=0, y=0, z=1}, self.Properties.iImpulsePower, 1);
  14.         Log("Impulse "..EntityClass);
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement