Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Summer Special
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
xander3000

Help!

Recommended Posts

xander3000

Please, I want know some things:

 

1)Exist a opcode who can make explode a actor when it dies? This is possible?

 

2)Remember the cave demons from the misterix mod?

user posted image

 

They only can die when it receive shots in his tail.

how I can set in a regular actor this feature?

 

3)I have about 50 cleo scripts loaded in san andreas, this isn't dangerous for my game?

Thank you!

Edited by xander3000

Share this post


Link to post
Share on other sites
trickstar34

1) I don't think you can, try a check if the actor is dead then store its coords in variables, then set a explosion opcode to take place at those coords. I might not understanding your question by blowing up, the only thing I think is possible is an actual explosion, not the character blowing up (body exploding), I am saying this because it doesn't happen in any of the missions nor is it in the main.scm. However I am not the best one to ask as ZAZ, Dutchy3010, PatrickW, and gtasearcher are much better scripters than I, so hopefully they will help you.

 

Here is some code I typed to get you started (not tested)

 

if actor.Dead(ActorVar)then 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to $X_Coord $Y_Coord $Z_Coord end020C: create_explosion_with_radius 1 at [email protected] [email protected] [email protected]

 

 

2) I have never heard of that mod and don't understand what your asking

 

3) It shouldn't be, unless they're all extremely large or aren't programed right.

Edited by trickstar34

Share this post


Link to post
Share on other sites
PatrickW

1/ If you want this done for a specific actor, that you created yourself in SCM, you can keep track of it's location, and as soon as you determine that he's dead, you can create an explosion at his last known location. There is no opcode to have exploding bodies for all actors/peds.

 

example code:([email protected] is the actor you want to explode)

 

REPEAT wait 0 00A0: store_actor [email protected] position_to [email protected] [email protected] [email protected] UNTIL actor.Dead([email protected])020C: create_explosion_with_radius 1 at [email protected] [email protected] [email protected]

 

 

2/ You can't. Regular actor don't have tails. tounge.gif

(alternative answer: As far as I know there's only the option to detect shots to the head separate from shots the the rest of the body. Maybe for these demon-models the tail was modeled as the head. Than is would be possible to let them only be killable by a headshot (being a shot to the tail for them)

 

3/ I'm not aware of a hard upper limit to the number of cleo-scripts, but more scripts will lead to more potentional incompatibilities and a higher load on the engine, and thus degraded performance.

Share this post


Link to post
Share on other sites
james227uk
1) I don't think you can, try a check if the actor is dead then store its coords in variables, then set a explosion opcode to take place at those coords. I might not understanding your question by blowing up, the only thing I think is possible is an actual explosion, not the character blowing up (body exploding), I am saying this because it doesn't happen in any of the missions nor is it in the main.scm. However I am not the best one to ask as ZAZ, Dutchy3010, PatrickW, and gtasearcher are much better scripters than I, so hopefully they will help you.

 

Here is some code I typed to get you started (not tested)

 

if actor.Dead(ActorVar)then 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to $X_Coord $Y_Coord $Z_Coord end020C: create_explosion_with_radius 1 at [email protected] [email protected] [email protected]

 

 

2) I have never heard of that mod and don't understand what your asking

 

3) It shouldn't be, unless they're all extremely large or aren't programed right.

1) lol, I don't think that's really gonna work.

 

 

wait 0if   Actor.Dead(VAR)then   Actor.StorePos(VAR, X, Y, Z)   020C: create_explosion_with_radius 3 at X Y Zend

 

 

Explosion radius's go from 1-7. 8 or over creates a black burnt effect on the floor but there's no visible explosion.

 

2) That's because of how the model was made. Not scripted

 

3) As long as they work ok, no errors, and most only work on keypress or in area.

 

 

 

Share this post


Link to post
Share on other sites
xander3000

I didn't get work the explosion, sometimes only in the floor gets burned without explosions confused.gif, like james227uk said, but I haven't killed the actor yet and the black thing appears in the floor.

 

Well, only I wanted know if that is possible smile.gif

 

Thank you to everybody anyway cookie.gifcookie.gif

Share this post


Link to post
Share on other sites
trickstar34
1) I don't think you can, try a check if the actor is dead then store its coords in variables, then set a explosion opcode to take place at those coords. I might not understanding your question by blowing up, the only thing I think is possible is an actual explosion, not the character blowing up (body exploding), I am saying this because it doesn't happen in any of the missions nor is it in the main.scm. However I am not the best one to ask as ZAZ, Dutchy3010, PatrickW, and gtasearcher are much better scripters than I, so hopefully they will help you.

 

