ComSer Forum
Welcome, Guest. Please login or register.
July 20, 2018, 12:18:26 PM

Login with username, password and session length
Search:     Advanced search
Try Haxball - www.haxball.com
8133 Posts in 708 Topics by 253 Members
Latest Member: Maxigenzztop
* Home Help Search Calendar Login Register
+  ComSer Forum
|-+  Gusanos Forum
| |-+  Gusanos Support
| | |-+  [LUA] Custom bodies drop on death
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: [LUA] Custom bodies drop on death  (Read 2301 times)
SilverPL
Jr. Member
*

Karma: 0
Offline Offline

Posts: 4


View Profile
« on: December 24, 2008, 08:56:12 AM »

Hi guys. I've started modding for gusanos long time ago, but i wanted to do something more advanced so i started to edit lua files. I want to make that on some weapons bodies are different like flamethrower makes burned bodies, some kind of rail gun makes them disappear, and stuff like that.

I have started to write simple lua script BUT it is not working. I need any help you can give me.
Here's the CODE:
Code:
function something.init()
local body = load_particle("body.obj")
end

function something.death(worm)
local health = worm:health()
if health < 1 then
worm:shoot( body, 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0)
end
end
« Last Edit: December 24, 2008, 08:57:04 AM by SilverPL » Logged
basara
Administrator
Historic Member
*****

Karma: 31
Offline Offline

Posts: 841



View Profile
« Reply #1 on: December 24, 2008, 10:35:50 AM »

When is something.death called?
How does it not work? does it error? does it just do nothing?
Logged
SilverPL
Jr. Member
*

Karma: 0
Offline Offline

Posts: 4


View Profile
« Reply #2 on: December 24, 2008, 12:36:45 PM »

It is called in Bullet's On detect_range event. it give "shoot called from "here" " error
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!