|
3 registered members (EvanTJ, Quad, AndrewAMD),
4,715
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: New guy needs help please :)
[Re: Cowabanga]
#262655
04/25/09 05:40
04/25/09 05:40
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
This is the code I got for function main
function main() { set(welcomescreen,SHOW); wait(10); level_load("training.hmp"); ENTITY* sky = ent_createlayer("skycube+6.dds", SKY | CUBE | SHOW, 0); sky.z = 30; camera.z = 30; character = ent_create("char.mdl",vector(0,0,100),NULL); }
missed that out.
Last edited by JakeBilbe; 04/25/09 05:40.
|
|
|
Re: New guy needs help please :)
[Re: Cowabanga]
#262657
04/25/09 05:46
04/25/09 05:46
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
Dw I figured it out I had to put ENTITY* before the character = ent_create thanks for the help  .
Last edited by JakeBilbe; 04/25/09 05:49.
|
|
|
Re: New guy needs help please :)
[Re: Cowabanga]
#262663
04/25/09 06:06
04/25/09 06:06
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
Yeah I thought that as well but I set his xyz to 20,40,250 and he is above the ground, just not moving. This is right tho?
action Player() { Player = me;
while (1) { if (key_a) c_rotate += 19*time_step; if (key_d) c_rotate -= 19*time_step; if (key_w) c_move (my, vector(15 * time_step, 0, 0), nullvector, GLIDE); if (key_space) my.z +=8; if (my.z > 20) my.z -=0.4; wait (1); }
Last edited by JakeBilbe; 04/25/09 06:06.
|
|
|
Re: New guy needs help please :)
[Re: JakeBilbe]
#262664
04/25/09 06:09
04/25/09 06:09
|
Joined: Aug 2008
Posts: 2,838 take me down to the paradise c...
Cowabanga
Expert
|
Expert
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
|
It's so wrong. c_rotate is wrong. This is how to use c_rotate: c_rotate(my,vector(19*time_step,0,0),GLIDE); Anyway, replace the while by this one: while (1)
{
if (key_a)
c_rotate(my,vector(19*time_step,0,0),GLIDE);
if (key_d)
c_rotate(my,vector(-19*time_step,0,0),GLIDE);
if (key_w)
c_move (my, vector(15 * time_step, 0, 0), nullvector, GLIDE);
if (key_space) my.z +=8;
if (my.z > 20) my.z -=0.4;
wait (1);
}
|
|
|
|