Bully-Board
Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started 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?
-
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).
-
I'll try both. Thanks, DABOSS!
-
But where do I put the functions?
-
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
-
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).
-
Thanks for all your help, but unfortunately none of these worked. :-(
-
Lemme see ya script.
-
Wait, BOY am I dumb. I kept forgetting to put the area code in AreaTransitionXYZ(). Thanks guys for your help!!!!!
-
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
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
-
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
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!!!