OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: sfc.itzhak on 17 Mar 2008, 18:03:15
-
hi.
i am trying to attach the tank shell with a "tracer" that will make it visible at night/day its still alpha but it wont work.
_Missile = nearestobject [_this select 0,_this select 4];
? isNull _Missile : exit
_Type= typeOf _Missile
titletext ["shell fired","plain"];
shell1= "bvr_shell" createVehicle [0,0,0];
#loop
? _Type != typeOf _Missile : goto "end"
shellpos=getpos _Missile;
shellx=shellpos select 0;
shelly=shellpos select 1;
shellz=shellpos select 2;
shell1 setpos [shellx,shelly,shellz];
Goto "loop"
titletext ["shell fired","plain"];
#End
exit
any ideas/suggestions?
thanks in advance.
-
Do you get the titletext ["shell fired","plain"]; displayed ?
-
yeap.
and only when i really slow mo i can see the attached shell.
so either the projectile is moving to fast or the script is too slow.
maybe i am using a bad approach?
the drop command is better?
what i am trying to achieve is, whan the tank fire a shell we can see the shell(bright and orange/red projectile).
so maybe create a particle and attach it to the projectile.
-
You may create a lightpoint vehicle and attach it to your shell:
_light = "#lightpoint" createVehicle [0,0,0];
_light setLightColor [0.7,0.8,1];
_light setLightAmbient [0.7,0.8,1];
_light setLightBrightness 0.1;
_light LightAttachObject [_Missile,[0,0,0]];
Not sure it will be seen at daylight.
-
hey mandoble.
whan i use this script i get
this is what i use to activate the script
this addEventHandler ["Fired", {this exec "fired.sqs"}]
_Missile = nearestobject [_this select 0,_this select 4];
? isNull _Missile : exit
_Type= typeOf _Missile
? _Type != typeOf _Missile : goto "end"
shellpos=getpos _Missile;
_light = "#lightpoint" createVehicle [0,0,0];
_light setLightColor [0.7,0.8,1];
_light setLightAmbient [0.7,0.8,1];
_light setLightBrightness 0.1;
_light LightAttachObject [_Missile,[0,0,0];
titletext ["shell fired","plain"];
#End
exit
"error type any,expected object" and this line is above it.
_light LightAttachObject [_Missile,[0,0,0]];
thanks in advance
-
In your code you are missing a ] here _light LightAttachObject [_Missile,[0,0,0];
-
hey mandoble.
i tried what you said but it still gives me the same error.
_Missile = nearestobject [_this select 0,_this select 4];
? isNull _Missile : exit
_Type= typeOf _Missile
? _Type != typeOf _Missile : goto "end"
shellpos=getpos _Missile;
_light = "#lightpoint" createVehicle [0,0,0];
_light setLightColor [0.7,0.8,1];
_light setLightAmbient [0.7,0.8,1];
_light setLightBrightness 0.1;
_light LightAttachObject [_Missile,[0,0,0]];
titletext ["shell fired","plain"];
#End
exit
and the "shell fired" wont show up.
-
Try this experiment:
-
thanks again man for your help
but are able to see anything?
cuz i dont see any orb or something..
-
I see both, the light and the drop using external view.