IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 External Script

 
Revolution-Designes  
Posted: Friday, Apr 6 2012, 21:33
Quote Post


AKA JopperX9
Group Icon
Group: Members
Joined: Dec 28, 2008

eu.gif

Member Award




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

I defined it:
CODE
DEFINE EXTERNAL_SCRIPTS 1 // Use -1 in order not to compile AAA script
DEFINE SCRIPT WEATHERCONTROL AT @WEATHERCONTROL // 0


And added the script:
CODE
:WEATHERCONTROL
thread 'WEATHERCONTROL'

:WEATHERCONTROL1
set_weather 9
01B5: force_weather 1
end_thread
jump @WEATHERCONTROL1


I also loaded the script and made it run:
CODE
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?
Users WebsitePMMSN
  Top
 

 
xrk  
Posted: Friday, Apr 6 2012, 22:14
Quote Post


30Hz
Group Icon
Group: Members
Joined: Feb 4, 2004

en.gif

XXXXX



QUOTE (Revolution-Designes @ Friday, Apr 6 2012, 21:33)
CODE

:WEATHERCONTROL1
set_weather 9
01B5: force_weather 1
end_thread
jump @WEATHERCONTROL1



Isnt the jump after you end the thread useless?
PMMSNXbox Live
  Top
 

 
Revolution-Designes  
Posted: Saturday, Apr 7 2012, 08:35
Quote Post


AKA JopperX9
Group Icon
Group: Members
Joined: Dec 28, 2008

eu.gif

Member Award




QUOTE (xrk @ Saturday, Apr 7 2012, 00:14)
QUOTE (Revolution-Designes @ Friday, Apr 6 2012, 21:33)
CODE

:WEATHERCONTROL1
set_weather 9
01B5: force_weather 1
end_thread
jump @WEATHERCONTROL1



Isnt the jump after you end the thread useless?

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

 
xrk  
Posted: Saturday, Apr 7 2012, 10:29
Quote Post


30Hz
Group Icon
Group: Members
Joined: Feb 4, 2004

en.gif

XXXXX



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?

CODE

:WEATHERCONTROL1
wait 10
set_weather 9
01B5: force_weather 1
jump @WEATHERCONTROL1



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

This post has been edited by xrk on Saturday, Apr 7 2012, 10:34
PMMSNXbox Live
  Top
 

 
Revolution-Designes  
Posted: Saturday, Apr 7 2012, 10:47
Quote Post


AKA JopperX9
Group Icon
Group: Members
Joined: Dec 28, 2008

eu.gif

Member Award




QUOTE (xrk @ Saturday, Apr 7 2012, 12:29)
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?

CODE

:WEATHERCONTROL1
wait 10
set_weather 9
01B5: force_weather 1
jump @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.
Users WebsitePMMSN
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG