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


Show Posts

* Messages | Topics | Attachments

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - HairyButtNugget

Pages: [1]
1
Requests / Re: A Fix for the game on Windows 10.
« on: September 25, 2016, 03:51:42 AM »
I found that forcing the game to run in older DirectX helped the game run for a bit longer before crashing. In steam right click Bully and select properties. Then set the launch options to "-force-d3d10" (without quotations). This forces the game to run in DirectX 10 instead of 12. You can also try DX9.

Credit : http://www.speedrun.com/Bully_Scholarship_Edition/thread/1lnkp

2
Modding Questions/Help Archives / Re: Stealth Missions?
« on: September 24, 2016, 06:51:16 PM »
Yeah, that's the sort of mission I am thinking of. But I have no idea how to do it  :laugh:

3
Modding Questions/Help Archives / Stealth Missions?
« on: September 24, 2016, 01:36:29 PM »
Hi. I'm new to modding bully so i was going over ideas for my first mission mod. I thought of making a stealth style mission with cones of sight on the mini-map etc but I'm not sure if its possible. I don't think I have ever seen it been done before. Does anyone know if it is possible to do and if so how to do it?

Thanks  :)

4
LUA Scripting Help / Re: Help with PedIsInAreaXYZ
« on: August 21, 2016, 11:35:26 AM »
'Blip' part explanation:
0 = no blip
1 = blip (yellow)
2 = arrow (blue)
and so on
You can try it yourself, just change the blip number
BTW this PedIsInAreaXYZ(ped, X, Y, Z, Radius, Blip) code, work pretty unique, if you reach the designated area, the blip will be automatically deleted
so you don't need an extra code to delete the blip

But, if you want to create your own blip & delete it, you can use this code
BlipAddXYZ & BlipRemove
for more information read this thread:
http://bully-board.com/index.php?topic=22886.0

Oh ok. Thank you. I was just looking up how to add maps blips.

Cheers

5
LUA Scripting Help / Re: Help with PedIsInAreaXYZ
« on: August 21, 2016, 10:16:13 AM »
Code: [Select]
MissionSetup = function()
PlayerSetHealth(200)
AreaTransitionXYZ(0,270, -110, 7)
Gary = PedCreateXYZ(130,275, -110, 7)
end

MissionCleanup = function()
end

function main()
Mission1()

repeat

Wait(0)
until not PedIsValid(gPlayer) or PedIsDead(gPlayer)
end


Mission1 = function()
repeat
Wait(0)
until PedIsInAreaXYZ(gPlayer, 275, -110, 7, 1, 1)
TextPrintString("Gary: Marry Me, Jimmy!!!", 3, 2)
PedAttackPlayer(Gary,3)
PedSetPedToTypeAttitude(Gary,13,0)
end

Your mistakes:
  • You used wait(0) (lowercase w), the correct one is Wait(0) (uppercase W)
    Lua is extremely sensitive with lowercase & uppercase
  • You missed some part of this PedIsInAreaXYZ code
    PedIsInAreaXYZ(ped, X, Y, Z, Radius, Blip)
    eg. PedIsInAreaXYZ(gPlayer, 275, -110, 7, 1, 1)

Thanks for the help. Do you mind explaining what the 'Blip' part means/does? I'm new to all of this :)

6
LUA Scripting Help / Re: Help with PedIsInAreaXYZ
« on: August 21, 2016, 10:14:07 AM »
Here's a new script that'll do what you're looking for with comments explaining it. (The lines starting with -- are comments and are ignored when the script runs).

Code: [Select]
-- Setup/cleanup:
function MissionSetup()
  -- Set the player's position outside:
  PlayerSetPosXYZArea(270,-110,6,0) -- args for this are similar to AreaTransitionXYZ, but it instead takes the area code (0 for outside) last.
 
  -- Create Gary:
  -- While it is entirely up to you how you name variables, we name this one starting with a "g" to indicate it is not a local variable (but is global instead).
  gGary = PedCreateXYZ(130,271,-73,5.9)
 
  -- Wait for the area to load before continuing (we switched to a new area using PlayerSetPosXYZArea).
  while AreaIsLoading() do
    Wait(0)
  end
end
function MissionCleanup()
 
end

-- Main:
function main()
  -- Get Gary's current position and store them in x, y, and z. These variables are also created as local variables, so they can't be used in another function.
  local x,y,z = PedGetPosXYZ(gGary)
 
  -- Wait for the player to be near Gary
  while not PedIsInAreaXYZ(gPlayer,x,y,z,10) do -- call "PedIsInAreaXYZ", check if it returns false, and if so run the lines between "do" and "end"
    Wait(0) -- suspend the script for one frame (0 ms) so other scripts can run and so the game can run (the game is completely frozen until your script waits)
    x,y,z = PedGetPosXYZ(gGary) -- Update the value of x, y, and z incase Gary moved somehow.
  end
 
  -- Show "Success!" after the while loop above has completed, note that the while loop will continue to run until "PedIsInAreaXYZ" returns true.
  TextPrintString("Success!",3,1) -- show the text for 3 seconds
  Wait(3000) -- wait 3 seconds (3000 ms) for the text to go away
end

It's also important to know how the script will run. First, the script will be read from start to finish running any code it finds that isn't contained in a function. If it reads code that is in a function, that function will simply be put into memory so it can be called later. For Bully, it is sort of convention that you don't really call anything outside of any functions, but it's totally up to you how you want to do your scripts. You do at least need a few functions though, as after the script gets read from start to finish normally, Bully will call a few functions from your script. For mission scripts (such as ArcRace1.lur, what I assume you're using here), MissionSetup will be called first, then main after that finishes, and MissionCleanup when the mission ends.

Thank you so much. I understand a lot better how everything works now. I was struggling with using while loops before because i kept getting mixed up with the 'end's so i couldn't end the function properly. So i tried creating a way around it with the code i made before.

Thanks for the help!

7
LUA Scripting Help / Help with PedIsInAreaXYZ
« on: August 20, 2016, 06:07:54 AM »
Hi there. I am very new to modding (only started yesterday) but i have some simple coding experience in python. I want to learn how to mod bully. I learned the basics of how to spawn peds and setting player health etc and I am trying to learn how to make a mission but i cant get the "PedIsInAreaXYZ" command to work properly. I have been changing and adapting my code for many hours but cannot get it to work.

Here is the code at the moment:

Code: [Select]
MissionSetup = function()
PlayerSetHealth(200)
AreaTransitionXYZ(0,270,-110,6.000000953674)
Gary = PedCreateXYZ(130,271,-73,5.992765495)
end

MissionCleanup = function()
end

function main()
repeat
Mission1()
wait(0)
until not Alive
end

Mission1 = function()
if PedIsInAreaXYZ(gPlayer,271,-73,5.992765495,10) then
TextPrintString("Success", 5, 1)
else main()
end
end

I tried to make the code constantly check if the player is in range of Gary by making the main function keep running the "Mission1" function.

I want the code to work like this:

1. Gary spawns at co-ordinates.
2. Player walks over to Gary.
3. Text "Success" is shown.

If anyone can give me some help i would really appreciate it :).

P.S. Sorry if the problem is extremely simple. I'm very new and couldn't find any help anywhere on the internet.

Pages: [1]