Comments (11)
It works correctly on main.scm, the movement is smooth.
Using this stripped from Zaz:
DEFINE OBJECTS 1
DEFINE OBJECT (dummyobject) // This is an unused object. You can put anything here.
DEFINE MISSIONS 0
DEFINE EXTERNAL_SCRIPTS -1
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0
//-------------MAIN---------------
:MAIN_1
03A4: name_thread 'MAIN'
016A: fade 0 (in) 0 ms
042C: set_total_missions_to 0
030D: set_total_mission_points_to 0
01F0: set_max_wanted_level_to 6
0111: set_wasted_busted_check_to 0 (disabled)
00C0: set_current_time 23 0
04E4: unknown_refresh_game_renderer_at 2494.5 -1668.5
03CB: set_camera 2494.5 -1668.5 13.4
0053: $PLAYER_CHAR = create_player #NULL at 2494.5 -1668.5 13.4
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
01F5: $PLAYER_ACTOR = create_emulated_actor_from_player $PLAYER_CHAR
0173: set_actor $PLAYER_ACTOR z_angle_to 7.0
0373: set_camera_directly_behind_player
070D: $PLAYER_CHAR
0629: change_stat 181 (islands unlocked) to 4 // integer see statdisp.dat
01B6: set_weather 1
04BB: select_interior 0 // select render area
01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)
01B7: release_weather
016C: restart_if_wasted at 2494.5 -1668.5 13.4 angle 180.0 unknown 0
016D: restart_if_busted at 2494.5 -1668.5 13.4 angle 180.0 unknown 0
016A: fade 1 (out) 1000 ms
0001: wait 100 ms
03E6: remove_text_box
0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here
:MAIN_3
0001: wait 0 ms
0@ = 0
while 0@ < 100
0@ += 1
0099: 1@ = random_int_in_ranges_0_to_32767 // just to make it slower
end
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0
00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
0002: jump @MAIN_3
from cleo-redux.
It's working perfectly now, I was able to create a free camera mod without any problems.
Taking the advantage, a minor issue: 007B: in Sanny Builder for "SA Mobile" is written = instead of +=
from cleo-redux.
Does it happen when you run the same script in main.scm?
(note that 0C00 won't work in main.scm, but you can use widget keys for testing)
from cleo-redux.
I haven't tested it, but now I better understand the cause of the problem.
Try making 100 copies of this line:
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0
And hold Y.
The script will be slower to process, as a result, it takes around 3 seconds to process the loop and take effect.
It's like a lazy processing, I don't know. The longer the script, the longer it takes to process. Quickly takes a matter of seconds.
from cleo-redux.
this is expected, no? the game runs scripts in the main loop, which means while it executes opcodes it can't render a new frame. this is why we have wait
command to put the script on hold and let the game finish rendering the frame. the more opcodes you add in between wait
commands, the slower things are.
from cleo-redux.
But that's not how script execution works, just when "wait" is read the next game frame is executed.
You can loop 10,000 commands, the game will never skip frames.
This is for PC:
{$cleo}
0000:
while true
wait 0
if 0AB0: is_key_pressed 89 //y, PC opcode
then
0@ = 0
while 0@ < 10000
0@ += 1
0099: 1@ = random_int_in_ranges_0_to_32767 // just to make it slower
end
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 -10.0 0.0
00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
end
end
I lowered this script to only 1,000 iterations, tested it on SA:DE, pressed Y and the game ran for over 1 minute until it took effect. One possibility is that each command read, is executed 1 "wait 0" (roughly saying, to understand it). This script above would take more than 10 minutes to take effect in SA:DE.
from cleo-redux.
Can you test the same on pure main.scm?
from cleo-redux.
I can confirm the player movement is smooth on main.scm and jerking on cleo. I will look into what may cause it
from cleo-redux.
Remove wait 0 and it will become faster. I mentioned this problem before, but there is no time to study in these two days.
from cleo-redux.
@XMDS Loops must have wait command. It's actually a CLEO bug and a critical one, I must say.
@JuniorDjjr thanks for providing a test script and hinting the main.scm behavior. I was able to identify and fix the problem. Check the new dev build on discord.
from cleo-redux.
fixed in 0.8.3
from cleo-redux.
Related Issues (20)
- CLEO commands with multiple outputs don't work correctly HOT 2
- [Bully] `Clothing.BuildPlayer()` crashes the game HOT 1
- support "long strings" in III and VC if CLEO library is present HOT 1
- GTA 3 Definitive Edition car spawning freeze HOT 4
- GTA VC Definitive Edition CRASHES
- Dispatching an event from another event crashes the game? HOT 1
- Is it possible to restore the original music using CLEO Redux in San Andreas Definitive Edition
- [STEAM] GTA Trilogy - Error Cleo Redux is and Ultimate ASI Loader HOT 2
- [Classic: San Andreas] - Events.cleo Plugin Conflict with VehFuncs HOT 14
- Incompatible with new GTA Vice City DE patch 1.0.17.39540 HOT 2
- [RGL] 1.1.2 Crashes San Andreas Definitive Edition when loading a Save. HOT 8
- CLEO Redux doesn't work for ReVC OpenGL x64 build and Re3 OpenGL x64 build HOT 1
- Raknet HOT 1
- Heli.Create should return type Heli HOT 3
- Type "label" in opcodes input HOT 1
- stack trace is wrong in typescript files
- fxt support in VC: DE HOT 1
- conversion error in Memory.Fn.ThiscallU8 HOT 2
- Fx.DrawCorona bug HOT 4
- Text operations bug in 1.2.1 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cleo-redux.