[Help] damage function
3 posts • Page 1 of 1
[Help] damage function
hi everybody.. umm this question is a littlebit difficult,
i want to do a function that when polygon hit another polygon, the damage will reduce due to velocity and weight.
i need it to Beyblade game that i did and Wrestling game.. two of them very spacial..
this what i have now-
i want to replace the "math.sin" function with much better function .. plz any idea
i want to do a function that when polygon hit another polygon, the damage will reduce due to velocity and weight.
i need it to Beyblade game that i did and Wrestling game.. two of them very spacial..
this what i have now-
- Code: Select all
(e)=>{
scene.my.blue > 0 ? {scene.my.blue := (scene.my.blue - (2 + 2 * math.sin(sim.time * 2)))} : {
e.this.density := 60;
e.this.color := [0, 0, 0, 1];
scene.my.blue := 0
}
}
i want to replace the "math.sin" function with much better function .. plz any idea
- daniel1296
- Posts: 15
- Joined: Fri Dec 30, 2011 9:31 pm
Re: [Help] damage function
1) you need to read velocities with (readable(e.this)).vel (readable(e.other)).vel
2) you need to get weight via density and size (or another way)
2) you need to get weight via density and size (or another way)
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: [Help] damage function
umm u can write it for me? i dont exacly understand what u write..
- daniel1296
- Posts: 15
- Joined: Fri Dec 30, 2011 9:31 pm
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests