Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, Quad, Grant), 8,062 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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