Gamestudio Links
Zorro Links
Newest Posts
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 (AndrewAMD, dr_panther), 1,282 guests, and 4 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
Page 1 of 3 1 2 3
I am getting close......... #223681
08/25/08 21:39
08/25/08 21:39
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
I am getting close to being moving my ship. I think if I can get over this one problem I will have it made. here is the error I am getting.




I been looking all over trying how to do this, but I am at a lose.
here is all of my code
Code:

//////////////////////////////
#include <acknex.h>
#include <default.c>

function main()
{
	level_load ("");
	wait(2);	// wait until the level is loaded
	vec_set(camera.x, vector(-500, 0, -10));
	ent_create("ship.mdl", vector(0, 0, 0),NULL);
	ent_create("land.mdl", vector(-900,2000, -400),NULL);
}	

 action move_ship()
	
{
	
	
	


	while (1)
	
    {

              
             // move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed

               c_move (ship, vector(10 * (key_w - key_s) * time_step, 6 * (key_a - key_d) * time_step, 0), nullvector, GLIDE);

    }

}

	   wait (1);
	   
	   



I hope some one can help. It has been two days now, I been working on this. manual said it was easy, most likely so if you know it already.
Thank You
renny

Last edited by sadsack; 08/25/08 23:38.

I have A7 Commercial .............. Now I just need to learn how to use it

Re: I am getting close......... [Re: sadsack] #223682
08/25/08 21:41
08/25/08 21:41
Joined: Mar 2008
Posts: 67
crumply Offline
Junior Member
crumply  Offline
Junior Member

Joined: Mar 2008
Posts: 67
ent_create("ship.mdl", vector(0, 0, 0),move_ship);

also, put the action move_ship above main.

Re: I am getting close......... [Re: crumply] #223683
08/25/08 22:06
08/25/08 22:06
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Well crumply, that got me very close. see photo




I don't know what syntax error, but I did mot get it on till I put action move_ship above main.
here is the code

Code:

//////////////////////////////
#include <acknex.h>
#include <default.c>

action move_ship()

function main()
{
	level_load ("");
	wait(2);	// wait until the level is loaded
	vec_set(camera.x, vector(-500, 0, -10));
	ent_create("ship.mdl", vector(0, 0, 0),move_ship);
	ent_create("land.mdl", vector(-900,2000, -400),NULL);
}	

 
	
{
	
	
	


	while (1)
	
    {

              
             // move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed

               c_move (ship, vector(10 * (key_w - key_s) * time_step, 6 * (key_a - key_d) * time_step, 0), nullvector, GLIDE);

    }

}

	   wait (1);
	   
	   



I think if we can get this fixed it will work.
thank you
renny

Last edited by sadsack; 08/25/08 23:39.

I have A7 Commercial .............. Now I just need to learn how to use it

Re: I am getting close......... [Re: sadsack] #223684
08/25/08 22:15
08/25/08 22:15
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
Why are you double posting?


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: I am getting close......... [Re: Blade280891] #223686
08/25/08 22:29
08/25/08 22:29
Joined: Mar 2008
Posts: 67
crumply Offline
Junior Member
crumply  Offline
Junior Member

Joined: Mar 2008
Posts: 67
I said ent_create("ship.mdl", vector(0, 0, 0),move_ship);

not

ent_create("ship.mdl", vector(0, 0, 0),move_ship());

Re: I am getting close......... [Re: crumply] #223687
08/25/08 22:56
08/25/08 22:56
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Yes crumply, I did see that and changed it so it was right.
but still have the same error. What can be wrong with the main function.

Blade,
I did not know I was.
Thank you
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: I am getting close......... [Re: sadsack] #223690
08/25/08 23:22
08/25/08 23:22
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Code:
//////////////////////////////
#include <acknex.h>
#include <default.c>
var mv_v1[3];
function move_ship() {
	while(1) {
		mv_v1.x = 10 * (key_w - key_s) * time_step;
		mv_v1.y = 6 * (key_a - key_d) * time_step;
		mv_v1.z = 0;
		 // move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed
		 c_move (ME, mv_v1, nullvector, GLIDE);
		 wait(1);
	}
}
function main() {
	level_load ("");
	wait(2);	// wait until the level is loaded
	vec_set(camera.x, vector(-500, 0, -10));
	ent_create("ship.mdl", vector(0, 0, 0),move_ship);
	ent_create("land.mdl", vector(-900,2000, -400),NULL);
}	


Re: I am getting close......... [Re: testDummy] #223692
08/25/08 23:37
08/25/08 23:37
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
I can see this is a hard thing to learn. For two days I been working on this with some help from all of you who have took your time to help. well, test Dummy, You code came close,but still an error. I don't know what they are talking about with this one.





This is something, to go through all of this just to make a ship move.
Well, that is how life goes
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: I am getting close......... [Re: sadsack] #223695
08/26/08 00:19
08/26/08 00:19
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Blade, I am sorry, you are right I deleted it, But it only some it. I did not know that it was still there on till you said some thing about.
I hope you can forgive me foe being so dumb.
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: I am getting close......... [Re: sadsack] #223701
08/26/08 02:37
08/26/08 02:37

C
cemetarycat
Unregistered
cemetarycat
Unregistered
C



hey sadsack
and others here too... wink

why not try this?
I just used the x component of the vector.
As well as excluded the time_step system variable.
You can place it in to multiply.
And I used the Red Dragon model too.

Code:
//////////////////////////////
#include <acknex.h>
#include <default.c>
VECTOR* mv[3];





function move_ship() {
	
	mv.x=0;
	mv.y=0;
	mv.z=0;
	
	
	while(1) {
		
		  if (key_w) vec_add(my.x,vector(7,0,0));
		  if (key_s) vec_add(my.x, vector(-7,0,0));
		  
		  
	 //	mv_v1.x = 7 *time_step;
	//	mv_v1.y = 6 * time_step;
	//	mv_v1.z = 0;
		 // move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed
		 
		 
		 
		 c_move (me, nullvector,  vector( mv.x, mv.y, mv.z), GLIDE);
		 wait(1);
	}
}




function main() {
	level_load ("");
	wait(2);	// wait until the level is loaded
	vec_set(camera.x, vector(-500, 0, -10));
	ent_create("RED_DRAGON.mdl", vector(0, 0, 0),move_ship);
	//ent_create("land.mdl", vector(-900,2000, -400),NULL);
}	
 



and the proof is in the pudding.

on start up of the program



after I pressed the w key once




cheers


Last edited by cemetarycat; 08/26/08 02:40.
Page 1 of 3 1 2 3

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