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


Author Topic: Lua help  (Read 9085 times)

0 Members and 1 Guest are viewing this topic.

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Lua help
« on: October 06, 2014, 10:42:07 PM »
This code was generously given to me by GreenOmnitrix
This works and it plays conversation sounds but I think I might also need an animation that triggers talking with other pedestrians if anyone knows. Maybe an Speech Idle? Idk

Code:

ImportScript("\\Library\\LibTable.lua") -- imports the LibTable library
ImportScript("\\Library\\LibPed.lua") -- imports the LibPed library
local l_0_0 = false

MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords

PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)

end

F_MissionSetup = function()
TextPrintString("Conversation Mod", 4, 1)
Wait(5000)
TextPrintString("By: GreenOmnitrix", 2, 1)
end

main = function()
F_MissionSetup()
CreateThread("TL_Buttons")
gMissionRunning = true
while gMissionRunning do
TL_Buttons()
Wait(0)
end
end

TL_Buttons = function()
if IsButtonPressed(3, 0) then
SoundPlayScriptedSpeechEvent(gPlayer, "CONVERSATION", 0, "speech")
end
end

« Last Edit: October 06, 2014, 10:46:47 PM by Cyclops »

Offline WhenLifeGivesYouLemons

  • xfire: 1emonthatsme
  • Sr. Member
  • ***
  • Posts: 971
  • Gender: Male
  • 波動バースト
    • View Profile
Re: Lua help
« Reply #1 on: October 06, 2014, 11:20:05 PM »
Wrong Section.

This section is for help with Bully-Board based problems not modding.

Just ask a mod to move it

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Re: Lua help
« Reply #2 on: October 06, 2014, 11:27:48 PM »
Who? everyone is offline.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Lua help
« Reply #3 on: October 06, 2014, 11:45:17 PM »
As soon as one gets on they'll probably see this, you don't got to worry I don't think.
Atm I'm on phone so I can't look at script but I will tomorrow if no-one else has helped by then

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Re: Lua help
« Reply #4 on: October 07, 2014, 12:25:27 AM »
Ok

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Re: Lua help
« Reply #5 on: October 07, 2014, 03:28:31 AM »
That moment when everyone is offline and you're waiting for someone to help and you get bored and post something then regret it later then I don't know what next and why Am I still typing I should probably stop or my fingers will be tired but then again I'm really bored and I don't know what to do so why not type random stuff and im still going a few paragraphs now aw cmon stop typing fingers please help me i need a therapist call someone! preferrably a finger doctor or maybe a keyboard merchant but my hands just got cramped and im still bored i should REAAALLLY stop typing and I'm done.


Sincerely
                       Bored russell

Offline BloodChuckZ

  • Bullworth God
  • Original Member
  • Define "Life" For Me Again...
  • *
  • Posts: 39,563
  • Gender: Male
  • Are You Insane ???
    • View Profile
Re: Lua help
« Reply #6 on: October 07, 2014, 03:35:57 AM »
Boredom is your own fault, Y'know.

Offline Enderman

  • What i'm doing right now?
  • Full Member
  • ***
  • Posts: 293
  • Gender: Male
  • I'm no longer do mods for Bully ...
    • View Profile
    • bully-board.com
Re: Lua help
« Reply #7 on: October 07, 2014, 03:45:50 AM »
what about me i all way online ;D

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Re: Lua help
« Reply #8 on: October 07, 2014, 07:14:07 AM »
Boredom is your own fault, Y'know.

Instead of saying stuff like that, try to help please? :<

Offline 明日香

  • Full Member
  • ***
  • Posts: 404
  • Gender: Female
    • View Profile
Re: Lua help
« Reply #9 on: October 07, 2014, 08:14:13 AM »
Do you want the animation for speaking?

Offline WhenLifeGivesYouLemons

  • xfire: 1emonthatsme
  • Sr. Member
  • ***
  • Posts: 971
  • Gender: Male
  • 波動バースト
    • View Profile
Re: Lua help
« Reply #10 on: October 07, 2014, 09:49:26 AM »
Do you want the animation for speaking?
No he probably wants the ped to speak back to him.
The mod only triggers the voice not a full on conversation

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Lua help
« Reply #11 on: October 07, 2014, 03:14:01 PM »
Use code tags next time, easier to copy the code.

All this does is play a sound, no ped really "hears" it so nobody will react to it or anything. Use an action node for talking or one of the social functions, there is probably some social functions for doing things like that. Open the Bully.exe in HxD and there are many functions visible. Just search for like "Social" or something and maybe you'll find a useful function for what you are trying to do.

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Re: Lua help
« Reply #12 on: October 07, 2014, 07:23:21 PM »
hmm.. Complex shit right there

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Lua help
« Reply #13 on: October 07, 2014, 07:31:39 PM »
I'm sorry but I don't know how to make it any simpler. Just practice LUA modding for a while, don't focus on big mods yet. As you make little mods and practice and improve, you'll eventually be able to make these big mods you want to do. Take it slow... not everyone is a fast learner like me, nor is everyone a fucking BOSS like me

Offline Spaps

  • Spy
  • Full Member
  • ***
  • Posts: 354
  • Gender: Male
  • Mahlons
    • View Profile
Re: Lua help
« Reply #14 on: October 07, 2014, 07:43:22 PM »
Russell is boss-ier-er-isey-er

._.