Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Clarifying damage, heath and shoot.

bracer
Registered User
Quote
2017-05-09 14:51:37

Just need confirmation as to whether this is how it works:

Documentation:
Normally inside the ActionOnAttack, the Shoot action is called.

Question 1: So the health is reduced the minute Shoot is called ? Or When whatever the Shooting action is emitting hit it's target ? Because it would be really strange if health is immediately deducted before the bullet hit.

The Attack Animation, this is THE MOST MYSTERIOUS of them all, the document says “ActionOnAttack” happens in the middle of this animation.

Question 2: So exactly in the middle ? What if the shooting animation have 4 frames ? Does it shoot at 2.5 frames then ? or frame 2 ? or frame 3 ?

Question 3: So I have to set up the animation so that the middle of it is the firing ?
Question 4: What happened if the animation is 1 frame ?

Question 5:
While executing AttackAnimation, does the monster still moves or, the rule is during firing, all “Game Actor with Health” stop moving ?

Question 6:
How does Coppercube handle animation with root motion ? So far my walk animation stays in one place and is moved by the AI which is good.
But what IF the animation itself have root motion ?
Unity allows you to decide whether it not to keep root motion, so how about CopperCube ?


bracer
Registered User
Quote
2017-05-10 06:08:40

Just experimented with this so here is an answer:

Answering Question 6 Myself:
To those coming to Coppercube from Unity, Root motion is irrelevant in Coppercube.
Once you set your Monster's Collider space under Size in "Coliide when moved", even if the Character physical moved because of Root motion, the Monster's Collider bounding box [capsule should be more appropriate] will stay where it was, remember to take this into consideration.
And also if "Game Actor with Health" is applied, on a character with root motion and is set to Randomly Patrol mode, the Character will be moonwalking [in a sense.]
The long and short of it is: Don't use Animations with Root motion or atleast REMOVE the root motion.


ishmaru
Registered User
Quote
2017-05-14 04:21:23

Let me share my experience with AI,

1 - When shooting with a bullet (the cloned scene node option) the dammage is calculated on a successful contact with the bounding box of the enemy. When Shooting without a bullet (the direct hit option) the hit is performed at the exact moment shoot is activated, if their is a direct line of sight between shooter and target.

1B & 2 - Currenty the attack animaion does not work. Generally the shoot animation happens once on occasion and then gets stuck on last frame. The last frame is looped until the ai moves.

2, 3, &4 - Honestly if an attack animation is vital (like melee attacks) I would just set AI to "this is the player" and use javascript ai commands, and manually setting the nodes animations yourself. Use the doSomethingLater action to control the exact delay between the start of the attack animation and when the shoot is performed.

5 - Ai is designed to stand still when shooting. you can get around this by using 2 child nodes, one as a targetpointer (this one detects if the player is within range), and another node as the "gun". Add a "on proximity" behavior to have the gun shoot when player is within the target node's range. This will give the ai the ability to shoot while moving.

6 - I know you looked into this yourself, but I just want to say that their are some good reasons to use root animation. I had good success animating the root. like bobing up and down in water, flying animations, banking left or right on turning, idle animations like looking behind the character, to name a few.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact