Pushing something over, disabling an object... (SOLVED)

Started by Grapefruitologist, Thu 02/02/2006 19:29:09

Previous topic - Next topic

Grapefruitologist

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?
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Ashen

#1
If you're using Proskrito's MI template, you use UsedMode(..) to tell which mode was used, e.g.:
Code: ags
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.
I know what you're thinking ... Don't think that.

Grapefruitologist

#2
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?
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Barbarian

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.
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

Grapefruitologist

#4
It's fixed now, thanks. =)
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

SMF spam blocked by CleanTalk