3 registered members (Dico, AndrewAMD, TipmyPip),
16,874
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: How to retrieve the x,y,z of an vector
[Re: peteredlin]
#350665
12/18/10 00:21
12/18/10 00:21
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
We'd need to see more of the code but a stab in the dark, you've created a boolean pointer somewhere and are storing the entity in this (won't show any problems in the compiler) but the BOOLEAN data type doesn't have a .x property, make sure that cylinder is an ENTITY pointer. basically what i'm trying to say:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
BOOL bool_temp;
void main(){
BOOL bool_temp;
level_load(NULL);
bool_temp = ent_create(CUBE_MDL, vector(1, 1, 1), NULL);
bool_temp.x = 1;
//vec_set(bool_temp, vector(1, 1, 1));
}
change to:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
ENTITY* ent_temp;
void main(){
level_load(NULL);
ent_temp = ent_create(CUBE_MDL, vector(1, 1, 1), NULL);
ent_temp.x = 1;
}
or .x inside the entities on function would work
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
action move_me(){
while(me){
my.x += time_step;
wait(1);
}
}
void main(){
level_load(NULL);
ent_create(CUBE_MDL, vector(1, 1, 1), move_me);
}
Hope this helps (and makes sense) ENTITY*
|
|
|
Entire Thread
|
How to retrieve the x,y,z of an vector [solved]
|
peteredlin
|
12/17/10 19:46
|
Re: How to retrieve the x,y,z of an vector
|
WretchedSid
|
12/17/10 20:09
|
Re: How to retrieve the x,y,z of an vector
|
peteredlin
|
12/17/10 20:20
|
Re: How to retrieve the x,y,z of an vector
|
WretchedSid
|
12/17/10 20:46
|
Re: How to retrieve the x,y,z of an vector
|
peteredlin
|
12/17/10 21:09
|
Re: How to retrieve the x,y,z of an vector
|
WretchedSid
|
12/17/10 21:54
|
Re: How to retrieve the x,y,z of an vector
|
peteredlin
|
12/17/10 22:55
|
Re: How to retrieve the x,y,z of an vector
|
MrGuest
|
12/18/10 00:21
|
Re: How to retrieve the x,y,z of an vector
|
peteredlin
|
12/18/10 08:19
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|