thanks.
I just dont get it:
pPlayer = App.ShipClass_Cast(MissionLib.GetPlayer())
pSet = pPlayer.GetContainingSet()
kThis = App.Waypoint_Create("PlayerPosition", pSet.GetName(), None)
kThis.SetStatic(1)
kThis.SetNavPoint(1)
kThis.SetTranslate(pPlayer.GetTranslate())
kForward = App.TGPoint3()
kForward.SetXYZ(0.417716, 0.620277, 0.663905)
kUp = App.TGPoint3()
kUp.SetXYZ(-0.898685, 0.389602, 0.2014 35)
kThis.AlignToVectors(kForward, kUp)
kThis.SetSpeed(25.000000)
kThis.Update(0)
# Position "Player Start"
kThis = App.Waypoint_Create("Player Start", sSetName, None)
kThis.SetStatic(1)
kThis.SetNavPoint(0)
kThis.SetTranslateXYZ(-32.572227, -226.536850, -0.921197)
kForward = App.TGPoint3()
kForward.SetXYZ(-0.858776, 0.441285, 0.260330)
kUp = App.TGPoint3()
kUp.SetXYZ(0.199461, -0.180069, 0.963219)
kThis.AlignToVectors(kForward, kUp)
kThis.SetSpeed(25.000000)
kThis.Update(0)
kThis = None
# End position "Player Start"
the first one is the routine i wrote in "MyLib/AddNav()" the second is the one in "Belaruz4/LoadPlacements(sSetName)"
I JUST DON'T GET IT WHY DOES MINE WORK BUT NOT THE OREGINAL????
There is no sign of the "Player Start" WP but with "PlayerPosition" it works perfectly...
Even when i call LoadPlacements manually from console it seems to do nothing..... where are this silly WPs......
ANY ideas what could be the error?
NOTE: i use this to search for the WPs:
def ListObjectsInSet(pSet, Type):
for pObject in pSet.GetClassObjectList(Type):
if pObject:
str = repr(pObject.GetName())
print str
with this calls:
ListObjectsInSet(MissionLib.GetPlayer().GetContainingSet(), App.CT_WAYPOINT)
ListObjectsInSet(MissionLib.GetPlayer().GetContainingSet(), App.CT_BASE_OBJECT)
Oh and i tried this too:
Obj = App.ObjectClass_GetObject(MissionLib.GetPlayer().GetContainingSet(), "Player Start")
print Obj
Result: None :x :x :x