1 registered members (AndrewAMD),
645
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
vec_for_vertex ...
#375773
06/27/11 20:18
06/27/11 20:18
|
Joined: Aug 2010
Posts: 131 Iran
Mafia_IR
OP
Member
|
OP
Member
Joined: Aug 2010
Posts: 131
Iran
|
Hi guys , i have two questions :
1) i created pics with ent_create command in lite-c and i wanted to created them in front of my gun , i used vec_for_vertex command here but i get a error message e1513 , Why ?
here is my code :
while(1) {
...
if(key_ctrl) { vec_for_vertex(shoot_vector.x, my, 356); ent_create("Shoot.jpg",shoot_vector,shoot_pic_function); } wait(1); }
2)how can i create a sky for my space ship game ,because when i want to use Dome , ... they don't make a whole sky and they are only make sky in top but nothing in bottom . and i dont want to use CUBE because it doesn't seem real ...
Thanks
Last edited by Mafia_IR; 06/28/11 03:43.
|
|
|
Re: vec_for_vertex ...
[Re: Mafia_IR]
#375847
06/28/11 12:37
06/28/11 12:37
|
chris_oat
Unregistered
|
chris_oat
Unregistered
|
2) What doesnt look so real with CUBE? Define a skycube like in the Manual (search for it if you dont know it) and get a +6 skycube Texture (free resources) and it will look good.
|
|
|
Re: vec_for_vertex ...
[Re: Mafia_IR]
#375850
06/28/11 12:43
06/28/11 12:43
|
chris_oat
Unregistered
|
chris_oat
Unregistered
|
is there a Vector "shoot_vector" defined?
Is the "shoot_pic_function" in your ent_create ABOVE your code?
|
|
|
Re: vec_for_vertex ...
[Re: ]
#375856
06/28/11 13:42
06/28/11 13:42
|
Joined: Oct 2006
Posts: 873
Shadow969
User
|
User
Joined: Oct 2006
Posts: 873
|
it's better to post error message instead of error code alone. there may be several reasons for crash: -empty pointer('my' entity is not set or created at the moment). -type mismatch(shoot_vector has to be either var array or VECTOR structure in both cases when you want to pass a vector you don't have add .x after the variable's name unless it's an entity struct and you want to access it's coordinate. so, if that doesn't help - post error message, and the code where you define shoot_vector
|
|
|
Re: vec_for_vertex ...
[Re: Shadow969]
#375989
06/29/11 08:01
06/29/11 08:01
|
Joined: Aug 2010
Posts: 131 Iran
Mafia_IR
OP
Member
|
OP
Member
Joined: Aug 2010
Posts: 131
Iran
|
its my player function :
VECTOR* temp ;
function player_function ()
{
player = me ;
my.scale_x = 0.75 ;
my.scale_y = 0.75 ;
my.scale_z = 0.75 ;
while(player_health >= 0)
{
c_move(me,vector(30*time_step,0,0),nullvector,IGNORE_PASSABLE);
if(key_w)
...
if(key_ctrl)
{
vec_for_vertex (temp.x, my, 356);
ent_create("Shoot.jpg",temp,shoot_pic_function);
ent_create("Shoot.jpg",temp,shoot_pic_function);
}
wait(1);
}
}
do you know what's it mean ? i have the same problem with fire in back and laser in front . look at the first picture : it's ok , because its pan never changed until now , in the next picture i changed its pan , now what's problem here ? fire pan and laser pan are changed, it shouldn't change , they should rotate with space ship . what i want ? i want to shoot laser for enemy or stones in space and this(laser) should rotate with space ship . it's my laser function :
function shoot_pic_function ()
{
my.flags |= OVERLAY | BRIGHT | TRANSLUCENT | PASSABLE;
my.alpha = 80 ;
while(1)
{
c_move(me,vector(50,0,0),nullvector,IGNORE_PASSABLE);
if((vec_dist(player.x, my.x)) >= 2000)
break ;
wait(1);
}
ent_remove(me);
}
Thanks ... Mohammad
Last edited by Mafia_IR; 06/29/11 08:03.
|
|
|
|