Tottel
Member
|
RE: damage radius
Sure.
I assume you have some inheritance system.
What you could do is add a TakeDamage() function to your Chr baseclass. You can then call TakeDamage on any object that inherits from Chr (Player, AI,..).
To do so, you can do something like ObjGet() (I don't have Esenthel installed on this PC here, I'm not sure about the name) to get the objects in that area and cast to Chr class. If the cast is valid, call TakeDamage.
|
|
03-14-2014 06:39 PM |
|
1991mirec
Member
|
RE: damage radius
hi thank you tottel
the thing is that the obj (blue thing infront of the bird) is not created with capsul ball box or anything it s the same thing as pentagram in esenthel rpg2 but shae was changed.. so it doesn t have physics on it. how can i create or have obj like this(it will be invisible later on) created and any obj inside of it would receive damage.. i couldn t make this shaped rectangle with anything else... any advice???
|
|
03-14-2014 07:38 PM |
|
Rubeus
Member
|
RE: damage radius
That's a relatively simple shape. You could programatically create a mesh based on it's shape to feed to PhysX to check the collisions.
|
|
03-14-2014 09:53 PM |
|
Rubeus
Member
|
RE: damage radius
You could create a mesh that fits the shape(see the dynamic mesh tutorial), then give a physbody part the newly created meshbase using createMesh. That would allow you to interface with the physics and create a callback, or however you wanted to do it.
Alternatively, you could create an approximate sized box, and when you check for objects, do a second check to see if they are within the more precise bounds of the area you want.
You could probably even get away with just using the box-unless you need it very precise.
|
|
03-14-2014 11:03 PM |
|