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


Author Topic: Clique Fights  (Read 8178 times)

0 Members and 1 Guest are viewing this topic.


Offline Phap

  • Full Member
  • ***
  • Posts: 216
  • Gender: Male
    • View Profile
Re: Clique Fights
« Reply #16 on: June 16, 2013, 12:38:13 PM »
good! but why dont you use a trainer
Why would I do that?

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Clique Fights
« Reply #17 on: June 17, 2013, 09:54:30 AM »
Can you do Townies vs Bullies?

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Clique Fights
« Reply #18 on: June 17, 2013, 10:30:10 AM »
Mick why dont u do it yourself? :D
Its easy to make. And fun to watch

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Clique Fights
« Reply #19 on: June 17, 2013, 10:35:47 AM »
I have tryed to make faction fights. But some of them just stand still. A

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Clique Fights
« Reply #20 on: June 17, 2013, 10:46:57 AM »
Mick do this after u spawn them.

PedAttack(Attacker, Target)
Replace the Attacker with who you want to attack and the Target with who you want to be attacked.

Make sure they are facing at the same side (That they look at each other) but in a small distance (about 2 - 7 meters)

Offline Phap

  • Full Member
  • ***
  • Posts: 216
  • Gender: Male
    • View Profile
Re: Clique Fights
« Reply #21 on: June 17, 2013, 11:29:57 AM »
In my fights, they stand 20 metres away from each other. But yeah you have to add the PedAttack code to make them attack each other.
This my my code:

GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")

  l_0_0 = 60

MissionSetup = function()
  local l_1_0 = 515
  local l_1_1 = 504
  local l_1_2 = 19.60971009
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
  TextPrintString("Bully Scholarship Edition Bullies vs Townies ", 4, 1)
  Wait(5000)
  TextPrintString("Enjoy ", 4, 1)
  Wait(5000)

 local Ped1 = nil
 local Ped2 = nil
 local Ped3 = nil
 local Ped4 = nil
 local Ped5 = nil
 local Ped6 = nil
 local Ped7 = nil
 local Ped8 = nil
 local Ped9 = nil
 local Ped10 = nil
 local Ped11 = nil
 local Ped12 = nil
 local Ped13 = nil
 local Ped14 = nil
 local Ped15 = nil

local Ped1 = PedCreateXYZ(91, 510, 500, 19.60971009)
local Ped2 = PedCreateXYZ(47, 510, 501, 19.60971009)
local Ped3 = PedCreateXYZ(46, 510, 502, 19.60971009)
local Ped4 = PedCreateXYZ(45, 510, 503, 19.60971009)
local Ped5 = PedCreateXYZ(43, 510, 504, 19.60971009)
local Ped6 = PedCreateXYZ(41, 510, 505, 19.60971009)
local Ped7 = PedCreateXYZ(44, 510, 506, 19.60971009)
local Ped8 = PedCreateXYZ(42, 510, 507, 19.60971009)
local Ped9 = PedCreateXYZ(75, 530, 500, 19.60971009)
local Ped10 = PedCreateXYZ(99, 530, 501, 19.60971009)
local Ped11 = PedCreateXYZ(85, 530, 502, 19.60971009)
local Ped12 = PedCreateXYZ(145, 530, 503, 19.60971009)
local Ped13 = PedCreateXYZ(146, 530, 504, 19.60971009)
local Ped14 = PedCreateXYZ(147, 530, 505, 19.60971009)
local Ped15 = PedCreateXYZ(102, 530, 506, 19.60971009)

PedAttack(Ped1, Ped9, 1) - Ped1 attacks Ped9
PedAttack(Ped2, Ped10, 1) - Ped2 attacks Ped10 and etc.
PedAttack(Ped3, Ped11, 1)
PedAttack(Ped4, Ped12, 1)
PedAttack(Ped5, Ped13, 1)
PedAttack(Ped6, Ped14, 1)
PedAttack(Ped7, Ped15, 1)
PedAttack(Ped8, Ped9, 1)
PedAttack(Ped9, Ped1, 1)
PedAttack(Ped10, Ped2, 1)
PedAttack(Ped11, Ped3, 1)
PedAttack(Ped12, Ped4, 1)
PedAttack(Ped13, Ped5, 1)
PedAttack(Ped14, Ped6, 1)
PedAttack(Ped15, Ped7, 1)

PedWander(Ped1, true) - Makes them walk around after a fight, but this is not required.
PedWander(Ped2, true)
PedWander(Ped3, true)
PedWander(Ped4, true)
PedWander(Ped5, true)
PedWander(Ped6, true)
PedWander(Ped7, true)
PedWander(Ped8, true)
PedWander(Ped9, true)
PedWander(Ped10, true)
PedWander(Ped11, true)
PedWander(Ped12, true)
PedWander(Ped13, true)
PedWander(Ped14, true)
PedWander(Ped15, true)

end


F_MissionSetup = function()
  PlayerSetControl(1)
  CameraFollowPed(gPlayer)
  ClockSet(9, 30)
  ClockSetTickRate(0.0060000000521541)
  LaunchScript("SObjTest.lua")

end



MissionCleanup = function()
  ClearTextQueue()
  EnablePOI()
  gMissionRunning = false
  shared.gMissionEventFunction = nil
  WeatherRelease()
  PlayerSetControl(1)
  PlayerSetPunishmentPoints(0) 
end



main = function()
  F_MissionSetup()
  gMissionRunning = true
  while gMissionRunning do
    UpdateTextQueue()
    Wait(0)
   end
end 

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: Clique Fights
« Reply #22 on: June 17, 2013, 11:47:32 AM »
I'll have to correct your code in one part:

Ped1 = PedCreateXYZ(91, 510, 500, 19.60971009)
Ped2 = PedCreateXYZ(47, 510, 501, 19.60971009)
Ped3 = PedCreateXYZ(46, 510, 502, 19.60971009)
Ped4 = PedCreateXYZ(45, 510, 503, 19.60971009)
Ped5 = PedCreateXYZ(43, 510, 504, 19.60971009)
Ped6 = PedCreateXYZ(41, 510, 505, 19.60971009)
Ped7 = PedCreateXYZ(44, 510, 506, 19.60971009)
Ped8 = PedCreateXYZ(42, 510, 507, 19.60971009)
Ped9 = PedCreateXYZ(75, 530, 500, 19.60971009)
Ped10 = PedCreateXYZ(99, 530, 501, 19.60971009)
Ped11 = PedCreateXYZ(85, 530, 502, 19.60971009)
Ped12 = PedCreateXYZ(145, 530, 503, 19.60971009)
Ped13 = PedCreateXYZ(146, 530, 504, 19.60971009)
Ped14 = PedCreateXYZ(147, 530, 505, 19.60971009)
Ped15 = PedCreateXYZ(102, 530, 506, 19.60971009)

Once you've created a local (i.e. local Ped1 = nil), you don't need to write "local" again when defining the local. "local" is just used to create a new local. But when you define it, it's not needed.