Coding

 Reply to this postStart new topic

Math Codding

Michael.Knight1
post Jun 11 2012, 06:16 PM
Post #1


Member

Posts: 130
From: Germany
Joined: 24-March 12



I Woring on kitt computer status , is while i turn off the computer , kitt dosen't can to do anythings , and when i turn on the computer , kitt can to using function .
Sorry I don't can to give you the source scripts because while i finish any script i compile the main.scm biggrin.gif
So Thoes is just the computer status script and the kitt following script , the two is working but i wanna while i turn off the computer kitt doesn(t can to do anythings biggrin.gif

COMPUTER STATUS

CODE
:KITT_COMPUTER
thread 'KITT_COMPUTER'
$POWER = 0
  
:KITT_COMPUTER_26
wait 0
if
   Player.Defined($PLAYER_CHAR)
else_jump @KITT_COMPUTER_26
if
   Actor.InCar($PLAYER_ACTOR, $KITT)
else_jump @KITT_COMPUTER_26
if and
0AB0:   key_pressed 35 // Turn On Computer
$POWER == 0
else_jump @KITT_COMPUTER_26
Audiostream.Load($POWER, "CLEO\AUDIO\KITT\POWER.MP3")
03C0: $KITT = actor $PLAYER_ACTOR car
wait 0
Car.SetImmunities($KITT, 0, 0, 0, 0, 0)
053F: set_car $KITT tires_vulnerability 1
Audiostream.PerformAction($POWER, PLAY)
wait 4000
0918: unknown_car $KITT driver_flag 0
wait 4000
067F: set_car $KITT lights 1
068A: set_car $KITT repair_componentA 2
wait 4000
04FE: deflate_tire 1 on_car $KITT
04FE: deflate_tire 3 on_car $KITT
Car.SetImmunities($KITT, 1, 1, 1, 1, 1)
053F: set_car $KITT tires_vulnerability 0
0001: wait 0 ms
jump @KITT_COMPUTER_232

:KITT_COMPUTER_232
wait 0
if
   Player.Defined($PLAYER_CHAR)
else_jump @KITT_COMPUTER_232
if
   Actor.InCar($PLAYER_ACTOR, $KITT)
else_jump @KITT_COMPUTER_232
if
0AB0:   key_pressed 35 // Turn off Computer
else_jump @KITT_COMPUTER_232
Audiostream.Load($POWER, "CLEO\AUDIO\KITT\POWER.MP3")
03C0: $KITT = actor $PLAYER_ACTOR car
wait 0
Audiostream.PerformAction($POWER, PLAY)
wait 10000
0699: set_car $KITT repair_tire 1
0699: set_car $KITT repair_tire 3
wait 2000
0918: unknown_car $KITT driver_flag 1
jump @KITT_COMPUTER_26
end_thread


KITT FOLLOW
CODE
:KITT_FOLLOWING
thread 'KITT_FOLLOWING'

:KITT_FOLLOWING_19
wait 0
if
   Player.Defined($PLAYER_CHAR)
else_jump @KITT_FOLLOWING_19
if
   Actor.InCar($PLAYER_ACTOR, $KITT)
else_jump @KITT_FOLLOWING_19
jump @KITT_FOLLOWING_83

:KITT_FOLLOWING_83
03C0: $KITT = actor $PLAYER_ACTOR car
jump @KITT_FOLLOWING_98

:KITT_FOLLOWING_98
wait 0
if
   not Actor.Driving($PLAYER_ACTOR)
else_jump @KITT_FOLLOWING_98
if and
   not Actor.Dead($PLAYER_ACTOR)
   not Actor.Driving($PLAYER_ACTOR)
else_jump @KITT_FOLLOWING_98
if and
  $POWER == 1  
0AB0:   key_pressed 96
else_jump @KITT_FOLLOWING_98
if
82BF:   not car 0@ sunk
else_jump @KITT_FOLLOWING_98
if and
   not Actor.Dead($PLAYER_ACTOR)
   not Actor.Driving($PLAYER_ACTOR)
else_jump @KITT_FOLLOWING_98
if
   not Car.Wrecked($KITT)
else_jump @KITT_FOLLOWING_98
068A: set_car $KITT repair_componentA 2
wait 1000
jump @KITT_FOLLOWING_226

:KITT_FOLLOWING_226
wait 0
04C4: store_coords_to $SELECTED_MENU_ITEM $44 $ACTIVE_INTERIOR from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
02C2: car $KITT drive_to $SELECTED_MENU_ITEM $44 $ACTIVE_INTERIOR
Car.SetMaxSpeed($KITT, 22.0)
jump @KITT_FOLLOWING_98
end_thread



--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Jun 11 2012, 07:16 PM
Post #2


Member

Posts: 130
From: Germany
Joined: 24-March 12



Help me pleasse ?? confused.gif


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: