Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

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

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    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. Design Your Own Mission
      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
    1. Announcements

    2. Support

    3. Suggestions

Status Health Bar to Actor not working!


skatefilter5
 Share

Recommended Posts

I was making the boss actor, however I took it from the tutorial of sweet's car for example but adding it to the script while it's processing when the enemy's quotes or if actor dead, I set the health bar to 35000 and nothing happens when I shoot him.

 

Having health bar (while) will get this script locked in a looped unitl reach 0

 

example from dutchy's

repeatwait 0 ms$health = Car.Health([email protected])0084: $health2 = $health // integer values and handlesif $health2 > 250 // integer valueselse_jump @SWEET4_11472$health2 -= 250 // integer values:SWEET4_11472$health2 /= 12 // integer valuesuntil  $health < 2500151: remove_status_text $health2end_thread

repeat and until will lock this script from killing actor & destroying.

 

Like this:

 

$health_target = actor.Health([email protected])
0084: $Bobby_health = $health_target // integer values and handles
0ADF: add_dynamic_GXT_entry "BOBBY_B" text "Bobby's ~r~Health"
//$Bobby_health = 35000 -- That didn't work either
03C4: set_status_text_to $Bobby_health 1 'BOBBY_B' // CAR HEALTH

 

-------------------------------------------

 

:HEALTH_BOBBY
0084: $Bobby_health = $health_target // integer values and handles
if
$Bobby_health > 250 // integer values
jf @BOBBY_HIT
$Bobby_health -= 250 // integer values

:BOBBY_HIT
$Bobby_health /= 12 // integer values
:HEALTH_BOBBY
if
$Bobby_health > 35000 // integer values
jf @SCRIPT_RUN_BOBBY_QUOTES
$Bobby_health -= 100 // integer values
$Bobby_health /= 12 // integer values}
jump @SCRIPT_RUN_BOBBY_QUOTES

 

The whole script

