Forum Jump :

Author Message


Posts: 26
Rank:


Level: Member

Country: us
Location: Dallas, Tx
Occupation:
Age: 46
In-game name:

 
#1 Posted at 2012-04-16 22:41        
     
No issues in ArmA 1...

titleText[">>> Order confirmed!  Chopper RTB! <<<", "PLAIN DOWN"];

_Heli=_this select 3;
_Pilot= driver _Heli;

#RestartErr2
"W1LZMkr" setmarkerpos getmarkerpos "W1EvacRTB";
W1LZ setdir Getdir W1AirLnd;
W1LZ setpos getmarkerpos "W1LZMkr";

~2

(vehicle _Pilot) doMove (position W1LZ);

#Restart1
(vehicle _Pilot) flyinheight 200;
(vehicle _Pilot) setspeedmode "FULL";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 3000 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 3000): goto "Restart1";

#Restart2
(vehicle _Pilot) flyinheight 150;
(vehicle _Pilot) setspeedmode "FULL";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 2000 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 2000): goto "Restart2";

#Restart3
(vehicle _Pilot) flyinheight 105;
(vehicle _Pilot) setspeedmode "FULL";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 1000 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 1000): goto "Restart3";

#Restart4
(vehicle _Pilot) flyinheight 90;
(vehicle _Pilot) setspeedmode "FULL";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 600 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 600): goto "Restart4";

#Restart5
(vehicle _Pilot) flyinheight 70;
(vehicle _Pilot) setspeedmode "NORMAL";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 300 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 300): goto "Restart5";

#Restart6
(vehicle _Pilot) flyinheight 25;
(vehicle _Pilot) setspeedmode "NORMAL";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 150 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 150): goto "Restart6";

_Heli land "Get Out";

#Restart7
(vehicle _Pilot) flyinheight 15;
(vehicle _Pilot) setspeedmode "LIMITED";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 25 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 25): goto "Restart7";

#Restart8
(vehicle _Pilot) flyinheight 15;
(vehicle _Pilot) setspeedmode "LIMITED";

? ((!(_Pilot in _Heli))||(!(alive _Heli))||(!(alive _Pilot))||(!(canmove _Heli))): goto "Cont";
Hint Format["Dist > 15 ETA %1",_Heli distance W1LZ];
? ((_Heli distance W1LZ) > 15): goto "Restart8";

_Heli land "LAND";

(vehicle _Pilot) flyinheight 0;

Hint "Landed!";
goto "ContEnd";

#Cont
? ((!(alive _Heli))||(!(alive _Pilot))): goto "ContErr1";
? (((alive _Pilot)&&(_Pilot in _Heli))&&(!(canmove _Heli))): goto "ContErr2";
? ((!(alive _Pilot))&&(canmove _Heli)||(!(canmove _Heli))): goto "ContErr3";
? (!(_Pilot in _Heli)): goto "ContErr4";
goto "ContEnd";

#ContErr1
Hint "RTB Failure: Chopper and crew destroyed!";
goto "ContEnd";

#ContErr2
_Heli setdammage 0;
_Heli setfuel 1;

Hint "RTB Warning: Making repairs and attempting to continue mission!";
goto "RestartErr2";

#ContErr3
Hint "RTB Failure: Pilot Killed!  Destroying chopper (20 Secs)!";
~20
_Heli Setdammage 1;
goto "ContEnd";

#ContErr4
Hint "MAYDAY!!!  MAYDAY!!!  Chopper destroyed!  I'm bailing and need rescue!";
goto "ContEnd";

#ContEnd
exit


Runs great in Arma... But when I run it in Arma 2, sound freaks out, and CPU utilization goes up, then the
game crashes. I'm running Windows 7, on my friends computer, cause my puter died a few days back.

Anyway, things operate much differently in Arma 2. In Arma 1, I could setpos an object in midair, but when I
use the same script in Arma 2 the object falls to the ground.

As far as this script goes, it's called from an Addaction command... Something in here the Arma Engine doesn't
like.

I would greatly appreciate any criticisms on my use of .sqs, and what the problem could be...

As many of us do, I as well, come from a Flashpoint, Resistance and Arma background. I was a member of the original DSF clan for about two months, back when Hatcher was in charge, along with Deaddog, Joker, Thatcher, two german dudes, and my callsign was, and still is FullMetal.

Author Message

