Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Grapefruitologist on Thu 02/02/2006 19:29:09

Title: Pushing something over, disabling an object... (SOLVED)
Post by: Grapefruitologist on Thu 02/02/2006 19:29:09
Ok, I have two questions.
First, how do you make something get pushed over when you click "push"? I tried "any click on object" and added an action there, but that means that now if you just look at it it gets pushed over. (I'm using the MI gui)
Second, there's that option, "switch an object back on," but how can you disable an object again?
Title: Re: Pushing something over, disabling an object...
Post by: Ashen on Thu 02/02/2006 23:07:31
If you're using Proskrito's MI template, you use UsedMode(..) to tell which mode was used, e.g.:
if (UsedMode(PUSH)) {
  // Do stuff
}


If you're using one of the other MI style GUIs out there, there'll be some variable that does the same job. (And if you've made your own, you might want to include such a function/variable.)
Whatever way you use, this would go in the 'Any click' interaction.

To turn  an object off again, there's the 'Object - Remove an object from the room' interaction (3 above 'Object - switch an object back on'). To set an object to initially off, uncheck the 'Object is initially visible' box on the object editor window, or you can turn it off in 'Player enters sceen (before fadein)'. Scripting uses the Object.Visible property.
Title: Re: Pushing something over, disabling an object...
Post by: Grapefruitologist on Fri 03/02/2006 01:40:10
Where do I put that code?
EDIT: Thanks, I can disable stuff again now.

EDIT EDIT: I have a third question now. I made an animation for a character, but the speed is really off... he's moving even before his foot is on the floor. Is there a way to make the character move only when both his feet are on the floor?
Title: Re: Pushing something over, disabling an object...
Post by: Barbarian on Fri 03/02/2006 09:53:32
From the AGS editor's "General settings", click to put a check-mark to enable the "Use anti-glide mode" setting.  That might resolve the last question you had.   Though using that option, you may find you may now need to re-adjust the characters speed settings.
    Not sure if that's what you were asking about, but, give it a try and see if it helps.
Title: Re: Pushing something over, disabling an object...
Post by: Grapefruitologist on Sat 04/02/2006 04:38:08
It's fixed now, thanks. =)