Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 938 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can i make this work ...I've tried evreything #184550
02/18/08 23:33
02/18/08 23:33
Joined: Nov 2006
Posts: 193
England
RyuShinji Offline OP
Member
RyuShinji  Offline OP
Member

Joined: Nov 2006
Posts: 193
England
How can i make this work in multiplayer, i've tried using the input_scan from the kh tutorial but no good. please i've tried everything...



FUNCTION handle_movement()
{
temp.x = -1000;
temp.y = 0;


IF (key_cuu == 1 && key_cud == 0 && key_cul == 0 && key_cur == 0) { temp.x = camera.pan; }
IF (key_cud == 1 && key_cuu == 0 && key_cul == 0 && key_cur == 0) { temp.x = camera.pan + 180; }
IF (key_cul == 1 && key_cud == 0 && key_cuu == 0 && key_cur == 0) { temp.x = camera.pan + 90; }
IF (key_cur == 1 && key_cud == 0 && key_cul == 0 && key_cuu == 0) { temp.x = camera.pan - 90; }
IF (key_cuu == 1 && key_cul == 1 && key_cur == 0 && key_cud == 0) { temp.x = camera.pan + 45; }
IF (key_cuu == 1 && key_cur == 1 && key_cul == 0 && key_cud == 0) { temp.x = camera.pan - 45; }
IF (key_cud == 1 && key_cul == 1 && key_cur == 0 && key_cuu == 0) { temp.x = camera.pan + 135; }
IF (key_cud == 1 && key_cur == 1 && key_cul == 0 && key_cuu == 0) { temp.x = camera.pan - 135; }

IF (temp.x != -1000)
{IF (key_shift == 1) { temp.y = 10 * time; } ELSE { temp.y = 15 * time; }}

my.move_x = fcos(temp.x,temp.y);
my.move_y = fsin(temp.x,temp.y);
c_move(my,nullvector,my.move_x, ignore_passable | glide);//Basic Movement

result = trace(vector(my.x,my.y,my.z - my.z_offset),vector(my.x,my.y,my.z - 4000));
IF (result < 0) { my.z -= result; my.velocity_z = 0; }

//
IF (temp.y > 0) { rotate_entity(temp.x,20); }//if we are moving rotate the player towards the
//angle stored in temp.x at a speed of 20.

Re: How can i make this work ...I've tried evreything [Re: RyuShinji] #184551
02/19/08 04:18
02/19/08 04:18
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
What version you using. This code looks like it's for v6.3 or 5.

If your using a new version of GS try updating the it.
eg: time is now time_step trace is now c_trace.

The manual will help you of course.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus

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