Here is some code I typed to get you started (not tested)

 

if actor.Dead(ActorVar)then 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to $X_Coord $Y_Coord $Z_Coord end020C: create_explosion_with_radius 1 at [email protected] [email protected] [email protected]

 

 

2) I have never heard of that mod and don't understand what your asking

 

3) It shouldn't be, unless they're all extremely large or aren't programed right.

1) lol, I don't think that's really gonna work.

 

 

wait 0if   Actor.Dead(VAR)then   Actor.StorePos(VAR, X, Y, Z)   020C: create_explosion_with_radius 3 at X Y Zend

 

 

Explosion radius's go from 1-7. 8 or over creates a black burnt effect on the floor but there's no visible explosion.

 

2) That's because of how the model was made. Not scripted

 

3) As long as they work ok, no errors, and most only work on keypress or in area.

like I said, I'm not the best person to ask, I just copied codes I got from the opcode search.

Share this post


Link to post
Share on other sites
james227uk

 

needs two opcodes

 

020C: create_explosion_with_radius 8 at [email protected] [email protected] [email protected]: create_temporary_explosion_fire [email protected] [email protected] [email protected]  7

 

lol, I can never remember that 0565 . I saw it before, bt could never find it again. Definitely faving this topic

 

 

ike I said, I'm not the best person to ask, I just copied codes I got from the opcode search.

 

 

lol most people should know that never works. That's what newb coders do, sling opcodes from the opcode search together. (BTW, I AM NOT calling you a newb.)

Edited by james227uk

Share this post


Link to post
Share on other sites
xander3000

OK Let's see, I'm trying to use this, but I'm sure about something wrong on this..

 

 

 

[email protected] = Actor.Create(Gang3, #SPECIAL01, 228.7055, 2503.006, 189.4844)Actor.Health([email protected]) = 5000446: set_actor [email protected] immune_to_headshots 0 060B: set_actor [email protected] decision_maker_to 32 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTORActor.SetImmunities([email protected], 0, 1, 0, 1, 0) wait 0if  Actor.Dead([email protected])thenActor.StorePos([email protected], 272.9222, 2503.5535, 16.4844)020C: create_explosion_with_radius 8 at 272.9222 2503.5535 16.4844 0565: create_temporary_explosion_fire 272.9222 2503.5535 16.4844  7end

 

 

I added the coords, but I'm not sure what does the "Actor.StorePos", I tried this in the game, I kill the actor and nothing happened confused.gif

 

 

Share this post


Link to post
Share on other sites
trickstar34

 

lol most people should know that never works. That's what newb coders do, sling opcodes from the opcode search together. (BTW, I AM NOT calling you a newb.)

 

I'm half and half

 

I know how to make advanced scripts but I dont know how to use all of the opcodes, I've only been coding for like a month (who say's it takes several months to learn coding, that would mean that there arent many scripters if thats the case).

 

And I know how to use that code, I just wasnt paying attention because I had to go work on the house.

Edited by trickstar34

Share this post


Link to post
Share on other sites
trickstar34

 

OK Let's see, I'm trying to use this, but I'm sure about something wrong on this..

 

 

 

