Lazlo_ Posted May 2, 2016 Share Posted May 2, 2016 (edited) re: GTA SA Sannybuilder rejects the vehicle's game name "TUGSTAI", and using opcodes 014B and 014C with the ID number (608) compiles but renders nothing. I was unable to find any discussion of trailer spawning in CLEO. It seems to be in a class of vehicles that don't follow the usual conventions. Any insights? Thanks in advance. 0001: wait 1000 ms 0A95: enable_thread_saving 014B: [email protected] = init_parked_car_generator 608 color 0 0 1 alarm 0 door_lock 0 0 10000 at -1429.697 19.6257 14.1484 angle 90.0 014C: set_parked_car_generator [email protected] cars_to_generate_to 101 Edited May 2, 2016 by Lazlo_ Link to comment Share on other sites More sharing options...
dkluin Posted May 2, 2016 Share Posted May 2, 2016 (edited) Remove the enable_thread_saving opcode. Be sure to compile it like this: {$CLEO .cs}:Spawn_Parked_Carthread 'PARKED'014B: [email protected] = init_parked_car_generator 608 color 0 0 1 alarm 0 door_lock 0 0 10000 at -1429.697 19.6257 14.1484 angle 90.0 014C: set_parked_car_generator [email protected] cars_to_generate_to 101end_threadIf you want to spawn it near the player, then you need different code. EDIT: Just noticed that you tried to spawn a trailer... Edited May 2, 2016 by dkluin Sweet Bellic 1 Link to comment Share on other sites More sharing options...
Lazlo_ Posted May 2, 2016 Author Share Posted May 2, 2016 ... EDIT: Just noticed that you tried to spawn a trailer... Yes, sorry. I noted that it was a trailer in the subject, and thus the problem: it doesn't seem to conform to usual vehicle syntax. i did see some very old threads talking about spawning regular vehicles with trailers attached, but they didn't seem coherently resolved and, from what I could tell, didn't approach it from CLEO. I thought perhaps I was using an opcode inappropriate for the vehicle class. I looked through the game script and didn't find anything helpful there either, except that I could rule out treating it as an object. Except that the ID is 608, the model and texture name is tugstair, the game name is TUGSTAI and that it's a trailer, I don't have much to go on. There are threads that mention it as a trailer, but I wasn't able to find anything that particularly addresses and resolves how to spawn it with CLEO. I am not especially skilled with CLEO as it is beyond simple things. So if I can't use CLEO, I wouldn't know how to do it. If its hex, then I likewise can't find any documentation on it thus far that way either. Intuition implies it should not be terribly exotic or complex, but so far, I am unable to produce a solution for the meager goal of spawning the Tugstair trailer (or any trailer, for that matter. Thank you for the input. Link to comment Share on other sites More sharing options...
OrionSR Posted May 3, 2016 Share Posted May 3, 2016 (edited) {$CLEO .cs}0001: wait 1000 ms 0A95: enable_thread_saving 014B: [email protected] = init_parked_car_generator 608 color 0 0 1 alarm 0 door_lock 0 0 10000 at -1429.697 19.6257 14.1484 angle 90.0 014C: set_parked_car_generator [email protected] cars_to_generate_to 101004E: end_thread Seems to work just fine for me. #TUGSTAIR works too, but I wanted to show as much of your original code as possible. Edited May 3, 2016 by OrionSR Lazlo_ 1 Link to comment Share on other sites More sharing options...
Guest Posted May 3, 2016 Share Posted May 3, 2016 (edited) Do you want to spawn Tug + stairs or do you want to make stairs generator? (Like OrionSR posted.) If you want to spawn Tug with attached stairs you can use my script. You said you are not very skilled with CLEO so I added bunch of comments to help you understand how script works. {$CLEO .cs}0000:// Check if numeric 5 was pressed:Key_checkwait 0if 0AB0: key_pressed 101 // Numeric 5else_jump @Key_check// Load models:Load_modelswait 00247: load_model 583 // Tug0247: load_model 608 // Stairs038B: load_requested_models// Check if models were successfully loadedif and0248: model 583 available // Tug0248: model 608 available // Stairselse_jump @Load_models // If not then return to @Load_models// Get player position with offset04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.00172: [email protected] = actor $PLAYER_ACTOR Z_angle// Create vehicles00A5: [email protected] = create_car 583 at [email protected] [email protected] [email protected] // Tug0175: set_car [email protected] Z_angle_to [email protected]: [email protected] = create_car 608 at [email protected] [email protected] [email protected] // Stairs// Attach Stairs to Tug as trailer0893: put_trailer [email protected] on_cab [email protected]// Release cars and models01C3: remove_references_to_car [email protected] // Tug01C3: remove_references_to_car [email protected] // Stairs0249: release_model 583 // Tug0249: release_model 608 // Stairswait 1000jump @Key_check Unfortunately if stairs get detached you won't be able to attach them again because game was not programmed to attach them automatically. However, it's very easy to write CLEO script that scans area around player for Tug and stairs, and if they are very close to each other CLEO can automatically attach them. Edited May 3, 2016 by Guest Link to comment Share on other sites More sharing options...
Lazlo_ Posted May 3, 2016 Author Share Posted May 3, 2016 Seems to work just fine for me... How peculiar. I wonder what Sanny is seeing different in mine. Originally I tried adding the Tugstair to an existing script, but then tried giving it it's own and neither rendered a solution. I couldn't get it to accept the game-name either; it insisted on the number and then still yeilded nothing, even when I isolated it as the only running script. I will review it again and look for any errors. Do you want to spawn Tug + stairs...? Anything that renders the stairs would be great, and thank you for your kind gift as well. I am happy to try it and see if I can make it work. I meant to just spawn stairs like I would any vehicle, but couldn't for some reason. I just wish I knew what I was doing wrong if it can in fact be spawned like any vehicle, all the more embarassing if it is some minor glitch of my own. It is late here and I may be occupied for much of tomorrow, but I will certainly try it and report results as soon as I can, either tomorrow or the evening after at latest. Many thanks to all, I hope to be able to return with positive results. And Markuza97, whether I get it to work or not, I am grateful that you shared your script and value the effort and kindness of expounded comments. Moreover, it'll likely give me something to learn, as I learn best by example, instruction and practice. Have a great evening, all. :3 Link to comment Share on other sites More sharing options...
Lazlo_ Posted May 3, 2016 Author Share Posted May 3, 2016 Good news! Having fiddled around with my original script, I have results already. I can't say why some of my attempts failed. One place I tried was at SFO and right overtop the underground parking garage. I have noticed many glitches there before, like cars spawning half way through the pavement above at the terminals, or appearing and disappearing, as there is heavy consistent traffic there. This may have caused some interference. It is also possible that it was spawing atop the concourse where I couldn't see it. I may never know. I am just happy it works. Another time, the location shown in the script was tested during a game-save where there were no cleo-saves, a session I keep for tests and additions. There are however other new scripts present, and the tug one had not been isolated yet at that point as a 'quarantine' control-type test. In that case, it was the same problem that had me going bonkers two weeks ago when mapping another marina in Santa Monica(Maria). I keep failing to remember that the larger the vehicle, the more space it needs from other spawns. As it happens, large boats need a lot of space. In this case, an airliner must have a huge footprint. Though the tugstairs appeared to be a healthy distance, it turns out it was not, as I found when removing it. Repositioning it even farther rendered the solution. Later I will fine tune it. I noticed it had the same odd dark texture shown in OrionSR's image, not the usual light grey. Nonetheless. though the problem was cleared up, and thanks to OrionSR for the independent test, I would also like to explore Markuza97's script for several reasons, among them being that it looks straightforward and will help me make more elegant ones in the future, as I struggle with correct syntax and using variables sometimes, and some of my scripts are pretty choppy, meaning they're effective, but leave loose ends that can become convoluted. Practicing with Markuza97's script will help me develop better intuition and grasp of its parts, and if applied, should improve ones I already made so mine wont be as sloppy. My next project is to find a way to craft new street signs. I don't model particularly well at all, and the game inventory doesn't quite have what I'm looking for. Having not found alternatives, I guess it will be a challenge. So a big thanks to all, you've all been very helpful. Have a great week, and be blessed. ♥http://s32.postimg.org/ufkfigk9h/LA_Marina.jpg Link to comment Share on other sites More sharing options...
OrionSR Posted May 4, 2016 Share Posted May 4, 2016 Compiled file has no header, so the model name #TUGSTAIR can not be used. Use number ID instead. The message above is displayed if I am using GTA SA SCR mode so my code looks more like the original Rockstar format. I usually work in GTA SA mode. If you are using GTA SA SCR mode you will need to use a different command format for your scripts to work properly. 014B: $PARKED_RHINO = init_car_generator #RHINO color -1 -1 force_spawn 1 alarm 0 door_lock 0 min_delay 0 max_delay 10000 at 2435.302 -1671.848 12.8007 angle 90.0 // GTA SA014B: create_car_generator 2435.302 -1671.848 12.8007 angle 90.0 model #RHINO color -1 -1 force_spawn 1 alarm 0 doorlock 0 delay 0 10000 store_to $PARKED_RHINO // GTA SA SC Your stairs are an odd color because you specified black and black (color 0 0) for your colors. Use -1 for random/default colors. Lazlo_ 1 Link to comment Share on other sites More sharing options...
Lazlo_ Posted May 4, 2016 Author Share Posted May 4, 2016 (edited) The message above is displayed if I am using GTA SA SCR mode so my code looks more like the original Rockstar format.... I see- Thank you very much! I should've noticed that,regarding the color. I will try to absorb your recommendation for syntax so my scripts have better game fidelity. I put two baggage cars and two stairs at each airport today. I wasn't able to get them to spawn hitched yet, so I will work on that later. Presently, I am trying to find a better Shamal replacement, but haven't found much, for a Learjet. I still mean to make nice street and road signs, perhaps this summer. I must learn how to properly make and paint simple models. I quite enjoy the planes and boats. I made this rather dull AT-400 tutorial when my airports were more bare. It was still fun to make. (not sure why the video quality is half the resolution in this embed as on the video page, at least in my browser) Mostly, I just do IPLs and re-texs. I've only done a bit of player-rigging, minor stuff, and very few DFF tweaks, or cloning models, mostly for posters in my favorite save point. I've had some fun with Ped behavior, and changing music in the clubs, all of it with help from here. I do have ENEXs everywhere: condos, offices etc. http://s1.postimg.org/vgn3c21u7/image.jpg http://s1.postimg.org/4zedwr4y7/image.jpg http://s1.postimg.org/mhsfla7kf/image.jpg http://s1.postimg.org/ctezi5cr3/image.jpg http://s1.postimg.org/bei07611r/image.jpg http://s1.postimg.org/sntvs11hr/image.jpg My smaller marina http://s28.postimg.org/5g28s0y25/image.jpg A condo in SF http://s9.postimg.org/6nzh60cvz/image.jpg http://s24.postimg.org/p2f5c1t2t/image.jpg And some selfies http://s28.postimg.org/gptt4k7u5/cj_deer_sweater.jpg http://s23.postimg.org/cq0asu2rf/Dakurlz_Umbrella_7.png Theres some more (less tasteful) maps for Vegas and my Prickle Pine interior (linked to the houses above), some clubs etc. I have interior ENEXs everywhere. One of the odder ones is at an apartment complex in Rodeo, where one ENEX takes you to an upper floor balcony with a nice view, and another next to it to take you inside. I'm not as skilled as many, but I have fun with what I can do. Many thanks again, this site has always been a lot of help, especially in my harder projects, like filling my pool with water and making CULLs to keep weather out of my carports and sheds. For me, they were a challenge, but the documentation here was a major help. I haven't tried the newer HD games; I suppose someday I will have to learn it all over again with new tools and editors. For now, I am grateful for your tips and will use them to fix those Tugstair colors this week.. Have a great day, and be blessed,all. Edited May 4, 2016 by Lazlo_ 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