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


Author Topic: [Tutorial] How to make Targeted Pedestrians do an Action Node  (Read 4319 times)

0 Members and 1 Guest are viewing this topic.

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
[Tutorial] How to make Targeted Pedestrians do an Action Node
« on: February 20, 2015, 08:17:05 PM »
This tutorial will teach you how to make a locked on pedestrian do your desired action node.

First of all you will need to make a function, for this tutorial I will use:

Code: [Select]
F_PedNode = function()
Then you need to make a local and make it call PedGetTargetPed(gPlayer) so you won't have to type it always.

Code: [Select]
local Ped = PedGetTargetPed(gPlayer)
After that, you need to make an if/then statement using your desired buttons and add a PedIsValid(Ped) to make sure that the action node only activates if they are is a valid ped targeted. I made mine press the down arrow key.

Code: [Select]
if IsButtonPressed(3,0) and PedIsValid(Ped) then
Now, all you need to do is add your desired action node, I will make the ped I target use a running attack, just for fun.

Code: [Select]
ExecuteActionNode(Ped, "/Global/Actions/Offense/RunningAttacks/RunningAttacksDirect", "Act/Globals/GlobalActions.act")
Finally, you are done! The desired ped that you target will do the action node you provide. Here is the finished function that you can use and edit in your mods. Thanks for reading this tutorial!
Code: [Select]
F_PedNode = function()
local Ped = PedGetTargetPed(gPlayer)

if IsButtonPressed(3,0) and PedIsValid(Ped) then
ExecuteActionNode(Ped, "/Global/Actions/Offense/RunningAttacks/RunningAttacksDirect", "Act/Globals/GlobalActions.act")
end
end



Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #1 on: February 20, 2015, 08:18:56 PM »
Nice tut!

deadpoolXYZ

  • Guest
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #2 on: February 20, 2015, 08:51:17 PM »
Nice tutorial m8!

I might use this later for something.

Offline SWEGTA

  • Da Forum Luffs Me!
  • *****
  • Posts: 6,422
  • Gender: Male
  • Swee Gee Tee Ayy
    • View Profile
    • Bully & GTA videos
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #3 on: February 20, 2015, 11:44:46 PM »
Good tutorial.  :cc_detective:

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #4 on: February 21, 2015, 12:17:07 AM »
When you get sick of making Jimmy play your action nodes, have your enemies do them instead! They certainly need a bit of help up against Jimmy... let alone modding Jimmy.

Offline Kikymaki

  • Jr. Member
  • **
  • Posts: 38
  • Gender: Female
  • im WOTA JKT48
    • View Profile
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #5 on: February 21, 2015, 02:39:56 AM »
nice josh,
im still waiting you rigging tutorial release

Offline Ky

  • Full Member
  • ***
  • Posts: 329
  • Gender: Male
  • <3
    • View Profile
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #6 on: February 21, 2015, 08:48:21 AM »
Good tutorial, tell me more, this works for any PED?

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #7 on: February 21, 2015, 10:14:39 AM »
Good tutorial, tell me more, this works for any PED?

As long as you target the ped, then yes.

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: [Tutorial] How to make Targeted Pedestrians do an Action Node
« Reply #8 on: March 08, 2015, 03:38:41 AM »
it not work need help send codigos chad