[email protected] = Actor.Create(Gang3, #SPECIAL01, 228.7055, 2503.006, 189.4844)Actor.Health([email protected]) = 5000446: set_actor [email protected] immune_to_headshots 0 060B: set_actor [email protected] decision_maker_to 32 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTORActor.SetImmunities([email protected], 0, 1, 0, 1, 0) wait 0if  Actor.Dead([email protected])thenActor.StorePos([email protected], 272.9222, 2503.5535, 16.4844)020C: create_explosion_with_radius 8 at 272.9222 2503.5535 16.4844 0565: create_temporary_explosion_fire 272.9222 2503.5535 16.4844  7end

 

 

I added the coords, but I'm not sure what does the "Actor.StorePos", I tried this in the game, I kill the actor and nothing happened confused.gif

You dont make it repeat to check if the actor is dead, also the decition maker you made doesnt always work, here is a repaired version of your code. Oh and I believe you should change those coords to vars.

 

 

[email protected] = Actor.Create(Gang3, #SPECIAL01, 228.7055, 2503.006, 189.4844)Actor.Health([email protected]) = 5000446: set_actor [email protected] immune_to_headshots 0 060B: set_actor [email protected] decision_maker_to 655360946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTORActor.SetImmunities([email protected], 0, 1, 0, 1, 0) :CHECKwait 0if  Actor.Dead([email protected])thenActor.StorePos([email protected], [email protected], [email protected], [email protected])020C: create_explosion_with_radius 8 at [email protected] [email protected] [email protected] 0565: create_temporary_explosion_fire [email protected] [email protected] [email protected] 7jump @NEXTendjump @CHECK:NEXT

 

 

:NEXT is where the continuation of your mission should go.

Edited by trickstar34

Share this post


Link to post
Share on other sites
xander3000

lol.giflol.giflol.gif LOL

 

trickstar this really worked biggrin.gif ,

I got scared when this guy exploded in the CJ's face.

Thank you to everybody. cookie.gifcookie.gifcookie.gifcookie.gifcookie.gifcookie.gifcookie.gifcookie.gifcookie.gifcookie.gifcookie.gifbiggrin.gifbiggrin.gifbiggrin.gif

This code is really AWESOME

 

 

Share this post


Link to post
Share on other sites
trickstar34

just another note: you dont need 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR, as the game tells the enemy to follow the player automatically until he is dead, the only time you would need this is if you dont want the enemy to kill him, but follow him.

 

From PatrickW's code, try not to use repeat as much as possible, because it changes into if's in the compiled version and could completely ruin your script, had this problem several times during Empire Mode, I changed them all to if's.

Edited by trickstar34

Share this post


Link to post
Share on other sites
xander3000

 

just another note: you dont need 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR, as the game tells the enemy to follow the player automatically until he is dead, the only time you would need this is if you dont want the enemy to kill him, but follow him.

 

Got it! icon14.gif Thank you

 

 

From PatrickW's code, try not to use repeat as much as possible, because it changes into if's in the compiled version and could completely ruin your script, had this problem several times during Empire Mode, I changed them all to if's.

 

Yeah, I had this problem too in another cleo mods lol.gif

 

 

 

Share this post


Link to post
Share on other sites
xander3000

Sorry for double-posting, but I have another question and I want post the question in this topic instead of creating a new topic.

 

Is possible set an actor able for climb billboards and fences chasing to the Player actor?

 

Beacause they normally when the Player Actor is in the top of a small wall or in the roof of a little house, they don't climb it.. confused.gifconfused.gif

 

Is possible make them able for do that?

 

Thanks..

Share this post


Link to post
Share on other sites
trickstar34

 

Sorry for double-posting, but I have another question and I want post the question in this topic instead of creating a new topic.

 

Is possible set an actor able for climb billboards and fences chasing to the Player actor?

 

Beacause they normally when the Player Actor is in the top of a small wall or in the roof of a little house, they don't climb it.. confused.gif  confused.gif

 

Is possible make them able for do that?

 

Thanks..

It's possible to make them climb on them if you predefine their route, but if they are chasing the player I'm not sure, I'll check if there is any way to do it.

 

OK, I have found a opcode to make the actor jump, but I still am searching for something to check if it has to.

 

 

05BC: AS_actor [email protected] jump 1

 

 

EDIT: I've been looking, but no opcode to check if he needs to jump, you will just have to hope the actor is smart enough to jump and climb.

Edited by trickstar34

Share this post


Link to post
Share on other sites
NTAuthority
From PatrickW's code, try not to use repeat as much as possible, because it changes into if's in the compiled version and could completely ruin your script, had this problem several times during Empire Mode, I changed them all to if's.

'ruin your script' as in 'make it impossible to decompile to the same repeat structures'? That's obvious in most programming languages, but absolutely should not be a reason to not use repeat structures. What, do you think R*N wrote everything as if/jf combinations? smile.gif

Share this post


Link to post
Share on other sites
xander3000

Another question, exist a opcode for make the Player Actor unable to shot or trow punches?

 

I'm working in a cleo mod, and I want a opcode to make the player actor unable to start to shot or trow punches during a mini-cutscene,

this is possible?

Thanks. smile.gif

Share this post


Link to post
Share on other sites
Dutchy3010

Perhaps with this opcode:

 

0881: set_player $PLAYER_CHAR able_to_shoot_weapons 0 

 

I never tried this one, though.

Share this post


Link to post
Share on other sites
xander3000

It worked, thank you! biggrin.gifcookie.gifcookie.gifcookie.gifcookie.gif

 

But the Player Actor can still performing physical attacks,

exist a opcode for prevent the physicals attacks?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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