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


Recent Posts

Pages: [1] 2 3 ... 10
1
Modding Questions/Help / Re: Damage multiplier script
« Last post by Micha on Today at 03:47:33 PM »
I tried your method but the game crashed once I pressed start on the game menu, at least I know that the script is being read this way because previously nothing happened. But I must have messed something up.
2
Requests / Trouble meter always full for bully AE
« Last post by Antiverbic on Today at 03:23:45 PM »
Could someone make a mod that makes the trouble meter full at all times I would like to see how hard the game would be
And remember it's for bully AE, not SE  :)
3
Modding Questions/Help / Re: Damage multiplier script
« Last post by Micha on Today at 01:44:36 PM »
Okay, thanks, I'll keep messing around with it and see if I can make stuff work. At the very least I've become more mindful of the mistakes I make. I will probably need to keep trying this out a lot more though to get the hang of it.  This has been very helpful though so thank you Simon.
4
Modding Questions/Help / Re: Damage multiplier script
« Last post by SimonBestia on Today at 01:26:20 PM »
You still kept the 1-second constant loop at the end of Main.
As I said, you're getting the script stuck (for when you script something below it), as it will just keep waiting forever.

Other than that, structure-wise the script is fine, though scripting-wise DamageMultiplication is broken, and nothing will happen.

Here's a quick script I'd do for what you're trying to do:
(Keep in mind I'm not good with this kind of loop. An issue here is that, for example, whatever you script, like the damage multiplier, will CONSTANTLY be applied. In this case it's harmless, but if you do something else, like say, spawning something, well... it's going to keep spawning forever until the game crashes)
Code: [Select]
while true do --Anything inside here gets looped forever
FindX, FindY, FindZ = PlayerGetPosXYZ() --Constantly gets Jimmy's coordinates, and gives each coordinate a name, to use as you please.
TextPrintString("Finding peds matching specified conditions...", 1, 1) --Constantly prints this when not printing anything below, aka before it finds a ped. Printing text is the easiest way to see your script working in real time.
for i, Ped in ({PedFindInAreaXYZ(FindX, FindY, FindZ, 80)}) do --Starts a loop of constantly finding peds in a specific range (80) and stores them in a table.
if i ~= gPlayer and not PedIsDead(Ped) then  --Some conditions
if PedGetFaction(Ped) == 5 then --Preppies faction condition
TextPrintString("Found a prep!", 1, 1)
--Script something here idk
elseif PedGetFaction(Ped) == 1 then --Nerds faction condition
TextPrintString("Found a Nerd!", 1, 1)
--Script something here idk
end
end
end
Wait(0)
end
5
Modding Questions/Help / Re: Damage multiplier script
« Last post by Micha on Today at 01:18:51 PM »
I've made it again, the main thing I'm not certain about is how the main function should be structured in STimeCycle compared to if it's made for a mission. I'm also not a hundred percent sure if I'm structuring the damage multiplier function correctly.
6
Modding Questions/Help / Re: Damage multiplier script
« Last post by Micha on Today at 12:44:33 PM »
Thank you for your advice, it's very helpful. What if I then structure the script like this?

Never mind, still didn't work. I'll try again
7
Modding Questions/Help / Re: Damage multiplier script
« Last post by SimonBestia on Today at 12:19:06 PM »
What is wrong with the first main:
  • Not sure why you wait 1 second after you've already waited for the game to be ready.
  • LoadAnims() is a function that doesn't exist. The game will get stuck there and the script won't continue.
  • CreateThread() is used in the wrong way:
Code: [Select]
CreateThread("ThreadName") --Correct
CreateThread(ThreadName) --Incorrect
  • You have a continuous loop that always waits 1 second and does absolutely nothing, other than getting the game stuck.
What is wrong with the second main:
  • LoadAnim() is a function that doesn't exist.
  • DamageMultiplier would be better outside of that loop and as a thread of its own, to avoid getting the game stuck.
What is wrong with DamageMultiplier:
  • PedFoundInAreaXYZ() is a function that doesn't exist.
  • "-=" gives issues with the compiler because it's not a thing. You might be confusing it with "~=" which is "equals not"
  • PedisModel should be PedIsModel. Code is case-sensitive.
  • I think you meant math.random(1, 25), not math.random(1.25)
  • Some issues with PedSetActionTree():
    • You have a typo. "/Global/" not ",Global/".
    • "Act/Anim/" is redundant, you can remove that, and just leave the name.
    • The name of the action tree must always end with ".act"
8
Modding Questions/Help / Re: Damage multiplier script
« Last post by Micha on Today at 12:17:09 PM »
I've actually watched Derpy's second tutorial again and it cleared a lot of things up with the functions, I'm just trying to ensure that I can structure the creation of a new function for the multiplier within the main thread properly for the STimeCycle file.
9
Modding Questions/Help / Re: Damage multiplier script
« Last post by Micha on Today at 10:42:41 AM »
Hi Simon, I've been looking at tutorials that focus on the STimeCycle and they help a lot and I can see now that I need to apply a proper main function for it to work. I'm just not completely sure about the right structure, could you maybe point me in the right direction. I'll include a file with how I've been trying to approach this differently. There are a lot of good lua tutorials but I have not found as many that focus on the STimeCycle file,
10
Modding Questions/Help / Re: Damage multiplier script
« Last post by SimonBestia on Today at 03:55:02 AM »
What is the best command for damage multiplication btw? is it PedSetDamageGivenMultiplier or is there a better way?

Yeah, PedSetDamageGivenMultiplier(ped, damagetype, multiplier) does the job.
IIRC I helped someone else with this, check my post history.
Pages: [1] 2 3 ... 10