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 - ilovekittens

Pages: [1]
1
Modding Questions/Help / Re: How to use sigma in lua scripts
« on: December 23, 2021, 03:04:27 AM »
Why would you want to do that? You want the text to display in game? I don't think the default Bully fonts support that character.

2
Modding Questions/Help / Re: Why can't I spawn the school bus?
« on: December 23, 2021, 03:01:10 AM »
Code: [Select]
CreatePersistentEntity("ScoolBus")

There's more to that function than just the string. I recommend using the number ID for any prop, but we'll stick to "ScoolBus" for this example:

Code: [Select]
CreatePersistentEntity("ScoolBus", x, y, z, rotationInDegrees, areacode)
For areacode you should just use AreaGetVisible() and it'll use whatever area is currently loaded

3
Modding Questions/Help / Re: CreatePersistentEntity
« on: December 23, 2021, 02:58:57 AM »
The name of the props is just their name in World.img.
the best place to look is in the Objects folder actually. Here is my list of spawnable entities from a menu I'm working on: https://pastebin.com/9mZEsmT8

4
Mod Releases / On Screen Typing [LUA]
« on: December 23, 2021, 02:47:55 AM »
This is my first modding related post in many years, but I'm very excited to show you guys this on-screen-typing system (or whatever you wanna call it)

It's not as good as being able to just type with your keyboard, but it's probably the best way to go about this completely in LUA script modding without creating any scripthooks or anything fancy like that.

Video demo:
https://youtu.be/9k7CZZMrZ14

Source:
Code: [Select]
--[[
--control scheme--
dpad up/down: scroll through letters
left/right weapon wheel: change case
dpad left: backspace
dpad right: next character
grapple: insert an underscore (_)
sprint: confirm text
]]

function main()
Wait(1000)
while true do
if IsButtonBeingPressed(3, 0) and not gTyping then
typing_typedStuff = F_OnScreenTyping("text: ") -- no args are necessary here, but you can optionally put a string of text here to display before the typing string
TextPrintString("typing finished", 2, 1)
elseif IsButtonBeingPressed(1, 0) and not gTyping and typing_typedStuff ~= nil then
TextPrintString("You typed: "..typing_typedStuff, 4, 1)
end
Wait(0)
end
end

typing_chars = {
{"a", "A"},
{"b", "B"},
{"c", "C"},
{"d", "D"},
{"e", "E"},
{"f", "F"},
{"g", "G"},
{"h", "H"},
{"i", "I"},
{"j", "J"},
{"k", "K"},
{"l", "L"},
{"m", "M"},
{"n", "N"},
{"o", "O"},
{"p", "P"},
{"q", "Q"},
{"r", "R"},
{"s", "S"},
{"t", "T"},
{"u", "U"},
{"v", "V"},
{"w", "W"},
{"r", "R"},
{"x", "X"},
{"y", "Y"},
{"z", "Z"},
{"1", "1"},
{"2", "2"},
{"3", "3"},
{"4", "4"},
{"5", "5"},
{"6", "6"},
{"7", "7"},
{"8", "8"},
{"9", "9"},
{"0", "0"},
}
typing_chars.n = table.getn(typing_chars)
gTyping = false
function F_OnScreenTyping(txt)
gTyping = true
typing_case = 1
typing_typed = {}
typing_typed.n = table.getn(typing_typed)
typing_index = 1
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_str = typing_typed[1]
PlayerWeaponHudLock(true) -- Optional, but I recommend this because the weapon wheel buttons will be used to change the letter case
repeat
F_PreventDPadUpFromZoomingIn()

-- Change case:
if IsButtonBeingPressed(11, 0) then
typing_case = 1
table.remove(typing_typed, typing_typed.n)
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_conc()
elseif IsButtonBeingPressed(13, 0) then
typing_case = 2
table.remove(typing_typed, typing_typed.n)
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_conc()
end

-- Select character:
if IsButtonBeingPressed(1, 0) then
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_conc()
elseif IsButtonBeingPressed(0, 0) and typing_typed.n > 1 then
table.remove(typing_typed, typing_typed.n)
typing_conc()
end

-- Change character:
if F_IsButtonBeingPressed(2, 0) then
typing_index = typing_index - 1
if typing_index < 1 then
typing_index = typing_chars.n
end
table.remove(typing_typed, typing_typed.n)
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_conc()
elseif F_IsButtonBeingPressed(3, 0) then
typing_index = typing_index + 1
if typing_index > typing_chars.n then
typing_index = 1
end
table.remove(typing_typed, typing_typed.n)
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_conc()
end

-- Insert an underscore:
if IsButtonBeingPressed(9, 0) then
table.insert(typing_typed, "_")
table.insert(typing_typed, typing_chars[typing_index][typing_case])
typing_conc()
end

-- Display text:
TextPrintString((txt and txt or "")..typing_str.."<", 1, 1)
Wait(0)
until IsButtonBeingPressed(7, 0)
gTyping = false
PlayerWeaponHudLock(false)
return typing_str
end

-- Concatenate strings from table:
function typing_conc()
typing_str = nil
for i = 1, typing_typed.n do
if typing_str == nil then
typing_str = typing_typed[1]
else
typing_str = typing_str..typing_typed[i]
end
end
end

function F_PreventDPadUpFromZoomingIn()
if IsButtonBeingReleased(2, 0) then
CameraAllowChange(false)
Wait(0)
CameraAllowChange(true)
end
end

gButtons = {}
function F_IsButtonBeingPressed(b, c)
if IsButtonBeingPressed(b, c) then
gButtons[b] = GetTimer()
return true
elseif IsButtonPressed(b, c) and gButtons[b] ~= nil then
return GetTimer() - gButtons[b] > 500
else
gButtons[b] = nil
return false
end
end

I commented just about everything I felt needed explaining. This example script isn't really intended to be run alone, but my intention of this post for you to be able to use the functions in it in your own script mods if you know what you're doing.
When you call the F_OnScreenTyping function, you should set a variable to be equal to it like I did in the script.
Code: [Select]
typedStuff = F_OnScreenTyping()After this line, typedStuff will hold a string of whatever you typed.

You can add more characters to the "typing_chars" table, as many as you want. I didn't include any characters other than numbers and letters because I originally scripted this system to type out file names to save bike races and spawned objects to in my trainer.

If you have any questions, leave a reply.  :cool:

5
Bully 1 Discussion / Re: 12 years!
« on: October 14, 2021, 01:04:37 AM »
i remember typing on this forum as a kid

6
Bully 1 Discussion / Re: Irc-Channel
« on: September 02, 2021, 04:35:07 AM »
Daaamn almost 15 years!

7
Mod Showroom / ilovekittens trainer showcase
« on: April 06, 2019, 09:53:12 PM »
http://www.youtube.com/watch?v=e7qFH-nUt98

unknownsoldier here, check out my mod

also i dont remember how to embed the video in posts, can anyone remind me? been too long lol

8
Suggestions & Feedback / Re: All Quiet On The B-B Front
« on: February 20, 2019, 03:47:32 AM »
woahhh

9
Introduce Yourself / this is crazy!
« on: December 19, 2018, 03:05:29 AM »
this is bringing back memories. i used to be unknownsoldier on here, and i havent gone on here in years, but wow its back up and idk if anyone i knew still uses this, and i probably wont be very active anymore but its cool going back and looking at old posts and just, feeling the memories and remembering all the friends i made here years ago when i was just a wee lass. great to see it back up again :D

Pages: [1]