How would I make something like this work in GDevelop?
Use a raycast from player to each enemy/other player, and check whether they’re obscured.
Set “z” value of your shadow sprite higher than the object.
Eh? When using a light object, the shadow is not a sprite.
What shadow sprite? I just have a light that follows my player around.
How would I go about doing that?
In my game the shadows cover the enemy players, but doesn’t actually hide them like I’m trying to do:
Oh yeah sorry, I got the question wrong. Btw I don’t have light objects in my gdevelop, how do I add them?
To add a light click ‘add a new object’ then select ‘light’
For an alternate option:
- Install the Sprite Mask extension.
- Edit it to change the object parameter from “Sprite” to “Any Object”
- Add all of the objects you want hideable to an object group, like “CanBeHidden” or whatever you prefer.
- Mask those objects with your light object. They will only be visible when they are lit up.
4 Likes
Nevemind, I uninstalled and reinstalled Gdevelop, I have my light object now
1 Like