Advertisement
Daemonion

weapon callback script test v1

Jul 28th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. function test_my_shit()
  2.     local actor = db.actor
  3.     local rain_fps_l = xr_sound.get_safe_sound_object ("daemonion\\misc\\rain_test_l")
  4.     local rain_fps_r = xr_sound.get_safe_sound_object ("daemonion\\misc\\rain_test_r")
  5.     local wpn = db.actor:active_item()
  6.     wpn = packet_utils.item_is_fa(wpn) and wpn
  7.  
  8.     if (wpn) then
  9.         local se_wpn = alife():object(wpn:id())
  10.         local data = stpk_utils.get_weapon_data(se_wpn)
  11.         if (data.weapon_state == 5) then      
  12.             rain_fps_l:play_at_pos (actor, vector():set(-5, 0, 1), 0, sound_object.s2d)
  13.             rain_fps_r:play_at_pos (actor, vector():set(5, 0, 1), 0, sound_object.s2d)
  14.         end
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement