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


Author Topic: Loading  (Read 3877 times)

0 Members and 1 Guest are viewing this topic.

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Loading
« 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?

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Loading
« Reply #1 on: September 18, 2016, 08:16:26 PM »
When you start the arcade machine, the screen is faded out (black). If the camera is faded out too long, the loading screen will show up until it is unfaded. You have two options, either call the CameraFade function yourself to unfade it, or transition to a new area as that also unfades the camera. Try using PlayerSetPosXYZArea(270,-110,6,0).

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Re: Loading
« Reply #2 on: September 18, 2016, 08:17:43 PM »
I'll try both. Thanks, DABOSS!
« Last Edit: September 19, 2016, 06:36:24 PM by 3gtheepic »

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Re: Loading
« Reply #3 on: September 19, 2016, 06:36:55 PM »
But where do I put the functions?

Offline Rambo7

  • "Awesomely Kick-Ass Troll"
  • Full Member
  • ***
  • Posts: 404
  • Gender: Male
  • #ZAMBess
    • View Profile
    • My ModDB Page
Re: Loading
« Reply #4 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
« Last Edit: September 20, 2016, 12:10:04 AM by Rambo7 »

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Loading
« Reply #5 on: September 20, 2016, 10:28:43 AM »
Important note of what all the 3 functions mentioned do and how they work.

PlayerSetPosXYZArea(x,y,z,area) is a C function (so straight from Bully.exe) that will set the player's position and set the current area. It will not wait for the area to load.
AreaTransitionXYZ(area,x,y,z) is a scripted LUA function (from another script that your script has access to) that calls the former function but waits for the area to load before the script moves on.
CameraFade(ms,in) is a C function that will fade the camera in or out, the first argument is how long it takes, and the second is if it is fading in or out. 1 = in (game), 0 = out (black).

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Re: Loading
« Reply #6 on: September 21, 2016, 05:47:50 PM »
Thanks for all your help, but unfortunately none of these worked. :-(

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Loading
« Reply #7 on: September 21, 2016, 08:02:53 PM »
Lemme see ya script.

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Re: Loading
« Reply #8 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!!!!!

Offline AlphaTech

  • LostInSpace
  • Sr. Member
  • ***
  • Posts: 758
  • Gender: Male
  • The name's AlphaTECH, whatca need help with?! :)
    • View Profile
Re: Loading
« Reply #9 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
« Last Edit: September 22, 2016, 02:49:49 AM by AlphaTech »

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Re: Loading
« Reply #10 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!!!