Talk:Scripted AI Objects: Difference between revisions

Jump to navigation Jump to search
m
+syn
mNo edit summary
m (+syn)
Line 8: Line 8:


Instead of using this :
Instead of using this :
var DestinationOfFiring = new target(whatever);
<syntaxhighlight lang="nasal">
missile = new missile(pylon, DestinationOfFiring );  
var DestinationOfFiring = Target.new(whatever);
a very, very simple way of doing it could be just feed the missile with 2 object and have someting like that
var missile = Missile.new(pylon, DestinationOfFiring );  
  var SourceOfFiring = new target(whatever);
</syntaxhighlight>
  var DestinationOfFiring = new target(whatever);
a very, very simple way of doing it could be just feed the missile with 2 object and have someting like that:
  var myMissile = new missile(SourceOfFiring , DestinationOfFiring, missileType);
 
<syntaxhighlight lang="nasal">
  var SourceOfFiring = geo.Coord.new(whatever);
  var DestinationOfFiring = geo.Coord.new(whatever);
  var myMissile = new missile(origin:SourceOfFiring , target:DestinationOfFiring, type:missileType);
</syntaxhighlight>


This is a quick way of doing the job. Perhaps the "Target" object needs to be completed, with "pylon number" or "pylon position" (and it also could be renamed). This will allow the script to be independant of any aircraft.
This is a quick way of doing the job. Perhaps the "Target" object needs to be completed, with "pylon number" or "pylon position" (and it also could be renamed). This will allow the script to be independant of any aircraft.

Navigation menu