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


Author Topic: Working on Bully SE: Local Multiplayer v3  (Read 5941 times)

0 Members and 3 Guests are viewing this topic.

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Working on Bully SE: Local Multiplayer v3
« on: December 16, 2015, 05:51:57 AM »
so im starting to work with this mod again. i have to fix some bugs. so if any of u all can help me, thank u.so im gonna ask a few questions. i need help fixing jumping. when i press jump button repeatedly, it will fly. so anyone can help me with that? anyone has running grapple node? how to fix all bugs that has on local multiplayer v2.5?

Offline DarkHero

  • Developer
  • Full Member
  • ***
  • Posts: 155
  • Gender: Male
  • Bully Modder
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #1 on: December 16, 2015, 07:32:40 AM »
I could help you fix the Nodes, if you want to help, just send me PM me and we can talk more about this. I'm no expert on this, but I can help you the maximum I can, because the Local Multiplayer Mod was one of the best mods I've played.
« Last Edit: December 16, 2015, 07:36:56 AM by DarkHero »

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #2 on: December 16, 2015, 08:48:16 AM »
I could help you fix the Nodes, if you want to help, just send me PM me and we can talk more about this. I'm no expert on this, but I can help you the maximum I can, because the Local Multiplayer Mod was one of the best mods I've played.
thank u. and wat can u help me with?

Offline DarkHero

  • Developer
  • Full Member
  • ***
  • Posts: 155
  • Gender: Male
  • Bully Modder
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #3 on: December 16, 2015, 08:57:35 AM »
I could help you fix the Nodes, if you want to help, just send me PM me and we can talk more about this. I'm no expert on this, but I can help you the maximum I can, because the Local Multiplayer Mod was one of the best mods I've played.
thank u. and wat can u help me with?
Yes.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #4 on: December 16, 2015, 01:08:15 PM »
Check that the player is playing "Default_KEY" before allowing anything.

For example...

Code: [Select]
while true do
  if PedMePlaying(gPlayer,"Default_KEY") then
    if IsButtonBeingPressed(8,0) then
      -- jump
    elseif IsButtonBeingPressed(9,0) then
      -- grapple attempt
    end
  end
  Wait(0)
end
« Last Edit: December 17, 2015, 11:26:36 AM by DaBOSS54320 »

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #5 on: December 16, 2015, 10:50:20 PM »
Check that the player is playing "Default_KEY" before allowing anything.

For example...

while true do
  if PedMePlaying(gPlayer,"Default_KEY") then
    if IsButtonBeingPressed(8,0) then
      -- jump
    elseif IsButtonBeingPressed(9,0) then
      -- grapple attempt
    end
  end
  Wait(0)
end
hmmm i might try that

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #6 on: December 16, 2015, 11:26:24 PM »
Check that the player is playing "Default_KEY" before allowing anything.

For example...

while true do
  if PedMePlaying(gPlayer,"Default_KEY") then
    if IsButtonBeingPressed(8,0) then
      -- jump
    elseif IsButtonBeingPressed(9,0) then
      -- grapple attempt
    end
  end
  Wait(0)
end
im afraid that crashed my game

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #7 on: December 16, 2015, 11:51:46 PM »
Send me your whole script if you want me to take a look, maybe I can find the issue. You might want to use pastebin.com since BB's code tag doesn't always format code correctly.

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #8 on: December 17, 2015, 12:30:04 AM »
Send me your whole script if you want me to take a look, maybe I can find the issue. You might want to use pastebin.com since BB's code tag doesn't always format code correctly.
here u go : http://pastebin.com/qE1z5Lz0

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #9 on: December 17, 2015, 12:33:23 AM »
Send me your whole script if you want me to take a look, maybe I can find the issue. You might want to use pastebin.com since BB's code tag doesn't always format code correctly.
pasta bin removes tabs when not in the RAW paste data.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #10 on: December 17, 2015, 11:26:16 AM »
In the start of main...

