4 мая 2013 г.

Таблицы переходов (демонстрация)

Изучаем таблицы переходов!
Нажмите TAB + C для разных действий во время пешей прогулки, в транспорте и на джетпаке.


{$CLEO}
0000:

:JTable
wait 0
if
player.Defined(0)
jf @JTable
if and
not actor.Dead($PLAYER_ACTOR)
0AB0: key_pressed 0x9
0AB0: key_pressed 0x43
jf @JTable
if and
8A0C: not player 0 on_jetpack
not actor.Driving($PLAYER_ACTOR)
then
0@ = 3.0
else
   if
   actor.Driving($PLAYER_ACTOR)
   then
   0@ = 20.0
   else
   0@ = 30.0
   end
end
0871: init_jump_table 0@ total_jumps 3 default_jump 0 @JTable jumps 3.0 @OnFoot 20.0 @Driving 30.0 @Jetpack -1 @JTable -1 @JTable -1 @JTable -1 @JTable

:OnFoot
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0
actor.PutAt($PLAYER_ACTOR,1@,2@,-100.0)
wait 350
jump @JTable

:Driving
03C0: 1@ = actor $PLAYER_ACTOR car
02E3: 2@ = car 1@ speed
2@ *= 1.4
car.SetSpeedInstantly(1@,2@)
car.RemoveReferences(1@)
wait 350
jump @JTable

:Jetpack
actor.StorePos($PLAYER_ACTOR,1@,2@,3@)
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 15.0 0.0
actor.PutAt($PLAYER_ACTOR,4@,5@,-100.0)
07A7: put_jetpack_on_actor $PLAYER_ACTOR
wait 500
020C: create_explosion_with_radius 10 at 1@ 2@ 3@
jump @JTable


Комментариев нет: