I posted this at UTF but didn't get any replies, thought I'd try here.
It is the second level 3 mission for an extension. The level 1, 2, and 4 missions work fine, so does the other level 3 mission. I can't figure out why this one doesn't work.
I put notes in the text attachment to try and describe what is happening.
Here is the mission code document: code.txt
Help with mission code, please.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Hmm...I don't see the problem.
But one (possibly related) problem is that you are using (objSetData) instead of (objSetObjRefData). It is vital that you use (objSetObjRefData) when storing objects (stations, ships, etc). Otherwise, the game will not be able to properly save/restore.
I don't know why the game crashed when you used (objSetObjRefData), but maybe that is a clue to the root problem...
If you can package it up as an extension or something, I could take a look under the debugger...
p.s.: You should also save mission references (like "PrimaryTarget") under the gStation object, not under gPlayerShip. Otherwise, if there happen to be two stations in the same system, and the player gets a mission from both at the same time (I know--that should be rare) one station would overwrite the other's variables.
But one (possibly related) problem is that you are using (objSetData) instead of (objSetObjRefData). It is vital that you use (objSetObjRefData) when storing objects (stations, ships, etc). Otherwise, the game will not be able to properly save/restore.
I don't know why the game crashed when you used (objSetObjRefData), but maybe that is a clue to the root problem...
If you can package it up as an extension or something, I could take a look under the debugger...
p.s.: You should also save mission references (like "PrimaryTarget") under the gStation object, not under gPlayerShip. Otherwise, if there happen to be two stations in the same system, and the player gets a mission from both at the same time (I know--that should be rare) one station would overwrite the other's variables.
- dvlenk6
- Militia Captain
- Posts: 519
- Joined: Sun Mar 05, 2006 6:56 am
- Location: Sanctuary and beyond
- Contact:
Thanks. That was quick!
It gives me some leads to look into. I had no clue whatsoever.
If I still can't get it to work within a few days, I might take you up on that offer to run it through your debugger
.
It gives me some leads to look into. I had no clue whatsoever.
If I still can't get it to work within a few days, I might take you up on that offer to run it through your debugger

-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Yes it would! If anyone has one, please let me knowKarl wrote:Mmmm, a Transcendence debugger. That would be a nice tool for modders to have.

I was talking about the C++ debugger (in this case, MS Visual Studio).
In the next version, I've added an in-game command line window so that you can enter script code while the game is running. Sometimes this helps to see what variables are set, etc.
Ah, C++ under Visual Studio! Cool.george moromisato wrote:I was talking about the C++ debugger (in this case, MS Visual Studio).
I was just wondering what would be the best way to test out bits of script... and... THAT'S the best way.george moromisato wrote:In the next version, I've added an in-game command line window so that you can enter script code while the game is running. Sometimes this helps to see what variables are set, etc.

~
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!