Bully-Board
Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: AlphaTech on April 15, 2014, 10:27:52 PM
-
How do I make the if PedInRectangle code happen more than once not repeating but say
if PedInRectangle then
PedSetInfiniteSprint
if PedInRectangle then
PedCreateXYZ
The code repeats itself but the lua script never lets me use me functions more than once with this code it is always one instance.
-
Re run the main function like.
if PedInRectangle(BLAHBLAH) then
CODES
Main()
when you rerun the main function, it should let you do it more then once.
-
It never lets me repeat the code though it usually says something like repeat or until needed near end or something like that. I put the line of code where it says its needed and it never repeats the code. Can you give me an example script of the if PedInRectangle code being used more than once. Thanks it will help allot.
-
I can make one here.
MissionSetup = function()
AreaTransitionXYZ(.....)
PlayerSetHealth(.......)
end
Test = function()
if PedInRectangle(.........) then
main()
end
end
MissionCleanUp = function()
end
main = function()
repeat
Test()
Wait(0)
until not Alive
end
-
It's still not letting me repeat the If PedInRectangle code it doesn't repeat at all. Any suggestions?