palyarmerc  

I live inside the editor


Posts: 753
Rank:


Level: Member

Country: uk
Location:
Occupation: *Retired from ArmA*
Age:
In-game name: Paly

 
#2 Posted at 2012-04-17 07:42        
     
In Arma 1, I could setpos an object in midair, but when I
use the same script in Arma 2 the object falls to the ground

Did BIS better implement gravity in Arma2? Perhaps, but anyway, is this the actual problem?

sqs is deprecated - anyone still using it is frowned upon. I still use it in limited ways, because it still works and I find it easier to loop stuff
also you should do the following...
SQS does not require ; at the end of its sentences, (probably the main issue here)
change doMove to Move
change setDir to setFormDir

*THUMBS UP*

....that's all folks....!

Advertisement


Author Message


Posts: 26
Rank:


Level: Member

Country: us
Location: Dallas, Tx
Occupation:
Age: 46
In-game name:

 
#3 Posted at 2012-04-17 14:51        
     
Thanks Palyarmerc for the reply...

I would get errors whenever I leave the ";" out. I use the DoMove because it works great in conjunction with the DoStop command; If I issue a DoMove to my Evac chopper it will fly to the location and stay there, rather than to try to get back into formation. I wanted him as part of my squad, so I could control where he goes, and where he lands, but I do not want to babysit him like I do the other AI.

Your right about the sqs being easier than the sqf... Sometimes it's easier using loops than it is to figure out the complex syntax for sqf. I think they made it more complex than it really has to be, and before BIS releases yet, another game, they should fix the two games they obviously havn't finished yet. People are going to have the same problems in Arma 3 as they've had in Flashpoint and Arma 1, giving us better graphics, and making us learn another User Interface to replace the one we've gotten used to, is just problematic. I have to go through 3 layers of menu's to tell BLUE team to move to a map clicked location on the MAP, very frustrating.

But at least when you order a chopper to _Heli land "LAND", in Arma 2, it actually lands, now whether or not it stays landed is a problem they've yet to fix. Would be nice if they took away some of the decision making process for the chopper.

I'll tell you something that was funny, and infuriating both at the same time, that happened to me the other day, while playing Arma 2...

I used onmapsingleclick to place a helipad near me, then I told the Evac to fly to that location... He flew short of that location. I set his flyinheight to 0, to cause him to touch the ground, then I ordered my team to disembark, so guess what happened?

He lifted back off while my men were disembarking, and as a result half my team got killed rather in a bad kind of a way.

So now, I added an option to deplete his fuel when he touches down, so I can control exactly what he does... Anyway, just complaining... All in all, Arma 2 is a great game, and the sounds are better than in Arma 1, as well as the graphics, and the AI are a bit more smarter. So is it worth buying, YES, does that mean BIS can slack off, NO, we gamers deserve a fully functional product for the money, and our loyalty to those products, that includes...

Fixing...

(1) Onmapsingleclick
(2) Taking away the thought process for the vehicles, so they do not assume anything.
(3) fixing the hold fire, so that when you tell them not to fire, they do not fire


If I'm told to do something I do it, and when I'm told not to, I do not, so why should AI be exceptions to that rule.

Anyway, thanks for the reply... Hope this doesn't bore you too much, I like talking.

As for the gravity in Arma 2, it does appear to have better physics. I have to use SetposATL, instead of setpos.

But that does not fix all my problems... I use infantry teleport as a replacement to the non-working Team Switch, and it actually works better, I can walk up stairs, and tell Soldier2 to watch a certain direction, then hit my teleport, and he'll teleport exactly to that spot, at any position. Grenades work differently in Arma 2, than in Arma...

I have a function in Arma 1 called Set Charge... I walk somewhere, press set charge, and then walkaway, and then it creates a new option in my action thingie, called Detonate, when I press that, it creates two grenades, which explode at the previous location I was at.

Totally doesn't work in Arma 2, because it's a gravity thing... If I create it 1, 2, 3, or even 4 or 5 meters above ground it won't go off, but if I create it 10 meters above the ground then it will go off when it touches the ground.

Have a good one

FullMetal

As many of us do, I as well, come from a Flashpoint, Resistance and Arma background. I was a member of the original DSF clan for about two months, back when Hatcher was in charge, along with Deaddog, Joker, Thatcher, two german dudes, and my callsign was, and still is FullMetal.