sci4me Posted March 11, 2010 Share Posted March 11, 2010 (edited) How do i set an actors health? Edited March 12, 2010 by sci4me Link to comment Share on other sites More sharing options...
spaceeinstein Posted March 12, 2010 Share Posted March 12, 2010 Please be more descriptive about what you want. Assuming it's coding-related, please do a search next time. 0223: set_actor $actor health_to 500 Link to comment Share on other sites More sharing options...
sci4me Posted March 12, 2010 Author Share Posted March 12, 2010 THANKS... If an actor has a weapon, where do i put the code? ex.: $BUD1 = Actor.Create(Gang2, #BMYBOUN, 891.9232, 2117.818, 10.8203) Actor.Angle($BUD1) = 90.3137 01B2: give_actor $BUD1 weapon 31 ammo 900 // Load the weapon model before using this Actor.HasWeapon($BUD1, 31) 0223: set_actor $actor health_to 2000 this is part of a big script with many actors. Link to comment Share on other sites More sharing options...
ZAZ Posted March 13, 2010 Share Posted March 13, 2010 To give the actor or the player a weapon requires also to load first the model file But to give it then really into his hands needs to insert a special weapon number which is not documented in any game file. To find the right weapon number look in Sannybuilder HELP: SCM Documentation >> GTA SA >> Weapon numbers Weapon given to actors are not created in same sense like the other models, so it dont it to release them from script like other items :Actor_103A4: name_thread 'Actor':Actor_20001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Actor_2if00FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 2491.5 -1667.5 13.35 radius 1.0 1.0 1.0004D: jump_if_false @Actor_20247: request_model 1200247: request_model #AK47:Load_models_check0001: wait 0 ms00D6: if and0248: model 120 available0248: model #AK47 available004D: jump_if_false @Load_models_check009A: [email protected] = create_actor 24 120 at 2486.5 -1664.5 13.450173: set_actor [email protected] z_angle_to 180.001B2: give_actor [email protected] weapon 30 ammo 99999 // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to 1000223: set_actor [email protected] health_to 100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 120:Loop_10001: wait 0 msif8118: NOT actor [email protected] dead004D: jump_if_false @Cleanup_1if0104: actor $PLAYER_ACTOR near_actor [email protected] radius 80.0 80.0 10.0 sphere 0004D: jump_if_false @Cleanup_10002: jump @Loop_1:Cleanup_101C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @Actor_2 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Peppo_o'Paccio Posted March 14, 2010 Share Posted March 14, 2010 And if you want the actor immune to the headshots you must insert 0446: set_actor [email protected] immune_to_headshots 0 because if the actor has got maximum health, an headshot can kill him. If you write immune_to_headshots 0 the actor is immune to headshots, if you write immune_to_headshots 1 he isn't immune. Link to comment Share on other sites More sharing options...
TheSiggi Posted March 14, 2010 Share Posted March 14, 2010 If you write immune_to_headshots 0 the actor is immune to headshots, if you write immune_to_headshots 1 he isn't immune. the other way around.... 0=false 1=true 0446: set_actor [email protected] immune_to_headshots 0 > false > one shot and...... it's over 0446: set_actor [email protected] immune_to_headshots 1 > true > bam....it's a highlander Link to comment Share on other sites More sharing options...
james227uk Posted March 14, 2010 Share Posted March 14, 2010 Actually he's right. For me 0 has always been immune. That's how it was when coding X-Files II Link to comment Share on other sites More sharing options...
Peppo_o'Paccio Posted March 14, 2010 Share Posted March 14, 2010 HA-HA! I'm right P.S: I use this code, so I know how it works. Link to comment Share on other sites More sharing options...
TheSiggi Posted March 15, 2010 Share Posted March 15, 2010 Well after playing around with a quickly written scipt I gotta say... WTF!?!?!!? my actor is immune to headshots when I use 0446 always.... doesn't matter hether I set the parameter to 0 or 1 Never noticed this because I never considered writing a code including an opcode which is 'useless' (why shoul I write a script to disable the immunity of a actor if its already standart???) Does anybody else has that issue? or is it just CLEO 4? gotta try it with 3 again Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now