Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Old kitty script #55921
09/23/05 18:25
09/23/05 18:25
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
This was the original cat sliding code, but I ditched it for the physics engine. No point in keeping it, maybe somebody with a lower edition will get some use from it. You'll need to set the entities skills 1-3 or just adjust the code.

Code:
 
action cat2
{
var force_abs[3];
var dist[3];
var accel;
var force_x;
var force_y;
var keepitsteady;
var rotate_look[3];
var rotate_force;
var rotate_go;
my.cast = off;
accel = 0.1;
my.flag1 = off;
//my.shadow = on;
move_friction = 0;
var min_speed;
var max_speed;
var mouse_accel;
min_speed = my.skill1; //enter properties in wed or change this line
max_speed = my.skill2; //enter properties in wed or change this line
mouse_accel = my.skill3; //enter properties in wed or change this line
while(1)
{
if(my.flag1 == on)
{
force_x += mouse_force.x*mouse_accel;
force_x = max(min_speed, ( min(force_x, max_speed) ));

force_y += mouse_force.y*mouse_accel;
force_y = max(min_speed, ( min(force_y, max_speed) ));

force_abs.x = force_x;
force_abs.y = force_y;

vec_accelerate(dist,force_abs,accel,2);
}

rotate_look.x = my.x+dist.x;
rotate_look.y = my.y+dist.y;
rotate_look.z = my.z;
vec_set(temp,rotate_look.x);
vec_sub(temp,my.x);
vec_to_angle(rotate_look.pan,temp); // now MY looks at YOU

temp = ang(my.pan) - ang(rotate_look.pan);
if (abs(temp) > 180)
{
temp = (360 - abs(temp)) * sign(temp) * (-1);
}
//if(temp < 0) { my.pan += time*2; }
//if(temp > 0) { my.pan -= time*2; }
if(temp > 0) { rotate_force = 0.5; }
if(temp < 0) { rotate_force = -0.5; }
rotate_go += rotate_force * time;
if(rotate_go > 4) { rotate_go = 4; }
if(rotate_go < -4) { rotate_go = -4; }

my.pan += -rotate_go * time;


vec_set(temp, my.x);
temp.z -= 1000;
trace_mode = ignore_models+ignore_sprites;
if(my.flag4 == off) { trace(my.x,temp.x); }
//debugvar3 = result;
if(result > 1)
{
if(dist.z > gravity) { dist.z -= time*0.1; }
my.passable = on;
my.flag1 = off;
my.flag2 = on;
if(result > 300)
{
my.flag4 = on;
}
}
else
{
if(my.flag4 == off)
{
dist.z = 0;
my.flag1 = on;
my.passable = off;
my.flag3 = on;
}
}
if(my.flag4 == on)
{
if(dist.z > gravity) { dist.z -= time*0.1; }
my.passable = on;
if(my.flag5 == off) { ent_create("falltarget.tga",my.x,ownage_point); my.flag5 = on; } // create the green thing
}

if((my.flag2 == on) && (my.flag3 == on))
{
if(my.flag5 == off)
{
ent_create("splat1.tga",my.x,decal_up); // create blood splatter
my.flag3 = off;
my.flag2 = off;
}
}

if(my.flag4 == off)
{
camera.x = my.x;
camera.y = my.y-280;
camera.z = 200;
camera.tilt = -35 + force_y;
camera.roll = -force_x;
}
move_mode = ignore_me + ignore_passable + glide;
result = ent_move(nullvector,dist);
wait(1);
}
}





Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Old kitty script [Re: Stansmedia] #55922
09/23/05 20:21
09/23/05 20:21
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
thank you. i'll try this...

Re: Old kitty script [Re: Stansmedia] #55923
09/23/05 21:23
09/23/05 21:23
Joined: Oct 2003
Posts: 2,881
United Kingdom
Tozzy Offline
Expert
Tozzy  Offline
Expert

Joined: Oct 2003
Posts: 2,881
United Kingdom
Quote:

This was the original cat sliding code,




Why a cat? How unusual.

I thought you mean't: This was the original car sliding code,

But then again it says kitty in your thread title

Re: Old kitty script [Re: Tozzy] #55924
09/23/05 23:56
09/23/05 23:56
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
...


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Old kitty script [Re: Stansmedia] #55925
09/24/05 04:24
09/24/05 04:24
Joined: Jan 2002
Posts: 3,176
VPrime Offline
Expert
VPrime  Offline
Expert

Joined: Jan 2002
Posts: 3,176
..his halarious game.. kitty ccarnage.. thats why a cat.. its a cat on viagra sliding on his... ahem.... wang (cant think of a better word right now :P)
thus the sliding kitty code... :P
il have no use for this but im sure some one may...

Re: Old kitty script [Re: VPrime] #55926
09/24/05 16:05
09/24/05 16:05
Joined: Oct 2003
Posts: 2,881
United Kingdom
Tozzy Offline
Expert
Tozzy  Offline
Expert

Joined: Oct 2003
Posts: 2,881
United Kingdom
oh!! I mighta known lol. That's so typical of Bloodred . I take it you've already got a cat model then?

Re: Old kitty script [Re: Tozzy] #55927
09/24/05 17:38
09/24/05 17:38
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
That stays with me.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1