Daemonion

on item take perspective

Mar 19th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. function actor_binder:on_item_take (obj)
  2.     level_tasks.proceed(self.object)       
  3.    
  4.     -- weapon perspective audio ----
  5.     if (isWeapon(obj)) then
  6.         local sec = obj:section()
  7.         local ini = system_ini()
  8.         -- Check system ini if section with the postfix "_actor" exists
  9.         -- if has_alife_info("interior_whitenoise_playing") then
  10.             -- if (ini:section_exist(sec.."_actor_indoors")) then
  11.                 -- alife():release( alife():object(obj:id()),true )
  12.                 -- alife():create(sec.."_actor_indoors",db.actor:position(),0,0,0)
  13.             -- end
  14.         -- else
  15.         if (ini:section_exist(sec.."_actor")) then
  16.             alife():release( alife():object(obj:id()),true )
  17.             alife():create(sec.."_actor",db.actor:position(),0,0,0)
  18.             -- end
  19.         end
  20.     end
  21.     ---- weapon perspective audio --]]--
Advertisement
Add Comment
Please, Sign In to add comment