Detecting current act?
18 years 5 months ago #18819
by JT
_______________
Surgeon-General's Warning: Early test cases of Torn Stars have resulted in fatalities. The errors in the software should be gone by now. Hopefully.
Detecting current act? was created by JT
Hey guys. I've been writing a little mod for EoC which adds random commodity-for-commodity trades to the trade centre. I ran into a dilemma: during the Prelude / Act 0, Young Cal powers up the base and gets access to the Trades screen. At this point, I don't want the trades to be visible, so I don't want to add trades to the screen until Act 1 (in Act 1, Cal is grown up and freely able to conduct trades).
I dug through the include files for a while, searching for a function that would help, but couldn't find anything. Instead, I thought of what I thought was an ingenious solution: just check to see if the player has pirated any cargo, using iScore.PodPiracyCount(), because the player can't pirate anything as a kid.
Unfortunately, EoC crashes whenever that function is called, at least in the base...
Does anyone have any other solutions?
_______________
"The art of flying is to throw yourself at the ground and miss." --Douglas Adams
I dug through the include files for a while, searching for a function that would help, but couldn't find anything. Instead, I thought of what I thought was an ingenious solution: just check to see if the player has pirated any cargo, using iScore.PodPiracyCount(), because the player can't pirate anything as a kid.
Unfortunately, EoC crashes whenever that function is called, at least in the base...
Does anyone have any other solutions?
_______________
"The art of flying is to throw yourself at the ground and miss." --Douglas Adams
_______________
Surgeon-General's Warning: Early test cases of Torn Stars have resulted in fatalities. The errors in the software should be gone by now. Hopefully.
Please Log in or Create an account to join the conversation.
18 years 5 months ago #15286
by mdvalley
Replied by mdvalley on topic Detecting current act?
You could use iEmail.InboxSize(). As the game progresses, that thing fills right up, and as near as I can tell, there’s no way for poor Cal to delete all the spam he gets. I’d figure that would be safe to call in-base.
Please Log in or Create an account to join the conversation.
18 years 5 months ago #15289
by JT
_______________
Surgeon-General's Warning: Early test cases of Torn Stars have resulted in fatalities. The errors in the software should be gone by now. Hopefully.
Replied by JT on topic Detecting current act?
Yep, that did the trick!
_______________
"The art of flying is to throw yourself at the ground and miss." --Douglas Adams
_______________
"The art of flying is to throw yourself at the ground and miss." --Douglas Adams
_______________
Surgeon-General's Warning: Early test cases of Torn Stars have resulted in fatalities. The errors in the software should be gone by now. Hopefully.
Please Log in or Create an account to join the conversation.