{$CLEO .CS}0000: NOPMODEL.Load(#wmybmx)MODEL.Load(#gungrl3)MODEL.Load(#ak47)MODEL.Load(#flame)MODEL.Load(#SHOTGSPA)038B: load_requested_models:KEY_PRESSEDwait 0 if and0AB0:   key_pressed 80AB0:   key_pressed 90jf @KEY_PRESSEDwait 100004C4: store_coords_to [email protected] [email protected] [email protected] from_actor $player_actor with_offset 0.0 6.0 -1.004C4: store_coords_to [email protected] [email protected] [email protected] from_actor $player_actor with_offset 1.0 6.0 [email protected] = audiostream.Load("cleo\bobbyking\bobby1.mp3")[email protected] = audiostream.Load("cleo\bobbyking\bobby2.mp3")[email protected] = audiostream.Load("cleo\bobbyking\bobby3.mp3")[email protected] = audiostream.Load("cleo\bobbyking\bobby4.mp3")[email protected] = audiostream.Load("cleo\bobbyking\bobby5.mp3")[email protected] = audiostream.Load("cleo\bobbyking\bobby6.mp3")[email protected] = audiostream.Load("cleo\bobbyking\bobby7.mp3")[email protected] = audiostream.Load("cleo\bobbyking\water.mp3")[email protected] = audiostream.Load("cleo\bobbyking\death.mp3"){0ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.00ABC: set_audiostream [email protected] volume 200.0   }//[email protected] = actor.Create(gang9, #wmybmx, [email protected], [email protected], [email protected])[email protected] = actor.Create(gang9, #gungrl3, [email protected], [email protected], [email protected]){audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])audiostream.LinkToActor([email protected], [email protected])  }038B: load_requested_models077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 0 // see ped.dat077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 1 // see ped.dat077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 6 // see ped.dat081A: set_actor [email protected] weapon_skill_to 2actor.GiveWeaponAndAmmo([email protected], ak47, 9999)077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 0 // see ped.dat077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 1 // see ped.dat077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 6 // see ped.dat03FE: set_actor [email protected] money 25000489: set_actor [email protected] muted 102AB: set_actor [email protected] immunities BP 0 FP 1 EP 0 CP 0 MP 002E2: set_actor [email protected] weapon_accuracy_to 8507DD: set_actor [email protected] attack_rate 89 // previously known as temper_to0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 104D8: set_actor [email protected] drowns_in_water 00446: set_actor [email protected] dismemberment_possible 0actor.SetWalkStyle([email protected], "player")02A9: set_actor [email protected] immune_to_nonplayer 102AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 107DD: set_actor [email protected] attack_rate 100 // previously known as temper_to07FE: set_actor [email protected] fighting_style_to 7 moves 60850: AS_actor [email protected] follow_actor [email protected]: AS_actor [email protected] kill_actor $player_actor05E2: AS_actor [email protected] kill_actor $player_actoractor.Health([email protected]) = 35000actor.Health([email protected]) = 800$health_target = actor.Health([email protected])0084: $Bobby_health = $health_target // integer values and handles0ADF: add_dynamic_GXT_entry "BOBBY_B" text "Bobby's ~r~Health"//$Bobby_health = 3500003C4: set_status_text_to $Bobby_health 1 'BOBBY_B'  // CAR [email protected] = 00209: [email protected] = random_int_in_ranges 0 6:SCRIPT_RUN_BOBBY_QUOTESwait 0//gosub @KEY_PRESSED_QUIT:BOBBYS_QUOTES_1wait 0if [email protected] = 0 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @BOBBYS_QUOTES_20ACD: show_text_highpriority "~r~Bobby~w~: Is that the best you got?" time [email protected] = 009B5: set_actor [email protected] signal_after_kill 005E2: AS_actor [email protected] kill_actor $player_actor//06E3: AS_actor [email protected] roll_sideways 107DD: set_actor [email protected] attack_rate 75 // previously known as temper_toactor.GiveWeaponAndAmmo([email protected], ak47, 9999)audiostream.PerformAction([email protected], play)jump @KEY_PRESSED_QUIT:BOBBYS_QUOTES_2wait 0if [email protected] = 1 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @BOBBYS_QUOTES_30ACD: show_text_highpriority "~r~Bobby~w~: Yo, girl and get them!" time [email protected] = 00687: clear_actor [email protected] task0812: AS_actor [email protected] perform_animation "f*cku" IFP "ped" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1  // versionB09B5: set_actor [email protected] signal_after_kill 007DD: set_actor [email protected] attack_rate 75 // previously known as temper_toactor.GiveWeaponAndAmmo([email protected], ak47, 9999)audiostream.PerformAction([email protected], play):BOBBYS_QUOTES_3     wait 0           if [email protected] = 2 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @BOBBYS_QUOTES_40ACD: show_text_highpriority "~r~Bobby~w~: Yo, girl kill this fool." time [email protected] = 00687: clear_actor [email protected] task0812: AS_actor [email protected] perform_animation "f*cku" IFP "ped" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1  // versionB05E2: AS_actor [email protected] kill_actor $player_actor09B5: set_actor [email protected] signal_after_kill 107DD: set_actor [email protected] attack_rate 75 // previously known as temper_toactor.GiveWeaponAndAmmo([email protected], ak47, 9999)audiostream.PerformAction([email protected], play)jump @KEY_PRESSED_QUIT:BOBBYS_QUOTES_4wait 0                    if [email protected] = 3 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @BOBBYS_QUOTES_50ACD: show_text_highpriority "~r~Bobby~w~: Your mine, idiot! Take that!" time 3000actor.GiveWeaponAndAmmo([email protected], combatshotgun, 9999)07DD: set_actor [email protected] attack_rate 100 // previously known as [email protected] = 006E3: AS_actor [email protected] roll_sideways 10687: clear_actor [email protected] task09B5: set_actor [email protected] signal_after_kill 1audiostream.PerformAction([email protected], play)jump @KEY_PRESSED_QUIT:BOBBYS_QUOTES_5wait 0                 if and           [email protected] = 4 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @BOBBYS_QUOTES_60ACD: show_text_highpriority "~r~Bobby~w~: Time to burn you to the ground!" time 2000actor.GiveWeaponAndAmmo([email protected], flamethrower, 9999)07DD: set_actor [email protected] attack_rate 100 // previously known as [email protected] = 0//06E3: AS_actor [email protected] roll_sideways 10687: clear_actor [email protected] task09B5: set_actor [email protected] signal_after_kill 1audiostream.PerformAction([email protected], play)jump @KEY_PRESSED_QUIT:BOBBYS_QUOTES_6wait 0                  if [email protected] = 5 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @[email protected] = 00ACD: show_text_highpriority "~r~Bobby~w~: I bet you cannot kill me, and one of your pal will die!" time 4000audiostream.PerformAction([email protected], play)jump @KEY_PRESSED_QUIT:BOBBYS_QUOTES_7wait 0                  if [email protected] = 6 0019:   [email protected] > 100000104:   actor $PLAYER_ACTOR near_actor [email protected] radius 60.0 60.0 60.0 sphere 0jf @[email protected] = 00ACD: show_text_highpriority "~r~Bobby~w~: Sorry buddy, I can't help you, I betrayed you, idiot." time 4000audiostream.PerformAction([email protected], play)jump @KEY_PRESSED_QUIT                                     :KEY_PRESSED_QUITwait 0if and0AB0:   key_pressed 80AB0:   key_pressed 90jf @[email protected] = 00151: remove_status_text $Bobby_healthactor.DestroyInstantly([email protected])actor.DestroyInstantly([email protected])//returnaudiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])wait 2000jump @KEY_PRESSED:BOBBY_DEATHwait 0if actor.Dead([email protected])jf @IN_WATER_QUOTE0151: remove_status_text $Bobby_healthaudiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], PLAY)0ACD: show_text_highpriority "~r~Bobby~w~: Noooooooooo!!!" time 3000wait 5000actor.DestroyInstantly([email protected])05BE: AS_actor [email protected] diewait 3000actor.DestroyWithFade([email protected])//returnwait 2000audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])audiostream.Release([email protected])jump @KEY_PRESSED:IN_WATER_QUOTEif0965:   actor [email protected] swimmingjf @[email protected] = 0audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], STOP)audiostream.performaction([email protected], play)0ACD: show_text_highpriority "~r~Bobby~w~: Darn it! I don't have no time to swim like this." time 3000//wait 1000jump @IN_WATER:IN_WATER04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $player_actor 0.0 0.0 0.004C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] 0.0 0.0 0.004C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] 0.0 1.0 0.0wait 0if04AD:   actor [email protected] in_waterjf @JUMP_THERE07E1: AS_actor [email protected] swim_to [email protected] [email protected] [email protected]:JUMP_THEREif 04AD:   actor [email protected] in_water//0104:   actor $PLAYER_ACTOR near_actor [email protected] radius 2.0 2.0 2.0 sphere 0//86BD: not  no_obstacles_between [email protected] [email protected] [email protected] and [email protected] [email protected] [email protected] solid 1 car 0 actor 0 object 1 particle 0jf @HEALTH_BOBBY00A1: put_actor [email protected] at [email protected] [email protected] [email protected]//05BC: AS_actor [email protected] jump 1//078F: AS_actor [email protected] climb 1//wait 1000//05BC: AS_actor [email protected] jump 0//078F: AS_actor [email protected] climb 0jump @KEY_PRESSED_QUIT:HEALTH_BOBBY0084: $Bobby_health = $health_target // integer values and handlesif $Bobby_health > 250 // integer valuesjf @BOBBY_HIT $Bobby_health -= 250 // integer values:BOBBY_HIT$Bobby_health /= 12 // integer values:HEALTH_BOBBYif $Bobby_health  > 35000 // integer valuesjf @SCRIPT_RUN_BOBBY_QUOTES$Bobby_health  -= 100 // integer values$Bobby_health  /= 12 // integer values}jump @SCRIPT_RUN_BOBBY_QUOTES//jump @KEY_PRESSED

:BOBBY_IN_WATER

wait 0

if or
04AD: actor [email protected] in_water
0104: actor $PLAYER_ACTOR near_actor [email protected] radius 2.0 2.0 2.0 sphere 0
jf @BOBBY_IN_WATER
00A1: put_actor [email protected] at [email protected] [email protected] [email protected]
05BC: AS_actor [email protected] jump 1
078F: AS_actor [email protected] climb 1
wait 1000

05BC: AS_actor [email protected] jump 0
078F: AS_actor [email protected] climb 0

 

However the actors cannot jump off the water which it didn't work in waters

 

 

Edited by skatefilter5
Link to comment
Share on other sites

First off. 35000 is a f*ck ton of health.

Use 2000 or some thing low. But definitely don't use 35000

 

Secondly you need to REVISE YOUR OWN SCRIPTS. YOU DO THIS sh*t EVERYDAY.

Your scripts are poorly made and have no sense in them half of the time. Please to get better at scripting just revise your own scripts, and play with things, change numbers, DONT USE NUMBERS LIKE 35000 WTF? Especially for health!

 

If it crashes use scrlog, to find where the SCM crashed at. Stop posting so many topics. It's just crowding and wasting everyone's time.

Edited by deltaCJ
Link to comment
Share on other sites

First off. 35000 is a f*ck ton of health.

Use 2000 or some thing low. But definitely don't use 35000

 

Secondly you need to REVISE YOUR OWN SCRIPTS. YOU DO THIS sh*t EVERYDAY.

Your scripts are poorly made and have no sense in them half of the time. Please to get better at scripting just revise your own scripts, and play with things, change numbers, DONT USE NUMBERS LIKE 35000 WTF? Especially for health!

 

If it crashes use scrlog, to find where the SCM crashed at. Stop posting so many topics. It's just crowding and wasting everyone's time.

I was using have this actor a large health so i spawn my army to kill him. 2000 health is still short and too easy to kill for me, like an average special actor's health is 1000 to 2000, however status bar works with 2500 in dyom. My script didn't crash, but health status don't work,

As if like I have and strong ally and he has like 10000 and with health status, he can survive on at least 50 gangs or more, but 2000 or less we won't survive.

Link to comment
Share on other sites

So, looking at your script, you made an error.

 

 

:HEALTH

thread 'HEAL'

set actor health 35000 or what ever

$HEALTH = actor_health

status_bar = $HEALTH2

 

:HEAL_02

wait 0

$HEALTH2 = $HEALTH

if

actor.dead([email protected])

jf @HEAL_02

jump @HEAL_03

 

:HEAL_03

remove_status_bar

 

This should work.

 

Since this isn't a car, cars need to have a check because if the car = 0 the car is already blown up.

 

I have done this with actors, and it has worked, well a similar structure.

 

Good luck. Start to revise your own scripts and stop bombarding the forums with useless topics

Edited by deltaCJ
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
 Share

  • 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.