Nabx3n Posted August 15, 2011 Share Posted August 15, 2011 ok i wanted to create a thread that would have multiple script mods as for example they work only when the actor is in the car so i did the following: :INCARthread 'INCAR':INCAR_11wait 0ifplayer.defined($PLAYER_CHAR)jf @INCAR_11ifactor.driving($PLAYER_ACTOR)jf @INCAR_11Gosub @INCAR_12Gosub @INCAR_13Gosub @INCAR_14Gosub @INCAR_15:INCAR_12wait 0if and(checks here)jf @INCAR_END(rest of the script)jump @INCAR_12:INCAR_13wait 0if and(checks here)jf @INCAR_END(rest of the script)jump @INCAR_13:INCAR_14wait 0if and(checks here)jf @INCAR_END(rest of the script)jump @INCAR_14:INCAR_15wait 0if and(checks here)jf @INCAR_END(rest of the script)jump @INCAR_15:INCAR_ENDend_thread but it seams like the gosub works just as jump, cause it only goes to INCAR_12 and doesnt go to others, as if the whole script isnt working except this one :INCAR_12wait 0if and(checks here)jf @INCAR_END(rest of the script)jump @INCAR_12 could someone tell me what's wrong with it or what is exactly Gosub please? Link to comment Share on other sites More sharing options...
Silent Posted August 15, 2011 Share Posted August 15, 2011 Gosub jumps to the label, then goes back to the place where it was called after reading opcode return. It looks like this: :YOURSCRIPTifXXXelse_jump @YOURSCRIPTgosub @YOURGOSUBYYYY Link to comment Share on other sites More sharing options...
Nabx3n Posted August 15, 2011 Author Share Posted August 15, 2011 Gosub jumps to the label, then goes back to the place where it was called after reading opcode return. It looks like this: :YOURSCRIPTifXXXelse_jump @YOURSCRIPTgosub @YOURGOSUBYYYY <-- script will jump here after gosub is done - after [b]return[/b] opcodejump @YOURSCRIPT:YOURGOSUBZZZreturn <--- code jumps to the place where it was called (one line below gosub, obviously) i see, so would that work as how i want it? cause i need to make more than 3scripts running at the sametime if not, is there another possibility to do it? cause i want to create an all in one "if actor driving" external script i could send you the whole code on pms if it's ok so you can see if you could help me Link to comment Share on other sites More sharing options...
ZAZ Posted August 15, 2011 Share Posted August 15, 2011 (edited) If you need more threads running at same time you must create more threads. Extern scripts are also just threads but must be initialized as extern script You could upload your script to a filehoster and post the link here or do you have fear because of stealers? http://www.file-upload.net/ http://www.mediafire.com/index.php http://www.sendspace.com/ P.S. i forgot: Extern scripts are also limited, to 82 Edited August 15, 2011 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now