Help With Coding and Things

ethanmh1999
22 Mar 2017, 16:41

Hi, I'm trying to create a Quest game and I'm not a super tech-savvy coder or anything so I need some help with certain actions inside of my game. There's quite a list of what I need and if anyone can provide me with any resources, I'd be really thankful.

-How to detect if something is in your inventory
-How to create a health and combat system
-How to get NPCs to respond to a true 'if' statement (in reference to the first item on the list)


hegemonkhan
22 Mar 2017, 16:58

start with the tutorial to understand the basics of using the quest GUI/Editor:

http://docs.textadventures.co.uk/quest/#Tutorial

then, this is not easy at first, but it is the "bread and butter" of programming/coding/game-making:

basic scripting: Attributes and the 'if' Script usage:

http://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk

and then, once you've got down Attributes and the 'if' Script, then we can go into what next to learn.


XanMag
22 Mar 2017, 17:53

How to detect if something is in your inventory:
Use an 'If' script and select "Player is carrying object" and select the object you want to check on, then run proper script.

Health:
Check the "Health" Box in the game --> features tab and use the increase player health or decrease player health scripts where appropriate.

Combat System:
Oh boy. You probably want to use Pixie's combat library I'm guessing.

NPC responses:
When an event occurs (say a mouse is seen in the kitchen), you would 'Set object flag' on the mouse (or any other suitable object. When you 'speak to exterminator (NPC)' then use an 'If' script to check to see if the flag is set. If it is, run your new script. If not, print original message response.

But, HK is correct. Make sure you go through the tutorial. Quest is really helpful but it is NOT magic. There is quite a learning curve but once you get comfortable, it goes much more smoothly.

If you have specific questions keep asking.


NecroDeath
22 Mar 2017, 21:46

my number one advice is to learn to use object flags as soon as possible, they will save you huge hassle, I managed to code my first game without them, but was damn hard work!


The Pixie
23 Mar 2017, 08:15

For combat, I have a library and tutorials if you are using the desktop version:
https://github.com/ThePix/quest/wiki/CombatLib

Or a tutorial for the web version (which cannot use custom libraries):
https://github.com/ThePix/quest/wiki/The-Zombie-Apocalypse-(on-the-web-version)