Enabling / Disabling Walk-Behinds or Ignore Walk-Behinds

Started by Nixxon, Wed 18/11/2020 04:29:39

Previous topic - Next topic

Nixxon

Hey Gang,

I note that Character.IgnoreWalkbehinds and Object.IgnoreWalkbehinds have been deprecated in version 3.5

- All functions that find room objects under screen coordinates are now being clipped by the viewport (fail if there's no room viewport at these coordinates). This refers to: GetLocationName, GetLocationType, IsInteractionAvailable, Room.ProcessClick, GetWalkableAreaAt and all of the GetAtScreenXY functions (and corresponding deprecated functions).

I've had a trot through the viewport sections in the reference Manual, but it's all a little abstract to me.

Is there an easy way to disable a walk-behind area using a simple script command in the room code?

Much love.

Slasher

For 3D 9
Code: ags

 SetWalkBehindBase(1, 0);  // Walkbehind1 set to 0 Baseline...may help

Crimson Wizard

#2
Hmm, viewports have nothing to do with walkbehinds, maybe there's some kind of confusion here.

If by "disabling" walk-behind you mean make them appear behind all other things, then simply change their baseline, as slasher pointed out above.

Alternatively you may also use Room Objects instead of a walk-behind (and also adjust its baseline).



I should also note that changing walk-behind's drawing order is a bit uncommon thing, as usually you would change character/object's baseline instead. Would you mind telling what is your use case? for maybe there is a simplier alternative.

Nixxon

Thanks Guys,

It's a bit of complicated scene.

The problem is that the walkbehind is affecting the object.

I've even created a new object in front, set it's baseline to 999 and it's still being masked by the walkbehind. Driving me a bit crazy at the moment.

I'll try and post a detailed image.

EDIT - Don't you hate it when you delete and object and pretty much kill your room script....

EDIT - I've imported a brand new object and that's worked as a temporary walk behind. Not sure what was wrong with the original object I was trying to use.

Basically, there's an object, then a character in front of that object, then another object in front of that.

Slasher

What is the baseline of the walkbehind?

Nixxon

Thanks Slasher,

The walk behind was working fine, setting the base will definitely help down the road.


SMF spam blocked by CleanTalk