Jump to content

External Script


Revolution-Designes

Recommended Posts

Revolution-Designes

So I've picked up coding again and tried to make my own external script in the stripped main.scm

 

I defined it:

 

DEFINE EXTERNAL_SCRIPTS 1 // Use -1 in order not to compile AAA scriptDEFINE SCRIPT WEATHERCONTROL AT @WEATHERCONTROL // 0

 

 

And added the script:

 

:WEATHERCONTROLthread 'WEATHERCONTROL':WEATHERCONTROL1set_weather 9 01B5: force_weather 1end_threadjump @WEATHERCONTROL1

 

 

I also loaded the script and made it run:

 

08A9: load_external_script 0 (WEATHERCONTROL)0913: run_external_script 0 (WEATHERCONTROL)  

 

 

It's supposed to simply keep the weather at foggy, number 9. But as I don't know how this thread and script combination actually works I need some help. As soon as I start a new game and change the weather with a cheat it doesn't turn to foggy again. So the problem is that it doesn't loop. Anyone knows how this works?

Link to comment
Share on other sites

:WEATHERCONTROL1set_weather 9 01B5: force_weather 1end_threadjump @WEATHERCONTROL1

 

 

 

Isnt the jump after you end the thread useless?

Link to comment
Share on other sites

Revolution-Designes
:WEATHERCONTROL1set_weather 9 01B5: force_weather 1end_threadjump @WEATHERCONTROL1

 

 

 

Isnt the jump after you end the thread useless?

Yeah, I guess you're right. But that doesn't solve my problem.

Link to comment
Share on other sites

I didnt say it would. I dont know much about coding.

in anycase, you say you want it to loop, where is the loop? why end thread?

Like I say I really dont know much about coding but isnt this more the idea?

 

 

:WEATHERCONTROL1wait 10set_weather 901B5: force_weather 1jump @WEATHERCONTROL1 

 

 

 

All yours looks like it does, is sets and forces weather then finishes.

Edited by xrk
Link to comment
Share on other sites

Revolution-Designes
I didnt say it would. I dont know much about coding.

in anycase, you say you want it to loop, where is the loop? why end thread?

Like I say I really dont know much about coding but isnt this more the idea?

 

 

:WEATHERCONTROL1wait 10set_weather 901B5: force_weather 1jump @WEATHERCONTROL1 

 

 

 

All yours looks like it does, is sets and forces weather then finishes.

Removing the end_thread and let it loop doesn't work. It simply doesn't change to foggy weather when I use a cheat to change the weather. But when I create them as threads, so no external script, it works just fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.