how do you make something animate or move when you use hand icon on it.(ex. press use on a drawer how do you make it open???)by the way i know its obvious i just dont want to search the manual.
To save you from the wrath of the moderators, let me just say that next time you post a question, read the manual. It would be a lot quicker to larn rather that waiting for an hour for someone to reply. ;)
Anyway, I barely ever use the interactions editor, but you can do that instead of scripting.
-Make an object for the closed door of the drawer.
-Make an object for the opened door.
-Place the closed drawer where you want the door to be.
-Place the other one where you want it to be when you open it up, and click "Not Visible"
Interactions Editor:
-Go to the interactions editor for the closed object.
-Click on "Object Off". Set the object to number for the closed drawer.
-Click on "Object On". Set it to the open drawer object.
Then, to close it, do the opposite.
Scripting
-In the Interactions Editor, click on Run Script.
-Add:
objectOn(x);
objectOff(x);
Where X is the oppropriate object number.
Actually what I would do is create one object called the drawer, but import two sprites; one open and one closed. I'd set it to the closed sprite.
Interaction Editor for Object 0:
Interact with Object
|-Run Script
In Room Script:
//put this at the top of the script:
int draw_open=0,draw_used=0;
#define DRAW_CLOSED 1 //Replace 1 with the closed sprite number
#define DRAW_OPEN 2 //Replace 2 with open sprite number
//And then your interact function, (may look slightly different.)
#sectionstart object0_a // DO NOT EDIT OR REMOVE THIS LINE
function object0_a() {
// script for object0: Use object
//Insert the following code into the function:
//(replace //yourcode with the code you wish to use.)
if (draw_open==0) {
SetObjectGraphic (0, DRAW_OPEN);draw_open=1;return;}
else if (draw_open==1) {
if (draw_used==0) {
//yourcode (the code that interacts with it when it's open; to get an inventory item or something
draw_used=1;return;}
else if (draw_used==1) {
//yourcode (the code that says "I've already done that", or something)
}
draw_open=2;return;}
else if (draw_open==2) {
SetObjectGraphic (0,DRAW_CLOSED);draw_open=1;return;}
}
#sectionend object0_a // DO NOT EDIT OR REMOVE THIS LINE
This should work fine, though I haven't tested it yet...
thanks that should help
i know this is dumb but how exactly do you make and "import" sprites??(im new too)
gary...that ones pretty obvious...use the sprites button on the left side toolbar running upwards. You can get sprites from a number of places but ask before using them in your game. I recommend the instapack from www.sypher.com/ig/
can you please give me another link???That one does not seem to work.
could anyone give me a website??i need to get started with my game.
sorry man...spelled it wrong...its spelled www.sylpher.com/ip
sure it is liar
Don't double post and don't be rude to ghostface! Btw, the the site is http://www.sylpher.com/ig/ I think ghostface spelled sylpher wrong.
im locking this beacuse gary was being a jerk. plus, if you don't even know how to make a sprite, ags may not be for you.
thank you ghostface for trying, and edwin for correcting the link
gary, please calm down, check out the manual, and check out the critics lounge for some tutorials, ideas and images to view.
perhaps checking out the RON game sprites would be good.
wow, it took me awhile, but i found the ron pack on shimbleshanks site
http://www.freewebs.com/skimbleshanks/gamepacks.htm