Console Print...

()Chaos_Red()

I'm Honestly Just Plain Stupid...
So I'm making a map since there was nothing better to do, and I was curious. How Do I print console commands with slade, or zone builder when the level starts. Like if i loaded into map 1, and it printed "Setlives 3".
 
So I'm making a map since there was nothing better to do, and I was curious. How Do I print console commands with slade, or zone builder when the level starts. Like if i loaded into map 1, and it printed "Setlives 3".
You want the game to automatically run console commands when you load a level? To do this, create a console script in SLADE (https://wiki.srb2.org/wiki/Console_script), and then use a linedef executor (https://wiki.srb2.org/wiki/Linedef_executor) containing linedef type 415 (https://wiki.srb2.org/wiki/Linedef_type_415) to run the console script.

HOWEVER: This does not bypass permissions needed to run console commands. For example, ignoring the custom map for a second, if you loaded the game normally with zero mods and tried to run "setlives 3", it would say "You haven't earned this yet." Now, if you used a console script in a custom map to run "setlives 3" it would do nothing but say "You haven't earned this yet." This is because console scripts are just a fancy way of having the player run a console command without their knowing. Bear in mind that loading a custom map from within Zone Builder (pressing F9 with the map open in Zone Builder) marks the game as modified, possibly bypassing this. But it would NOT work when loaded normally from within SRB2.

If you wanted to manually set the player's lives to 3 when the map begins without these restraints, using a Lua script is the better option.
 
You want the game to automatically run console commands when you load a level? To do this, create a console script in SLADE (https://wiki.srb2.org/wiki/Console_script), and then use a linedef executor (https://wiki.srb2.org/wiki/Linedef_executor) containing linedef type 415 (https://wiki.srb2.org/wiki/Linedef_type_415) to run the console script.

HOWEVER: This does not bypass permissions needed to run console commands. For example, ignoring the custom map for a second, if you loaded the game normally with zero mods and tried to run "setlives 3", it would say "You haven't earned this yet." Now, if you used a console script in a custom map to run "setlives 3" it would do nothing but say "You haven't earned this yet." This is because console scripts are just a fancy way of having the player run a console command without their knowing. Bear in mind that loading a custom map from within Zone Builder (pressing F9 with the map open in Zone Builder) marks the game as modified, possibly bypassing this. But it would NOT work when loaded normally from within SRB2.

If you wanted to manually set the player's lives to 3 when the map begins without these restraints, using a Lua script is the better option.
Thanks for helping me. Though i'm new to coding, and I a bit confused. can you possibly explain a bit more...
Post automatically merged:

Thanks for helping me. Though i'm new to coding, and I a bit confused. can you possibly explain a bit more...
Nvm I found a way, Thanks.
 
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top