Bully-Board

Bully Modding Section => Bully Modding => Bully Modding Archives => Topic started by: AfterLife on June 22, 2015, 12:16:34 AM

Title: Very first code
Post by: AfterLife on June 22, 2015, 12:16:34 AM
This topic is for LUA modders, what is the first ever code taught to you? For me it was PlayerSwapModel. Taught to me by jedijosh.

What about yours (If you can remember.).
Title: Re: Very first code
Post by: Unknownsoldier on June 22, 2015, 04:08:33 AM
Honestly I can't remember. Codes have been sent back and fourth between me and my contacts. I know its not a bully function, but the first lua function taught to me was table.insert from DaBoss. Most other things I learned either from Hex Editong the Scripts, or just the few tutorials we had at the time.
Title: Re: Very first code
Post by: AfterLife on June 22, 2015, 06:48:47 AM
Honestly I can't remember. Codes have been sent back and fourth between me and my contacts. I know its not a bully function, but the first lua function taught to me was table.insert from DaBoss. Most other things I learned either from Hex Editong the Scripts, or just the few tutorials we had at the time.
I meant bully related codes.
Title: Re: Very first code
Post by: DaBOSS54320 on June 22, 2015, 08:30:58 AM
The first Bully LUA code taught to me was in SWEGTA's bodyguard tutorial, then the second thing I learned was setting fighting styles in LUA (also thanks to SWEGTA). Then I learned some basics about LUA as a language with some youtube tutorials and then mostly taught myself new things by experimentation with function names I found in the game's executable.
Title: Re: Very first code
Post by: Unknownsoldier on June 23, 2015, 01:36:38 AM
well the first bully related code i learned then was PedSetHealth. I don't know how, but at the time, that was the best discovery every in my mind xD.
Title: Re: Very first code
Post by: FaZe on June 23, 2015, 11:56:55 AM
I think it was TextPrintString
Title: Re: Very first code
Post by: SWEGTA on June 23, 2015, 01:18:11 PM
PedCreateXYZ
Title: Re: Very first code
Post by: Masterreys100 on June 27, 2015, 06:08:32 PM
TextPrintString :D
Title: Re: Very first code
Post by: AlphaTech on June 29, 2015, 12:51:14 PM
The very first I learned was PedSedSetTypeToAttitude, PedMoveToXYZ, and PedClimbLadder. Those were my very first codes that I learned making the ped have agression and to make them move was amazing. I made the peds move up ladders a little later but was so happy it was my help to creating missions.
Title: Re: Very first code
Post by: Rasmus on June 29, 2015, 09:08:55 PM
ExecuteActionNode and PedSetTypeToTypeAttitude.
Title: Re: Very first code
Post by: Enderman on June 29, 2015, 09:20:01 PM
PedSetActionTree
Title: Re: Very first code
Post by: MadmaN on June 30, 2015, 11:20:24 PM
I was never actually 'taught' any of the bully lua coding. Tho the closest thing to being taught anything on that would be when Fred Tetra got hold of me here via pm and sent me what he had at the time on the lua scripts he was able to decompile.

Far as being 'taught' lua....even tho this actually has nothing to do with bully...that would happen to be:

Code: [Select]
require("INC_Class.lua")

--===========================

cAnimal=setclass("Animal")

function cAnimal.methods:init(action, cutename)
self.superaction = action
self.supercutename = cutename
end

--==========================

cTiger=setclass("Tiger", cAnimal)

function cTiger.methods:init(cutename)
self:init_super("HUNT (Tiger)", "Zoo Animal (Tiger)")
self.action = "ROAR FOR ME!!"
self.cutename = cutename
end

--==========================

Tiger1 = cAnimal:new("HUNT", "Zoo Animal")
Tiger2 = cTiger:new("Mr Grumpy")
Tiger3 = cTiger:new("Mr Hungry")

print("CLASSNAME FOR TIGER1 = ", Tiger1:classname())   
print("CLASSNAME FOR TIGER2 = ", Tiger2:classname())
print("CLASSNAME FOR TIGER3 = ", Tiger3:classname())
print("===============")
print("SUPER ACTION",Tiger1.superaction)
print("SUPER CUTENAME",Tiger1.supercutename)
print("ACTION        ",Tiger1.action)
print("CUTENAME",Tiger1.cutename)
print("===============")
print("SUPER ACTION",Tiger2.superaction)
print("SUPER CUTENAME",Tiger2.supercutename)
print("ACTION        ",Tiger2.action)
print("CUTENAME",Tiger2.cutename)
print("===============")
print("SUPER ACTION",Tiger3.superaction)
print("SUPER CUTENAME",Tiger3.supercutename)
print("ACTION        ",Tiger3.action)
print("CUTENAME",Tiger3.cutename)

Which was when I first started learning lua by itself. The above code is a classes and methods example.  :biggrin: