Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help with character movement .... #335639
07/29/10 20:07
07/29/10 20:07
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Hello,
I am using pXent_movechar(...) to move my character... I am using the exact same example that is in the manual:

Quote:
...
pXent_settype(me,PH_CHAR,PH_CAPSULE);
...
while(1) { move_char(); wait(1); }
}
...function move_char()
{
VECTOR mov = vector(0,0,0);
if(key_w) mov.x= 8*time_step;
if(key_s) mov.x=-8*time_step;
if(key_a) mov.y= 8*time_step;
if(key_d) mov.y=-8*time_step;
vec_rotate(mov,camera.pan);
mov.z=0; // must be set, because vec_rotate sets mov.z when the camera looks up/down.
pXent_movechar(me, mov, camera.pan, 0);
}


However, I deleted the underlined line : mov.z=0; and added ::
Quote:
if(key_space) mov.z=8*time_step;


The player never moves up not even a little when I press space... Could u plz tell me what I am doing wrong??
Can somebody try it?

Re: Help with character movement .... [Re: bk9iq] #335641
07/29/10 20:11
07/29/10 20:11
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
I think you meant +=, not =.

Re: Help with character movement .... [Re: Lukas] #335687
07/30/10 02:57
07/30/10 02:57
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Oh that's a mistake I made while writing the topic here...

here's my code.... Space doesn't change anything

Link to Download

Thanks

Re: Help with character movement .... [Re: bk9iq] #335793
07/30/10 16:36
07/30/10 16:36
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Is it impossible to move in the Z direction while applying physics or this is a bug??

Re: Help with character movement .... [Re: bk9iq] #335802
07/30/10 17:24
07/30/10 17:24
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
If a object is register as physic, you don`t can move this object with c_move (if you mean this with move in z direction)

Re: Help with character movement .... [Re: Widi] #335803
07/30/10 17:28
07/30/10 17:28
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Thanks Widi for answering me ....
I am not using c_move... I am using:
if(key_space) mov.z+=8*time_step;
and
pXent_movechar(me, mov, nullvector, 0);

to move it but whenever I press the space it doesn't move up?? I uploaded the file.. I just wanna know what is wrong...

here's the file again
http://www.mediafire.com/?6qodxbb08r1ls4z


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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