Jump to content

Define (A New) Script Under The "Main.scm" OR Insert It Into The Main Part Of It [Classic]


ArmanCan

Recommended Posts

Hello Guys.. it's me againย ๐Ÿ˜Ž

ย 

My request is simple.. well not so simple.. but it's simple for expertsย ๐Ÿ˜ƒ I'm currently using this "Unused Detonator Animation" from @Cleoude (Cleoude.. nice job by the way.. it has a weird bug when the player is on fire but it's irrelevant ๐Ÿ˜‰) and today i realized that it's perfectly possible to implement it as "DEFINE SCRIPT ............... AT @......................................//78" OR edit and insert the script into the main part of it (Into the "Main Script/Mission")..After that i will only use it on my custom main.scm.. And off course..I WON'T PUBLISH IT ANYWHERE..

ย 

I'm posting the script here.. how can i do it? Thanks in advance for your help ๐Ÿ™

ย 

Spoiler
//by Cleomodlar (https://www.youtube.com/c/GtaCleoModlarTurkiye) 
{$CLEO .cs}

//-------------MAIN---------------
thread "DETONATOR"    
04ED: load_animation  "DETONATOR"

:DETONATOR_11
wait 0 
if and
02D8:   actor $PLAYER_ACTOR current_weapon == 40 
00E1:   player 0 pressed_key 17     
84AD:  not actor $PLAYER_ACTOR in_water
03EE:  player $PLAYER_CHAR controllable
09E7:   player $PLAYER_CHAR not_frozen  
8A0C:  not player $PLAYER_CHAR on_jetpack
jf @DETONATOR_11      
0A1A: actor $PLAYER_ACTOR perform_walk_animation "bomber" IFP "detonator" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 -1 ms // versionC
wait 300
        0AAC: 8@ = load_mp3 "CLEO\SOUNDS\beep.wav" 
        0AAD: set_mp3 8@ perform_action 1
09D9: detonate_all_satchel_charges
wait 300
0555: remove_weapon 40 from_actor $PLAYER_ACTOR
jump @DETONATOR_11                  

ย 

ย 

Link to comment
Share on other sites

ย 

add the script to the main part of main.scm

remove cleo directive and add a label instead

add 004F: create_thread @<added start label> to initialize the script

place 004F: in the main thread if the script should start at game start

or place 004F:ย  where ever you want, e.g another script, or mission script to can initialze it by key_press or something else

ย 

add a script to stripped main

add a script to originally main

ย 

ย 

Edited by ZAZ
Link to comment
Share on other sites

@ZAZ ok i got it.. i may bump you again if i have questions or need help ๐Ÿ˜‰

ย 

Edit: It worked.. thank you so much for your help ๐Ÿ™‚

Edited by ArmanCan
Link to comment
Share on other sites

The problem is you have to use one of the game sounds. cleo sounds don't work for scm

Link to comment
Share on other sites

@Cleoude hello ๐Ÿ˜ƒ

ย 

yes.. i figured that out.. because of that i removed the sound initiation from your script.. but if you have an idea to use sound (which i've never messed them except music disabling from Audiozon.dat) i can easily apply it ๐Ÿ˜‰

ย 

create_thread_wb @DETONATOR
.....
....
...
..
.
:DETONATOR
thread "DETONATOR"    
04ED: load_animation  "DETONATOR"

:DETONATOR_11
wait 0 
if and
    02D8:   actor $PLAYER_ACTOR current_weapon == 40 
    00E1:   player 0 pressed_key 17     
    84AD:  not actor $PLAYER_ACTOR in_water
    03EE:  player $PLAYER_CHAR controllable
    09E7:  player $PLAYER_CHAR not_frozen  
    8A0C:  not player $PLAYER_CHAR on_jetpack
jf @DETONATOR_11      
    0A1A: actor $PLAYER_ACTOR perform_walk_animation "bomber" IFP "detonator" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 -1 ms // versionC
wait 300
    09D9: detonate_all_satchel_charges
wait 300
    0555: remove_weapon 40 from_actor $PLAYER_ACTOR
jump @DETONATOR_11

ย 

Link to comment
Share on other sites

iirc You can't use from sfx files. I used this before for my Zero's rc mod.

03CF: load_wav 45400 as 3ย 

03D1: play_wav 3ย 
0949: link_wav 3 to_actor $Player_actor

ย 

but this kind of stuff is healthier with programming

ย 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.