Bully-Board

Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: 3gtheepic on September 18, 2016, 06:59:54 PM

Title: Loading
Post by: 3gtheepic on September 18, 2016, 06:59:54 PM
I am currently trying to make my own mission mod and whenever I try to test it by going to the arcade game, the game just infinitely loads. How to fix?
Title: Re: Loading
Post by: 3gtheepic on September 18, 2016, 08:17:43 PM
I'll try both. Thanks, DABOSS!
Title: Re: Loading
Post by: 3gtheepic on September 19, 2016, 06:36:55 PM
But where do I put the functions?
Title: Re: Loading
Post by: Rambo7 on September 20, 2016, 12:07:19 AM
Code: [Select]
MissionSetup = function()
  AreaTransitionXYZ(0, 270, -110, 7) -- Put it right here
end

MissionCleanup = function()
end

function main()
  repeat
    Wait(0)
  until not PedIsValid(gPlayer) or PedIsDead(gPlayer)
end
Title: Re: Loading
Post by: 3gtheepic on September 21, 2016, 05:47:50 PM
Thanks for all your help, but unfortunately none of these worked. :-(
Title: Re: Loading
Post by: 3gtheepic on September 21, 2016, 08:31:16 PM
Wait, BOY am I dumb. I kept forgetting to put the area code in AreaTransitionXYZ().  Thanks guys for your help!!!!!
Title: Re: Loading
Post by: AlphaTech on September 22, 2016, 02:42:00 AM
Hey dude welcome to the board and here's a bit of info on how to mod and make a mission. I haven't been around in a while busy working but I have my f_cking files this time  >:(. So i'll give you a post I made on mission modding. One is a test mission script and the other a tutorial. 

http://bully-board.com/index.php?topic=22996.msg394002#msg394002

http://bully-board.com/index.php?topic=22975.msg393727#msg393727

To correct this blip tutorial here is a stealth script

Code: [Select]
local l_0_0 = {}
local l_0_1 = false
local l_0_2 = true
local l_0_3 = true
 
MissionSetup = function()
  DATLoad("SpawnTest.DAT", 2)
  DATInit()
  AreaTransitionPoint(22, POINTLIST._ST_PLAYER)
  AreaOverridePopulation(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  {id = nil, point = POINTLIST._ST_COP, model = 83}.path = PATH._ST_COP
  {id = nil, point = POINTLIST._ST_COP, model = 83}.path2 = PATH._ST_COP2
  {id = nil, point = POINTLIST._ST_COP, model = 83}.path3 = PATH._ST_COP3
  l_0_0 = AreaOverridePopulation
  ItemSetCurrentNum(370, 10)
end
 
MissionCleanup = function()
  DATUnload(2)
  AreaRevertToDefaultPopulation()
end
 
main = function()
  local l_3_0 = nil
  local l_3_1 = BlipAddXYZ(-100, 56, 26, 0, 1)
  RadarSetIndoorRange(20)
  for l_3_5 = l_0_0, nil, nil do
    l_3_5.id = PedCreatePoint(l_3_5.model, l_3_5.point)
    PedSetStealthBehavior(l_3_5.id, 1, F_OnSightCallback, F_OnHearCallback)
    PedSetStealthVisionHeight(l_3_5.id, 0.5)
    l_3_0 = l_3_5.id
  end
  while 1 do
    if l_0_1 then
      TextPrintString("Press ~x~ to make cop stop.", 0.10000000149012, 2)
    else
      TextPrintString("Press ~x~ to make cop patrol, ~t~ to reset props, ~o~ to return to start.", 0.10000000149012, 2)
    end
    if IsButtonPressed(7, 0) then
      PedAttack(l_3_0, gPlayer, 3)
      Wait(500)
    elseif IsButtonPressed(6, 0) then
      if l_0_1 then
        F_StopPeds()
      else
        F_MovePeds(0)
      end
      Wait(500)
    elseif IsButtonPressed(8, 0) then
      Wait(500)
    elseif IsButtonPressed(9, 0) then
      Wait(500)
    end
    Wait(0)
  end
end
 
F_OnHearCallback = function(l_4_0)
end
 
F_OnSightCallback = function(l_5_0)
end
 
F_MovePeds = function(l_6_0)
  for l_6_4 = l_0_0, nil, nil do
    if l_6_4.id ~= nil then
      PedFollowPath(l_6_4.id, l_6_4.path, 2, l_6_0, F_T1, 0, F_T2, F_T3)
    end
  end
  l_0_1 = true
end
 
F_T1 = function(l_7_0, l_7_1, l_7_2)
end
 
F_T2 = function(l_8_0, l_8_1, l_8_2)
end
 
F_T3 = function(l_9_0, l_9_1, l_9_2, l_9_3)
end
 
F_StopPeds = function()
  for l_10_3 = l_0_0, nil, nil do
    if l_10_3.id ~= nil then
      PedStop(l_10_3.id)
    end
  end
  l_0_1 = false
end
 
F_ReturnToStart = function()
  for l_11_3 = l_0_0, nil, nil do
    if l_11_3.id ~= nil then
      PedMoveToPoint(l_11_3.id, 0, l_11_3.point)
    end
  end
  l_0_1 = false
end
 
F_RestoreProps = function()
  if PAnimIsDestroyed(TRIGGER._ST_CRATE_01) then
    PAnimCreate(TRIGGER._ST_CRATE_01)
  end
  if PAnimIsDestroyed(TRIGGER._ST_CRATE_02) then
    PAnimCreate(TRIGGER._ST_CRATE_02)
  end
  if PAnimIsDestroyed(TRIGGER._ST_CRATE_03) then
    PAnimCreate(TRIGGER._ST_CRATE_03)
  end
end
Title: Re: Loading
Post by: 3gtheepic on September 22, 2016, 06:38:07 PM
Hey dude welcome to the board and here's a bit of info on how to mod and make a mission. I haven't been around in a while busy working but I have my f_cking files this time  >:(. So i'll give you a post I made on mission modding. One is a test mission script and the other a tutorial. 

http://bully-board.com/index.php?topic=22996.msg394002#msg394002

http://bully-board.com/index.php?topic=22975.msg393727#msg393727

To correct this blip tutorial here is a stealth script

Code: [Select]
local l_0_0 = {}
local l_0_1 = false
local l_0_2 = true
local l_0_3 = true
 
MissionSetup = function()
  DATLoad("SpawnTest.DAT", 2)
  DATInit()
  AreaTransitionPoint(22, POINTLIST._ST_PLAYER)
  AreaOverridePopulation(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  {id = nil, point = POINTLIST._ST_COP, model = 83}.path = PATH._ST_COP
  {id = nil, point = POINTLIST._ST_COP, model = 83}.path2 = PATH._ST_COP2
  {id = nil, point = POINTLIST._ST_COP, model = 83}.path3 = PATH._ST_COP3
  l_0_0 = AreaOverridePopulation
  ItemSetCurrentNum(370, 10)
end
 
MissionCleanup = function()
  DATUnload(2)
  AreaRevertToDefaultPopulation()
end
 
main = function()
  local l_3_0 = nil
  local l_3_1 = BlipAddXYZ(-100, 56, 26, 0, 1)
  RadarSetIndoorRange(20)
  for l_3_5 = l_0_0, nil, nil do
    l_3_5.id = PedCreatePoint(l_3_5.model, l_3_5.point)
    PedSetStealthBehavior(l_3_5.id, 1, F_OnSightCallback, F_OnHearCallback)
    PedSetStealthVisionHeight(l_3_5.id, 0.5)
    l_3_0 = l_3_5.id
  end
  while 1 do
    if l_0_1 then
      TextPrintString("Press ~x~ to make cop stop.", 0.10000000149012, 2)
    else
      TextPrintString("Press ~x~ to make cop patrol, ~t~ to reset props, ~o~ to return to start.", 0.10000000149012, 2)
    end
    if IsButtonPressed(7, 0) then
      PedAttack(l_3_0, gPlayer, 3)
      Wait(500)
    elseif IsButtonPressed(6, 0) then
      if l_0_1 then
        F_StopPeds()
      else
        F_MovePeds(0)
      end
      Wait(500)
    elseif IsButtonPressed(8, 0) then
      Wait(500)
    elseif IsButtonPressed(9, 0) then
      Wait(500)
    end
    Wait(0)
  end
end
 
F_OnHearCallback = function(l_4_0)
end
 
F_OnSightCallback = function(l_5_0)
end
 
F_MovePeds = function(l_6_0)
  for l_6_4 = l_0_0, nil, nil do
    if l_6_4.id ~= nil then
      PedFollowPath(l_6_4.id, l_6_4.path, 2, l_6_0, F_T1, 0, F_T2, F_T3)
    end
  end
  l_0_1 = true






end
 
F_T1 = function(l_7_0, l_7_1, l_7_2)
end
 
F_T2 = function(l_8_0, l_8_1, l_8_2)
end
 
F_T3 = function(l_9_0, l_9_1, l_9_2, l_9_3)
end
 
F_StopPeds = function()
  for l_10_3 = l_0_0, nil, nil do
    if l_10_3.id ~= nil then
      PedStop(l_10_3.id)
    end
  end
  l_0_1 = false
end
 
F_ReturnToStart = function()
  for l_11_3 = l_0_0, nil, nil do
    if l_11_3.id ~= nil then
      PedMoveToPoint(l_11_3.id, 0, l_11_3.point)
    end
  end
  l_0_1 = false
end
 
F_RestoreProps = function()
  if PAnimIsDestroyed(TRIGGER._ST_CRATE_01) then
    PAnimCreate(TRIGGER._ST_CRATE_01)
  end
  if PAnimIsDestroyed(TRIGGER._ST_CRATE_02) then
    PAnimCreate(TRIGGER._ST_CRATE_02)
  end
  if PAnimIsDestroyed(TRIGGER._ST_CRATE_03) then
    PAnimCreate(TRIGGER._ST_CRATE_03)
  end
end


Thanks, ill go check it out. I think you released alot of bully scripts so I think that might help. Thanks for all your guys help!!!