Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,302 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_move problem #137121
06/19/07 15:08
06/19/07 15:08
Joined: Feb 2007
Posts: 77
São Paulo, Brazil
AttosRH Offline OP
Junior Member
AttosRH  Offline OP
Junior Member

Joined: Feb 2007
Posts: 77
São Paulo, Brazil
here is my code:

var video_depth=32;
var video_mode=7;
var video_screen =2;

entity* = guard;

action guard_player1
{
var walk =0;
var stand = 0;
var run = 0;
guard = me;
while(1)
{
if(key_cuu)
{
standdist=0;
walkdist+=1;
c_move(me,vector(0.7,0,0),nullvector,glide);
ent_animate(me,"walk",walk,anm_cycle);
}
if(key_cuu && key_shift)
{
standdist=0;
rundist + =1.5;
ent_animate(me,"run",run,anm_cycle);
c_move(me,vector(1,0,0),nullvector,glide);
}
if(key_cuu == off)
{
standdist + = 0.2;
walkdist = 0;
ent_animate(me,"stand",stand,anm_cycle);
}
if(key_cul == on)
{
my.pan+=1;
}
if(key_cur == on)
{
my.pan-=1;
}
wait(1);
}
}

function main()
{
level_load("level1.wmb");
wait(1);
camera.tilt = -45;
camera.pan = 35;
while(1)
{
if(key_a){camera.x-=1.4; camera.y+=2;}
if(key_d){camera.y-=2; camera.x+=1.4;}
if(key_w){camera.x+=2; camera.y+=1.4;}
if(key_s){camera.x-=2; camera.y-=1.4;}
wait(1);
}
}

the problem is that when the model collides with any block and I press the left or the right arrow key, the model go through the wall ...

how to fix this??

Re: c_move problem [Re: AttosRH] #137122
06/19/07 16:18
06/19/07 16:18
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Quote:


if(key_cul == on)
{
my.pan+=1;
}
if(key_cur == on)
{
my.pan-=1;
}





Collision detection won't take effect while entity is pan/tilt/roll,
use c_rotate instead.

Re: c_move problem [Re: vlau] #137123
06/19/07 16:30
06/19/07 16:30
Joined: Feb 2007
Posts: 77
São Paulo, Brazil
AttosRH Offline OP
Junior Member
AttosRH  Offline OP
Junior Member

Joined: Feb 2007
Posts: 77
São Paulo, Brazil
Jesus it works!!!
xD

Re: c_move problem [Re: AttosRH] #137124
06/19/07 18:18
06/19/07 18:18
Joined: Apr 2007
Posts: 20
H
H4x0r Offline
Newbie
H4x0r  Offline
Newbie
H

Joined: Apr 2007
Posts: 20
try it with ent_move. Maybe it'll work!

Re: c_move problem [Re: H4x0r] #137125
06/21/07 17:12
06/21/07 17:12
Joined: Feb 2007
Posts: 77
São Paulo, Brazil
AttosRH Offline OP
Junior Member
AttosRH  Offline OP
Junior Member

Joined: Feb 2007
Posts: 77
São Paulo, Brazil
I don't Have this problem in Lite-C...
the character don't penetrate the walls when I hold the up arrow key and the left or right arrow key


Gamestudio download | 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