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


Author Topic: How do I get specific peds to spawn in specific locations?  (Read 10548 times)

0 Members and 1 Guest are viewing this topic.

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: How do I get specific peds to spawn in specific locations?
« Reply #15 on: July 03, 2013, 05:18:04 PM »
K, Just tell me which interor u want them to spawn in cuz u need the area code, the area's name and also the coords, I can get those for you and fill them for u with the commands.

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #16 on: July 03, 2013, 05:33:43 PM »
Girls Dorm      35      -430.667999, 317.761993, -2.361660

Then if I decide to try it with another interior, it's the same idea with a different area code and cords, right?

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: How do I get specific peds to spawn in specific locations?
« Reply #17 on: July 03, 2013, 05:49:55 PM »
Yes.
So u just want the codes? I see u got all u need okey.

Command to tp the player :

AreaTransitionXYZ(0, -34, -92, 1.001125435)

Just fill in the area code (the 0) and the coords.

Command to create Peds there :

PedName = PedCreateXYZ(32,l_1_0 +1, l_1_1 +1, l_1_2)

Replace the 32 with the Ped's model (For example 32 is Chad)
Replace the l_1_0 and all of those with the coords.

Plus u may need to load the interor so here is the command :

DATLoad("SP_Girls_Dorm", 2)
  DATInit()


Hope I helped.

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #18 on: July 03, 2013, 05:55:07 PM »
Yes.
So u just want the codes? I see u got all u need okey.

Command to tp the player :

AreaTransitionXYZ(0, -34, -92, 1.001125435)

Just fill in the area code (the 0) and the coords.

Command to create Peds there :

PedName = PedCreateXYZ(32,l_1_0 +1, l_1_1 +1, l_1_2)

Replace the 32 with the Ped's model (For example 32 is Chad)
Replace the l_1_0 and all of those with the coords.

Plus u may need to load the interor so here is the command :

DATLoad("SP_Girls_Dorm", 2)
  DATInit()


Hope I helped.

Where do I place the code to load the interior?

DATLoad("SP_Girls_Dorm", 2)
  DATInit()

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #19 on: July 03, 2013, 06:01:15 PM »
Actually.... could you just paste the whole lua script for me? I just want to make sure I put everything in the right place so I don't have to keep coming back to ask questions. Thanks :)

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: How do I get specific peds to spawn in specific locations?
« Reply #20 on: July 03, 2013, 06:03:56 PM »
I recommend in the mission setup, I usually do this

PlayerSetHealth(200) -- gives the player 200 health
  AreaTransitionXYZ(0, -34, -92, 1.001125435)
DATLoad("1_B.DAT", 2)
  DATInit()
Wait(2000)

Then write the teleport command to teleport to the other place.
Basicly what this does, that when the script is launched, it teleports you to another place, loads the area and then by the time that the place , giving the place time to get loaded and then teleports you to it.

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #21 on: July 03, 2013, 06:41:51 PM »
Bully.exe has stopped working...

I think I'm doing something wrong.

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: How do I get specific peds to spawn in specific locations?
« Reply #22 on: July 03, 2013, 07:15:29 PM »
Send me the script and I will check it out.
(Did u compile the script? Did you delete ArcRace1.lur inside the script.img and put the compiled ArcRace1.lur file insted?)

deadpoolXYZ

  • Guest
Re: How do I get specific peds to spawn in specific locations?
« Reply #23 on: July 03, 2013, 07:48:52 PM »
I recommend in the mission setup, I usually do this

PlayerSetHealth(200) -- gives the player 200 health
  AreaTransitionXYZ(0, -34, -92, 1.001125435)
DATLoad("1_B.DAT", 2)
  DATInit()
Wait(2000)

Then write the teleport command to teleport to the other place.
Basicly what this does, that when the script is launched, it teleports you to another place, loads the area and then by the time that the place , giving the place time to get loaded and then teleports you to it.

It's not necessary to use the "DATLoad" command. Just write the correct area code in the "AreaTransitionXYZ" part and that's it.

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #24 on: July 03, 2013, 10:02:38 PM »
Yes, but after I put back the original Trigger.img I got the same message so I will just do a reinstall.

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: How do I get specific peds to spawn in specific locations?
« Reply #25 on: July 03, 2013, 10:14:41 PM »
I didn't tell you to touch the Trigger.img files.

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #26 on: July 03, 2013, 10:35:41 PM »
I didn't tell you to touch the Trigger.img files.

Lol.... I just realized.... I had to replace the Script not the Trigger.

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #27 on: July 05, 2013, 07:26:20 PM »
Hey, sorry it took so long to get back to you but I ended up having to reinstall Bully. Could you just paste the full Lua script for me?

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: How do I get specific peds to spawn in specific locations?
« Reply #28 on: July 05, 2013, 07:49:39 PM »
There ya go  :cool:

Code: [Select]
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
   AreaTransitionXYZ(35, -430.667999, 317.761993, -2.361660)
  PlayerSetHealth(200) -- gives the player 200 health
  Test1 = PedCreateXYZ(23,-437.667999, 318.761993, -2.361660)
  Test2 = PedCreateXYZ(24, -435.667999, 317.761993, -2.361660)
end
MissionCleanup = function()
end -- end statement
main = function() -- Main mission function
end

Offline TrollFace

  • mmmmm
  • Jr. Member
  • **
  • Posts: 8
  • Gender: Male
  • hmmmm
    • View Profile
Re: How do I get specific peds to spawn in specific locations?
« Reply #29 on: July 05, 2013, 07:57:19 PM »
Thank you very very very much.... but now I have another problem :(
Reinstalling it did not fix the problem. Right after the main menu the error comes up and the game crashes. I'm not sure if it's my computer or Bully.