3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
HELP PLEASE, BULLET
#348433
11/26/10 20:42
11/26/10 20:42
|
Joined: Aug 2010
Posts: 15
Totolia
OP
Newbie
|
OP
Newbie
Joined: Aug 2010
Posts: 15
|
I'm trying to make out a projectile, a bullet but I can not. The bullet appears but does not move. if(mouse_left){ ent_create ("bala.mdl", vector(prota.x - 5,prota.y + 7, prota.z + 14), disparar); }
action disparar (){ my.scale_x = 0.1; my.scale_y = 0.1; my.scale_z = 0.1; my.pan = your.pan; // face same direction as player c_move(my,vector(40*time_step,0,0),NULL,IGNORE_YOU); }
|
|
|
Re: HELP PLEASE, BULLET
[Re: Totolia]
#348435
11/26/10 20:54
11/26/10 20:54
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
You have to put c_move in a loop:
if(mouse_left){
ent_create ("bala.mdl", vector(prota.x - 5,prota.y + 7, prota.z + 14), disparar);
}
action disparar (){
my.scale_x = 0.1;
my.scale_y = 0.1;
my.scale_z = 0.1;
my.pan = your.pan; // face same direction as player
while(1)
{
c_move(my,vector(40*time_step,0,0),NULL,IGNORE_YOU);
wait(1);
}
}
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: HELP PLEASE, BULLET
[Re: painkiller]
#348439
11/26/10 21:06
11/26/10 21:06
|
Joined: Aug 2010
Posts: 15
Totolia
OP
Newbie
|
OP
Newbie
Joined: Aug 2010
Posts: 15
|
Not because I close the program. I close the program automatically without displaying error or anything.
Last edited by Totolia; 11/26/10 21:07.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|