Bully-Board

Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: embas10 on August 14, 2015, 08:20:04 AM

Title: offense action node problem?
Post by: embas10 on August 14, 2015, 08:20:04 AM
Hey everyone, can i ask something about attacking/offense action node.
Is there have a solution about we can't use offense action node while we lock on enemy beside and behind him.
And we only can using offense action node in front of enemy or while we not lock on enemy.
Not all offense action node i mean, so is there have a way to solve this problem?
Thanks to people who want helping me.
Title: Re: offense action node problem?
Post by: DaBOSS54320 on August 14, 2015, 12:10:23 PM
If you're the one activating the action node with a script you can just add to the if statement.

if IsButtonBeingPressed(3,0) and not PedIsValid(PedGetTargetPed(gPlayer)) then
  PedSetActionNode(...)
end

IsButtonBeingPressed(3,0) I assume you know
not PedIsValid(PedGetTargetPed(gPlayer)) insures that there is no valid ped being targeted (meaning you're not locking onto anyone)

I don't know how you can do the part where you only want it to work in front of an enemy, you can use the ped's heading maybe but since you can't target your enemy, how do you know which ped to check the heading of?
Title: Re: offense action node problem?
Post by: embas10 on August 14, 2015, 06:57:24 PM
I don't know how you can do the part where you only want it to work in front of an enemy.

I 'am using code playerAI repeatly, like your super mod 4 beta, that can make all offense action node work. But sometimes not wrok properly.

how do you know which ped to check the heading of?

I dont know what are you talking about.
Anyway thanks man.
Title: Re: offense action node problem?
Post by: embas10 on August 15, 2015, 01:50:37 AM
Man it's not work like i wanted.
I'am wanted to, gPlayer can use offense action from behind,beside and in front of enemy while gPlayer lock on/targeting on enemy.
The code you gave me, that make me cannot use offense action node while lock on and it's make gPlayer only can use offense action at gPlayer not lock on.
Sorry for my bad english.
Title: Re: offense action node problem?
Post by: embas10 on August 15, 2015, 08:05:34 AM
Off-topic this problem has been solved.