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


Author Topic: Give other ped some move??  (Read 3590 times)

0 Members and 1 Guest are viewing this topic.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Give other ped some move??
« on: April 20, 2014, 06:08:32 AM »
is there have a way to gave other ped a actionnode or mix actiontree(style) ?? like:
-Tad using his normal style !but he can do Darby 5 hit combo
-Algernon using His normal style ! but he have a johnny style too (the mean 2 style can have!or more)

so is there have a way to give other ped some move?

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #1 on: April 20, 2014, 11:58:36 AM »
Set their fighting style to what you want.

Then something like this
Code: [Select]
local RNDM1 = math.random(700)
local RNDM2 = math.random(700)

if RNDM1 == RNDM2 then
node or set style
end

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #2 on: April 21, 2014, 08:33:38 AM »
Set their fighting style to what you want.

Then something like this
Code: [Select]
local RNDM1 = math.random(700)
local RNDM2 = math.random(700)

if RNDM1 == RNDM2 then
node or set style
end


Are it's work like this?:

Code: [Select]
local RNDM1 = math.random(700)
local RNDM2 = math.random(700)

if RNDM1 == RNDM2 then
PedSetActionNode(Hal,  "Darby 5 hit", "Act")
PedSetActionTree(Hal, "Johhnny Style", "Act")
end

that just example don't think real!  8)

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #3 on: April 21, 2014, 10:55:09 AM »
It won't work right if you set their style and a node at the same time though. But yes that's right.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #4 on: April 22, 2014, 07:01:19 AM »
It won't work right if you set their style and a node at the same time though. But yes that's right.

thanks for the info! but if like this are work! i make a two of that?like this!

Code: [Select]
local RNDM1 = math.random(700)
local RNDM2 = math.random(700)

if RNDM1 == RNDM2 then
PedSetActionNode(Hal,  "Darby 5 hit", "Act")
PedSetActionNode(Hal,  "Bearhug", "Act")
end

local RNDM1 = math.random(700)
local RNDM2 = math.random(700)

if RNDM1 == RNDM2 then
PedSetActionTree(Hal,  "G Grapp", "Act")
PedSetActionTree(Hal,  "J Grapp", "Act")
end

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #5 on: April 22, 2014, 10:28:58 AM »
That won't work correctly. Try this.

Code: [Select]
local RNDM1 = math.random(600)
local RNDM2 = math.random(600)
local RNDM3 = math.random(600)
local RNDM4 = math.random(600)
local RNDM5 = math.random(1000)
local RNDM6 = math.random(1000)
local RNDM7 = math.random(1000)
local RNDM8 = math.random(1000)

if RNDM1 == RNDM2 then
PedSetActionNode(Hal,  "Darby 5 hit", "Act")
end

if RNDM3 == RNDM4 then
PedSetActionNode(Hal,  "Bearhug", "Act")
end

if RNDM5 == RNDM6 then
PedSetActionTree(Hal,  "G Grapp", "Act")
end

if RNDM7 == RNDM8 then
PedSetActionTree(Hal,  "J Grapp", "Act")
end

For the nodes, a random value is set to two variables for each node, if they are the same, it does the node. The same for the styles except I like to use a larger number range. But whatever works best for you. :)

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #6 on: April 23, 2014, 05:24:20 AM »
That won't work correctly. Try this.

Code: [Select]
local RNDM1 = math.random(600)
local RNDM2 = math.random(600)
local RNDM3 = math.random(600)
local RNDM4 = math.random(600)
local RNDM5 = math.random(1000)
local RNDM6 = math.random(1000)
local RNDM7 = math.random(1000)
local RNDM8 = math.random(1000)

if RNDM1 == RNDM2 then
PedSetActionNode(Hal,  "Darby 5 hit", "Act")
end

if RNDM3 == RNDM4 then
PedSetActionNode(Hal,  "Bearhug", "Act")
end

if RNDM5 == RNDM6 then
PedSetActionTree(Hal,  "G Grapp", "Act")
end

if RNDM7 == RNDM8 then
PedSetActionTree(Hal,  "J Grapp", "Act")
end

For the nodes, a random value is set to two variables for each node, if they are the same, it does the node. The same for the styles except I like to use a larger number range. But whatever works best for you. :)

thanks man, i will try it! if still problem i will reply it!  :biggrin:

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #7 on: April 24, 2014, 10:27:16 AM »
hey , dude! if i want last than 1 ped how to do it? are its like this?

Code: [Select]
local RNDM1 = math.random(600)
local RNDM2 = math.random(600)
local RNDM3 = math.random(600)
local RNDM4 = math.random(600)
local RNDM5 = math.random(1000)
local RNDM6 = math.random(1000)
local RNDM7 = math.random(1000)
local RNDM8 = math.random(1000)
local RNDM9 = math.random(600)
local RNDM10 = math.random(600)
local RNDM11 = math.random(600)
local RNDM12 = math.random(600)
local RNDM13 = math.random(1000)
local RNDM14 = math.random(1000)
local RNDM15 = math.random(1000)
local RNDM16 = math.random(1000)


if RNDM1 == RNDM2 then
PedSetActionNode(Hal,  "Darby 5 hit", "Act")
end

if RNDM3 == RNDM4 then
PedSetActionNode(Hal,  "Bearhug", "Act")
end

if RNDM5 == RNDM6 then
PedSetActionTree(Hal,  "G Grapp", "Act")
end

if RNDM7 == RNDM8 then
PedSetActionTree(Hal,  "J Grapp", "Act")
end

if RNDM9 == RNDM10 then
PedSetActionNode(Johnny,  "Prep strkr A light atk", "Act")
end

if RNDM11 == RNDM12 then
PedSetActionNode(Johnny,  "Prep strkr B light atk", "Act")
end

if RNDM13 == RNDM14 then
PedSetActionTree(Johnny,  "G johnny", "Act")
end

if RNDM15 == RNDM16 then
PedSetActionTree(Johnny,  "BOSS DARBY", "Act")
end


are it's will be work like this?

Offline Reath

  • Jr. Member
  • **
  • Posts: 26
  • Gender: Male
    • View Profile
Re: Give other ped some move??
« Reply #8 on: April 24, 2014, 10:48:39 AM »
Yes, that should work. You can keep adding them like that.