View Issue Details

IDProjectCategoryView StatusLast Update
0002380FSSCPscriptingpublic2011-01-23 17:11
ReporterMadProf Assigned ToThe_E  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.13 
Summary0002380: Setting Ship.TargetSubystem doesn't target subsystem
Description
example
  hv.Player.TargetSubsystem = hv.Player.Target["engine"]

no change in targeted subsystem
Additional Informationchanging the != to == in the line

if(aip->target_signature != newh->sig)

@line 6320 in file lua.cpp, the subsystem will change
TagsNo tags attached.

Activities

FUBAR-BDHR

2011-01-18 21:58

developer   ~0012603

One thing here that may be an issue (note I know nothing about scripting) is the use of engine. Engine is a special case "container" subsystem that includes all engines (engine01a, engine02a, engines, etc) try it with something that isn't like weapons.

MadProf

2011-01-19 04:47

reporter   ~0012604

Tried this script before and after the condition change with a Leviathan targeted

$On Key Pressed:
[
if hv.Key:lower() == "f10" then
  if hv.Player.Target:isValid() and hv.Player.Target:getBreedName() == "Ship" then
    hv.Player.TargetSubsystem = hv.Player.Target[1]
  end
end
]

Results
  Before - no subsystem targeted
  After - Laser Turret targeted

The_E

2011-01-23 17:10

administrator   ~0012609

Fixed in revision 6967

Issue History

Date Modified Username Field Change
2011-01-18 21:08 MadProf New Issue
2011-01-18 21:58 FUBAR-BDHR Note Added: 0012603
2011-01-19 04:47 MadProf Note Added: 0012604
2011-01-23 17:10 The_E Note Added: 0012609
2011-01-23 17:11 The_E Status new => resolved
2011-01-23 17:11 The_E Resolution open => fixed
2011-01-23 17:11 The_E Assigned To => The_E