"Start Stop Use"

Black_Dragon

New member
Hello,

I have something strange with the task "Start Stop Use", I have create a small behavior for an enemy, it's working for the patrol etc ... he see me and come close and he attacks, but only 1 time :
attack1.jpg

he doesn't go on the next step "wait" & the box "always return success" is check (normaly it's need to go on the next step, following the "sequence")

when I kill the enemy, after respawn, he goes on the next step "wait" attack 1 time and stay again block on this step :
attack2.jpg

I do something wrong, but I don't found where, if somebody can help me, it will be nice :)
 
Did you figure this one out because I had a similar situation and I had taken that Repeater away and then it worked or maybe you haven't checked repeat forever.
 
I have the exact same situation and was here to ask this question. My AI doesnt attack at all though. I created a pistol Item and thought it may have been the problem.
Slot ID is -1 and Action ID is 0.
I see that slot ID description says it is "The Slot that should be used". What "slots" is this referring to?
It looks like all weapons have an action ID of 0 so I assume that is the general ID to use a item.
What is the ID for weapons? It looks like all of those are 0 as well.
 
Ok, well it looks like you answered my one question. thank you. That gave me overall insight but it doesn't address the primary question asked.
Can you give us any idea why this isnt working for us? My post in Question was also deleted but not answered....
 
Beyond the troubleshooting steps the best way to see why it's not firing is to set a breakpoint within StartStopUse.OnUpdate and see where it ends early. This should give you an indication of why it isn't firing - if you tell me the line that returns early I can say what may be the cause.
 
Thank you.
I added a Stop and it stopped at Line 41 var target = GetDefaultGameObject(m_TargetGameObject.Value);
but the "Target" value is working with the rest of the code because my AIAgent follows my character around and is constantly pointing his gun at his head.
I looked at your script and it says The slot ID and Action ID must match and does a break if they do not.
but Slot and Action IDs are different. Why would that the case? I then added a Debug and it does that break.
through using Debug logs to see what is happening, the first time the script runs it does not find the ability but after that it does and runs the ability and does not stop.
My character is not firing the pistol though. I have set up all the sounds, muzzle flash and shell ejection stuff but nothing happens...
 
When it says that the slot ID and action ID must match it is referring to matching the corresponding ID on the item. The slot ID and action ID most likely will not match.

Looking at it from another direction, does the Behavior Designer sample scene work well for you? Can you tell what is different between your item and the demo agent's item? As a test you could even copy the ShootableWeapon component to see if that helps at all.

GetDefaultGameObject will ensure a GameObject is always valid but wouldn't be stopping the actual task from working.
 
THe differences are that My game item has the First Person Perspective and First Person Shootable Weapon Properties components as well as the Third Person Perspective and Third Person Shootable Weapon components. When I copy and paste the Shootable Weapon component and change the Consumable Item Type he will no longer point at me and looks away. His BT completes but stops at the Find ammo if the amount of ammo is low branch. I have 24 PistolBullets in his ItemSetManager component. Nothing else in the Shootable Weapon component looks as if it should matter.

Should I have a separate Item for AIAgents to use? When I remove the First person Perspective component, my AIAgent no longer Aims...
 
No, you can have both first and third person properties without any issues. For the BD demo scene I actually have both as well and then before I upload the demo I run a script which removes the unnecessary components.

Approaching this another way, are you able to send me a small repro scene that I can take a look at? I can step through it to see what the issue is.
 
I have never gotten this resolved and as a result I can not get the AI to do $hit. I am really upset because I now have to research a working asset. I will be changing my review because BD seems to promise a lot but cant even deliver an AI that can shoot a pistol. The dev is a nice guy but being a nice guy doesnt help me with my project. I quit playing with this when I could never get it to work but I am going back into it and I still see this does not work. This is pathetic...
 
Top