Killing "Undo" ....for.ev.ver.

Anonynn
Is there a way to disable undo from the player commands? I figured going into the filter and searching undo and deleting the code would likely be the best way....but for testing purposes I would like a way to disable and re-enable it as I please.

Thank you in advance!

lightwriter
Maybe somehow use a boolean and if statement... Basically, edit the code of the undo where it's surrounded by an if statement when a certain boolean is set true (or false) and then do an else statement to print a message.

HaganeSteel
undo.png


Click Filter on the bottom left.

Click Show Library Elements.

Click on Commands and search for Undo.

You can delete it altogether or click Copy so that you can edit it.

My advice would be to delete where it says "undo one transaction." To reinstate it, enter code view and type: undo.

Edit: Lightwriter's suggestion is fantastic.

I did this:

if (player.GM = 1) {
undo
}
else {
msg ("Nothing happens.")
}


This can be copied to the "undo" script. Just use code view.

What I did was assign the player object an attribute called GM. GM is an integer. If I set this integer to 1, I can use undo. If it's any other number, it displays "Nothing happens" instead.

You can make this a boolean or whatever you want. It would then be:

if (player.GM = true) {
undo
}
else {
msg ("Nothing happens.")
}

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums