Jump to content

katana with effect


cloud_strife94

Recommended Posts

cloud_strife94

I want to attach an effect (the electricity of the overdose effects by ZAZ and Function X, http://www.gtaforums.com/index.php?showtopic=412597&st=0) to the katana; I started a cleo but it doesn't work,

can someone help me to fix?

 

{$CLEO .cs}03A4: name_thread 'SWORD'while truewait 0ifPlayer.Defined($PLAYER_CHAR)thenif0ADC: test_cheat "SAS"then0ACA: show_text_box "on"Model.Load(#KATANA)038B: load_requested_modelswait 0 if Model.Available(#KATANA) 01B2: give_actor $PLAYER_ACTOR weapon 8 ammo 1Model.Destroy(#KATANA)04C4: store_coords_to 3@ 4@ 23@ from_actor $PLAYER_ACTOR with_offset 0.25 1.0 0.0066A: 21@ = attach_particle "electric2" to_actor $PLAYER_ACTOR with_offset 0.5 13.0 23@ rotation 0.25 130.0 18@ flag 1 064F: remove_references_to_particle 21@ 04C4: store_coords_to 3@ 4@ 23@ from_actor $PLAYER_ACTOR with_offset 0.25 4.0 7.5 if0AB0:   key_pressed 80555: remove_weapon 8 from_actor0108: destroy_object 0@0976: destroy_particle 21@end endendend

 

 

thanks in advance

Link to comment
Share on other sites

{$CLEO .cs}03A4: name_thread 'SWORD'while true // indent your code..   wait 0   if       Player.Defined($PLAYER_CHAR)   then       if           0ADC: test_cheat "SAS"       then           0ACA: show_text_box "on"           Model.Load(#KATANA)           038B: load_requested_models                      // you dont need to check if models are loaded after using 038B:                      01B2: give_actor $PLAYER_ACTOR weapon 8 ammo 1                      Model.Destroy(#KATANA)                      04C4: store_coords_to 3@ 4@ 23@ from_actor $PLAYER_ACTOR with_offset 0.25 1.0 0.0           066A: 21@ = attach_particle "electric2" to_actor $PLAYER_ACTOR with_offset 0.5 13.0 23@ rotation 0.25 130.0 18@ flag 1           064C: make_particle 21@ visible     // need this to see the particle           064F: remove_references_to_particle 21@           04C4: store_coords_to 3@ 4@ 23@ from_actor $PLAYER_ACTOR with_offset 0.25 4.0 7.5       end              // i believe this code should be here..       if           0AB0:   key_pressed 8       then // must add "then"           0555: remove_weapon 8 from_actor           0108: destroy_object 0@           // 0976: destroy_particle 21@ // this is the mission version           064E: stop_particle 21@  // we have already marked the particle as not used using 064F       end   endend

 

Link to comment
Share on other sites

 

I want to attach an effect (the electricity of the overdose effects by ZAZ and Function X, http://www.gtaforums.com/index.php?showtopic=412597&st=0) to the katana; I started a cleo but it doesn't work,

can someone help me to fix?

 

The effect "electric2" doesn't exist in OD1.4

electric2 is a texturname

 

The effects are named:

electric_tiny

electric_med

electric

 

 

the description of this opcode isn't correct:

064F: remove_references_to_particle 21@

 

correct is:

 

064F: make_temp_particle_visible_and_remove_references 21@

 

 

so you don't need opcode 064C: and also not 0976:

 

and you don't need 0108: destroy_object 0@ because there isn't any object

 

and if you attach particle to actor with offset you also don't need to store coords from actor

 

Ok, so far, let's explain the effect and opcode 064F: more below

first the correct script.

I haven't run cleo4 so i used keypress

you can change 0ADC: with 0AB0: by yourself and reactivate 0ACA:

press 0 to activate, press backspace to remove the weapon

 

{$CLEO .cs}03A4: name_thread 'SWORD'while true   wait 0   if   Player.Defined($PLAYER_CHAR)   then       if  and       not Actor.HasWeapon($PLAYER_ACTOR, 8)       0AB0:   key_pressed 48//--------- 0       //0ADC: test_cheat "SAS"       then           //0ACA: show_text_box "on"           Model.Load(#KATANA)           038B: load_requested_models           wait 0           01B2: give_actor $PLAYER_ACTOR weapon 8 ammo 1           Model.Destroy(#KATANA)           066A: 21@ = attach_particle "electric_tiny" to_actor $PLAYER_ACTOR with_offset 0.5 0.5 0.5 rotation 0.0 0.0 0.0 flag 1           064F: make_temp_particle_visible_and_remove_references 21@       end       if  and       0AB0:   key_pressed 8//--------- Backspace       Actor.HasWeapon($PLAYER_ACTOR, 8)       then           0555: remove_weapon 8 from_actor $PLAYER_ACTOR       end   endend

 

 

We have 2 kinds of particle

1. temporary

2. permanently

 

temporary particles are shown for a short moment

they needs to get opcode 064F: to be visible and to get released

 

permanently particles need to show it with opcode 064C: and remove it with with opcode 0650:

 

To indicate if the particle is temporary or permanently needs to look into effects.fxp

 

FILENAME: X:\SA\FxTools\Data\effects\gta_pc\systems/map/electric_tiny.fxsNAME: electric_tinyLENGTH: 10.000LOOPINTERVALMIN: 0.000LENGTH: 0.000PLAYMODE: 0 <---------- playmode 0 is temporary

 

 

FILENAME: X:\SA\FxTools\Data\effects\gta_pc\systems/code/spraycan.fxsNAME: spraycanLENGTH: 5.000LOOPINTERVALMIN: 0.000LENGTH: 0.000PLAYMODE: 2 <---------- playmode 1 and 2 is permanently

 

 

Link to comment
Share on other sites

cloud_strife94

thanks a lot ZAZ smile.gif

 

EDIT: it works, but if it's possible I want to do something like this

user posted image

 

Uploaded with ImageShack.us

but attacched on the sword and make the effect permanent...

Edited by cloud_strife94
Link to comment
Share on other sites

cloud_strife94

I changed something to the cleo but I need the name of the effect, I think it's in project fantasia, but I doesn't know the name, I founded some effect but they aren't the same that I'm looking for...

 

{$CLEO .cs}03A4: name_thread 'SWORD'while truewait 0ifPlayer.Defined($PLAYER_CHAR)thenif  andnot Actor.HasWeapon($PLAYER_ACTOR, 8)0AB0:   key_pressed 48thenModel.Load(#KATANA)038B: load_requested_modelswait 001B2: give_actor $PLAYER_ACTOR weapon 8 ammo 1Model.Destroy(#KATANA)066A: 21@ = attach_particle "??????????" to_actor $PLAYER_ACTOR with_offset 0.3 0.3 0.3 rotation 0.0 0.0 0.0 flag 1064C: make_particle 21@ visibleendif  and0AB0:   key_pressed 8Actor.HasWeapon($PLAYER_ACTOR, 8)then0650: delete_particle 21@0555: remove_weapon 8 from_actor $PLAYER_ACTORendendend

 

 

EDIT:sorry for the double post.

Link to comment
Share on other sites

eh?

ZAZ already gave you all those things, you only need to search the "PF_Examples" inside PF files.

I think these are the ones you want: (ZAZ example)

 

 

{$CLEO .cs}:ParticleEffect_Playmode_0//Playmode_0 is shown for a moment, temporary, can run in a loop for some cases03A4: name_thread 'PRTEFCT':PRTEFCT_010001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @PRTEFCT_01if0AB0:   key_pressed 8//-----------------------press Backspace004D: jump_if_false @PRTEFCT_0104C4: create_coordinate 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset 0.0 3.5  1.0064B: 0@ = create_particle "electric_tiny"  at 1@ 2@ 3@ type 4064F: make_temp_particle_visible_and_remove_references 0@wait  1250064B: 0@ = create_particle "electric_med"  at 1@ 2@ 3@ type 4064F: make_temp_particle_visible_and_remove_references 0@wait  1250064B: 0@ = create_particle "electric"  at 1@ 2@ 3@ type 4064F: make_temp_particle_visible_and_remove_references 0@wait  1250064B: 0@ = create_particle "lightning_shot"  at 1@ 2@ 3@ type 4064F: make_temp_particle_visible_and_remove_references 0@wait  1250064B: 0@ = create_particle "lightning_rain"  at 1@ 2@ 3@ type 4064F: make_temp_particle_visible_and_remove_references 0@wait  12500002: jump @PRTEFCT_01

 

one of those is the one you want, just search...

Link to comment
Share on other sites

 

thanks a lot ZAZ  smile.gif

EDIT: it works, but if it's possible I want to do something like this

a smaller effect? yes,

"taservictim"

or

"taser"

 

look at profantasia-effectlist

to find the names of all new effects of PROJECT FANTASIA

 

 

 

but attacched on the sword and make the effect permanent...

to show a playmode 0 particle permanently needs to run the effectcode in a loop

study the examples of PROJECT-FANTASIA-MAGIC-MODS of Folder PF_Examples

 

to attach the effect to the hand needs this supportive opcode:

 

0883: attach_particle 21@ to_actor $PLAYER_ACTOR mode 23// right hand

 

 

try the script below

play around with the wait time, with wait 0 it displays to much light because the effect have a minimum duration

and it needs to make breakes in the loop

 

{$CLEO .cs}03A4: name_thread 'SWORD'while true   wait 50   if   Player.Defined($PLAYER_CHAR)   then       if  and       not Actor.HasWeapon($PLAYER_ACTOR, 8)       0AB0:   key_pressed 48//--------- 0       //0ADC: test_cheat "SAS"       then           //0ACA: show_text_box "on"           Model.Load(#KATANA)           038B: load_requested_models           wait 0           01B2: give_actor $PLAYER_ACTOR weapon 8 ammo 1           Model.Destroy(#KATANA)       end       if       02D8:   actor $PLAYER_ACTOR current_weapon == 8        then           066A: 21@ = attach_particle "taservictim" to_actor $PLAYER_ACTOR with_offset 0.4 -0.3 -0.1 rotation 0.0 0.0 0.0 flag 1           0883: attach_particle 21@ to_actor $PLAYER_ACTOR mode 23// right hand           064F: make_temp_particle_visible_and_remove_references 21@       end       if  and       0AB0:   key_pressed 8//--------- Backspace       Actor.HasWeapon($PLAYER_ACTOR, 8)       then           0555: remove_weapon 8 from_actor $PLAYER_ACTOR       end   endend

 

 

 

Link to comment
Share on other sites

cloud_strife94

thanks ZAZ, I modificated something and now is exactly as I want...

user posted image

it's a little too luminous,

is there any way to fix the problem of the light?

or do I need to found another effect?

 

however, thanks for everything.

Link to comment
Share on other sites

 

thanks ZAZ, I modificated something and now is exactly as I want...

it's a little too luminous,

is there any way to fix the problem of the light?

or do I need to found another effect?

 

however, thanks for everything.

yes, as i said, increase the wait time a little bit

 

 

play around with the wait time, with wait 0 it displays to much light because the effect have a minimum duration

and it needs to make breakes in the loop

 

{$CLEO .cs}03A4: name_thread 'SWORD'while true  wait 50  if  Player.Defined($PLAYER_CHAR)  then      if  and      not Actor.HasWeapon($PLAYER_ACTOR, 8)      0AB0:   key_pressed 48//--------- 0      //0ADC: test_cheat "SAS"      then          //0ACA: show_text_box "on"          Model.Load(#KATANA)          038B: load_requested_models          wait 0          01B2: give_actor $PLAYER_ACTOR weapon 8 ammo 1          Model.Destroy(#KATANA)      end      if      02D8:   actor $PLAYER_ACTOR current_weapon == 8      then          066A: 21@ = attach_particle "taservictim" to_actor $PLAYER_ACTOR with_offset 0.4 -0.3 -0.1 rotation 0.0 0.0 0.0 flag 1          0883: attach_particle 21@ to_actor $PLAYER_ACTOR mode 23// right hand          064F: make_temp_particle_visible_and_remove_references 21@      end      if  and      0AB0:   key_pressed 8//--------- Backspace      Actor.HasWeapon($PLAYER_ACTOR, 8)      then          0555: remove_weapon 8 from_actor $PLAYER_ACTOR      end  endend

 

Link to comment
Share on other sites

cloud_strife94

sorry, just another thing...you sayed that

 

0883: attach_particle 21@ to_actor $PLAYER_ACTOR mode 23// right hand

 

and for the left hand? how can I do?

Link to comment
Share on other sites

sorry, just another thing...you sayed that

 

0883: attach_particle 21@ to_actor $PLAYER_ACTOR mode 23// right hand

 

and for the left hand? how can I do?

 

0883: attach_particle 0@ to_actor $PLAYER_ACTOR mode 24//left Hand

 

Link to comment
Share on other sites

a vid would be more interessting

Link to comment
Share on other sites

cloud_strife94
a vid would be more interessting

soon xD

first I need to finish some mods, after I'll post here the link

Link to comment
Share on other sites

  • 1 month later...
cloud_strife94

following the PF Examples I made a scrip for throwing object.

I added an effect to this object but it's a playmod 0, so after few seconds it disappear...

I used the opcodes 066A but the game crash...so, please can you help me to fix it?

here my script:

 

thread 'FIRESTYLE' :NONAME_11wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NONAME_11 if 0ADC:   test_cheat 'FIRE' else_jump @NONAME_11 Model.Load(1598)else_jump @NONAME_11   Model.Available(1598) :NONAME_117wait 0 if 0AB0:   key_pressed 8 else_jump @NONAME_753 wait 50 04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 2.0 0.0 1@ = Object.Create(1598, 11@, 12@, 13@)0750: set_object 1@ visibility 1 04D9: object 1@ set_scripted_collision_check 1 Object.CollisionDetection(1@) = True08D2: object 1@ scale_model 0.0 0906: set_object 1@ mass_to 30000.0 // float 0908: set_object 1@ turn_mass_to 30000.0 // float wait 0066E: create_particle "FIRENAR" attached_to_object 1@ with_offset 0.0 0.0 0.3 rotation 15@ 16@ 23@ flag 1 handle_as 27@ 064F: make_Particle_visible_and_remove_references 27@4@ = 100.1 19@ = Actor.Angle($PLAYER_ACTOR)02F6: 15@ = sine 19@ // (float) 02F7: 16@ = cosine 19@ // (float) 15@ *= 10.0 16@ *= 10.0 15@ *= -1.0 18@ = 1.0 Object.ToggleInMovingList(1@) = TrueObject.Throw(1@, 15@, 16@, 18@)33@ = 0 :NONAME_603wait 0 0400: store_coords_to 11@ 12@ 13@ from_object 1@ with_offset 0.0 -2.0 0.0 Object.Throw(1@, 15@, 16@, 18@)if or04DA:   has_object 1@ collided  33@ > 3000 else_jump @NONAME_603 0400: store_coords_to 11@ 12@ 13@ from_object 1@ with_offset 0.0 0.0 0.0 0565: create_soundless_explosion_at 11@ 12@ 13@ type 1 0976: destroy_particle 21@ Object.Destroy(1@)Model.Destroy(1598)jump @NONAME_753 :NONAME_753if 0ADC:   test_cheat "FIRE" else_jump @NONAME_117  jump @NONAME_11 

 

thanks in advance.

Link to comment
Share on other sites

You have used "FIRENAR" which don't exist in the PF_effect files

Use "FIREBALL" or did you modified the effect files?

 

The effect diappear because it needs to run the effect codes also in the second loop

 

:NONAME_603wait 00400: store_coords_to 11@ 12@ 13@ from_object 1@ with_offset 0.0 -2.0 0.0Object.Throw(1@, 15@, 16@, 18@)066E: create_particle "FIREBALL" attached_to_object 1@ with_offset 0.0 0.0 0.3 rotation 15@ 16@ 23@ flag 1 handle_as 27@064F: make_Particle_visible_and_remove_references 27@if or04DA:   has_object 1@ collided33@ > 3000else_jump @NONAME_603

 

 

 

btw. this check is wrong:

 

Model.Load(1598)else_jump @NONAME_11 Model.Available(1598)

 

 

 

Link to comment
Share on other sites

cloud_strife94

I used an effect made by function X and it's a playmode 0.

my script works fine, the only problem is that the effect disappear after few second...

please, can you help me to fix this problem?

Link to comment
Share on other sites

 

I used an effect made by function X and it's a playmode 0.

my script works fine, the only problem is that the effect disappear after few second...

please, can you help me to fix this problem?

ok, again

 

The effect diappear because it needs to run the effect codes also in the second loop

 

:NONAME_603wait 00400: store_coords_to 11@ 12@ 13@ from_object 1@ with_offset 0.0 -2.0 0.0Object.Throw(1@, 15@, 16@, 18@)066E: create_particle "FIRENAR" attached_to_object 1@ with_offset 0.0 0.0 0.3 rotation 15@ 16@ 23@ flag 1 handle_as 27@064F: make_Particle_visible_and_remove_references 27@if or04DA:   has_object 1@ collided33@ > 3000else_jump @NONAME_603

 

 

Link to comment
Share on other sites

  • 4 weeks later...

i dont know why but only some effects work. i tried to use 'fireball' for example and it wouldnt show up in game. and yeah, i installed everything where it goes. 'electric', 'taser/taservictim' 'lightning rain' 'electric_tiny' 'lightning shot' worked fine when i tried them out. why dont all effects work?

Link to comment
Share on other sites

kmlwin.1996
i dont know why but only some effects work. i tried to use 'fireball' for example and it wouldnt show up in game. and yeah, i installed everything where it goes. 'electric', 'taser/taservictim' 'lightning rain' 'electric_tiny' 'lightning shot' worked fine when i tried them out. why dont all effects work?

That can happen when you didn't save your changed file.

Link to comment
Share on other sites

 

i dont know why but only some effects work. i tried to use 'fireball' for example and it wouldnt show up in game. and yeah, i installed everything where it goes. 'electric', 'taser/taservictim' 'lightning rain' 'electric_tiny' 'lightning shot' worked fine when i tried them out. why dont all effects work?

You must just know that it requires always a supportive opcode to make the particle visible

read tutorial

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.