I'm still looking for an example of coding for multiple choice questions in game. basically at this point I just want an npc or event to trigger a multiple choice question randomly from a list, then when the player picks a responce it tells the player wether he was correct, or false.
I've been looking around the site alot at demos and all that and I'm just not seeing and direct examples that could be modified to this purpose. THe daunting giant dictionary of commands is all that seems to maybe have what I need to get to my solution and I am a newb so that's just taking me quite a while to digest, but even telling me what part of the dictionary to look in would be helpful thanks.
Mike
ID:163048
Oct 20 2007, 8:39 am
|
|
Oct 20 2007, 11:37 am
|
|
In response to DivineO'peanut
|
|
thanx that works, I wasn't quite sure what test_paper was referring to and how to define it, so I just made it /mob/verb/pop_quiz() for now to make it a user command, I'll play with it and see if I can get it to output a random quesstion and get it to be a mob triggered event, and what not, with rewards and penalties. But hey thanx alot, I've been stumped trying to find the various peices for that coding.
Mike |
In response to Kichimichi
|
|
Uhm, test_paper was the name of the object, that's just an easier way to kick it down. But you would probaly recognize it as
obj |
In response to DivineO'peanut
|
|
SO I've gotten to the point where correct answeres are rewarding gold and experience, now if I can figure out how to get a large question list to be drawn from randomly so it's not always the same question, I should be able to insert it anywhere I want to make it a key game mechanic.
Mike mob/verb/pop_quiz() |
In response to Kichimichi
|
|
That may be a bit more complicated. You want a multi-dimensional associative list, whereas the format is <code>"question content"=list(list(answers),correct answer)</code> may require you to parse it a bit.
Seeing as you seem like the learning type (and not the ripping type), I'll supply you demo code: var/list I also suggest you do some research on lists and the <code>pick()</code> procedure. |
In response to DivineO'peanut
|
|
Hey thanx alot, yeah im getting along with it, figuring out what works and what doesn't. I def want to be able to write my code all myself, just difficult to get past the first tutorials to the next level of them, they seem to go from really basic right into anthologies of code explanations, and the DM guide is kinda like learning chinese by looking at a dictionary but hardly ever seeing it used in example. To a certian extent I suppose I am ripping since, I'll take what in english would be
"the dog went down the road" and converting it to "the man went up the hill" while much of what I'm doing is not from absolute scratch, I can't simply learn by definitions and leet speak discriptions, I have to sometimes get a jump ahead with an example tha shows where things work, and then I can figure out why playing with it and using some of this to go here and there. I certianly wouldn't want to rip someones game model or sprites, or the basic mechanics though, I want what I make to be unique and I have unique desires for my projects, and so regardless of how choppy my code is my product will look very original, and I'll try my best to know what I'm doing but then man must first learn to crawl, then he can think about walking flying and being a god. Mike |
In response to Kichimichi
|
|
var/list got it to initiate a verb when the correct answer was spit out but I can't add more questions to the list yerg >< tried just repeating the format and got a "topmost and expected } error, no idea what that means Mike- |
In response to Kichimichi
|
|
Wow spent an hour figuring out that the extra elipse comes only at the end of the list, what a dork i am.
Mike |
Let me know if you're interested in checking out the game as it progresses I'll upload the file or email it to you. It's coming together finally, I don;t have rewards for gameplay yet like levels or items to buy, but you can run around killing mobs and collecting exp at this point.
Mike |
In response to Kichimichi
|
|
I prefer playing games when they are complete. Thanks for the offer though!
|
In response to DivineO'peanut
|
|
I'll make an NPC named DivineO'peanut in your honor for all the help anyhow. So far I've got the mobs moving randomly, statpoint rewards per level, stats that improve attack dmg and HP amounts, change weather in game, have to use the quiz questions to attack if the answer is wrong it hits the player with feedback damage,
atm I'm working on getting the npc's unique stats and abilities (I have it set kinda retarded all the mobs including the client us the same skeleton to start on, and it's somewhat ugly trying to get the game to let me back out of that lol) looking for ways to set up a shopkeeper and other NPC's, maybe quests, equipable items, buy sell trade ect. at least for now it's kinda fun the way it is and I can get a pile of my study questions for school loaded in, great study aid much more fun than flashcards heh Mike |