News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: offense action node problem?  (Read 2454 times)

0 Members and 1 Guest are viewing this topic.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
offense action node problem?
« 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.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: offense action node problem?
« Reply #1 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?

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: offense action node problem?
« Reply #2 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.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: offense action node problem?
« Reply #3 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.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: offense action node problem?
« Reply #4 on: August 15, 2015, 08:05:34 AM »
Off-topic this problem has been solved.