0 registered members (),
1,397
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Hi! I have a problem
#39181
01/13/05 22:33
01/13/05 22:33
|
Joined: Jan 2005
Posts: 79
taipan
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2005
Posts: 79
|
Hello everybody. This is my first post here. Hope uoy all can help me Im trying the RPG tutorial shown in thread RPG but i cant seem to be able to make my cool looking RPG hero to move. Everything else works fine except that when i try to move him he just stands still. Im at page 15 in the PDF that came with the tutorial. I currently have 6.22 PRO and it says that the tutorial is made for 5.51 Can that be the problem? Can someone check the code and see if there should be any changes? //Patrik
- A 3D world can be flawless...I want to live there
|
|
|
Re: Hi! I have a problem
[Re: taipan]
#39182
01/14/05 00:03
01/14/05 00:03
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
Senior Expert
|
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
Hi there and welcome to the forums...
Can you post you complete code here? It'll make it easier to try to find the old A5 syntax that needs to be changed in order to work with A6... This shouldn't be to difficult, so just post your code here and I'll see what I can do...
EDIT: Also you should consider downloading the newest A6 version from either the download page, or here ; a6 31.3
Cheers
Last edited by PHeMoX; 01/14/05 00:05.
|
|
|
Re: Hi! I have a problem
[Re: PHeMoX]
#39185
01/14/05 02:22
01/14/05 02:22
|
Joined: Jan 2005
Posts: 79
taipan
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2005
Posts: 79
|
here is the code:
include<var.wdl>; include<int.wdl>; include<func.wdl>;
var video_mode = 6; var video_depth = 16;
function animate() { while(1) { wait(1); } }
function adventure() { while(1) {
collision_check();
if((key_cuu==1)&&(key_cur==1)) {heru.pan=(face_up+face_right)/2;if ((move_forward == yes) && (move_right == yes)) {heru.y+=8/1.3* time;}goto skip;} if((key_cuu==1)&&(key_cul==1)) {heru.pan=(face_up+face_left)/2;if ((move_forward == yes) && (move_left == yes)) {heru.y+=8/1.3* time;}goto skip;} if((key_cud==1)&&(key_cur==1)) {heru.pan=(face_down+face_right)/2;if ((move_forward == yes) && (move_right == yes)) {heru.y-=8/1.3* time;}goto skip;} if((key_cud==1)&&(key_cul==1)) {heru.pan=(face_down+face_left)/2;if ((move_forward == yes) && (move_right == yes)) {heru.y-=8/1.3* time;}goto skip;}
if(key_cuu==1) {heru.pan=face_up;if (move_forward == yes) {heru.y+=8*time;}goto skip;} if(key_cud==1) {heru.pan=face_down;if (move_back == yes) {heru.y-=8*time;}goto skip;} if(key_cur==1) {heru.pan=face_right;if (move_right == yes) {heru.x+=8*time;}goto skip;} if(key_cul==1) {heru.pan=face_left;if (move_left == yes) {heru.x-=8*time;}goto skip;}
skip:
wait(1); } }
function collision_check() {
dot_front_left[0]=heru.x-15; dot_front_left[1]=heru.y+25; dot_front_left[2]=heru.z; dot_front_right[0]=heru.x+15; dot_front_right[1]=heru.y+25; dot_front_right[2]=heru.z;
dot_back_left[0]=heru.x-15; dot_back_left[1]=heru.y-25; dot_back_left[2]=heru.z; dot_back_right[0]=heru.x+15; dot_back_right[1]=heru.y-25; dot_back_right[2]=heru.z;
dot_right_front[0]=heru.x+25; dot_right_front[1]=heru.y+15; dot_right_front[2]=heru.z; dot_right_back[0]=heru.x+25; dot_right_back[1]=heru.y-15; dot_right_back[2]=heru.z;
dot_left_front[0]=heru.x-25; dot_left_front[1]=heru.y+15; dot_left_front[2]=heru.z; dot_left_back[0]=heru.x-25; dot_left_back[1]=heru.y-15; dot_left_back[2]=heru.z;
me = heru; trace_mode = ignore_me; if (trace(dot_front_left.x, dot_front_right.x) != 0) {move_forward = no;} else {move_forward = yes;} if (trace(dot_back_left.x, dot_back_right.x) != 0) {move_back = no;} else {move_back = yes;} if (trace(dot_left_front.x, dot_left_back.x) != 0) {move_left = no;} else {move_left = yes;} if (trace(dot_right_front.x, dot_right_back.x) != 0) {move_right = no;} else {move_right = yes;} me = blank_ent;
}
function npc_animate(who, &frames);
var wait_start=0; var wait_end=1; var heru_frames[2]=2,10; var npc1_frames[2]=0,19; var npc2_frames[2]=0,0; var npc3_frames[2]=2,11;
entity* heru; entity* npc1; entity* npc2; entity* npc3; entity* temp_npc;
action heru_act {heru = me;} action npc1_act {npc1 = me;} action npc2_act {npc2 = me;} action npc3_act {npc3 = me;}
string field_level = <field.WMB>;
starter start_up()
{ level_load(field_level); while ((heru == null) || (npc1 == null) || (npc2 == null) || (npc3 == null)) {wait(1);} camera.visible=off;
animate(); }
function animate() { while(1) { if ((heru.frame > heru_frames[wait_end])||(heru.frame < heru_frames[wait_start])) {heru.frame = heru_frames[wait_start];}
heru.frame+=.7*time;
npc_animate(npc1, npc1_frames); npc_animate(npc2, npc2_frames); npc_animate(npc3, npc3_frames);
wait(1);
} animate(); adventure(); }
function npc_animate(who, &frames) { temp_npc=who;
if((temp_npc.frame>frames[wait_end])||(temp_npc.frame<frames[wait_start])) {temp_npc.frame=frames[wait_start];} temp_npc.frame+=.7*time; }
- A 3D world can be flawless...I want to live there
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|