Espectro (DayZ) 0 Posted April 29, 2002 Hi there. I need to get a units position, the unit is named P1. After that, i need to place another unit at the same place (both height and x and y coordinates), this unit is called S1 can some1 please help me ? Share this post Link to post Share on other sites
Espectro (DayZ) 0 Posted April 29, 2002 ok, thanks alot... But i got a nother problem. How do i create a smokeshell? I try and use "camcreate smokeshell getpos p1" not working Share this post Link to post Share on other sites
Guest Posted April 29, 2002 the syntax is: _shell = "smokeshell" camcreate getpos p1 Share this post Link to post Share on other sites
Espectro (DayZ) 0 Posted April 29, 2002 Cool, thanks it works... now the next problem (*drumroll*) How do i make that smokeshell move along the unit p1 ? Share this post Link to post Share on other sites
Dawdler 0 Posted April 29, 2002 do a loop with setpos getpos. But Im not sure if it works since a smokeshell is kind of a fire and forget weapon (meaning you use it and thats it (the "object" aint there anymore). Kind of like trying to move an explosion). Though Im totally unsure, never tried it before Share this post Link to post Share on other sites
Guest Posted April 29, 2002 As a script, I'll draw out the basics, you can then adjust it to your needs. ----------------------------------------------------- ; fsmoke.sqs ; [targetUnit, followTime] as input ; i.e [p1,10] = exec "fsmoke.sqs" _targetUnit = this select 0 _imax = this select 1 ; index variable _i = 0 ; update interval (seconds) for instance here 0.1 s _ui = 0.1 Â ; max follow time _imax = _imax/_ui ;create the smokeshell _shell = "smokeshell" camcreate getpos targetUnit # loop ;move the smoke _shell setpos getpos targetUnit ;wait update interval ~_ui ; if we are done go to end label ?(_i >= _imax):goto "end" ;else increase i _i = _i+1 ; loop goto "loop" # end exit --------------------------------------------------- I havn't tried it but it should work. Share this post Link to post Share on other sites
Espectro (DayZ) 0 Posted April 30, 2002 thx alot dude, ill try t when i get home Share this post Link to post Share on other sites
Espectro (DayZ) 0 Posted April 30, 2002 Okay... This is my script, can u tell me if anything wrong with it (cant test it here) It is supposed to make a plane smoke and even engine failure if its damaged: ----------------------- #check ?(targetUnit getdammage <= 0.3):goto "check" _shell = "smokeshell" camcreate getpos targetUnit Enginevar = 1 #loop _shell setpos getpos targetUnit ~0.1 ?(targetUnit getdammage = 1):goto "end" ?(targetUnit getdammage >= 0.7):goto "engine" goto "loop" #engine ?(Enginevar = 0):goto "loop" Enginevar = 0 targetUnit setfuel 0 targetUnit setfuel 0.1 targetUnit setfuel 0 targetUnit setfuel 0.1 targetUnit setfuel 0 goto "loop" #end exit ----------------------- Share this post Link to post Share on other sites