English Help me with run script

5 replies
Goto Page
To the start Previous 1 Next To the start
09.06.11 10:26:16 am
Up
popeye654
User
Offline Off
this my script

...RUN SCRIPT...
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
on:keyhit02 {
     if ($s2g_runpressed==1) {skip;}
     if ($s2g_stamina>1000) {
          $s2g_runpressed=1;
          $s2g_player_speed=($s2g_player_speed*2.0);
          player_speed $s2g_player_speed;
          timer 0,1000,0,"weaken";
          freetimers 0,"runrecover";
//          msg "$s2g_player_speed";
     }
}

on:keyrelease02 {
     if ($s2g_runpressed==0) {skip;}
     $s2g_runpressed=0;
     freetimers 0,"weaken";
     timer 0,1000,0,"runrecover";
     $s2g_player_speed=($s2g_player_speed*0.5);
     player_speed $s2g_player_speed;
//     msg "$s2g_player_speed";
}

on:runrecover {
     $s2g_stamina+=500;
//     msg "$s2g_stamina";
     if ($s2g_stamina>=5000) {freetimers 0,"runrecover";}
}

on:weaken {
//     msg "$s2g_stamina";
     $s2g_stamina-=1000;
     $tmp1=(storage("unit",1,1)*-1.0);
     $tmp2=(storage("unit",1,2)*1.0);
     $tmp3=($tmp1/$tmp2);
     if ($tmp>0.8) {$s2g_stamina-=1000;}
     freevar $tmp1,$tmp2,$tmp3;
     if ($s2g_stamina<=0) {event "keyrelease02","global";}
}


Help me if u can help

tell me if u have other script

Thank you

Ps 1 : This code is from "stranded 2 Extension Mod"
Ps 2 : I'm not good at English.
I'm not good at English , I'm sorry with your language.
09.06.11 02:19:24 pm
Up
Hurri04
Super User
Offline Off
if you want us to help you, first help us by telling us what your problem is.
10.06.11 03:24:50 pm
Up
popeye654
User
Offline Off
okay
My problem is
this script is not work in game

first time to use this script
that doesn't do any thing
_________________________________
I'm sorry about your language
I'm not good at English , I'm sorry with your language.
10.06.11 03:31:38 pm
Up
Assassin moder
User
Offline Off
I know what is your problem and I edit script:

on:keydown02 {
if ($s2g_runpressed==1) {skip;}
if ($s2g_stamina>1000) {
$s2g_runpressed=1;
$s2g_player_speed=($s2g_player_speed*2.0);
player_speed $s2g_player_speed;
timer 0,1000,0,"weaken";
freetimers 0,"runrecover";
// msg "$s2g_player_speed";
}
}

on:keyrelease02 {
if ($s2g_runpressed==0) {skip;}
$s2g_runpressed=0;
freetimers 0,"weaken";
timer 0,1000,0,"runrecover";
$s2g_player_speed=($s2g_player_speed*0.5);
player_speed $s2g_player_speed;
// msg "$s2g_player_speed";
}

on:runrecover {
$s2g_stamina+=500;
// msg "$s2g_stamina";
if ($s2g_stamina>=5000) {freetimers 0,"runrecover";}
}

on:weaken {
// msg "$s2g_stamina";
$s2g_stamina-=1000;
$tmp1=(storage("unit",1,1)*-1.0);
$tmp2=(storage("unit",1,2)*1.0);
$tmp3=($tmp1/$tmp2);
if ($tmp>0.8) {$s2g_stamina-=1000;}
freevar $tmp1,$tmp2,$tmp3;
if ($s2g_stamina<=0) {event "keyrelease02","global";}
}


Or You also can use mine simple script:

$player_run=2.5;
$player_walk=1.6;

// SPRINTING     
     on:keydown02 {
          blur 0.5;
          consume 0,-.05,-.06,-.05;
          player_speed $player_run;
     }
     
     on:keyrelease02 {
          blur 0;
          player_speed $player_walk;
     }

EDIT: Sorry i have mistake: $player_sprint; -> $player_run

Sorry my bad
edited 1×, last 11.06.11 11:21:46 am
11.06.11 03:08:17 am
Up
kalis
User
Offline Off
this "$" help long to make script
let delete it @ @
11.06.11 03:13:54 am
Up
popeye654
User
Offline Off
thank you very much
I'm not good at English , I'm sorry with your language.
To the start Previous 1 Next To the start