![]() ![]() |
![]() Post #1 | |
Ameteur Member Posts: 49 Joined: 5-August 09 ![]() | Is it possible to move objects, like an elevator, via script (SCM or CLEO)? Like, player goes to elevator, selects a floor, and then lifts them up to the desired level? |
![]() Post #2 | |
![]() In motus... ![]() Posts: 361 From: Portugal Joined: 28-May 09 ![]() | Well, on my SCM knowledge I only know about Enex's. Still, I don't think that's possible. Ask Deji, he has way more experience in scm/CLEO than me. |
![]() Post #3 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | Yeah, course! First you need to create the elevator as a model (duh). Then use this code: CODE :ELEVATE 03A4: name_thread 'ELEVATE' 029B: 0@ = init_object #ELEVATOR at 0.0 0.0 50.0 // Use if you want the object to be there permenantly. 0392: object 0@ toggle_in_moving_list 1 // Make the object movable. 0006: 1@ = 0 // Tell script elevator is down. jump @ELEVATE_1 :ELEVATE_1 wait 0 if and 00E1: player 0 pressed_key 4 0474: actor $PLAYER_ACTOR near_object_in_cube 0@ radius 4.0 4.0 4.0 flag 0 // Adjust to ensure player is in lift. else_jump @ELEVATE_1 if 0039: 1@ == 0 else_jump @ELEVATE_2 // If elevator is down, move up. If elevator is up, move down. jump @ELEVATE_3 {-------------------------------------------------- Move object opcode can be used as both a command and condition. Use in a wait 0 loop to keep object moving smoothly! Once the object has fully moved by 250.0, the condition will be true and code will continue :) ---------------------------------------------------} :ELEVATE_2 wait 0 if 034E: move_object 0@ to 0.0 0.0 50.0 speed 0.0 0.0 0.2 flag 0 else_jump @ELEVATE_2 0006: 1@ = 0 // Tell the script that the elevator is down. jump @ELEVATE_1 :ELEVATE_3 wait 0 if 034E: move_object 0@ to 0.0 0.0 250.0 speed 0.0 0.0 0.2 flag 0 else_jump @ELEVATE_3 0006: 1@ = 1 // Tell script that the elevator is up. jump @ELEVATE_1 (change #ELEVATOR to whatever you elevators model is or the game will crash!) Go to the middle of the map (countryside somewhere) and use a jetpack to get to the elevator. Press the Action key and your elevator will rise you up a few hundered meters ![]() You'll have to configure the radius check to fit your elevators model and make sure the player is on the elevator before it goes up or down... -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() ![]() |