New to this: Simply getting a custom "jump" verb to go without typing "self"

ritaclare
So I want there to be a silly easter egg in my game, where if you just type "jump" you get a funny ending and automatically win the game.
Under my Player verbs, I have "jump" as a verb, with a script running to first show a message, and then end the game. But when I type "jump" in to the game, it just reads "You jump, but nothing happens." But if I write "jump self" it runs it just fine and ends the game. I've only just started at this this morning, and have been on it for most of today, so I'm still getting the hang of it. Any tips on how to have these basic player verbs work out without typing "self"? Thanks!

HegemonKhan
There's a way to synchronize~connect Verbs and Commands, but it's way too confusing+advanced for me... (I think it was Pixie that I saw doing this in one of his~her libraries)

so instead of your adding~creating of a Verb on your 'player' Player Object,

create~add a Command:

Commands are like Verbs (technically Verbs are actually a subtype Command), except they're not tied to specific Objects as Verbs are, and also they take~use (and are activated~selected by the) input from the person playing the game, so no hyperlinks in the left big text pane (unless you use Text Processor Commands to put them there, lol) or not any 'verb buttons' on the 'object~inventory' panes on the right

'tree of stuff (Elements)' :

Objects
-> game
->-> Verbs
->-> Commands <------- click on this, and click on 'add' button (to add~create a global Command, which is what you want)
-> room
->-> player
Functions
Timers
Advanced
-> Object Types
-> etc etc etc

Command Name: jump_command // or whatever you want to call it, names must be unique, no two names can be the same

Command Pattern: jump // this is the syntax~format for what+how you type in your input during game play, to activate~select this Command (and when you're ready, to can also include input VARIABLES:Parameters to be used as well, but not for now, unless you're already ready for them, lol)

Command Script(s): (see below)

add the same scripts as you did for your Verb: 'msg ~ print a message' Script and the 'finish ~ end game' Script

----------

and during game play, all you got to do is to type into the command~input bar at the bottom of the screen:

jump

for it to activate~select~execute~run the above Command

ritaclare
Thank you thank you!!! It worked!!

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

Support

Forums