Code: [Select]
  local safehouse = CreateThread("F_Safehouses")
  local model = CreateThread("F_SelectModels")
  repeat
  TextPrintString("~BULLY_CREST~ ~dleft~/~dright~ = Switch models ~BULLY_CREST~ - ~BULLY_CREST~ ~TAG_START~ - Select model - ~BULLY_CREST~ ~ATTACK~ - Winter Outfit ~BULLY_CREST~",1,2)
  TextPrintString("~BULLY_CREST~ Local Multiplayer Mod v3 by UltimateGamer9 ~BULLY_CREST~",1,1)
  F_SetupModels()
  F_SetupModels2()
  Wait(0)
  until IsButtonBeingPressed(7,1) and IsButtonBeingPressed(7,0)

I really suggest adding a Wait(500) before all of that so the game has some time to initialize (since STimeCycle starts before the game is even finished initializing), and additionally a huge problem is that you call F_SetupModels and F_SetupModels2 repeatedly. To begin with, it already seems like a waste of memory to set up 2 tables with the same contents, but even worse you add to them repeatedly every single frame! Since there are 258 peds, and you add all the peds to 2 tables every frame, that means 516 things are getting added to memory every single frame! On top of that, every table you add seems to hold 2 string values, we're gonna say on average maybe 15 bytes for each table since there's 2 strings? (Although there is probably more...). Now that means that 7,740 bytes (over 7 kilobytes) are being added to memory every frame, and with the game running at 30 frames per second, that means 232,200 bytes (232.2 kb) are being added to memory every second. So... yeah, the game will probably crash from memory limitations.

I kinda got carried away with numbers there so lemme just summarize it for you:
 Add Wait(500) to the start of your main function, this will give the game time to initialize before your script starts doing crap.
 Only set up your tables one time, not repeatedly. Take the calls to F_SetupModels and F_SetupModels2 out of that repeat loop. Also F_SetupWeapons in the other repeat loop.

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #11 on: December 17, 2015, 08:06:49 PM »
In the start of main...

Code: [Select]
  local safehouse = CreateThread("F_Safehouses")
  local model = CreateThread("F_SelectModels")
  repeat
  TextPrintString("~BULLY_CREST~ ~dleft~/~dright~ = Switch models ~BULLY_CREST~ - ~BULLY_CREST~ ~TAG_START~ - Select model - ~BULLY_CREST~ ~ATTACK~ - Winter Outfit ~BULLY_CREST~",1,2)
  TextPrintString("~BULLY_CREST~ Local Multiplayer Mod v3 by UltimateGamer9 ~BULLY_CREST~",1,1)
  F_SetupModels()
  F_SetupModels2()
  Wait(0)
  until IsButtonBeingPressed(7,1) and IsButtonBeingPressed(7,0)

I really suggest adding a Wait(500) before all of that so the game has some time to initialize (since STimeCycle starts before the game is even finished initializing), and additionally a huge problem is that you call F_SetupModels and F_SetupModels2 repeatedly. To begin with, it already seems like a waste of memory to set up 2 tables with the same contents, but even worse you add to them repeatedly every single frame! Since there are 258 peds, and you add all the peds to 2 tables every frame, that means 516 things are getting added to memory every single frame! On top of that, every table you add seems to hold 2 string values, we're gonna say on average maybe 15 bytes for each table since there's 2 strings? (Although there is probably more...). Now that means that 7,740 bytes (over 7 kilobytes) are being added to memory every frame, and with the game running at 30 frames per second, that means 232,200 bytes (232.2 kb) are being added to memory every second. So... yeah, the game will probably crash from memory limitations.

I kinda got carried away with numbers there so lemme just summarize it for you:
 Add Wait(500) to the start of your main function, this will give the game time to initialize before your script starts doing crap.
 Only set up your tables one time, not repeatedly. Take the calls to F_SetupModels and F_SetupModels2 out of that repeat loop. Also F_SetupWeapons in the other repeat loop.
but when i don't put
Code: [Select]
if PedMePlaying(gPlayer,"Default_KEY") then
it doesn't crash my game. when i put it, it crashes.

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #12 on: December 18, 2015, 08:37:59 AM »
In the start of main...

