ShovelToad
New member
Please give any simple example.
Thank You for files, it helped to understand that test openbor which I tryed to test is not compatable with script. Then I put this in my own openbor progect, rename name from "car" to "craw" (log says that cant spawn player from "craw" when character name is "car"), and loading and spawn is correct. Will test and trying to do something more complated what I need (man and car), to understand movies code can adapted it in similar tasks, will post result here laterbWWd said:i edited my post and you can download what i have
Yes, I khow it, and my mod is classic beatemup platformer game, and if Id try to use any platformer engine, Id cant realise all what I need.bWWd said:Id try to do it in different engine if i were you, openbor is not made for this, it could be scripted but engines like godot ,construct or gdevelop would get you there faster .
There are dwcent tutorials for this for them, openbo has none cause not many people tried to do topview car racing and 8 directional walk ,pain and idles.
In godot i had 2 players split screen platfrormer done in 1day which is quite amazing.for beatemups openbor is unbeatable but other stuff can be done sometimes faster with other engines
name craw
type player
health 100
speed 2
mp 0
shadow 0
noquake 1
cantgrab 1
notgrab 1
nodieblink 1
makeinv 1 0
falldie 2
riseinv 1 1
jugglepoints 15
nolife 1
animationscript data/chars/car/script.c
nopain 1
nodrop 1
subject_to_platform 1
subject_to_screen 1
gfxshadow 1
icon data/chars/car/micon.gif
anim idle
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/iu1.gif
offset 10 19
bbox 6 5 83 98
drawmethod flipx 1
frame data/chars/car/iu2.gif
offset 10 19
anim follow2
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
platform 8 25 -10 -10 11 11 8 24
frame data/chars/car/iur1.gif
frame data/chars/car/iur1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/iur2.gif
anim follow3
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/iu1.gif
frame data/chars/car/iu1.gif
offset 10 19
bbox 6 5 83 98
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
frame data/chars/car/iu2.gif
anim follow4
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/iur1.gif
frame data/chars/car/iur1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/iur2.gif
anim follow5
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/ir1.gif
frame data/chars/car/ir1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/ir2.gif
anim follow6
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/ird1.gif
frame data/chars/car/ird1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/ird2.gif
anim follow7
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/id1.gif
frame data/chars/car/id1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/id2.gif
anim follow8
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/ird1.gif
frame data/chars/car/ird1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/ird2.gif
anim follow9
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/ir1.gif
frame data/chars/car/ir1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/ir2.gif
anim pain1
loop 0
offset 10 19
bbox 6 5 83 98
delay 50
frame data/chars/car/car.gif
delay 15
frame data/chars/car/car.gif
anim spawn
loop 0
@cmd performattack getlocalvar("self") openborconstant("ANI_FOLLOW3")
offset 10 19
bbox 6 5 83 98
delay 2
frame data/chars/car/car.gif
frame data/chars/car/car.gif
#|edited by openBor Stats v 0.67
anim follow2 #Upper right
anim follow2
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( r1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( l1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)){
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)){
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
platform 8 25 -10 -10 11 11 8 24
frame data/chars/car/iur1.gif
frame data/chars/car/iur1.gif
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW2" 2 "UR" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW8" 2 "DR" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW6" 2 "DL" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "UL" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/iur2.gif
maxman said:I don't like to quote on the code but why is there an animation under the same animation? It's to keep button in momentum for the car to retain its direction til you turn to different directions?
maxman said:It would be better if you make labels next to animation names so you wouldn't get yourself confused on which is for which.
@cmd keyint "ANI_FOLLOW2" 2 (((playerkeys(iPIndex, 0, "moveup")&&(playerkeys(iPIndex, 0, "moveright"))) 0
anim follow3
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
setlocalvar("vsped",getentityproperty(self, "speed"));
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "attack");
void j1 = playerkeys(iPIndex, 0, "jump");
void right = playerkeys(iPIndex, 0, "moveright");
void left = playerkeys(iPIndex, 0, "moveleft");
float rot;
changedrawmethod(self, "enabled", 1);
if (getlocalvar("rot") == NULL() ){
setlocalvar("rot",0);
}
if (getlocalvar("rot") > 305 ){
setlocalvar("rot",-30);
}
if (getlocalvar("rot") <= -40 ){
setlocalvar("rot",315);
}
if ( getentityproperty(self, "zdir") > -sped && a1 && getlocalvar("rot")== 0 ){
changeentityproperty(self, "velocity", 0 , getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( a1 && getlocalvar("rot") == 15 ){
changeentityproperty(self, "velocity", sped/3 ,-sped/1.15);
}
if ( a1 && getlocalvar("rot") == 30 ){
changeentityproperty(self, "velocity", sped/2.25 ,-sped/1.25);
}
if ( getentityproperty(self, "xdir") < sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && a1 && getlocalvar("rot")== 45 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*+1.15, getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( a1 && getlocalvar("rot") == 60 ){
changeentityproperty(self, "velocity", sped/1.25 ,-sped/2.25);
}
if ( a1 && getlocalvar("rot") == 75 ){
changeentityproperty(self, "velocity", sped/1.15 ,-sped/3);
}
if ( getentityproperty(self, "xdir") < sped && a1 && getlocalvar("rot")== 90 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*1.15,0);
}
if ( a1 && getlocalvar("rot") == 105 ){
changeentityproperty(self, "velocity", sped/1.15 ,sped/3);
}
if ( a1 && getlocalvar("rot") == 120 ){
changeentityproperty(self, "velocity", sped/1.25 ,sped/2.25);
}
if ( getentityproperty(self, "xdir") < sped/1.35 && getentityproperty(self, "zdir") < sped/1.35 && a1 && getlocalvar("rot")== 135 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*+1.15, getentityproperty(self, "zdir")+0.3*+1.15);
}
if ( a1 && getlocalvar("rot") == 150 ){
changeentityproperty(self, "velocity", sped/2.25 ,sped/1.25);
}
if ( a1 && getlocalvar("rot") == 165 ){
changeentityproperty(self, "velocity", sped/3 ,sped/1.15);
}
if ( getentityproperty(self, "zdir") < sped && a1 && getlocalvar("rot")== 180 ){
changeentityproperty(self, "velocity", 0 , getentityproperty(self, "zdir")+0.3*1.15);
}
if ( a1 && getlocalvar("rot") == 195 ){
changeentityproperty(self, "velocity", -sped/3 ,sped/1.15);
}
if ( a1 && getlocalvar("rot") == 210 ){
changeentityproperty(self, "velocity", -sped/2.25 ,sped/1.25);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") < sped/1.35 && a1 && getlocalvar("rot")== 225 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15, getentityproperty(self, "zdir")+0.3*+1.15);
}
if ( a1 && getlocalvar("rot") == 240 ){
changeentityproperty(self, "velocity", -sped/1.25 ,sped/2.25);
}
if ( a1 && getlocalvar("rot") == 255 ){
changeentityproperty(self, "velocity", -sped/1.15 ,sped/3);
}
if ( getentityproperty(self, "xdir") > -sped && a1 && getlocalvar("rot")== 270 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15,0);
}
if ( a1 && getlocalvar("rot") == 285 ){
changeentityproperty(self, "velocity", -sped/1.15 ,-sped/3);
}
if ( a1 && getlocalvar("rot") == 300 ){
changeentityproperty(self, "velocity", -sped/1.25 ,-sped/2.25);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && a1 && getlocalvar("rot")== 315 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15, getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && a1 && getlocalvar("rot")== -45 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15, getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( a1 && getlocalvar("rot") == -30 ){
changeentityproperty(self, "velocity", -sped/2.25 ,-sped/1.25);
}
if ( a1 && getlocalvar("rot") == -15 ){
changeentityproperty(self, "velocity", -sped/3 ,-sped/1.15);
}
if ( !a1 && !j1 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")/1.15 ,getentityproperty(self, "zdir")/1.15);
changeentityproperty(self, "animpos", 1);
}
if ( getentityproperty(self, "zdir") < sped && j1 && getlocalvar("rot")== 0 ){
changeentityproperty(self, "velocity", 0 , getentityproperty(self, "zdir")+0.3*+1.15);
}
if ( j1 && getlocalvar("rot") == 15 ){
changeentityproperty(self, "velocity", -sped/3 ,sped/1.15);
}
if ( j1 && getlocalvar("rot") == 30 ){
changeentityproperty(self, "velocity", -sped/2.25 ,sped/1.25);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") < sped/1.35 && j1 && getlocalvar("rot")== 45 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15, getentityproperty(self, "zdir")+0.3*+1.15);
}
if ( j1 && getlocalvar("rot") == 60 ){
changeentityproperty(self, "velocity", -sped/1.25 ,sped/2.25);
}
if ( j1 && getlocalvar("rot") == 75 ){
changeentityproperty(self, "velocity", -sped/1.15 ,sped/3);
}
if ( getentityproperty(self, "xdir") > -sped && j1 && getlocalvar("rot")== 90 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15,0);
}
if ( j1 && getlocalvar("rot") == 105 ){
changeentityproperty(self, "velocity", -sped/1.15 ,-sped/3);
}
if ( j1 && getlocalvar("rot") == 120 ){
changeentityproperty(self, "velocity", -sped/1.25 ,-sped/2.25);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && j1 && getlocalvar("rot")== 135 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*-1.15, getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( j1 && getlocalvar("rot") == 150 ){
changeentityproperty(self, "velocity", -sped/2.25 ,-sped/1.25);
}
if ( j1 && getlocalvar("rot") == 165 ){
changeentityproperty(self, "velocity", -sped/3 ,-sped/1.15);
}
if ( getentityproperty(self, "zdir") > -sped && j1 && getlocalvar("rot")== 180 ){
changeentityproperty(self, "velocity", 0 , getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( j1 && getlocalvar("rot") == 195 ){
changeentityproperty(self, "velocity", sped/3 ,-sped/1.15);
}
if ( j1 && getlocalvar("rot") == 210 ){
changeentityproperty(self, "velocity", sped/2.25 ,-sped/1.25);
}
if ( getentityproperty(self, "xdir") < sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && j1 && getlocalvar("rot")== 225 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*1.15, getentityproperty(self, "zdir")+0.3*-1.15);
}
if ( j1 && getlocalvar("rot") == 240 ){
changeentityproperty(self, "velocity", sped/1.25 ,-sped/2.25);
}
if ( j1 && getlocalvar("rot") == 255 ){
changeentityproperty(self, "velocity", sped/1.15 ,-sped/3);
}
if ( getentityproperty(self, "xdir") < sped && j1 && getlocalvar("rot")== 270 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*+1.15,0);
}
if ( j1 && getlocalvar("rot") == 285 ){
changeentityproperty(self, "velocity", sped/1.15 ,sped/3);
}
if ( j1 && getlocalvar("rot") == 300 ){
changeentityproperty(self, "velocity", sped/1.25 ,sped/2.25);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && j1 && getlocalvar("rot")== 315 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*+1.15, getentityproperty(self, "zdir")+0.3*+1.15);
}
if ( getentityproperty(self, "xdir") > -sped/1.35 && getentityproperty(self, "zdir") > -sped/1.35 && j1 && getlocalvar("rot")== -45 ){
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")+0.3*+1.15, getentityproperty(self, "zdir")+0.3*+1.15);
}
if ( j1 && getlocalvar("rot") == -30 ){
changeentityproperty(self, "velocity", sped/2.25 ,sped/1.25);
}
if ( j1 && getlocalvar("rot") == -15 ){
changeentityproperty(self, "velocity", sped/3 ,sped/1.15);
}
if ( left ){
rot = setlocalvar("rot", getlocalvar("rot")-15);
changedrawmethod(self, "rotate",getlocalvar("rot"));
settextobj(1, 150 , 100 , 1, 1,getlocalvar("rot"), openborvariant("elapsed_time")+2000);
}
if ( right ){
rot = setlocalvar("rot", getlocalvar("rot")+15);
changedrawmethod(self, "rotate",getlocalvar("rot"));
settextobj(1, 150 , 100 , 1, 1,getlocalvar("rot"), openborvariant("elapsed_time")+2000);
}
@end_script
loop 1
offset 22 23
bbox 6 5 83 98
delay 7
sound data/chars/car/car.wav
frame data/chars/car/car.gif
frame data/chars/car/car.gif
bWWd said:what you want to do?
name rrr
type player
health 100
speed 8
mp 0
shadow 0
noquake 1
cantgrab 1
notgrab 1
nodieblink 1
makeinv 1 0
falldie 2
riseinv 1 1
jugglepoints 15
nolife 1
animationscript data/chars/car/script.c
nopain 1
nodrop 1
subject_to_platform 1
subject_to_screen 1
gfxshadow 0
icon data/chars/car/rrr/1.gif
anim idle
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/1.gif
frame data/chars/car/rrr/1.gif
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/1.gif
anim follow1
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/1.gif
frame data/chars/car/rrr/1.gif
offset 10 19
bbox 6 5 83 98
@cmd keyint "ANI_FOLLOW16" 2 "L" 0
@cmd keyint "ANI_FOLLOW2" 2 "R" 0
frame data/chars/car/rrr/1.gif
anim follow2
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped/1.75 ,-sped/1.25);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", sped/1.75 ,-sped/1.25);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped/1.75 ,sped/1.25);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/3.gif
frame data/chars/car/rrr/3.gif
@cmd keyint "ANI_FOLLOW1" 2 "L" 0
@cmd keyint "ANI_FOLLOW3" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/3.gif
anim follow3
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped/1.50 ,-sped/1.50);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", sped/1.50 ,-sped/1.50);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped/1.50 ,sped/1.50);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/4.gif
frame data/chars/car/rrr/4.gif
offset 10 19
bbox 6 5 83 98
@cmd keyint "ANI_follow2" 2 "L" 0
@cmd keyint "ANI_FOLLOW4" 2 "R" 0
frame data/chars/car/rrr/4.gif
anim follow4
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped/1.25 ,-sped/1.75);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", sped/1.25 ,-sped/1.75);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped/1.25 ,sped/1.75);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/5.gif
frame data/chars/car/rrr/5.gif
@cmd keyint "ANI_FOLLOW3" 2 "L" 0
@cmd keyint "ANI_FOLLOW5" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/5.gif
anim follow5
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/7.gif
frame data/chars/car/rrr/7.gif
@cmd keyint "ANI_FOLLOW4" 2 "L" 0
@cmd keyint "ANI_FOLLOW6" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/7.gif
anim follow6
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped/1.25 ,sped/1.75);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", sped/1.25 ,sped/1.75);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped/1.25 ,-sped/1.75);
}
@end_script
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/9.gif
frame data/chars/car/rrr/9.gif
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
@cmd keyint "ANI_FOLLOW7" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/9.gif
anim follow7
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped/1.50 ,sped/1.50);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", sped/1.50 ,sped/1.50);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped/1.50 ,-sped/1.50);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/10.gif
frame data/chars/car/rrr/10.gif
@cmd keyint "ANI_FOLLOW6" 2 "L" 0
@cmd keyint "ANI_FOLLOW8" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/10.gif
anim follow8
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", sped/1.75 ,sped/1.25);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", sped/1.75 ,sped/1.25);
}
if ( d1 ){
changeentityproperty(self, "velocity", -sped/1.75 ,-sped/1.25);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/11.gif
frame data/chars/car/rrr/11.gif
@cmd keyint "ANI_FOLLOW7" 2 "L" 0
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/11.gif
anim follow9
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", 0 ,sped);
}
if ( d1 ){
changeentityproperty(self, "velocity", 0 ,-sped);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/rrr/13.gif
frame data/chars/car/rrr/13.gif
@cmd keyint "ANI_FOLLOW8" 2 "L" 0
@cmd keyint "ANI_FOLLOW10" 2 "R" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/rrr/13.gif
anim follow10
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped/1.75 ,sped/1.25);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", -sped/1.75 ,sped/1.25);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped/1.75 ,-sped/1.25);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/11.gif
frame data/chars/car/rrr/11.gif
offset 36 19
bbox 6 5 83 98
@cmd keyint "ANI_follow9" 2 "L" 0
@cmd keyint "ANI_FOLLOW11" 2 "R" 0
frame data/chars/car/rrr/11.gif
anim follow11
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped/1.50 ,sped/1.50);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", -sped/1.50 ,sped/1.50);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped/1.50 ,-sped/1.50);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/10.gif
frame data/chars/car/rrr/10.gif
@cmd keyint "ANI_follow10" 2 "L" 0
@cmd keyint "ANI_FOLLOW12" 2 "R" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/rrr/10.gif
anim follow12
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped/1.25 ,sped/1.75);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", -sped/1.25 ,sped/1.75);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped/1.25 ,-sped/1.75);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/9.gif
frame data/chars/car/rrr/9.gif
offset 36 19
bbox 6 5 83 98
@cmd keyint "ANI_follow11" 2 "L" 0
@cmd keyint "ANI_FOLLOW13" 2 "R" 0
frame data/chars/car/rrr/9.gif
anim follow13
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void u1 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( u1 ){
changeentityproperty(self, "velocity", -sped ,0);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped ,0);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/7.gif
frame data/chars/car/rrr/7.gif
@cmd keyint "ANI_FOLLOW12" 2 "L" 0
@cmd keyint "ANI_FOLLOW14" 2 "R" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/rrr/7.gif
anim follow14
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped/1.25 ,-sped/1.75);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", -sped/1.25 ,-sped/1.75);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped/1.25 ,sped/1.75);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/5.gif
frame data/chars/car/rrr/5.gif
@cmd keyint "ANI_FOLLOW13" 2 "L" 0
@cmd keyint "ANI_FOLLOW15" 2 "R" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/rrr/5.gif
anim follow15
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped/1.50 ,-sped/1.50);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", -sped/1.50 ,-sped/1.50);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped/1.50 ,sped/1.50);
}
@end_script
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/4.gif
frame data/chars/car/rrr/4.gif
@cmd keyint "ANI_FOLLOW14" 2 "L" 0
@cmd keyint "ANI_FOLLOW16" 2 "R" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/rrr/4.gif
anim follow16
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void a1 = playerkeys(iPIndex, 0, "jump");
void a11 = playerkeys(iPIndex, 0, "moveup");
void d1 = playerkeys(iPIndex, 0, "movedown");
if ( a1 ){
changeentityproperty(self, "velocity", -sped/1.75 ,-sped/1.25);
}
if ( !a1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ( a11 ){
changeentityproperty(self, "velocity", -sped/1.75 ,-sped/1.25);
}
if ( d1 ){
changeentityproperty(self, "velocity", sped/1.75 ,sped/1.25);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/rrr/3.gif
frame data/chars/car/rrr/3.gif
@cmd keyint "ANI_FOLLOW15" 2 "L" 0
@cmd keyint "ANI_FOLLOW1" 2 "R" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/rrr/3.gif
anim pain1
loop 0
offset 10 19
bbox 6 5 83 98
delay 50
frame data/chars/car/car.gif
delay 15
frame data/chars/car/car.gif
anim spawn
loop 0
@cmd performattack getlocalvar("self") openborconstant("ANI_FOLLOW1")
offset 10 19
bbox 6 5 83 98
delay 2
frame data/chars/car/car.gif
frame data/chars/car/car.gif
#|edited by openBor Stats v 0.67
name mann
type player
health 100
speed 2
mp 0
shadow 0
noquake 1
cantgrab 1
notgrab 1
nodieblink 1
makeinv 1 0
falldie 2
riseinv 1 1
jugglepoints 15
nolife 1
animationscript data/chars/car/script.c
nopain 1
nodrop 1
subject_to_platform 1
subject_to_screen 1
gfxshadow 0
icon data/chars/car/micon.gif
anim idle
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/iu1.gif
offset 10 19
bbox 6 5 83 98
frame data/chars/car/iu1.gif
offset 10 19
anim follow2
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ((u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ((r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if ((d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
platform 8 25 -10 -10 11 11 8 24
frame data/chars/car/iur1.gif
frame data/chars/car/iur1.gif
frame data/chars/car/iur2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/iur2.gif
anim follow3
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ((u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ((r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if ((d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/iu1.gif
frame data/chars/car/iu1.gif
frame data/chars/car/iu2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/iu2.gif
anim follow4
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ((u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ((r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if ((d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/iur1.gif
frame data/chars/car/iur1.gif
frame data/chars/car/iur2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/iur2.gif
anim follow5
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ((u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ((r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if ((d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/ir1.gif
frame data/chars/car/ir1.gif
frame data/chars/car/ir2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/ir2.gif
anim follow6
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ((u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ((r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if ((d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 36 19
bbox 6 5 83 98
delay 5
drawmethod flipx 1
frame data/chars/car/ird1.gif
frame data/chars/car/ird1.gif
frame data/chars/car/ird2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 36 19
bbox 6 5 83 98
frame data/chars/car/ird2.gif
anim follow7
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if ((u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if ((r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if ((d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/id1.gif
frame data/chars/car/id1.gif
frame data/chars/car/id2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/id2.gif
anim follow8
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if (( u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if (( r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if (( d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/ird1.gif
frame data/chars/car/ird1.gif
frame data/chars/car/ird2.gif
@cmd keyint "ANI_FOLLOW9" 2 "R" 0
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/ird2.gif
anim follow9
@script
void self = getlocalvar("self");
int sped = getentityproperty(self, "speed");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
void u1 = playerkeys(iPIndex, 0, "moveup");
void r1 = playerkeys(iPIndex, 0, "moveright");
void d1 = playerkeys(iPIndex, 0, "movedown");
void l1 = playerkeys(iPIndex, 0, "moveleft");
if (( u1 )&&(!d1)){
changeentityproperty(self, "velocity", 0 ,-sped);
}
if ( !u1 ){
changeentityproperty(self, "velocity", 0 ,0);
}
if (( r1 )&&(!l1)){
changeentityproperty(self, "velocity", sped ,0);
}
if (( d1 )&&(!u1)){
changeentityproperty(self, "velocity", 0 ,sped);
}
if (( l1 )&&(!r1)){
changeentityproperty(self, "velocity", -sped ,0);
}
if (( u1 )&&(l1)&&(!d1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW4"));
changeentityproperty(self, "velocity", -sped/1.35 ,-sped/1.35);
}
if (( u1 )&&(r1)&&(!d1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW2"));
changeentityproperty(self, "velocity", sped/1.35 ,-sped/1.35);
}
if (( d1 )&&(r1)&&(!u1)&&(!l1)){
performattack(self, openborconstant("ANI_FOLLOW8"));
changeentityproperty(self, "velocity", sped/1.35 ,sped/1.35);
}
if (( d1 )&&(l1)&&(!u1)&&(!r1)){
performattack(self, openborconstant("ANI_FOLLOW6"));
changeentityproperty(self, "velocity", -sped/1.35 ,sped/1.35);
}
@end_script
loop 1 1
offset 10 19
bbox 6 5 83 98
delay 5
frame data/chars/car/ir1.gif
frame data/chars/car/ir1.gif
frame data/chars/car/ir2.gif
@cmd keyint "ANI_FOLLOW7" 2 "D" 0
@cmd keyint "ANI_FOLLOW3" 2 "U" 0
@cmd keyint "ANI_FOLLOW5" 2 "L" 0
offset 10 19
bbox 6 5 83 98
frame data/chars/car/ir2.gif
anim pain1
loop 0
offset 10 19
bbox 6 5 83 98
delay 50
frame data/chars/car/car.gif
delay 15
frame data/chars/car/car.gif
anim spawn
loop 0
@cmd performattack getlocalvar("self") openborconstant("ANI_FOLLOW3")
offset 10 19
bbox 6 5 83 98
delay 2
frame data/chars/car/car.gif
frame data/chars/car/car.gif
#|edited by openBor Stats v 0.67
setentityvar(self,"running",1); -- this goes to run or walk to let it know it was walking
then in idle animation insert this script to read walking variable and apply extra slide then change variable back to NULL which is nothing:
@script
void self = getlocalvar("self");
if ( getentityvar(self,"running") == 1 ) {
setentityvar(self,"running",NULL());
performattack(self,openborconstant("ANI_FOLLOWXX"),1);
}
@end_script
Something like this
@script
void self = getlocalvar("self");
if ( getentityvar(self,"running") == 1 ) {
changeentityproperty(self, "velocity", getentityproperty(self, "xdir")/1.15);
}
if ( getentityproperty(self, "xdir") == 0 ) {
setentityvar(self,"running",NULL());
}
@end_script