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
4 registered members (dBc, clonman, TipmyPip, 1 invisible), 18,946 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
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 | 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