Help with mission code, please.

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
dvlenk6
Militia Captain
Militia Captain
Posts: 519
Joined: Sun Mar 05, 2006 6:56 am
Location: Sanctuary and beyond
Contact:

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
george moromisato
Developer
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.
User avatar
dvlenk6
Militia Captain
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 :) .
User avatar
Karl
Militia Lieutenant
Militia Lieutenant
Posts: 219
Joined: Fri Jul 14, 2006 11:47 pm

Mmmm, a Transcendence debugger. That would be a nice tool for modders to have. :D
~
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Karl wrote:Mmmm, a Transcendence debugger. That would be a nice tool for modders to have. :D
Yes it would! If anyone has one, please let me know :)

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.
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

woohoo! that would rock so much!
User avatar
Karl
Militia Lieutenant
Militia Lieutenant
Posts: 219
Joined: Fri Jul 14, 2006 11:47 pm

george moromisato wrote:I was talking about the C++ debugger (in this case, MS Visual Studio).
Ah, C++ under Visual Studio! Cool.
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.
I was just wondering what would be the best way to test out bits of script... and... THAT'S the best way. :)
~
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!
Post Reply