How would one program an item while while you were using it. Enemies passed right through you and you passed through enemies. But you couldn't pass through walls. All this in a Zelda like game?
What's vague about it? Ok, I'll ask it a different way. Let's say your playing Zelda. And there was an item that let you pass through enemies and enemies pass through you. What is a code or way using gamemaker to do that?
So for example add in the code for the collision event with walls for the player following code:
x=xprevious;
y=yprevious;
This will prevent the player from moving into walls. For moving objects such as enemies a more complicated code is required but let's assume enemies don't move either, give them following code:
if (global.itemused==false)
{
x=xprevious;
y=yprevious:
}
This will make you bump into enemies as well if global.itemused is false. Whenever you want to activate the item, set global.itemused to 1.
And then make it so the collision doesn't happen when the item is used? I'm guessing if the global thing is equal to 1, then collision false? Some enemies in this game will charge at you in narrow corridors or block pathways to other rooms, so this item is needed to beat the game, thank you