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


Author Topic: *RELEASE* - Bully LUA Script Sources (just a few)  (Read 74152 times)

0 Members and 3 Guests are viewing this topic.

Offline Evolution

  • Elitist
  • *********
  • Posts: 13,574
  • Gender: Male
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #105 on: January 13, 2013, 05:29:17 AM »
^ Well, you need to install it then. -_-

Offline JmTsHaW

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #106 on: January 13, 2013, 07:38:48 AM »
Is there a certain line of code that allows spawned peds to use vehicles such as bikes?

Like how the Greasers annoyingly keep stealing the bikes that are left alone in New Coventry.

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #107 on: January 13, 2013, 07:54:12 AM »
Nope

You have to download it and use the VS 2008 CMD for the compiler to work. MadmaN made this quite clear, too.

Is there a certain line of code that allows spawned peds to use vehicles such as bikes?

Like how the Greasers annoyingly keep stealing the bikes that are left alone in New Coventry.

Yes, there is.

Offline JmTsHaW

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #108 on: January 13, 2013, 10:59:15 AM »
What is it? I've been trying to get peds to ride bikes for ages now.

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #109 on: January 13, 2013, 05:47:16 PM »
It is:

PedWarpIntoCar(cop, CopCar) -- First value is the ped id number (it can be assigned to a local too) and the second value is the vehicle id number (this can also be assigned to a local)

You can also remove a ped from a vehicle using:

PedWarpOutOfCar (cop, CopCar)

The warp out of car code works the same as the warp into car.

I will post a script example of proper usage a bit later tonite if I get time.  :biggrin:

Offline JmTsHaW

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #110 on: January 14, 2013, 11:12:37 AM »
^ Thanks. Can you also show an example of a working button-press script when you can?

Offline James Maurice

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #111 on: March 24, 2013, 05:35:13 AM »
|XF|-MadmaN[AR], can you send the video "how to make fighting style with lua", because i want to make fighting style

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #112 on: March 30, 2013, 05:55:33 PM »
I never made any videos.

I suggest downloading the bully modding magazine issue number 1 once I reupload it since it has been staticly linked to my server since I released it due to a file size limit on file uploads for the forum....My server has been down for a while now since I took it down so I can redo everything and once thats done I will redo the link in the download section for the modding magazine.

Offline Walter20210

  • Hero Member
  • ****
  • Posts: 1,102
  • Gender: Male
  • I keep loving the old things :P
    • View Profile
    • YouTube Account
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #113 on: April 06, 2013, 05:04:32 AM »
I wanna ask what the command repeat does

I never get a way to make it work.

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #114 on: April 06, 2013, 10:15:51 AM »
It means to repeat commands that you put underneath it until a certain criteria is met (you end it with "until" and write then write the action that terminates the loop).

For instance, in my one on one/survival mod, I set a repeat loop so that the camera shifts between the characters until someone is knocked out or all opponents are cleared (until PedGetHealth(idExample1) <= 0).

Offline Walter20210

  • Hero Member
  • ****
  • Posts: 1,102
  • Gender: Male
  • I keep loving the old things :P
    • View Profile
    • YouTube Account
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #115 on: April 06, 2013, 03:05:57 PM »
for example :
 
Code: [Select]
  repeat
  PedSetActionTree(l_1_7, "/Global/J_Grappler_A", "Act/J_Grappler.act")
  wait(10000)
  PedSetActionTree(l_1_7, "/Global/J_Melee_A", "Act/J_Melee.act")
  wait(10000)
  PedSetActionTree(l_1_7, "/Global/J_Striker_A", "Act/J_Striker_A.act")
  wait(10000)
  PedSetActionTree(l_1_7, "/Global/J_Mascot", "Act/J_Mascot.act")
  until
  PedGetHealth(l_1_7, 300)

like this?
« Last Edit: April 06, 2013, 03:34:59 PM by Walter20210 »

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #116 on: April 07, 2013, 03:53:57 PM »
Not quite...I'll have to make an example for you.

deadpoolXYZ

  • Guest
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #117 on: April 07, 2013, 04:18:04 PM »
Red I needed help with PedGetHealth too. Can I use it like this?

If PedGetHealth then
Blablabla
End

Offline Red Blaster

  • The BB Arab
  • More Than Halfway There
  • *****
  • Posts: 5,649
  • Gender: Male
  • Hi
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #118 on: April 07, 2013, 06:59:36 PM »
Yep. I use an if statement for PedGetHealth to give points to a winner in my one on one mod.

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: *RELEASE* - Bully LUA Script Sources (just a few)
« Reply #119 on: April 08, 2013, 01:46:06 PM »
Red I needed help with PedGetHealth too. Can I use it like this?

If PedGetHealth then
Blablabla
End

Here is an example of one way you can use PedGetHealth:

Code: [Select]
    if PedGetHealth(gPlayer) < 150 then
      PedSetHealth(gPlayer, 150)
    end

Here is another example...it is a bit more complex from the 6_B.lua script:

Code: [Select]

Stage2_Objectives = function()
  if not l_0_11 then
    if PedGetHealth(l_0_2) / GaryHealth * 100 < 75 then
      l_0_14 = true
    end
  elseif not l_0_12 and PedGetHealth(l_0_2) / GaryHealth * 100 < 50 then
    l_0_14 = true
  end
  if not l_0_13 and PedGetHealth(l_0_2) / GaryHealth * 100 < 1 then
    PedSetActionNode(gPlayer, "/Global/6_B/AdjustGravity", "Act/Conv/6_B.act")
    PedSetActionNode(l_0_2, "/Global/6_B/AdjustGravity", "Act/Conv/6_B.act")
    l_0_32 = true
  end
end

If you have any further questions I can try to help you out with them.  :cool: