Little help for a newbie?

Marzipan
First off: Hi I'm new, love the site, love the community and so on and so on. :D I'm familiar with playing parser IF but have never successfully written my own game before, and I'm hoping I'll be able to change that soon.

The problem is I'm hopeless at scripts and functions and all that. As of today I've figured out how to create some rooms and objects verbs and that's about it.

I'm sure I'm going to be begging for all kinds of help even for this tiny test game, but the specific issue I'm having right now is that I've got an object, and I want to make its description change several times based on the player's progress through the game.

I'm pretty sure I need to make the player triggering certain events set a variable, and then change the description based on that variable, but...I have no idea how to actually do any of that. :oops:

OurJud
Well you already sound like you know more than me, talking about the use of variables and such, and I've posted so many requests for help I'm surprised I haven't been booted yet. Joking aside, they're a very helpful bunch and I'm sure will come up with the goods.

I would probably go about your problem in a ridiculously elaborate way (if I could do it at all, that is) and I certainly wouldn't advice you followed it.

Have you looked at setting timer scripts or turn scripts?

What I can say is, you'll probably need to be a bit more descriptive with your problem. Do you want the object to be different each time the player types "look at [object]"? Do you want it to be different each time they enter the room?

Marzipan
Well, I'm vaguely familiar with the concept of variables and triggers from a CYOA site I used to hang out at, but I'm afraid my understanding never really got past, '1.) ask for help on the forums' 2.) 'copy and paste the answer into the little box' :P

And to be more specific, I'm wanting the object description to only change after certain events happen or puzzles get solved.

Marzipan
Hmm.

Okay, I'm stumbling blindly around in the status attribute section now, I might possibly be able to rig something workable together here. Fingers crossed!

george
welcome Marzipan. This one is actually a little non-obvious for a Quest newcomer, but it's set up this way so that you can easily switch player characters during the game.

Follow these basic steps and change as necessary:

1. click on the player in the left hand directory, click on the Features tab, then select 'Player can become this object'. You'll see a Player tab appear.
2. write whatever default/starting description you want in the box in the Player tab.
3. now go to the Attributes tab. If you look in the Attributes pane down at the bottom you'll see the first few attributes in non-greyed out text. One of them will be your starting description with a name of pov_look. Notice the underscore; however, the actual name of the attribute to use in your scripts is not pov_look, but game.pov.look
4. so, you can add a new attribute to the player called whatever you like, and then when the time comes run a script that changes game.pov.look to the value of your new attribute.

(I'm not sure why you can't use pov_look, maybe I don't understand everything correctly, but this is how it works).

Marzipan
Thanks for the response George, but I'm very tired right now so I think I'll have to attempt that in the morning.

Meanwhile I figured out a temporary fix in the hackiest way possible: I created object2, object3, etc, gave them identical names and set them to be swapped out with the original object every time I needed a new description.

Marzipan
Two more quick questions before I head off for bed:

1.) Is there some trick to using apostrophes in a room name that will let me work around that 'invalid element' message?

2.) If I've started my game in the web editor is there an easy way to move it over to the desktop version instead? There's that annoying delay every time I add a room or an object and I keep getting random errors, kind of makes me nervous about continuing to work online.

george
Oops, somehow I misread your first post as asking how to change the player's description, sorry!

For 1), yes, give the room an alias (in the Setup tab for the room) with the apostrophe. That will be used instead of the 'name' of the room. Refer to the 'name' in code however, not the alias.

For 2), yes, I think you can download the file in the main My Games screen (not while editing the game itself I think).

jaynabonne
You don't need to create different objects. Just change the description attribute of your existing object. That's assuming you only want to change the description. If you want to change other things as well (e.g. script behaviors), then keep going as you are. :)

The Pixie
This has come up a couple of times recently, so I thought I would put a tutorial in the libraries and sample codes forum.

viewtopic.php?f=18&t=4807

OurJud
Marzipan wrote:2.) If I've started my game in the web editor is there an easy way to move it over to the desktop version instead? There's that annoying delay every time I add a room or an object and I keep getting random errors, kind of makes me nervous about continuing to work online.

I found myself in exactly the same boat. Luckily I decided to switch before I'd put a lot of work in, so simply had the desktop version open alongside my web one and 'copy/pasted' it over. The desktop version isn't the most stable thing I've ever used, but better and quicker than the web version.

I'm sure the download option that george talks of is the way to go, though. It's just that it never occurred to me.

Marzipan
OurJud wrote:
I found myself in exactly the same boat. Luckily I decided to switch before I'd put a lot of work in, so simply had the desktop version open alongside my web one and 'copy/pasted' it over. The desktop version isn't the most stable thing I've ever used, but better and quicker than the web version.

I'm sure the download option that george talks of is the way to go, though. It's just that it never occurred to me.


Yeah he pointed that out just in time, I was just fixing to start copying and pasting myself, but downloading worked fine.

The Pixie wrote:This has come up a couple of times recently, so I thought I would put a tutorial in the libraries and sample codes forum.

viewtopic.php?f=18&t=4807


Holy moley, thanks for this! You are a lifesaver! :D Bookmarking so hard, I'm sure I'll need to refer to it plenty of times in my game-writing career. I just made a dummy command that increased the expression by +1 every time and it worked perfectly.

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

Support

Forums