Nexus Modding > Scripting

GetDockPoint not working?

(1/3) > >>

Arparso:
Does this actually work for anyone? The syntax is supposedly:


--- Code: ---GetDockPoint(ship, index, outer);
--- End code ---

However, the game insists I'm givin an invalid dockpoint index, although I'm pretty sure it's the right one (since I receive that index from a docking boat with E.ship:dockpoint).

Any idea how to get the coordinates for a docking point then?

Mularac:
I must say that I've never used it before, what is it for?

FYI: Coordinates for docking points are included in the mesh, but I guess you already know that.

Arparso:
The command should theoretically return the coordinates of a docking point, which I need to display a certain effect using PlayEfx... so I hooked up the Arriving event (which gets fired when boats start their docking approach) and tried something like that:


--- Code: ---RULE event Arriving
:action
dock := GetDockPoint(E.ship:dockTarget, E.ship:dockPoint, 0);
PlayEfx(42, E.ship:radius, dock.x, dock.y, dock.z);
:end
END
--- End code ---

But it fails at GetDockPoint every time telling me about an invalid dockpoint index. I also tried to supply the index manually, but it either gives me the same error when the value is less or equal than NumDockPoints(E.ship:dockTarget) or just 0, if it's greater than that.

Seems bugged to me :(

Mularac:
what does it tell you if you debug those values? (e.ship:dockpoint, e.ship:docktarget)

nevermind, just tested it. Dunno why it happens... yeah, it does seem bugged

The Old Dragon:
Just a thought or two...

What exactly are you defining with the E.ship variable here? The strikecraft or the mothership?

What I'm wondering is...

With the 'E.ship:dockPoint' could the game be thinking that you're requesting a dockpoint on the docking strikecraft and not it's target dock?
Or alternatively could it be thinking that you're asking for the motherships dock target? And therefore needs you to define the docking strikecraft instead?

I could be completely wrong here, but it's a theory that came to mind.

P.S.

While we're discussing broken commands,  has anyone had any problems with the 'EndTraffic' command. Whenever I tried it, nothing happened.

Navigation

[0] Message Index

[#] Next page

Go to full version