#No Pickup

1 messages · Page 1 of 1 (latest)

weary plover
#

no he prints the object

hollow canyon
#

What the

weary plover
#

which the vanilla also does by default

hollow canyon
#

Coooll

#

Everyone can see this?

#

First thread! So much useful info on this thread yes yes

weary plover
#

@tulip knot your function isn't fired

tulip knot
weary plover
#

try printing a message like "OnObjectAboutToBeRemoved"

tulip knot
#

I did print an actual IsoObject beforehand, it is fired and printed on each cursor hover.

weary plover
#

on different point

tulip knot
#

I see now

#

Wonder why its not firing then, meanwhile the handle seems to be processing test results.

#

Might have to fallback to mouse events which is yikes.

weary plover
#

If you want it to change for all objects it should be possible with something like
getSpriteManager():getSprite("..."):getProperties():UnSet("Moveable")

tulip knot
#

Nope, getSpriteManager() doesnt seem to be implemented yet.

#

Tried to get it from IsoCell:getSpriteManager() it fails at callstack immediatly by just the method name.

#

So gotta find another way.

hollow canyon
#

Try without isocell

tulip knot
#

no i meant i tried both.

#

static method fails too

hollow canyon
#

I just noticed we dont have a guides for modding annotated maps and meta events

weary plover
#

No Pickup

tulip knot
#

Callframe at: getSpriteManger its simply not implemented or requires something as argument to work

#

but I don't see any definitions in TS defs

hollow canyon
#

Check the docs

#

Ow

tulip knot
#

PipeWrench actually does say there should be a string.

#

At least I suppose the string is sprite name

weary plover
#
getSprite("solarmod_tileset_01_8"):getProperties():UnSet("IsMoveAble")
tulip knot
#

So..


--getSpriteManager(""):getSprite("fixtures_counters_01_5"):getProperties():UnSet("Moveable");
getSpriteManager(""):getSprite("fixtures_counters_01_5"):getProperties():Clear();

UnSet() didn't work for movable. To be sure I performed Clear() to be sure I wipe any possible property.
It did affect the sprite, making it not being able to be placed a z+1 tile, meaning I did access it. But clearing didn't remove it from being picked up.

weary plover
#

seems to nuke everything moveable

#

see example above

tulip knot
#

Lets see

weary plover
#

you'll need to add the other faces if it has the effect you want

tulip knot
#

That didnt do much to my case.

weary plover
#

it says cash register

#

your spritename goes to a counter

tulip knot
#

oh wait

#

sec

#

Worked like a charm

weary plover
#

don't ask me how to set it back though, I couldn't do it when I was trying

#

@hollow canyondid you find a way for that?

tulip knot
#
getSprite("location_shop_accessories_01_1"):getProperties():UnSet("IsMoveAble");

Completely disabled Pick Up ability

#

Next question is how to stop them from being disassembled too.

weary plover
#

similar way should work

#

s.canScrap = props:Is("CanScrap");

#

so UnSet("CanScrap")

tulip knot
#

Where do you find all sprite properties by names?

#

nvm

#

getPropertyNames(): java.util.ArrayList<string>;

hollow canyon
#

To set it back? Hmm i dont think so cuz i never needed to undo since it only applies to players with believer trait

tulip knot
#

Update: You can set sprite property back this way
getSprite(sprite):getProperties():Set(p, "", toggle);

Set() seems to work if you suffice it with empty string and bool after property name.

weary plover
#

ok but does it work with "IsMoveAble"

#

not sure if I tried both empty string and bool together so I'll save this for later