Mod Showroom

 Reply to this postStart new topic

One-life mod

fastman92
post Nov 12 2010, 04:49 PM
Post #1


Trained Member

Posts: 77
Joined: 25-October 10



One-life mod


This mod makes that you can`t live after you died. When your health is lover than 20% then you go to the hospital. If your health suddenly reaches zero then you can`t play anymore, cuz mod won`t let you.

Like in reality that when you survive big jump then you go to the hospital for long rehabilitation smile.gif
If jump will kill you then you aren`t in the ground and you don`t live again.
Don`t try to test this mod in reality laugh.gif

SANNY
{$CLEO}

0662: "One life mod"
0662: "By Fastman92"
0662: "Visit fastman92.tk"

if
$1770 == 1
else_jump @END_GAME
jump @ENDED_GAME

:END_GAME
wait 0
0226: 0@ = actor $PLAYER_ACTOR health
if
0@ == 0
else_jump @TO_HOSPITAL
0762: AS_actor $PLAYER_ACTOR dies
Player.CanMove($PLAYER_CHAR) = false
$1770 = 1
jump @ENDED_GAME

:TO_HOSPITAL
0AB1: call_scm_func @Get_current_health 1 player_actor $PLAYER_ACTOR store_to 0@
    if
    0@ < 0.2
    else_jump @END_GAME
    Actor.Health($PLAYER_ACTOR) = 0
    gosub @IS_PLAYER_REGENERATED    
    
jump @END_GAME

:ENDED_GAME
wait 1000
0AD1: show_formatted_text_highpriority "Your life has been ended up. You can`t play anymore." time 2000
Player.CanMove($PLAYER_CHAR) = false
jump @ENDED_GAME

:IS_PLAYER_REGENERATED
wait 0
0AB1: call_scm_func @Get_current_health 1 player_actor $PLAYER_ACTOR store_to 0@
if
0@ > 0.7
else_jump @IS_PLAYER_REGENERATED
return

:Get_current_health
{
Parameters:
   Passed:
     0@ - player actor
   Result:
     2@ - float, 1.0 means full life

Example:
  0AB1: call_scm_func @Get_current_health 1 player_actor $PLAYER_ACTOR store_to 0@
}

0226: 2@ = actor 0@ health  // Curent health
0093: 2@ = integer 2@ to_float

0653: 1@ = float_stat 24
1@ /= 5.69
  
0073: 2@ /= 1@ // (float)
0AB2: ret 1 2@


This post has been edited by fastman92: Nov 12 2010, 04:52 PM
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: