Bully-Board
Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: TrollFace on July 03, 2013, 11:12:40 AM
-
Say for example I want to spawn Gary in a specific building in which he normally wouldn't appear, how can I do that?
-
Sorry, I don't think I explained my question clearly, I wasn't asking how to make Gary appear in free roam. I was asking how I can make him (or any other character) spawn in the building of my choice. Like the girls dorm or somewhere he could not normally enter. (It doesn't have to be Gary, I was just using him as an example).
-
Please be sure to snoop around the Board before asking such questions, here is a thread filled with Bully Modding Tutorials. (Adding Boss Characters like Gary included)
http://www.bully-board.com/index.php?topic=14726.0 (http://www.bully-board.com/index.php?topic=14726.0)
-
Please be sure to snoop around the Board before asking such questions, here is a thread filled with Bully Modding Tutorials. (Adding Boss Characters like Gary included)
http://www.bully-board.com/index.php?topic=14726.0 (http://www.bully-board.com/index.php?topic=14726.0)
I've checked there, but I never found a mod which lets me spawn peds in areas where they are restricted from spawning. I just want to take a character and make it spawn at the coordinates of my choice.
-
Do you want them to spawn like they do in free roam, or do you want special spawns?
-
In free roam.
-
Shit, read your previous post in REVERSE. Thought you were saying you didn't mean that you wanted peds to spawn in places they wouldn't, but you wanted to know how to add them in free-roam. My mistake, anyways, I'm pretty sure this is done through MadMan's cord grabber.
There IS a tutorial on making cliques spawn in places they shouldn't (I would know as I have done it before, but it is limited to a few places) for example, spawning The Greasers on the Football field and other places (That I can't remember).... Although, I don't remember which thread it was. Best wait until someone else answers.
-
Shit, read your previous post in REVERSE. Thought you were saying you didn't mean that you wanted peds to spawn in places they wouldn't, but you wanted to know how to add them in free-roam. My mistake, anyways, I'm pretty sure this is done through MadMan's cord grabber.
There IS a tutorial on making cliques spawn in places they shouldn't (I would know as I have done it before, but it is limited to a few places) for example, spawning The Greasers on the Football field and other places (That I can't remember).... Although, I don't remember which thread it was. Best wait until someone else answers.
Haha, okay :P Well since I already know the cords, I'm assuming the rest is done through LUA, right?
-
Hmmm...if you want to do it like in free roam, you do that through trigger, I'm afraid, not lua.
And that...I never experimented with enough to know how to do.
-
Do you think anyone on this forum would know?
-
If u want him to spawn in an INTEROR, I suggest you take a visit at my LUA tutorial at Script modding section.
-
If u want him to spawn in an INTEROR, I suggest you take a visit at my LUA tutorial at Script modding section.
Yes, that's it, thanks.
-
So, You want me to explain you right away?
-
Just the lines of code I need to add would be nice.
-
Oh and one more thing, I was just trying to use Lua for the first time and when I try to compile my script I get the following error:
Luac: luascript.lua:13: ')' expected near '_1_0'
I assumed that mean I needed to add ")" next to this "_1_0" on line 13 but doing that did not change anything and gave me the same error.
Sorry if this isn't the right place to ask this but it's part of my problem.
-
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.
-
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?
-
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.
-
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()
-
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 :)
-
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.
-
Bully.exe has stopped working...
I think I'm doing something wrong.
-
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?)
-
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.
-
Yes, but after I put back the original Trigger.img I got the same message so I will just do a reinstall.
-
I didn't tell you to touch the Trigger.img files.
-
I didn't tell you to touch the Trigger.img files.
Lol.... I just realized.... I had to replace the Script not the Trigger.
-
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?
-
There ya go :cool:
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
-
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.
-
Well...
I dont know how to fix that you need someone like Mad to help you with this.
You should have made backup.
-
Everything IS backed up so that's okay. I just can't run the game...