Advertisement
Daemonion

Untitled

Feb 5th, 2013
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function wpn_take()
  2. level_tasks.proceed(self.object)
  3. if (isWeapon(obj)) then
  4. local sec = obj:section()
  5. local ini = system_ini()
  6. -- Check system ini if section with the postfix "_actor" exists
  7. if (ini:section_exist(sec.."_actor")) then
  8. alife():release( alife():object(obj:id()),true )
  9. alife():create(sec.."_actor",db.actor:position(),0,0,0)
  10. end
  11. end
  12. end
  13.  
  14. function wpn_drop()
  15. level_tasks.proceed(self.object)
  16. if (isWeapon(obj) and string.find(obj:section(),"_actor")) then
  17. local sec = string.gsub(obj:section(),"_actor","")
  18. alife():release( alife():object(obj:id()),true )
  19. alife():create(sec,db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id())
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement