Non-threaded

Forums » Newbie Central » Read Thread

Introduce yourself and get to know the community.

Where to start

14 years ago

what article should i start with if i want to learn how to script?

Where to start

14 years ago

The Basics of Scripting is the best article to start with when learning. Good choice for learning to script, you can do so much with it. It's a bit tricky to learn at first but scripting eventually becomes second nature to you, so persevere if you're having trouble. If you need help just ask me or JJJ (probably better to ask JJJ, I haven't scripted in years so I'm a bit rusty).


Where to start

14 years ago
Yea. Exactly what October said. That's how I started out. Its not as hard as it seems initially, so stick with it. You can always ask me questions too, if you like. Or post them on the advanced editor forum.

Where to start

14 years ago
Make sure you ask SPECIFIC questions. Scripting cannot be learned with general questions. The best way to learn is to try and accomplish something specific. Here are some very brief concepts:

Link Scripts are scripts that fire when links are clicked. Each link can have a link script associated with it. Link scripts CAN modify variables or change the text of the link or the destination of the link or a variety of other things.

Page Scripts are scripts that fire when a page is loading. Each page can have a page script associated with it. Page scripts are usually used to modify the text on the page. Page scripts cannot modify variables.

Global link scripts are link scripts that fire on EVERY LINK.
Global page scripts are page scripts that fire on EVERY PAGE.

Those are some real basics. Like I said, specific questions are what you need to ask if you want to learn scripting.

Where to start

14 years ago

it doesnt seam as hard as i was expecting, little confused on page scripts though.

Where to start

14 years ago
Be more specific. What about them?

Where to start

14 years ago

I hate to be wishy washy, but i'll get back to you on that.

Where to start

14 years ago
No worries. I'm just trying to cement the idea of really crystallizing a question. The moment you can do that, you're 75% of the way to learning what you're trying to learn.

Where to start

14 years ago

 

Ok, I’ve made a final decision, and should I not continue with it, and follow through on it, you all have my permission to scold me harshly. I have decided on a story I at first planned never to do, because its plot would be predictable, and I am not skilled enough to make the events to seem natural. Now I have decided to play upon that, and mold random events into the story using scripting. To do this I will need to know how to script, and as questions come up I will post them here. I have read the basics of scripting by alexp, he did a very good job on it, and I am not certain of what the term ELSE means in scripting. There are more questions to come I assure you.
 
IF %FLASHLITE = 1 THEN %FLASHLITE := 0 ELSE %FLASHLITE = 1
 
This is the example alexp used, now the if then statement means that if the variable flashlight does not equal 1, then make it equal 1. while if it already equal to 1, as else statement says, make it equal to zero. Meaning that ELSE means that should the if than statement isn’t relevant, do this?

Where to start

14 years ago

lol 3J you have proved correct, in asking that question i think i answerd my own question.

Where to start

14 years ago
Yeah that's a poor example. Let's do it a little differently:

IF %JETPACK = 1 THEN %ALTITUDE := 50000 ELSE %ALTITUDE = 0

So, if the jetpack variable is equal to 1, then the altitude is equal to 50000. If the jetpack variable does not equal 1, then the altitude is equal to 0.

Where to start

14 years ago
Whoops, missing a colon before the last = sign but you get the point.

Where to start

14 years ago

thats ok, my grammar was awfull and you knew what i meant.

Where to start

14 years ago
The other way is to format it like this:

IF %JETPACK = 1 THEN
BEGIN
%ALTITUDE := %SECONDS * 100
ELSE
%ALTITUDE := 0
END

So what this is saying is that if %JETPACK = 1 then the altitude will equal the seconds variable * 100 or if %JETPACK does not equal 1, then the altitude variable will equal 0.

I don't tend to put all of my script on one line as I think it's messier. I like to break it up like this. If you break it up out of the single line then you need a begin and an end statement like I've got there.

Where to start

14 years ago

ok is the * a symbol for multiplication?

Where to start

14 years ago
Yes.

* is multiplication
/ is division

Where to start

14 years ago
(* is as close to a filled in circle as you'll easily get on the computer, and a filled in circle is the symbol for multiplication once you get out of the habit of using an 'x' which is the stupidest fucking thing to ever teach kids to use. An x is a variable or a letter, it is not an operand.)

Where to start

14 years ago

ya i thought that was pretty dumb as well, all of the sudden X was something completly different and we were having little dots on our papers instead i got used to it though, for simple multi step multiplication i still use the X but the dot is alot better, for algebra and the like.

Where to start

14 years ago
I know longer use either as my trig teacher says "The higher you get in math they lazier we are with signs. Excuse me, I mean effecent." I only use parentheses now.

Where to start

14 years ago
edit- Know should be no.

Where to start

14 years ago
Parenthesis are more work than the dot, on occasion.

(3)(4) is harder than 3*4

Where to start

14 years ago
Yeah man, stop with the X. Get rid of it and never use it for multiplication ever again. If you put that onto your calculus assignment as an operand, you'd probably get a zero on the problem. It's best to get it out of your system completely right now, just be done with it.

Also, start drawing your t's with a tail and your x's as a little c joined at the center with a backwards little c.

t's like this: http://3.bp.blogspot.com/_aGatGSdnPFY/SwyFZmQ2jXI/AAAAAAAAANc/pSpkKSPu3lo/s1600/t-towel_letter.jpg

x's like this: http://www.shitalshah.com/?$%20%5CLARGE%20f(x)=2^x%5C%5C%20y=2^x%5C%5C%20x=2^y%20$

Then when you're doing multi-var calc, you never have to worry about letters getting mixed up and getting marks deducted for it.

Where to start

14 years ago
Honestly, I was told all of this by my dad back in highschool and I didn't listen but now I totally regret that. It took me ages this year to get my letters all sorted out and into the right habits. Start now, trust me.

Where to start

14 years ago

ok, thats exactly what i plan to do.

Where to start

14 years ago

 

Ok now I have read, basics of scripting, intermediate scripting, and Random Encounters/Events: A Scripting Scenario. What I want to accomplish is this, the character is in a bad spot trying to get somewhere accomplish his goal, but the figurative wall before him is a 7 day journey in unfriendly terrain. I want to make it to where what event happens each day is by pure chance, but I also don’t want there to be a possibility of the same event happening twice. Then once the days event is over there is a mildly generic resting section, where he sets up camp but depending on the variables, he says and does things differently. On the second day I want what happens to be again, random, but it also needs to be impossible that the same event will happen again.
 
i have a general idea as to how i would do this, but im not confident enough put it here shamefully, how would you go about doing this?
 
My idea is to at the very beginning of his generic morning, as soon as the player hits the "set out" link, one of like 50 events will start, and that even will be his entire day, which will end with a link of him making camp. on the next day another event will take place. so on so forth.

Where to start

14 years ago
Just doing some calc, I'll show a solution for this later :)

Where to start

14 years ago

What you could do, is have a variable for every single event (where min=0 and max=1), and when that event is initiated, the variable for that event equals 1, otherwise it is 0. So where you put in the scripting necessary to have the random event, you could have that if the event the random variable thing lands on equals 1, it would roll again, and so it would end on an event that hasn't appeared. At least I think this would work, or something like that.

Where to start

14 years ago

i started a variable test, and i relized i have no idea how to start this, i got to the window to put in my scripting and was like, thats great, now what the hell do i do. being able to read and understand script does not constitute as being able to use it.

Where to start

14 years ago

ok, i think i figured some of it out, it wasnt hard i just had to try.

when they click the "set out" link, the scripting for that link is

%EVENT := 1D50

then the easy thing to do would be to give the "set out" page 50 links, the links will only appear if you have their corresponding variable. then the script for that single link that will be open will say

%EVENT := 0

in this way i wont even need to use the $DEST scripting system i will however need like 51 variables for this alone.

Where to start

14 years ago

Instead of having a variable for each of the events to keep one from happening again, I can lock those event links so they can only be entered once,  and let there be two links available, one that is open because of the %EVENT and one that will reroll the 1D50. Meaning I would only need 1 variable for this to work.

Where to start

14 years ago
Sick solution, man. It's better than the one I was working on.

Where to start

14 years ago

: D thanks for all the help.

Where to start

14 years ago
um could help me make a story?

Where to start

14 years ago

Well, what do you need? make a new thread for this and tell us what you need help with more specifically and I'm sure sombody can help you.

Where to start

14 years ago

As a co-author or are you just looking for advice?

Where to start

14 years ago
co-author i cant finsh a story

Where to start

14 years ago

I'm on the list for possible co-authors, so I would be willing to help you out. Just add me as a co-author and we'll be in touch via PM's.

Where to start

14 years ago

I'll help with corrections and brainstorming ideas, but I can't write your story for you. The most important aspect of a writer is his imagination.

Where to start

14 years ago

If you want someone to be handy in correcting errors, you should pick Bo rather than me.

Where to start

14 years ago
Bo might as well be a grammar Nazi.

Where to start

14 years ago
i made a game

Where to start

14 years ago

I played it and the only advice I can give you is start over.

Where to start

14 years ago
Didn't even bother unpublishing that and just deleted it. No effort at all.

Where to start

14 years ago

And the version you read was the fixed version. He published a first one, I commented on it, he unpublished it, tried to fix it and published the version you read. So apparently, he tried to put effort into it.

Where to start

14 years ago
Five minutes doesn't count

Where to start

14 years ago

Well...let me rephrase that, he thought he was putting effort into it.