yeah you could do it that way. the only problem with that is that you can't then stand in front of it to pick it back up again!
alex did a brief 'how to' here: https://www.yolkfolk.com/dizzyage/articles/howto_player.html#trampoline suggesting a couple of ways.
I did it a different way in MSD with the Standing stone. you can move a 'static' object within the same room, however you can't move a static object outside of the original room. If you try to then it probably won't be static anymore.
it's rather complex tbh,, but here is how it was done in MSD. basically i had three tiles that made up the item. the stone, which is a dynamic object (obj 2051) that is visible, but cannot be picked up. a static object (brush 2052) that isn't visible, but mirrors the position of the dynamic object exactly, and a dynamic object (obj 1016) that isn't visible, but is actionable, which is positioned around the outside of the actual item, so that dizzy collides with it whereever he is stood next to the block.
the actionable object (obj 1016) is set so that it mimics the action af adding an item to the inventory when dizzy 'actions' it (it actually puts obj 2051 into the inventory), and disables the block (brush 2052) and trigger (obj 1016), when actioned. Then when you drop it, it drops the item, finds where the item is dropped in the map, and sets the block (brush 2052) and trigger (obj 1016) to the relevent positions relative to the block.
the following code replaces the first part of function DoPickupObject(idx) in action.gs (changes are in red). this uses object 1016 in the pickup code to mimic picking up object 2051, even though obj 2051 isn't an item:
func DoPickupObject(idx)
{
class = ObjGet(idx, O_CLASS);
[color="Red"]id = ObjGet(idx, O_ID);
//allow object 1016 to be picked up, even tho it isn't an 'item'
if(class==CLASS_ITEM[color="#ff0000"]||id==1016) // items are to be picked up in the inventory
{
ok = InventoryAdd(idx); // add item to inventory and return 1 if success or 0 if inventory is full
if(!ok) // inventory is full
{
OpenDialogMessage("YOUR HANDSnARE FULL!");
return;
}
[color="Red"] //if object 1016 is picked, disable all associated brushes + objects
id = ObjGet(idx, O_ID);
if(id==1016)
{
block = BrushFind(2052);
BrushSet(block,B_DRAW,0);
idx = ObjFind(2051);
ObjSet(idx,O_DISABLE,1);
ObjSet(idx,O_CLASS,0);
idx = ObjFind(1016);
ObjSet(idx,O_DRAW,0);
GameCommand(CMD_REFRESH);
}
SamplePlay(FX_BEEP1);
ObjSet(idx, O_DISABLE, 1); // disable object (picked up)
idx = OpenDialogInventory(1); // open inventory and don't select an item; return selected item or -1
if(idx!=-1) UseObject( idx ); // must use/drop something
}
The following code is used in game.gs and is used to action the trigger pick up (obj 1016), and drop the item (obj 2051):
/////////////////////////////
//block
/////////////////////////////
func ActionObject_2051()
{
//mimics picking the item up, even tho it isn't an item
idx = ObjFind(1016);
DoPickupObject(idx);
PlayerEnterIdle();
}
func DropObject_1016()
{
//check to make sure the player is stood on block material before dropping.
//this avoids the player dropping it again straight from the menu in the
//last 'safe' position, which could have been on top of the block...
x = PlayerGet(P_ X) -8;
y = PlayerGet(P_Y)+4;
w = 16;
h = 8;
rw = GameGet(G_ROOMW);
rh = GameGet(G_ROOMH);
//only action if material below player is solid
if(MaterialCheckFree(x%rw,y%rh,x%rw+w,y%rh+h)==0)
{
//find position block should be in
x = PlayerGet(P_ X) -8;
y = PlayerGet(P_Y)+PlayerGet(P_H)/2-16;
//draw the static hidden brush.
block = BrushFind(2052);
BrushSet(block,B_DRAW,2);
BrushSet(block,B_X,x);
BrushSet(block,B_Y,y);
GameCommand(CMD_REFRESH);
//draw the dynamic hidden object.
idx = ObjFind(2051);
ObjSet(idx,O_DISABLE,0);
ObjSet(idx,O_CLASS,1);
ObjSet(idx,O_X,x-8);
ObjSet(idx,O_Y,y-8);
//draw the dynamic 'item' object.
idx = ObjFind(1016);
ObjSet(idx,O_DRAW,3);
DoDropObject(idx);
}
}
i know it looks complicated, but there isn't really any other way of easily doing it, and unfortunately you can't move static brushes out of their original room, so it's not much use if you want to use it in a few rooms.
if you need any of the code explaining further, please ask.