Code: [Select]
  local safehouse = CreateThread("F_Safehouses")
  local model = CreateThread("F_SelectModels")
  repeat
  TextPrintString("~BULLY_CREST~ ~dleft~/~dright~ = Switch models ~BULLY_CREST~ - ~BULLY_CREST~ ~TAG_START~ - Select model - ~BULLY_CREST~ ~ATTACK~ - Winter Outfit ~BULLY_CREST~",1,2)
  TextPrintString("~BULLY_CREST~ Local Multiplayer Mod v3 by UltimateGamer9 ~BULLY_CREST~",1,1)
  F_SetupModels()
  F_SetupModels2()
  Wait(0)
  until IsButtonBeingPressed(7,1) and IsButtonBeingPressed(7,0)

I really suggest adding a Wait(500) before all of that so the game has some time to initialize (since STimeCycle starts before the game is even finished initializing), and additionally a huge problem is that you call F_SetupModels and F_SetupModels2 repeatedly. To begin with, it already seems like a waste of memory to set up 2 tables with the same contents, but even worse you add to them repeatedly every single frame! Since there are 258 peds, and you add all the peds to 2 tables every frame, that means 516 things are getting added to memory every single frame! On top of that, every table you add seems to hold 2 string values, we're gonna say on average maybe 15 bytes for each table since there's 2 strings? (Although there is probably more...). Now that means that 7,740 bytes (over 7 kilobytes) are being added to memory every frame, and with the game running at 30 frames per second, that means 232,200 bytes (232.2 kb) are being added to memory every second. So... yeah, the game will probably crash from memory limitations.

I kinda got carried away with numbers there so lemme just summarize it for you:
 Add Wait(500) to the start of your main function, this will give the game time to initialize before your script starts doing crap.
 Only set up your tables one time, not repeatedly. Take the calls to F_SetupModels and F_SetupModels2 out of that repeat loop. Also F_SetupWeapons in the other repeat loop.
wow, adding a wait(500) isn't a bad idea. and it just fixed a bug! i had a bug that needs to reload save game so it can run the model select but now, that bug has been fixed.

Offline nicefunfungirl

  • Jr. Member
  • **
  • Posts: 57
  • Gender: Female
    • View Profile
Re: Working on Bully SE: Local Multiplayer v3
« Reply #13 on: December 19, 2015, 10:53:15 AM »
In the start of main...

Code: [Select]
  local safehouse = CreateThread("F_Safehouses")
  local model = CreateThread("F_SelectModels")
  repeat
  TextPrintString("~BULLY_CREST~ ~dleft~/~dright~ = Switch models ~BULLY_CREST~ - ~BULLY_CREST~ ~TAG_START~ - Select model - ~BULLY_CREST~ ~ATTACK~ - Winter Outfit ~BULLY_CREST~",1,2)
  TextPrintString("~BULLY_CREST~ Local Multiplayer Mod v3 by UltimateGamer9 ~BULLY_CREST~",1,1)
  F_SetupModels()
  F_SetupModels2()
  Wait(0)
  until IsButtonBeingPressed(7,1) and IsButtonBeingPressed(7,0)

I really suggest adding a Wait(500) before all of that so the game has some time to initialize (since STimeCycle starts before the game is even finished initializing), and additionally a huge problem is that you call F_SetupModels and F_SetupModels2 repeatedly. To begin with, it already seems like a waste of memory to set up 2 tables with the same contents, but even worse you add to them repeatedly every single frame! Since there are 258 peds, and you add all the peds to 2 tables every frame, that means 516 things are getting added to memory every single frame! On top of that, every table you add seems to hold 2 string values, we're gonna say on average maybe 15 bytes for each table since there's 2 strings? (Although there is probably more...). Now that means that 7,740 bytes (over 7 kilobytes) are being added to memory every frame, and with the game running at 30 frames per second, that means 232,200 bytes (232.2 kb) are being added to memory every second. So... yeah, the game will probably crash from memory limitations.

I kinda got carried away with numbers there so lemme just summarize it for you:
 Add Wait(500) to the start of your main function, this will give the game time to initialize before your script starts doing crap.
 Only set up your tables one time, not repeatedly. Take the calls to F_SetupModels and F_SetupModels2 out of that repeat loop. Also F_SetupWeapons in the other repeat loop.
wow, adding a wait(500) isn't a bad idea. and it just fixed a bug! i had a bug that needs to reload save game so it can run the model select but now, that bug has been fixed.

WOOP WOOP!