Hard Light Productions Forums
Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: stargatefreak92 on August 31, 2016, 12:48:43 pm
-
I'm currently working on making some missions, before actually diving into modding. However, I'm using the cheats a lot to test the missions safely (and yes, to have some fun now and again). However, it's a pain to have to type "www.freespace2.com" each time. Is it possible to create a script that either enables the cheats, or create custom cheats? This is specifically for invulnerability and destroy the targeted ship. A cheat menu, similar to the command menu, would be nice.
I have some knowledge of Lua, but not in combination with FS2 Open, so I have no idea where to start. I've read the pages in the wiki, but can find no references as to how I can get a reference to the player or targeted ship, and set it to be invulnerable, or destroy it.
-
You can just set up an event in FRED to make the player invulnerable when you press one.
Same goes for making your target invulnerable, or blowing up your target, but those will be slightly more complicated (you might have to use argument lists, which you might not be familiar with yet).
No LUA required.
-
I'll admit though, a small mod to bring up a cheat enabling menu could be really nice to have around at this point.
-
You can just set up an event in FRED to make the player invulnerable when you press one.
Same goes for making your target invulnerable, or blowing up your target, but those will be slightly more complicated (you might have to use argument lists, which you might not be familiar with yet).
No LUA required.
While that might work, it would be better if it wasn't embedded into a mission, as I would have to add that to every mission, and then remove it when I'm finished, which I might overlook.
-
You could just call these events "CHEAT 1", "CHEAT 2", etc. so they would be perfectly visible in Events editor...
-
Alternatively, debug builds (including fast debug builds, which recent nightlies have, which have debug functionality with release optimization so that they don't run super-slow) allow you to use cheats (and some special debugging commands) without having to type an enabling code. They also have a debug console which gives access to further functionality which can be useful when developing a mission.
-
Alternatively, debug builds (including fast debug builds, which recent nightlies have, which have debug functionality with release optimization so that they don't run super-slow) allow you to use cheats (and some special debugging commands) without having to type an enabling code. They also have a debug console which gives access to further functionality which can be useful when developing a mission.
Thank you. I just figured out how to open the debug console. I must have done something wrong the first time I used the debug build, because the cheats or console somehow didn't work back then. Though I am getting a few warnings, but those can be ignored I guess.
-
Though I am getting a few warnings, but those can be ignored I guess.
The whole point of doing development in debug builds is to fix warnings; of course, if you're only working on a mission and the warnings are with somebody else's mod, there's not much you can do about them, but if the warnings are being generated by your mission, you shouldn't ignore them.
-
Though I am getting a few warnings, but those can be ignored I guess.
The whole point of doing development in debug builds is to fix warnings; of course, if you're only working on a mission and the warnings are with somebody else's mod, there's not much you can do about them, but if the warnings are being generated by your mission, you shouldn't ignore them.
I'm aware of that, but in this case they were warnings caused by FS1-Port. It had something to do with incorrect detail levels for certain ships, and happened when those ships were being loaded, either by FRED or the game.
Obviously, if they were caused by my missions, I would try to solve them :nervous::nod:.